Dhcp
如何將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。你知道我應該如何更正這個配置才能正常工作嗎?
DHCP 只會分配與介面的子網匹配的 IP。
所以如果你有 192.168.0.0/24 和 192.168.123.0/24; 您需要在 DHCP 中設置兩個範圍,每個範圍設置一個,它會自動適當地匹配它們。