[리눅스] CentOS 6, 7 Bonding 설정
- IT/linux
- 2021. 2. 25. 01:11
반응형
CentOS 6, 7 bonding(본딩) 설정입니다.
Bonding Module 설정
1. 본딩 모듈 추가
[root@eloquence ~]# vi /etc/modprobe.d/bonding.conf alias bond0 bonding options bonding mode=1 miimon=100 // mode=0 : Round Robin mode=1 : Active-Backup |
2. 본딩 모듈 로드
[root@eloquence ~]# modprobe --first-time bonding [root@eloquence ~]# lsmod | grep bonding bonding 188416 0 |
3. 본딩 모듈 정보
[root@eloquence ~]# modinfo bonding filename: /lib/modules/4.18.0-193.el8.x86_64/kernel/drivers/net/bonding/bonding.kr.xz author: Thomas Davis, tadavis@lbl.gov and many others description: Ethernet Channel Bonding Driver, v3.7.1 version: 3.7.1 license: GPL alias: rtnl-link-bond rhelversion: 8.2 (생략) . . . |
Bonding Interface 설정
1. 본딩 인터페이스 생성
[root@eloquence ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 NAME=bond0 TYPE=Bond IPADDR=192.168.0.100 NETMASK=255.255.255.0 GATEWAY=192.168.0.254 ONBOOT=yes BOOTPROTO=none BONDING_OPTS="mode=1 miimon=100" |
2. 슬레이브 인터페이스 생성
[root@eloquence ~]# cat /etc/sysconfig/network-scripts/ifcfg-eno1 DEVICE=eno1 NAME=bond-slave-eno1 TYPE=Ethernet ONBOOT=yes BOOTPROTO=none MASTER=bond0 SLAVE=yes [root@eloquence ~]# cat /etc/sysconfig/network-scripts/ifcfg-eno2 DEVICE=eno2 NAME=bond-slave-eno2 TYPE=Ethernet ONBOOT=yes BOOTPROTO=none MASTER=bond0 SLAVE=yes |
network 서비스 재시작
1. NetworkManager 정지 및 비활성화
[root@eloquence ~]# systemctl stop NetworkManager [root@eloquence ~]# systemctl disable NetworkManager |
2. network 재시작
[root@eloquence ~]# systemctl restart network |
Bonding 구성 확인
1. 인터페이스 확인
[root@eloquence ~]# nmcli d DEVICE TYPE STATE CONNECTION bond0 bond connected bond0 eno1 ethernet connected bond-slave-eno1 eno2 ethernet connected bond-slave-eno2 |
절체 테스트
1. active-backup Fault-Tolerance 테스트
[root@eloquence ~]# watch -n1 cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) Bonding Mode: fault-tolerance (active-backup) Primary Slave: None Currently Active Slave: eno1 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eno1 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 08:94:ef:16:31:c7 Slave queue ID: 0 Slave Interface: eno2 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 08:94:ef:16:31:c8 Slave queue ID: 0 ※. 물리적으로 eno1 이더넷 케이블을 뽑았을 때 eno1 status : down 상태로 되었으며, Active가 eno1 → eno2로 변경됨을 확인 [root@eloquence ~]# watch -n1 cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) Bonding Mode: fault-tolerance (active-backup) Primary Slave: None Currently Active Slave: eno2 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eno1 MII Status: down Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 08:94:ef:16:31:c7 Slave queue ID: 0 Slave Interface: eno2 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 08:94:ef:16:31:c8 Slave queue ID: 0 |
반응형
'IT > linux' 카테고리의 다른 글
[리눅스] fuser 명령어 사용법 (0) | 2021.04.26 |
---|---|
[리눅스] CentOS 구버전 iso 다운로드 방법 (0) | 2021.03.16 |
[리눅스] yum 명령어 안될 때 "could not retrieve mirrorlist" (0) | 2020.09.26 |
[리눅스] dd 명령어로 디스크 복제 및 초기화(삭제) (0) | 2020.08.06 |
[리눅스]Linux CPU 코어 수 설정(조절) (0) | 2020.04.16 |