我需要在我的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'我知道我可以直接使用nano编辑器并从文件中删除该选项,但在我的例子中,这是不切实际的。我需要从命令行中移除桥连接。
我怎么能这么做..。谢谢
发布于 2014-05-06 12:55:33
试试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...using 'delif‘您可以从桥上拔出不需要的接口。
如果版本很重要:这些行来自“态度调整(12.09,r36088)"-box。
https://unix.stackexchange.com/questions/128106
复制相似问题