如何将 IP 范围与接口关联

如何将 IP 范围与接口关联

如何将 IP 范围与特定接口关联。我有多个 Vlan,到今天为止,我已经使用了 1 个 IP 范围,但我需要将 IP 范围增加到第二个 Vlan。

我的前几行配置

   ddns-updates off;
    #ddns-update-style interim;
    ddns-update-style none;
    ignore client-updates;


    allow bootp;
    allow booting;
        shared-network siec {
                subnet 192.168.80.0 netmask 255.255.255.0 {
                        authoritative;
                        option routers          192.168.80.1;
                        option subnet-mask      255.255.255.0;
                        option domain-name              "aaaa.prv";
                        option domain-name-servers      85.22.22.14, 85.22.22.2;
        #               option domain-name-servers      192.168.0.1, 85.22.22.14;
        #               option domain-name-servers      192.168.0.1;
                        option netbios-name-servers     192.168.0.2;
                        default-lease-time 86400;
                        max-lease-time 172800;
                        range dynamic-bootp 192.168.80.2 192.168.80.50;
                        option ntp-servers 192.168.0.2;
        }

        host tel_testowy {
               hardware ethernet cc:cc:cc:cc:cc:cc;
               fixed-address 192.168.80.51;
        }

                subnet 192.168.0.0 netmask 255.255.254.0 {
                        authoritative;
                        option routers          192.168.0.5;
                        option subnet-mask      255.255.254.0;
                        option domain-name              "222.prv";
                        option domain-name-servers      85.22.22.14, 85.12.22.2;
        #               option domain-name-servers      192.168.0.1, 85.14.22.14;
        #               option domain-name-servers      192.168.0.1;
                        option netbios-name-servers     192.168.0.2;
                        default-lease-time 86400;
                        max-lease-time 172800;
                        range dynamic-bootp 192.168.0.110 192.168.0.150;
                        range dynamic-bootp 192.168.1.100 192.168.1.200;
                        option ntp-servers 192.168.0.2;
}
# VMWare

host v8_backup_ip {
       hardware ethernet 00:50:56:7A:75:9C;
       fixed-address 192.168.0.158;
}

并且我的计算机位于 192.168.80.0 网络后面的 vlan 中,从动态范围 192.168.0.0 网络获取 192.168.1.115 ip。您知道我应该如何更正此配置才能正常工作吗?

答案1

DHCP 将仅分配与接口子网匹配的 IP。

因此,如果您有 192.168.0.0/24 和 192.168.123.0/24;则您需要在 DHCP 中设置两个范围,每个范围一个,它将自动匹配它们。

相关内容