Top Banner

Click here to load reader

Bonding Guide RHEL5 v1 1

Apr 07, 2015

ReportDownload

Documents

Linux/OSS Support Center, IBM Japan

Bonding for RHEL5Version 1.1

Linux/OSS Support Center

Bonding for RHEL5

2009/12/18

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

Linux Bonding Bonding Bonding active-backup Red Hat Enterprise Linux 5 IBM IBM IBM

2

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

Bonding

3

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

Bonding Bonding

4

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

Bonding Bonding Linux Bonding Bonding Linux bonding.txt

RHEL5 initscripts Bonding BONDING_OPTS primary Bugzilla #236897 modprobe.conf options bonding max_bonds=X Bugzilla #229643 bond arp_ip_target Bugzilla #288151 bond arp_ip_target Bugzilla #483711

RHEL5 Bonding RPM initscripts 2009/12/17 initscripts-8.45.30-2.el5 5

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

Bonding (1)Bonding 7 0 : balance-rr Ether Channel Trunking 1

1 : active-backup 1

2 : balance-xor Ether Channel Trunking MAC

3 : broadcast

4 : 802.3ad IEEE 802.3ad Link Aggregation IEEE 802.3ad

6

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

Bonding (2) 5 : balance-tlb 1

6 : balance-alb IP (*)

active-backup

(*) ARP MAC 7

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

(1)active-backup 2 (*1) MII MII Media Independent Interface MII ethtool mii-tool (*2) MII (*1) balance-tlb, balance-alb MII MII (*2) MII netif_carrier_ok() use_carrier 0 ethtool mii-tool Linux bonding.txt8

ethtool MII # ethtool eth0 Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised auto-negotiation: Yes Speed: 1000Mb/s Duplex: Full Port: Twisted Pair PHYAD: 1 Transceiver: internal Auto-negotiation: on Supports Wake-on: d Wake-on: d Link detected: yes

ethtool MII # ethtool eth0 Settings for eth0: No data available

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

(2) ARP IP ARP ARP IP IP active-backup active ARP backup active ARP ARP ARP

MII ARP MII ARP MII Spanning Tree

9

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

ARP active-backup MAC MAC eth0eth1 bond0 MAC eth0 MAC eth0, eth1, bond0 MAC

MAC ARP ARP # grep HWaddr /proc/net/nicinfo/eth0.info Current_HWaddr 00:11:25:9c:6a:65 Permanent_HWaddr 00:11:25:9c:6a:65 # grep HWaddr /proc/net/nicinfo/eth1.info Current_HWaddr 00:11:25:9c:6a:65 Permanent_HWaddr 00:0d:60:5b:64:02 # ifconfig bond0 | grep HWaddr bond0 Link encap:Ethernet HWaddr 00:11:25:9C:6A:65 (*) /proc/net/nicinfo bmc5700 10

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

MAC MAC MAC RHEL5 RHEL4U4 Bonding MAC Gratuitous ARP MII Gratuitous ARP Gratuitous ARP MAC updelay Failback Spanning Tree updelay=5000 ARP updelay ARP MAC

11

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

12

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

(1) eth0eth1 bond0 bondX X 0

/etc/modprobe.conf eth0eth1 bond0 bonding eth0eth1 alias bnx2

modprobe.confalias eth0 bnx2 alias eth1 bnx2 alias bond0 bonding

ifcfg-eth0DEVICE=eth0 MASTER=bond0 SLAVE=yes BOOTPROTO=none HWADDR=00:11:25:9C:6A:65

ifcfg-eth0ifcfg-eth1 eth0eth1 bond0 /etc/sysconfig/network-scripts/ ifcfg-eth0ifcfg-eth1 bond0 IP HWADDR MAC MAC

ifcfg-eth1DEVICE=eth1 MASTER=bond0 SLAVE=yes BOOTPROTO=none HWADDR=00:0D:60:5B:64:02

13

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

(2) ifcfg-bond0 Bonding /etc/sysconfig/network-scripts/ ifcfg-bond0 IP DHCP BONDING_OPTS Bonding

ifcfg-bond0 ONBOOT=yes ifcfg-bond0 IP DEVICE=bond0 IPADDR=192.168.1.190 NETMASK=255.255.255.0 NETWORK=192.168.1.0 BROADCAST=192.168.1.255 GATEWAY=192.168.1.254 ONBOOT=yes BOOTPROTO=static BONDING_OPTS="mode=1 primary=eth0 miimon=100 updelay=5000"

ifcfg-bond0 DHCP DEVICE=bond0 ONBOOT=yes BOOTPROTO=dhcp BONDING_OPTS="mode=1 primary=eth0 miimon=100 updelay=5000" 14

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

bonding mode : Bonding active-backup 1

primary : active-backup

miimon : MII MII 1/1000 100 MII arp_interval

updelay : MII MII 1/1000 miimon

arp_interval : ARP ARP 1/1000 ARP miimon

arp_ip_target : ARP IP ARP ARP IP 16 IP : "arp_ip_target=192.168.1.1,192.168.1.2"15

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

2 bond1 ifcfg-ethX, ifcfg-bondY ifcfg-ethX MASTER bondY modprobe.conf bondY bonding modprobe.confalias alias alias alias alias alias eth0 bnx2 eth1 bnx2 eth2 bnx2 eth3 bnx2 bond0 bonding bond1 bonding

16

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

ifcfg-bond0 ONBOOT=yes ifup # ifup bond0

/var/log/messages

ifenslave eth1 bond0 # ifenslave -c bond0 eth1

MII down up ARP

BONDING_OPTS network ifdown/ifup bond bond0 # ifdown bond0; ifup bond0

initscripts 8.45.30-2.el5 ip_arp_target 17

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

VLAN Bonding VLAN bondX bondX.Y VLAN ID Y VLAN

bond0 VLAN ID 10 VLAN bond0.10 /etc/sysconfig/network VLAN=yes

bond0 bond0 IP VLAN /etc/sysconfig/network-scripts/ifcfg-bond0.10 IP ifcfg-bond0 bond0 IP DEVICE=bond0 ONBOOT=yes BOOTPROTO=static BONDING_OPTS="mode=1 primary=eth0 miimon=100 updelay=5000"

ifcfg-bond0.10DEVICE=bond0.10 IPADDR=192.168.10.190 NETMASK=255.255.255.0 NETWORK=192.168.10.0 BROADCAST=192.168.10.255 ONBOOT=yes BOOTPROTO=static

18

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

19

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

Bonding Jan Jan must Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan 20 7 10:32:41 node01 kernel: Ethernet Channel Bonding Driver: v3.0.3 (March 23, 2006) 7 10:32:41 node01 kernel: bonding: Warning: either miimon or arp_interval and arp_ip_target module parameters be specified, otherwise bonding will not detect link failures! see bonding.txt for details. 7 10:32:41 node01 kernel: bonding: bond0: setting mode to active-backup (1). 7 10:32:41 node01 kernel: bonding: bond0: Unable to set eth0 as primary slave as it is not a slave. 7 10:32:41 node01 kernel: bonding: bond0: Setting MII monitoring interval to 100. 7 10:32:41 node01 kernel: bonding: bond0: Setting up delay to 5000. 7 10:32:41 node01 kernel: ADDRCONF(NETDEV_UP): bond0: link is not ready 7 10:32:41 node01 kernel: bonding: bond0: Adding slave eth0. 7 10:32:41 node01 kernel: bnx2: eth0: using MSI 7 10:32:41 node01 kernel: ADDRCONF(NETDEV_UP): eth0: link is not ready 7 10:32:41 node01 kernel: bonding: bond0: enslaving eth0 as a backup interface with a down link. 7 10:32:41 node01 kernel: bonding: bond0: Adding slave eth1. 7 10:32:41 node01 kernel: bnx2: eth1: using MSI 7 10:32:41 node01 kernel: ADDRCONF(NETDEV_UP): eth1: link is not ready 7 10:32:41 node01 kernel: bonding: bond0: enslaving eth1 as a backup interface with a down link. 7 10:32:41 node01 kernel: bonding: bond0: Setting eth0 as primary slave. 7 10:32:41 node01 kernel: bnx2: eth0 NIC Link is Up, 1000 Mbps full duplex, receive & transmit flow control ON 7 10:32:41 node01 kernel: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready 7 10:32:41 node01 kernel: bonding: bond0: link status up for interface eth0, enabling it in 5000 ms. 7 10:32:41 node01 kernel: bnx2: eth1 NIC Link is Up, 1000 Mbps full duplex, receive & transmit flow control ON 7 10:32:41 node01 kernel: bonding: bond0: link status up for interface eth1, enabling it in 5000 ms. 7 10:32:41 node01 kernel: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready 7 10:32:41 node01 kernel: bonding: bond0: link status definitely up for interface eth0. 7 10:32:41 node01 kernel: bonding: bond0: making interface eth0 the new active one. 7 10:32:41 node01 kernel: bonding: bond0: first active interface up! 7 10:32:41 node01 kernel: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready 7 10:32:41 node01 kernel: bonding: bond0: link status definitely up for interface eth1.

Bonding for RHEL5

2009 IBM Corporation

Linux/OSS Support Center, IBM Japan

eth1 eth0 Jan Jan Jan Jan Jan 7 7 7 7 7 10:22:19 10:22:19 10:22:27 10:22:27 10:22:32 node01 node01 node01 node01 node01 kernel: kernel: kernel: kernel: kernel: bnx2: eth1 NIC Link is Down bonding: bond0: link status definitely down for interface eth1, disabling it bnx2: eth1 NIC Link is Up, 1000 Mbps full duplex, receive & transmit flow control ON bonding: bond0: link status up for interface