我需要在 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)」方塊。