netbonding

更新时间:
2024-01-09
下载文档

netbonding

添加/删除/控制网络绑定。

格式

netbonding addbd/changebd bond0 [ab|bl|bc] [-t|-a] [interval] [time to alive]

说明

[root@sylixos:/root]# help netbonding     
add / delete / control net bonding.
eg. netbonding show bond0              (Show all net device in 'bond0' net bonding)
    netbonding addbd bond0 [...]       (Add a net bonding named 'bond0')
    netbonding changebd bond0 [...]    (Change a net bonding named 'bond0')
    [...]: [ab|bl|bc] [-t|-a|-l] [interval] [time to alive]
    ab           : Active Backup mode
    bl           : Balance RR mode
    bc           : Broadcast mode
    -t           : Traffic detect in 'Active Backup' mode
    -a           : ARP detect in 'Active Backup' mode
    -l           : Linkup detect only in 'Active Backup' mode
    interval     : ARP detect interval (milliseconds)
    time to alive: When detect OK how long does it take to active (milliseconds)
    netbonding delbd bond0             (Delete a net bonding named 'bond0')
    netbonding adddev bond0 ethdev0    (Add a net device in net bonding named 'bond0')
    netbonding deldev bond0 ethdev0    (Delete a net device from net bonding named 'bond0')
    netbonding addif bond0 en1         (Same as 'adddev' but use interface name)
    netbonding delif bond0 en1         (Same as 'deldev' but use interface name)
    netbonding masterdev bond0 ethdev0 (Make net device 'ethdev0' as a master device in 'bond0')
    netbonding masterif bond0 en1      (Same as 'masterdev' but use interface name)
    netbonding addarp bond0 10.0.0.1   (Add a ARP detect target to net bonding named 'bond0')
    netbonding delarp bond0 10.0.0.1   (Delete a ARP detect target from net bonding named 'bond0')
netbonding [...]
[root@sylixos:/root]# 

此命令用于添加/删除/控制网络绑定,需要 2 台机器,4 个网口。

选项说明如下:

  • ab:主动备份模式。
  • bl:平衡 RR 模式。
  • bc:广播模式。
  • -t:“主动备份”模式下的流量检测。
  • -a:“主动备份”模式下的 ARP 检测。
  • interval:ARP 检测间隔(毫秒)。
  • time to alive:当检测正常时,激活需要多长时间(毫秒)。

样例

[root@sylixos:/apps]# netbonding addbd bond0 ab -a 10 30
net bonding device add ok, if index: 9.
[root@sylixos:/apps]# ifconfig
bd8       Link encap: Ethernet HWaddr: aa:10:5f:d6:61:44
          Dev: bond0 Ifidx: 9 DHCP: D4 D6 Spd: N/A
          inet addr: 10.4.130.15 netmask: 255.255.0.0
          gateway: 10.4.0.1 broadcast: 255.255.255.255
          inet6 addr: fe80::200:ff:fe00:0 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          collisions:0 txqueue:0 tcpaf:1 tcpwnd:65535
          RX ucast packets:5 nucast packets:1910 dropped:0
          TX ucast packets:0 nucast packets:7 dropped:0
          RX bytes:2899310 (2.7 MB)  TX bytes:538 (538.0 B)
文档内容是否对您有所帮助?
有帮助
没帮助