network interface bonding config

Configures network bonding interfaces. A bonded interface provides redundancy in the event of a physical port failure or network connection failure. You can create bond0 between eth0 and eth1, and bond1 between eth2 and eth3. Bonded interfaces must use static addressing.

The bonded port is not active unless port bonding is enabled. To enable port bonding, use the command network interface bonding enable.

Changing the configuration for a bonded interface

If the bonded interface you configure has already been configured, the existing configuration is deleted and is replaced by the new configuration, regardless of whether the existing bonded interface is enabled or not.

User Privileges

Users with the following privileges can perform this command:

>Admin

>Operator

NOTE   Initially, "Mode 1- Active-Backup Mode" was the default, and only, bonding mode. From Luna Network HSM 7 version 7.8.4 onward, the option is provided to choose "Mode 3 - Broadcast Mode". See network interface bonding config.

Syntax for appliance software version 7.8.4 and newer

network interface bonding config -ip <IP_address>  -netmask <netmask> -name {bond0 | bond1} [-gateway <IP_address>] [-mode <bondmode>] [-ipv6]

Argument(s) Shortcut Description
-ip <ipaddress> -i

Specifies the IP address of the bonded virtual network device.

-gateway <ipaddress> -g

Specifies the gateway/router IP address.

-ipv6 -ipv

Applied to IPv6.

-mode <bondmode> -m

Bond Interface Mode (broadcast).

NOTE   If -mode is not specified at all, in the command, then the default Mode 1 -Active-Backup bonding mode is applied.

-name {bond0 | bond1} -na

Specifies the network bond you want to configure:

>bond0 bonds eth0 and eth1

>bond1 bonds eth2 and eth3

-netmask <string> -ne Specifies the network mask for the interface. You can specify the network mask in IP address format (for example, 255.255.255.0) or in CIDR format, without the leading slash (for example, 24).

Example

[local_host] lunash:>network interface bonding config -name bond0 -ip 192.168.143.184 -netmask 255.255.252.0 -mode broadcast -gateway 192.168.140.1


Command Result : 0 (Success)
[local_host] lunash:>network interface bonding config -name bond1 -ip 192.168.142.20 -netmask 255.255.252.0 -mode broadcast -gateway 192.168.140.1


Command Result : 0 (Success)
[local_host] lunash:>network show

   Hostname         : local_host
   Name Server(s)   : 192.168.105.6      192.121.120.23
   Search Domain(s) : lab.hsm

Interface settings and status

ne   HW Address (eth0)    : 00:15:B2:AD:40:7C
   IP Address (eth0)    : 192.168.143.184/22
   Mask (eth0)          : 255.255.252.0
   Gateway (eth0)       : 192.168.140.1
   DNS (eth0)           :
   DNS Search (eth0)    :
   IP Protocol (eth0)   : IPv4
   Protocol (eth0)      : DHCP
   Auto Connect (eth0)  : Yes
   Activated (eth0)     : Yes
   Link detected (eth0) : Yes
   Default Route (eth0) : Yes


   HW Address (eth1)    : 00:15:B2:AD:40:7D
   IP Address (eth1)    : 192.168.143.1/22
   Mask (eth1)          : 255.255.252.0
   Gateway (eth1)       : --
   DNS (eth1)           :
   DNS Search (eth1)    :
   IP Protocol (eth1)   : IPv4
   Protocol (eth1)      : DHCP
   Auto Connect (eth1)  : Yes
   Activated (eth1)     : Yes
   Link detected (eth1) : Yes
   Default Route (eth1) : No

   HW Address (eth2)    : 00:15:B2:AD:40:7E
   IP Address (eth2)    : 192.168.142.20/22
   Mask (eth2)          : 255.255.252.0
   Gateway (eth2)       : --
   DNS (eth2)           :
   DNS Search (eth2)    :
   IP Protocol (eth2)   : IPv4
   Protocol (eth2)      : DHCP
   Auto Connect (eth2)  : Yes
   Activated (eth2)     : Yes
   Link detected (eth2) : Yes
   Default Route (eth2) : No


ne   HW Address (eth3)    : 00:15:B2:AD:40:7F
   IP Address (eth3)    : 192.168.142.21/22
   Mask (eth3)          : 255.255.252.0
   Gateway (eth3)       : --
   DNS (eth3)           :
   DNS Search (eth3)    :
   IP Protocol (eth3)   : IPv4
   Protocol (eth3)      : DHCP
   Auto Connect (eth3)  : Yes
   Activated (eth3)     : Yes
   Link detected (eth3) : Yes
   Default Route (eth3) : No


t   HW Address (bond0)    :
   IP Address (bond0)    : 192.168.143.184
   Mask (bond0)          : 255.255.252.0
   Gateway (bond0)       : 192.168.140.1
   DNS (bond0)           :
   DNS Search (bond0)    :
   IP Protocol (bond0)   : IPv4
   Protocol (bond0)      : Static
   Auto Connect (bond0)  : No
   Activated (bond0)     : No
   Link detected (bond0) : No
   Default Route (bond0) : Yes
   Active Slaves (bond0) :

   HW Address (bond1)    :
   IP Address (bond1)    : 192.168.142.20
   Mask (bond1)          : 255.255.252.0
   Gateway (bond1)       : 192.168.140.1
   DNS (bond1)           :
   DNS Search (bond1)    :
   IP Protocol (bond1)   : IPv4
   Protocol (bond1)      : Static
   Auto Connect (bond1)  : No
   Activated (bond1)     : No
   Link detected (bond1) : No
   Default Route (bond1) : Yes
   Active Slaves (bond1) :


Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.140.1    0.0.0.0         UG    108    0        0 eth0
192.168.140.0    0.0.0.0         255.255.252.0   U     105    0        0 eth1
192.168.140.0    0.0.0.0         255.255.252.0   U     106    0        0 eth2
192.168.140.0    0.0.0.0         255.255.252.0   U     107    0        0 eth3
192.168.140.0    0.0.0.0         255.255.252.0   U     108    0        0 eth0


Command Result : 0 (Success)
[local_host] lunash:>network interface bonding show


bond0:
bond0 is configured, but not enabled.

Bonding Interface: bond0
IPADDR=192.168.143.184
PREFIX=22
GATEWAY=192.168.140.1
Slave devices: eth0 eth1
-----------------------------------------------------------

bond1:
bond1 is configured, but not enabled.

Bonding Interface: bond1
IPADDR=192.168.142.20
PREFIX=22
GATEWAY=192.168.140.1
Slave devices: eth2 eth3
-----------------------------------------------------------

Command Result : 0 (Success)

[local_host] lunash:>network interface bonding enable -name bond0 -f


Activating bond-slave-eth0...
Activating bond-slave-eth1...

Command Result : 0 (Success)
[local_host] lunash:>network interface bonding enable -name bond1 -f


Activating bond-slave-eth2...
Activating bond-slave-eth3...

Command Result : 0 (Success)
[local_host] lunash:>

[local_host] lunash:>net sh

   Hostname         : local_host
   Name Server(s)   : <not set>
   Search Domain(s) : <not set>

Interface settings and status

   HW Address (eth0)    : 00:15:B2:AD:40:7C
   Bond master (eth0)   : bond0
   Link detected (eth0) : Yes

   HW Address (eth1)    : 00:15:B2:AD:40:7C
   Bond master (eth1)   : bond0
   Link detected (eth1) : Yes

   HW Address (eth2)    : 00:15:B2:AD:40:7E
   Bond master (eth2)   : bond1
   Link detected (eth2) : Yes

   HW Address (eth3)    : 00:15:B2:AD:40:7E
   Bond master (eth3)   : bond1
   Link detected (eth3) : Yes

   HW Address (bond0)    : 00:15:B2:AD:40:7C
   IP Address (bond0)    : 192.168.143.184/22
   Mask (bond0)          : 255.255.252.0
   Gateway (bond0)       : 192.168.140.1
   DNS (bond0)           :
   DNS Search (bond0)    :
   IP Protocol (bond0)   : IPv4
   Protocol (bond0)      : Static
   Auto Connect (bond0)  : Yes
   Activated (bond0)     : Yes
   Link detected (bond0) : Yes
   Default Route (bond0) : Yes
   Active Slaves (bond0) : eth0 eth1

   HW Address (bond1)    : 00:15:B2:AD:40:7E
   IP Address (bond1)    : 192.168.142.20/22
   Mask (bond1)          : 255.255.252.0
   Gateway (bond1)       : --
   DNS (bond1)           :
   DNS Search (bond1)    :
   IP Protocol (bond1)   : IPv4
   Protocol (bond1)      : Static
   Auto Connect (bond1)  : Yes
   Activated (bond1)     : Yes
   Link detected (bond1) : Yes
   Default Route (bond1) : No
   Active Slaves (bond1) : eth2 eth3


Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.140.1    0.0.0.0         UG    300    0        0 bond0
192.168.140.0    0.0.0.0         255.255.252.0   U     300    0        0 bond0
192.168.140.0    0.0.0.0         255.255.252.0   U     301    0        0 bond1


Command Result : 0 (Success)
[local_host] lunash:>network interface bonding show

bond0:

Bonding Mode: fault-tolerance (broadcast)
MII Status: up
MII Polling Interval (ms): 500
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:15:b2:ad:40:7c
Slave queue ID: 0

Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:15:b2:ad:40:7d
Slave queue ID: 0

Slave status eth0:      Link detected: yes
Slave status eth1:      Link detected: yes
-----------------------------------------------------------
bond1:

Bonding Mode: fault-tolerance (broadcast)
MII Status: up
MII Polling Interval (ms): 500
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:15:b2:ad:40:7e
Slave queue ID: 0

Slave Interface: eth3
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:15:b2:ad:40:7f
Slave queue ID: 0

Slave status eth2:      Link detected: yes
Slave status eth3:      Link detected: yes
-----------------------------------------------------------

Command Result : 0 (Success)
[local_host] lunash:>

Use ping to verify broadcast mode

[root@client21 ~]# ping 192.168.143.184
PING 192.168.143.184 (192.168.143.184) 56(84) bytes of data.
64 bytes from 192.168.143.184: icmp_seq=1 ttl=62 time=0.956 ms
64 bytes from 192.168.143.184: icmp_seq=1 ttl=62 time=0.966 ms (DUP!)
64 bytes from 192.168.143.184: icmp_seq=2 ttl=62 time=0.666 ms
64 bytes from 192.168.143.184: icmp_seq=2 ttl=62 time=0.676 ms (DUP!)
64 bytes from 192.168.143.184: icmp_seq=3 ttl=62 time=0.638 ms
64 bytes from 192.168.143.184: icmp_seq=3 ttl=62 time=0.646 ms (DUP!)
64 bytes from 192.168.143.184: icmp_seq=4 ttl=62 time=0.611 ms
64 bytes from 192.168.143.184: icmp_seq=4 ttl=62 time=0.620 ms (DUP!)
64 bytes from 192.168.143.184: icmp_seq=5 ttl=62 time=0.651 ms
64 bytes from 192.168.143.184: icmp_seq=5 ttl=62 time=0.659 ms (DUP!)
64 bytes from 192.168.143.184: icmp_seq=6 ttl=62 time=0.575 ms
64 bytes from 192.168.143.184: icmp_seq=6 ttl=62 time=0.584 ms (DUP!)
^C
--- 192.168.143.184 ping statistics ---
6 packets transmitted, 6 received, +6 duplicates, 0% packet loss, time 5001ms
rtt min/avg/max/mdev = 0.575/0.687/0.966/0.127 ms
[root@aa4221 ~]# ping 192.168.142.20
PING 192.168.142.20 (192.168.142.20) 56(84) bytes of data.
64 bytes from 192.168.142.20: icmp_seq=1 ttl=62 time=0.983 ms
64 bytes from 192.168.142.20: icmp_seq=1 ttl=62 time=0.992 ms (DUP!)
64 bytes from 192.168.142.20: icmp_seq=2 ttl=62 time=0.576 ms
64 bytes from 192.168.142.20: icmp_seq=2 ttl=62 time=0.584 ms (DUP!)
64 bytes from 192.168.142.20: icmp_seq=3 ttl=62 time=0.636 ms
64 bytes from 192.168.142.20: icmp_seq=3 ttl=62 time=0.644 ms (DUP!)
64 bytes from 192.168.142.20: icmp_seq=4 ttl=62 time=0.454 ms
64 bytes from 192.168.142.20: icmp_seq=4 ttl=62 time=0.462 ms (DUP!)
64 bytes from 192.168.142.20: icmp_seq=5 ttl=62 time=0.458 ms
64 bytes from 192.168.142.20: icmp_seq=5 ttl=62 time=0.466 ms (DUP!)
64 bytes from 192.168.142.20: icmp_seq=6 ttl=62 time=0.526 ms
64 bytes from 192.168.142.20: icmp_seq=6 ttl=62 time=0.533 ms (DUP!)
^C
--- 192.168.142.20 ping statistics ---
6 packets transmitted, 6 received, +6 duplicates, 0% packet loss, time 5000ms
rtt min/avg/max/mdev = 0.454/0.609/0.992/0.182 ms

Syntax prior to appliance software version 7.8.4

network interface bonding config -ip <IP_address>  -netmask <netmask> -name {bond0 | bond1} -gateway <IP_address>

Argument(s) Shortcut Description
-ip <ipaddress> -i

Specifies the IP address of the bonded virtual network device.

-gateway <ipaddress> -g

Specifies the gateway/router IP address.

-name {bond0 | bond1} -na

Specifies the network bond you want to configure:

>bond0 bonds eth0 and eth1

>bond1 bonds eth2 and eth3

-netmask <string> -ne Specifies the network mask for the interface. You can specify the network mask in IP address format (for example, 255.255.255.0) or in CIDR format, without the leading slash (for example, 24).

Example

lunash:>network interface bonding config -ip 192.20.11.64 -netmask 255.255.255.0 -gateway 192.20.11.10 -name bond1


Command Result : 0 (Success)