Home >

LunaSH Command Reference Guide > LunaSH Commands > network > network interface bonding config

network interface bonding config

Configure a network bonding interface - a virtual device that bonds Eth0 and Eth1.

Use port bonding only with static addressing. If you set bonding where dynamically allocated addressing is in use, then any future change in a DHCP lease would break interface bonding.

Syntax

 network interface bonding config -ip <ipaddress> [-gateway <ipaddress>]  -netmask <ipaddress> [-mode <modenumber>] 

Parameter Shortcut Description
-ip -i

Specifies the IP address of the bonded virtual network device.

-gateway -g

Specifies the gateway/router IP address. (This is indicated as "optional" in the command syntax, but the appropriate gateway address must always be supplied unless you and your clients are on the same subnet as the SafeNet Network HSM appliance.)

-netmask -n Specifies the network address mask.
-mode -m

Specifies the network bonding mode.
Valid values are: 0, 1, 2, 3, 4, 5, or 6  

(Summary text courtesy of Wikipedia.org)

mode 0 (Balance Round Robin) - Transmit network packets in sequential order from the first available network interface (NIC) slave through the last. This mode provides load balancing and fault tolerance.
NOTE: This is the default mode.

mode 1 (Active backup) - Only one NIC slave in the bond is active. A different slave becomes active if, and only if, the active slave fails. The single logical bonded interface's MAC address is externally visible on only one NIC (port) to avoid distortion in the network switch. This mode provides fault tolerance.

mode 2 (Balance XOR) - Transmit network packets based on a hash of the packet's source and destination. This mode provides load balancing and fault tolerance.

mode 3 (Broadcast) - Transmit network packets on all slave network interfaces. This mode provides fault tolerance.

mode 4 (802.3ad) - Creates aggregation groups that share the same speed and duplex settings. This mode is similar to the XOR mode above and supports the same balancing policies. The link is set up dynamically between two LACP-supporting peers.

mode 5 (Balance TLB) - Outgoing network packet traffic is distributed according to the current load (computed relative to the speed) on each network interface slave. Incoming traffic is received by one currently designated slave network interface. If this receiving slave fails, another slave takes over the MAC address of the failed receiving slave.

mode 6 (Balance ALB) - includes balance-tlb plus receive load balancing (rlb) for IPV4 traffic. The receive load balancing is achieved by ARP negotiation. The bonding driver intercepts the ARP Replies sent by the local system on their way out and overwrites the source hardware address with the unique hardware address of one of the NIC slaves in the single logical bonded interface such that different network-peers use different MAC addresses for their network packet traffic.

 

NOTE: The most recently configured mode setting is preserved if you run network interface bonding config without specifying -mode.

 

Example

lunash:> network interface bonding config -ip 192.20.17.200 -netmask 255.255.255.0 -gateway 192.20.17.10 -mode 5 

Command Result : 0 (Success)