728x90
CentOS 7.9 Bonding 구성 하는법
1. Network Interface 확인
ifconfig -a
본딩 구성할 장비명(device name) 은 ens33 과 ens37 확인
2. NetworkManger 끄기 및 modprobe 설정
chkconfig NetworkManager off
systemctl stop NetworkManager
systemctl disable NetworkManger
modprobe --first-time bonding
lsmod | grep bonding
modinfo bonding
아래와 같은 결과값이 나오면 다음 단계로
3. ifcfg-bond0 파일 만들기
귀찮으실거 같아서 복붙하면 만들어지게 써놓을게요 ip, gateway, netmask 는 수정 후 붙여넣기 해주세요
touch /etc/sysconfig/network-scripts/ifcfg-bond0
echo DEVICE=bond0 >> /etc/sysconfig/network-scripts/ifcfg-bond0
echo NAME=bond0 >> /etc/sysconfig/network-scripts/ifcfg-bond0
echo TYPE=Bond >> /etc/sysconfig/network-scripts/ifcfg-bond0
echo BONDING_MASTER=yes >> /etc/sysconfig/network-scripts/ifcfg-bond0
echo BONDING_OPTS="mode=active-backup primary=eno1 miimon=100 updelay=0 downdelay=0" >> /etc/sysconfig/network-scripts/ifcfg-bond0
echo IPADDR=사용할 ip 주소 >> /etc/sysconfig/network-scripts/ifcfg-bond0
echo PREFIX=24 >> /etc/sysconfig/network-scripts/ifcfg-bond0
echo GATEWAY=게이트웨이 주소 >> /etc/sysconfig/network-scripts/ifcfg-bond0
4. 1번에서 확인한 인터페이스 설정 파일 변경 (ens33)
touch /etc/sysconfig/network-scripts/ifcfg-ens33
echo TYPE=Ethernet >> /etc/sysconfig/network-scripts/ifcfg-ens33
echo PROXY_METHOD=none >> /etc/sysconfig/network-scripts/ifcfg-ens33
echo BROWSER_ONLY=no >> /etc/sysconfig/network-scripts/ifcfg-ens33
echo BOOTPROTO=none >> /etc/sysconfig/network-scripts/ifcfg-ens33
echo NAME=ens33 >> /etc/sysconfig/network-scripts/ifcfg-ens33
echo DEVICE=ens33 >> /etc/sysconfig/network-scripts/ifcfg-ens33
echo ONBOOT=yes >> /etc/sysconfig/network-scripts/ifcfg-ens33
echo MASTER=bond0 >> /etc/sysconfig/network-scripts/ifcfg-ens33
echo SLAVE=yes >> /etc/sysconfig/network-scripts/ifcfg-ens33
5. 1번에서 확인한 인터페이스 설정 파일 변경 (ens37)
touch /etc/sysconfig/network-scripts/ifcfg-ens37
echo TYPE=Ethernet >> /etc/sysconfig/network-scripts/ifcfg-ens37
echo PROXY_METHOD=none >> /etc/sysconfig/network-scripts/ifcfg-ens37
echo BROWSER_ONLY=no >> /etc/sysconfig/network-scripts/ifcfg-ens37
echo BOOTPROTO=none >> /etc/sysconfig/network-scripts/ifcfg-ens37
echo NAME=ens37 >> /etc/sysconfig/network-scripts/ifcfg-ens37
echo DEVICE=ens37 >> /etc/sysconfig/network-scripts/ifcfg-ens37
echo ONBOOT=yes >> /etc/sysconfig/network-scripts/ifcfg-ens37
echo MASTER=bond0 >> /etc/sysconfig/network-scripts/ifcfg-ens37
echo SLAVE=yes >> /etc/sysconfig/network-scripts/ifcfg-ens37
6. 인터페이스 down / up
ifdown bond0
ifdown ens33
ifdown ens37
ifup ens33
ifup ens37
ifup bond0
7. 확인
게이트 웨이로 핑 잘간다.
cat /proc/network/bonding/bond0 으로 확인 가능
728x90
'IT > Linux' 카테고리의 다른 글
[Azure/CentOS7] Azure 임시 스토리지(/mnt/resource) Swap 할당하기 (0) | 2022.12.14 |
---|---|
CentOS 7 메모리 확인하기 (0) | 2022.12.07 |
CentOS CPU 스펙(사양) 확인하기 (0) | 2022.12.05 |
php 컴파일 설치 (CentOS7 , apache2.4.54) (0) | 2022.09.14 |
[CentOS7] 서버 Cpu 스펙 확인하기 (0) | 2022.05.18 |