Debian 服务器设置 (wheezy)
1 - eth0 - 连接到 INTERNET
1 - eth1 - LAN 1(网络 1:192.168.100.0/24)
1 - wlan0 - 接入点(网络 2:192.168.200.0/24)
/etc/网络/接口
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.100.1
network 192.168.100.0
netmask 255.255.255.0
broadcast 192.168.100.255
gateway 192.168.100.1
auto wlan0
iface eth0 inet static
address 192.168.200.1
network 192.168.200.0
netmask 255.255.255.0
/etc/default/isc-dhcp 服务器
INTERFACES = "wlan0"
/etc/dhcp/dhcpd.conf
subnet 192.168.100.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
pool {
range 192.168.100.50 192.168.100.60;
}
option routers 192.168.100.1;
}
subnet 192.168.200.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
pool {
range 192.168.200.50 192.168.200.60;
}
option routers 192.168.100.1;
}
从上面的配置中,我从 dhcp 得到一个错误;并且如果偶然的话,只有连接到的客户端WLAN0
获得 ip-lease;
请帮忙。
答案1
我认为你应该修改你/etc/default/isc-dhcp 服务器 从
接口 = “wlan0”
到
接口 = “wlan0 eth1”
然后重启服务器。这样你就可以避免错误,并且你的 dhcp 服务器可以为 2 个网络提供服务。