我有一个基于 debian 的 isc dhcp 服务器,它也可以用作路由器/防火墙。我配置了 Cambium cnPilot 610 来广播 2 个 SSID。
每个 SSID 都与不同的 VLAN 相关联。因此,在 AP 连接的端口中,我配置了:
- VLAN 16 未标记
- VLAN 1607 标记
- VLAN 1611 标记
因此,我按以下方式配置了路由器接口:
auto eth2
iface eth2 inet static
address 172.18.104.254
netmask 255.255.255.0
auto eth2.1607
iface eth2.1607 inet static
address 172.22.103.250
netmask 255.255.252.0
auto eth2.1611
iface eth2.1611 inet static
address 172.22.22.250
netmask 255.255.255.0
auto eth3
iface eth3 inet static
address 200.16.31.18
netmask 255.255.255.240
gateway 200.16.31.17
我将其添加到我的 /etc/default/isc-dhcp-server 文件中:
INTERFACES="eth2 eth2.1607 eth2.1611"
这是我的 /etc/dhcp/dhcpd.conf:
include "/etc/dhcp/aps";
authoritative;
shared-network wifilenguas {
# Para los APs
subnet 172.18.104.0 netmask 255.255.255.0 {
default-lease-time 7200;
max-lease-time 7200;
pool{
deny unknown-clients;
range 172.18.104.10 172.18.104.100;
option domain-name-servers 172.18.104.254;
option domain-name "fl.unc.edu.ar";
option routers 172.18.104.254;
option broadcast-address 172.18.104.255;
}
}
# Para los docentes
subnet 172.22.22.0 netmask 255.255.255.0 {
default-lease-time 1800;
max-lease-time 1800;
pool{
allow unknown-clients;
range 172.22.22.1 172.22.22.240;
option domain-name-servers 172.22.22.250;
option domain-name "fl.unc.edu.ar";
option routers 172.22.22.250;
option broadcast-address 172.22.22.255;
}
}
# Para los alumnos
subnet 172.22.100.0 netmask 255.255.252.0 {
default-lease-time 1800;
max-lease-time 1800;
pool{
allow unknown-clients;
range 172.22.100.1 172.22.103.240;
option domain-name-servers 172.22.103.250;
option domain-name "fl.unc.edu.ar";
option routers 172.22.103.250;
option broadcast-address 172.22.103.255;
}
}
}
我将 AP MAC 地址放入 /etc/dhcp/aps 中
host AP_Aula22 {
hardware ethernet 58:c1:7a:16:a1:86;
fixed-address 172.18.104.10;
}
好吧。AP 可以完美获取其 IP。当我连接到第一个 SSID(与 VLAN 1607 关联)时,我完美获取所有 IP 参数,并且可以导航到 Internet。但是当我切换到另一个 SSID(与 VLAN 1611 关联)时,dhcp 服务器会给我相同的 IP 地址,而不是来自其他子网的 IP 地址。
我在 Google 上搜索了很多,但没有找到类似的情况。
有什么建议么??
多谢!!!