CentOS6 Linux NIC bonding 구성
eth0 08:00:27:5B:BE:D9
eth1 08:00:27:A6:82:43
eth2 08:00:27:E3:E9:D0
eth3 08:00:27:EA:D7:42
구성1. eth0-eth2 : DHCP(10.0.2.15)
구성2. eth1-eth3 : Statice IP(192.168.56.10)
기본 설정
1. channel bonding interface 설정
bond0 생성
[root@kss ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=dhcp
ONBOOT=yes
BONDING="mode=1 miimon=100"
bond1 생성
[root@kss ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond1
DEVICE=bond1
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.56.10
NETMASK=255.255.255.0
BONDING_OPTS="mode=1 miimon=100"
2. NIC bonding interface 바인딩 설정
ifcfg-eth0 설정
[root@kss ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO=dhcp
HWADDR="08:00:27:5B:BE:D9"
NM_CONTROLLED="yes"
ONBOOT="yes"
USERCTL=no
MASTER=bond0
SLAVE=yes
ifcfg-eth1 설정
[root@kss ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE="eth1"
BOOTPROTO=none
HWADDR="08:00:27:A6:82:43"
NM_CONTROLLED="yes"
ONBOOT="yes"
USERCTL=no
MASTER=bond1
SLAVE=yes
ifcfg-eth2 설정
[root@kss ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE="eth2"
BOOTPROTO=dhcp
HWADDR="08:00:27:E3:E9:D0"
NM_CONTROLLED="yes"
ONBOOT="yes"
USERCTL=no
MASTER=bond0
SLAVE=yes
ifcfg-eth3 설정
[root@kss ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth3
DEVICE="eth3"
BOOTPROTO=none
HWADDR="08:00:27:EA:D7:42"
NM_CONTROLLED="yes"
ONBOOT="yes"
USERCTL=no
MASTER=bond1
SLAVE=yes
3. /etc/modprobe.conf 파일 수정
[root@kss ~]# cat /etc/modprobe.conf
alias eth0 tg3
alias eth1 tg3
alias eth2 tg3
alias eth3 tg3
alias bond0 bonding
alias bond1 bonding
alias scsi_hostadapter cciss
alias scsi_hostadapter1 ata_piix
4. Bonding kernel module 이 loading 되도록 modprobe 설정
[root@kss ~]# cat /etc/modprobe.d/bonding.conf
alias bond0 bonding
alias bond1 bonding
5. Network 재시작
servvice network restart
bonding option 설정
1. 본딩 인터페이스 확인
[root@kss ~]# cat /sys/class/net/bonding_masters
bond0 bond1
2. 본딩 인터페이스 모드 확인
[root@kss ~]# cat /sys/class/net/bond0/bonding/mode
balance-rr 0
3. 인터페이스 확인
[root@kss ~]# ifconfig
bond0 Link encap:Ethernet HWaddr 08:00:27:5B:BE:D9
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe5b:bed9/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:78 errors:0 dropped:0 overruns:0 frame:0
TX packets:144 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:40881 (39.9 KiB) TX bytes:14681 (14.3 KiB)
bond1 Link encap:Ethernet HWaddr 08:00:27:A6:82:43
inet addr:192.168.56.10 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fea6:8243/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:4217 errors:0 dropped:0 overruns:0 frame:0
TX packets:2230 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:391581 (382.4 KiB) TX bytes:362725 (354.2 KiB)
eth0 Link encap:Ethernet HWaddr 08:00:27:5B:BE:D9
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:15 errors:0 dropped:0 overruns:0 frame:0
TX packets:49 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7531 (7.3 KiB) TX bytes:5347 (5.2 KiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:A6:82:43
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:3379 errors:0 dropped:0 overruns:0 frame:0
TX packets:2209 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:314419 (307.0 KiB) TX bytes:360511 (352.0 KiB)
eth2 Link encap:Ethernet HWaddr 08:00:27:5B:BE:D9
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:63 errors:0 dropped:0 overruns:0 frame:0
TX packets:95 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:33350 (32.5 KiB) TX bytes:9334 (9.1 KiB)
eth3 Link encap:Ethernet HWaddr 08:00:27:A6:82:43
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:839 errors:0 dropped:0 overruns:0 frame:0
TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:77222 (75.4 KiB) TX bytes:2214 (2.1 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:76 (76.0 b) TX bytes:76 (76.0 b)
mode 옵션 파라미터
balance-rr or 0 — Sets a round-robin policy for fault tolerance and load balancing. Transmissions are received and sent out sequentially on each bonded slave interface beginning with the first one available.
◦active-backup or 1 — Sets an active-backup policy for fault tolerance. Transmissions are received and sent out via the first available bonded slave interface. Another bonded slave interface is only used if the active bonded slave interface fails.
◦balance-xor or 2 — Sets an XOR (exclusive-or) policy for fault tolerance and load balancing. Using this method, the interface matches up the incoming request's MAC address with the MAC address for one of the slave NICs. Once this link is established, transmissions are sent out sequentially beginning with the first available interface.
◦broadcast or 3 — Sets a broadcast policy for fault tolerance. All transmissions are sent on all slave interfaces.
◦802.3ad or 4 — Sets an IEEE 802.3ad dynamic link aggregation policy. Creates aggregation groups that share the same speed and duplex settings. Transmits and receives on all slaves in the active aggregator. Requires a switch that is 802.3ad compliant.
◦balance-tlb or 5 — Sets a Transmit Load Balancing (TLB) policy for fault tolerance and load balancing. The outgoing traffic is distributed according to the current load on each slave interface. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed slave.
◦balance-alb or 6 — Sets an Active Load Balancing (ALB) policy for fault tolerance and load balancing. Includes transmit and receive load balancing for IPV4 traffic. Receive load balancing is achieved through ARP negotiation.
참고 URL : http://lesstif.tistory.com/262
'리눅스' 카테고리의 다른 글
[VNC] VNC "xauth: (stdin):1: bad display name" 에러 발생 시 (0) | 2013.09.20 |
---|---|
CentOS 7에서 고정 IP를 설정하는 방법 (0) | 2013.09.17 |
리눅스에서 기본 게이트웨이(Default Gateway)를 추가하는 방법 (0) | 2013.09.16 |
kickstart ks.cfg 파일 (0) | 2013.09.16 |
[리눅스] grep 명령어 (1) | 2013.09.16 |