请注意,根据@Simon The Cat链接的DD-WRT固件中的错误,当我升级到DD-WRT版本38240时,您可能需要像在TL-WR841Nv9上一样运行一些其他命令。
您可以/应该通过在SSH会话中运行“ swconfig list”来验证要使用哪个接口。
root@TL-WR841Nv9:~# swconfig list
Found: switch0 - eth0
root@TL-WR841Nv9:~#
您还可以通过“ swconfig dev eth0 show”确认启用vlan 0所需的所有端口。在以下情况下,我有端口0、1、2、3和4:
root@TL-WR841Nv9:~# swconfig dev eth0 show
Global attributes:
enable_vlan: 0
mirror_monitor_port: 15
Port 0:
enable_mirror_rx: 0
enable_mirror_tx: 0
pvid: 0
link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
enable_mirror_rx: 0
enable_mirror_tx: 0
pvid: 0
link: port:1 link:down
Port 2:
enable_mirror_rx: 0
enable_mirror_tx: 0
pvid: 0
link: port:2 link:down
Port 3:
enable_mirror_rx: 0
enable_mirror_tx: 0
pvid: 0
link: port:3 link:up speed:100baseT full-duplex auto
Port 4:
enable_mirror_rx: 0
enable_mirror_tx: 0
pvid: 0
link: port:4 link:up speed:100baseT full-duplex auto
VLAN 0:
vid: 0
ports: 0 1 2 3 4
root@TL-WR841Nv9:~#
我在管理->命令->命令外壳[box]->“保存启动”中输入的最终命令如下。用下面的接口名称代替TP-Link TL-WR841Nv9:
swconfig dev eth0 set reset 1;
swconfig dev eth0 set enable_vlan 1
swconfig dev eth0 vlan 0 set ports '0 1 2 3 4'
swconfig dev eth0 set apply 1
之后-不知道为什么,在启动时仅运行这两个命令“ swconfig dev eth0 set enable_vlan 1; swconfig dev eth0 set apply 1”,“ swconfig dev eth0 show”下面的输出看起来与同一命令的输出相同。但是由于某种原因,我的路由器需要另外两条线来使交换机端口在设备之间正确通信,如错误报告中所述:
root@TL-WR841Nv9:~# swconfig dev eth0 show
Global attributes:
enable_vlan: 1
mirror_monitor_port: 15
Port 0:
enable_mirror_rx: 0
enable_mirror_tx: 0
pvid: 0
link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
enable_mirror_rx: 0
enable_mirror_tx: 0
pvid: 0
link: port:1 link:down
Port 2:
enable_mirror_rx: 0
enable_mirror_tx: 0
pvid: 0
link: port:2 link:down
Port 3:
enable_mirror_rx: 0
enable_mirror_tx: 0
pvid: 0
link: port:3 link:up speed:100baseT full-duplex auto
Port 4:
enable_mirror_rx: 0
enable_mirror_tx: 0
pvid: 0
link: port:4 link:up speed:100baseT full-duplex auto
VLAN 0:
vid: 0
ports: 0 1 2 3 4
root@TL-WR841Nv9:~#