[Linux] Linux Bonding 설정하기
1. 파일 생성
-/etc/sysconfig/network-scripts 폴더 내에 ifcfg-bondN 파일 생성 (N은 interface 의 number ex:0, 1,2, 3)
2. Bond 파일 Edit
-다음과 같은 내용 입력
예시)
DEVICE=bond0
IPADDR=192.168.1.121
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=168.126.63.1
DNS2=
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
BONDING_OPTS="bonding parameters separated by spaces"
-BONDING_OPTS 내의 내용은 여러 가지 옵션 입력 가능
3. ifcfg-interface 파일 Edit
-Bonding할 인터페이스들의 설정 파일 Edit
-ex) ifcfg-eth1, 2
예시)
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
NM_CONTROLLED=no
USERCTL=no
MASTER=bond0
SLAVE=yes
4. bonding.conf 파일 생성
-bonding interface entry를 포함할 수 있도록 파일 생성
-/etc/modprobe.d/bonding.conf 파일 생성
-내용 Edit
alis bond0 bonding
5. eth 내리고 bond 올리기
예시
-ip link set eth0 down
-ip link set eth1 down
-ip link set bond0 up
-service network restart
6. Ping Test
-랜선 1개 씩 빼며 Ping Test 진행
완료.