各位先進 好
最近在測試 Linux DHCP Server multiple Subnets on single interface
架構如下
我在L3 SWITCH上有指定relay 192.168.3.2的DHCP Server
測試結果 VLAN 1 192.168.3.0的Client電腦可正常取得IP
VLAN 2 192.168.2.0 底下的電腦無法取得IP
Linux DHCP Server主機上設定
在即有的eth0上,新增一個eth0:0子介面,IP為192.168.2.253
dhcpd.conf設定內容如下
ddns-update-style interim;
ignore client-updates;
option domain-name-servers 168.95.1.1;
option time-offset -18000;
default-lease-time 18000;
max-lease-time 43200;
shared-network Lan-network {
allow client-updates;
allow unknown-clients;
subnet 192.168.3.0 netmask 255.255.255.0 {
range 192.168.3.100 192.168.3.200;
}
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.1 192.168.2.20;
}
}
是不是有少了那些步驟......請有做過的先進指點一下.....
你讓每一段subnet的設定都獨立我記得就可囉
shared-network vlan3 {
allow client-updates;
allow unknown-clients;
subnet 192.168.3.0 netmask 255.255.255.0 {
gateway 192.168.3.254
range 192.168.3.100 192.168.3.200;
}
}
shared-network vlan2 {
allow client-updates;
allow unknown-clients;
subnet 192.168.2.0 netmask 255.255.255.0 {
gateway 192.168.2.254
range 192.168.2.1 192.168.2.20;
}
}
用手機回答的,格式或參數不正確請見諒