linux – ifconfig:坏地址’-apbridge’

我需要在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编辑器直接从文件中删除选项,但在我的情况下,这是不切实际的.我需要从命令行中删除桥接连接..

我怎么能这样做..谢谢

解决方法:

试试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’你可以从桥上拔掉不需要的接口.

如果版本重要:这些行来自“ATTITUDE ADJUSTMENT(12.09,r36088)” – 框.

上一篇:[量子互联] 内网穿透之linux、openwrt安装方法


下一篇:如何在openwrt中安装和配置php