리눅스 분류
본딩 질문드립니다.
작성자 정보
- 보라색종이 작성
- 작성일
컨텐츠 정보
- 2,339 조회
- 1 댓글
- 0 추천
- 목록
본문
현재 가상 ip가 있고 서버는 두대입니다.
둘 다 cent os 6.5로 구성되어 있습니다.
각 서버에 ip는 부여되어 있으며 두 서버는 가상ip에 물려있습니다.
가상ip
|
---------------
| |
서버1 서버2
이 상황에서 본딩을 하고 싶은데 제가 아는 본딩의 개념은 한 서버에서 두개 이상의 네트워크 카드를
하나로 묶는 것으로 알고 있습니다.
그런데 위와같은 상황일 경우 ... 본딩을 어떻게 해야 할지 모르겠어서 질문드립니다.
또 본딩관련 자료들을 찾다보니 modprobe.conf 파일에 내용 작성하시던데..
따로 만들어야 하는건지 패키지로 설치를 해야 하는건지 궁금합니다.
제가 이해한 개념이 틀릴 수 있으니 많은 답변 부탁드립니다.
관련자료
-
이전
-
다음
댓글 1
Jszzang님의 댓글
- Jszzang
- 작성일
서버 1,2를 아래 bonding 구성내용을 참고하셔서 구축하시고
상위 VIP에서 두 bonding 아이피로 로드벨런싱 시키시면 어떨까 합니다.
0) 사전 백업 작업
+---------------------------------------------------------------+
cd /root
mkdir bonding
cp -pR /etc/sysconfig/network-scripts/ifcfg-eth0 /root/bonding/
cp -pR /etc/sysconfig/network-scripts/ifcfg-eth1 /root/bonding/
cp -pR /etc/sysconfig/network /root/bonding/
cp -pR /etc/modprobe.conf /root/bonding/
cp -pR /etc/modules.conf /root/bonding/
+---------------------------------------------------------------+
1) eth 2개 확인
cd /etc/sysconfig/network-scripts/
ls | grep eth
ifcfg-eth0
ifcfg-eth1
2) ifcfg-bond0 생성
cd /etc/sysconfig/network-scripts/
vi ifcfg-bond0
+----------------------------+
DEVICE=bond0
BOOTPROTO=none
IPADDR=210.121.219.54
NETMASK=255.255.255.0
ONBOOT=yes
USERCTL=no
+----------------------------+
3)ifcfg-eth0 변경
vi /etc/sysconfig/network-scripts/ifcfg-eth0
+-------------------------------------------+
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
+-------------------------------------------+
4)ifcfg-eth1 변경
vi /etc/sysconfig/network-scripts/ifcfg-eth1
+-------------------------------------------+
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
+-------------------------------------------+
5)modules.conf ( Or /etc/modprobe.conf ?? )
vi /etc/modprobe.conf
+-------------------------------------------+
alias bond0 bonding <--------추가
alias eth0 bnx2
alias eth1 bnx2
alias scsi_hostadapter cciss
alias scsi_hostadapter1 ata_piix
alias usb-controller uhci-hcd
alias usb-controller1 ehci-hcd
options bond0 miimon=100 mode=1 primary=eth0 <------ 추가
+-------------------------------------------+
6)network파일수정
vi /etc/sysconfig/network
+-------------------------------------------+
NETWORKING=yes
HOSTNAME=pcalkwls01
GATEWAYDEV=bond0 <--------- 추가
GATEWAY=210.121.219.54
+-------------------------------------------+
7)네트워크 재시작 및 확인
/etc/rc.d/init.d/network restart
ifconfig
+-------------------------------------------------------------------------------+
bond0 Link encap:Ethernet HWaddr 00:1E:0B:8D:93:0C
inet addr:210.121.219.54 Bcast:210.121.219.255 Mask:255.255.255.0
inet6 addr: fe80::21e:bff:fe8d:930c/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:28 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2558 (2.4 KiB) TX bytes:4382 (4.2 KiB)
eth0 Link encap:Ethernet HWaddr 00:1E:0B:8D:93:0C
inet6 addr: fe80::21e:bff:fe8d:930c/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:28 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2558 (2.4 KiB) TX bytes:4382 (4.2 KiB)
Interrupt:185 Memory:f8000000-f8012100
eth1 Link encap:Ethernet HWaddr 00:1E:0B:8D:93:0C
UP BROADCAST SLAVE MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:193 Memory:fa000000-fa012100
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:5818 errors:0 dropped:0 overruns:0 frame:0
TX packets:5818 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1796498 (1.7 MiB) TX bytes:1796498 (1.7 MiB)
+-------------------------------------------------------------------------------+
상위 VIP에서 두 bonding 아이피로 로드벨런싱 시키시면 어떨까 합니다.
0) 사전 백업 작업
+---------------------------------------------------------------+
cd /root
mkdir bonding
cp -pR /etc/sysconfig/network-scripts/ifcfg-eth0 /root/bonding/
cp -pR /etc/sysconfig/network-scripts/ifcfg-eth1 /root/bonding/
cp -pR /etc/sysconfig/network /root/bonding/
cp -pR /etc/modprobe.conf /root/bonding/
cp -pR /etc/modules.conf /root/bonding/
+---------------------------------------------------------------+
1) eth 2개 확인
cd /etc/sysconfig/network-scripts/
ls | grep eth
ifcfg-eth0
ifcfg-eth1
2) ifcfg-bond0 생성
cd /etc/sysconfig/network-scripts/
vi ifcfg-bond0
+----------------------------+
DEVICE=bond0
BOOTPROTO=none
IPADDR=210.121.219.54
NETMASK=255.255.255.0
ONBOOT=yes
USERCTL=no
+----------------------------+
3)ifcfg-eth0 변경
vi /etc/sysconfig/network-scripts/ifcfg-eth0
+-------------------------------------------+
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
+-------------------------------------------+
4)ifcfg-eth1 변경
vi /etc/sysconfig/network-scripts/ifcfg-eth1
+-------------------------------------------+
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
+-------------------------------------------+
5)modules.conf ( Or /etc/modprobe.conf ?? )
vi /etc/modprobe.conf
+-------------------------------------------+
alias bond0 bonding <--------추가
alias eth0 bnx2
alias eth1 bnx2
alias scsi_hostadapter cciss
alias scsi_hostadapter1 ata_piix
alias usb-controller uhci-hcd
alias usb-controller1 ehci-hcd
options bond0 miimon=100 mode=1 primary=eth0 <------ 추가
+-------------------------------------------+
6)network파일수정
vi /etc/sysconfig/network
+-------------------------------------------+
NETWORKING=yes
HOSTNAME=pcalkwls01
GATEWAYDEV=bond0 <--------- 추가
GATEWAY=210.121.219.54
+-------------------------------------------+
7)네트워크 재시작 및 확인
/etc/rc.d/init.d/network restart
ifconfig
+-------------------------------------------------------------------------------+
bond0 Link encap:Ethernet HWaddr 00:1E:0B:8D:93:0C
inet addr:210.121.219.54 Bcast:210.121.219.255 Mask:255.255.255.0
inet6 addr: fe80::21e:bff:fe8d:930c/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:28 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2558 (2.4 KiB) TX bytes:4382 (4.2 KiB)
eth0 Link encap:Ethernet HWaddr 00:1E:0B:8D:93:0C
inet6 addr: fe80::21e:bff:fe8d:930c/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:28 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2558 (2.4 KiB) TX bytes:4382 (4.2 KiB)
Interrupt:185 Memory:f8000000-f8012100
eth1 Link encap:Ethernet HWaddr 00:1E:0B:8D:93:0C
UP BROADCAST SLAVE MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:193 Memory:fa000000-fa012100
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:5818 errors:0 dropped:0 overruns:0 frame:0
TX packets:5818 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1796498 (1.7 MiB) TX bytes:1796498 (1.7 MiB)
+-------------------------------------------------------------------------------+