我有一个带有dhcp和dns服务的主路由器。
安
附加路由器
因为我有一个相对较小的同时设备数(家庭网络),我决定使用主路由器的DHCP和DNS服务。
在附加(aux)路由器上,我停止了dhcp服务和dns:
/etc/init.d/dnsmasq disable && /etc/init.d/dnsmasq stop
/etc/init.d/firewall disable && /etc/init.d/firewall stop
#config interface 'wan'
# option ifname 'eth0'
# option proto 'dhcp'
#config interface 'wan6'
# option ifname 'eth0'
# option proto 'dhcpv6'
我调整了交换机以包括WAN端口(不确定为什么端口0和5是WAN而不仅仅是0)此步骤可能是我的错误:
#config switch
# option name 'switch0'
# option reset '1'
# option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 1 2 3 4 5 6' # added WAN ports 0 and 5
#config switch_vlan
# option device 'switch0'
# option vlan '2'
# option ports '5 0'
“lan”接口如下所示:
config interface 'lan'
option ifname 'eth1 switch0'
option type 'bridge'
option proto 'static'
option ipaddr '10.0.1.3' # MAC reservation on main router
option netmask '255.255.255.0'
我可以连接并从主路由器获取IP,但我不能ping我的新路由器,也不能通过SSH访问它或访问Web UI。我错过了什么?