我需要在 OpenWRT 路由器中配置网络接口。因此我需要更改 /etc/config/network 文件中的一些选项。具体来说我想删除桥接。我已在 shell 上尝试了以下每一个命令:
ifconfig lan -apbridge
ifconfig eth0 -apbridge
每个命令的输出是:
ifconfig: bad address '-apbridge'
我也尝试过这些:
ifconfig lan type -apbridge
ifconfig eth0 type -apbridge
每个命令的输出是:
ifconfig: bad address 'type'
我知道我可以使用纳米编辑器并直接从文件中删除该选项,但就我而言,这是不切实际的。我需要从命令行删除桥接连接..
我该怎么做..谢谢
答案1
尝试brctl
...
root@ap5:~# brctl --help
BusyBox v1.19.4 (2013-03-14 11:28:31 UTC) multi-call binary.
Usage: brctl COMMAND [BRIDGE [INTERFACE]]
Manage ethernet bridges
Commands:
show Show a list of bridges
addbr BRIDGE Create BRIDGE
delbr BRIDGE Delete BRIDGE
addif BRIDGE IFACE Add IFACE to BRIDGE
delif BRIDGE IFACE Delete IFACE from BRIDGE
setageing BRIDGE TIME Set ageing time
setfd BRIDGE TIME Set bridge forward delay
sethello BRIDGE TIME Set hello time
setmaxage BRIDGE TIME Set max message age
setpathcost BRIDGE COST Set path cost
setportprio BRIDGE PRIO Set port priority
setbridgeprio BRIDGE PRIO Set bridge priority
stp BRIDGE [1/yes/on|0/no/off] STP on/off
root@ap5:~# brctl show
bridge name bridge id STP enabled interfaces
br-lan 8000.deadc0decafe no eth0
wlan0
...使用“delif”,您可以从桥上拔下不需要的接口。
如果版本很重要:这些行来自“姿态调整(12.09,r36088)”框。