리눅스 본딩 2개 구성 (다른 게이트웨이 사용)

Jmnote (토론 | 기여)님의 2014년 8월 19일 (화) 01:45 판 (→‎/etc/modprobe.conf)

1 개요

리눅스 본딩 구성
  • eth0, eth1 → bond0
  • eht2, eth3 → bond1
  • bond0과 bond1이 다른 게이트웨이를 사용하는 경우
  • /etc/sysconfig/network-scripts/ 폴더에 아래 파일들 설정

2 /etc/modprobe.d/bonding.conf

  • 다음 내용으로 파일 생성[1]
Copy
alias bond0 bonding
alias bond1 bonding

3 /etc/sysconfig/network-scripts/ifcfg-eth0

Copy
DEVICE=eth0
MASTER=bond0
SLAVE=yes
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

4 /etc/sysconfig/network-scripts/ifcfg-eth1

Copy
DEVICE=eth1
MASTER=bond0
SLAVE=yes
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

5 /etc/sysconfig/network-scripts/ifcfg-eth2

Copy
DEVICE=eth2
MASTER=bond1
SLAVE=yes
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

6 /etc/sysconfig/network-scripts/ifcfg-eth3

Copy
DEVICE=eth3
MASTER=bond1
SLAVE=yes
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

7 /etc/sysconfig/network-scripts/ifcfg-bond0

Copy
DEVICE=bond0
IPADDR=192.168.0.101
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
DNS1=8.8.8.8
DNS2=8.8.4.4
BONDING_OPTS="mode=1 miimon=100"
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

8 /etc/sysconfig/network-scripts/ifcfg-bond1

Copy
DEVICE=bond1
IPADDR=10.10.0.101
NETMASK=255.255.255.0
BONDING_OPTS="mode=1 miimon=100"
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

9 /etc/sysconfig/network-scripts/route-bond1

Copy
10.10.0.0/16 via 10.10.0.1 dev bond1

10 네트워크 재시작

bat
Copy
[root@jmnote ~]# /etc/init.d/network restart
Shutting down interface bond0:                             [  OK  ]
Shutting down interface bond1:                             [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface bond0:                               [  OK  ]
Bringing up interface bond1:                                [  OK  ]

11 같이 보기

12 참고 자료

  1. /etc/modprobe.conf 하단에 기입해도 됨