Intro
Rocky 8 부터는 ifcfg 말고 nmcli 로 네트워크 관리할 수 있도록 변경됐습니다.
cat /etc/sysconfig/network-scripts/readme-ifcfg-rh.txt 로 확인 가능
cisco cli 처럼 명령어 단축이 가능합니다. (connection -> con, modify -> mo)
예제
bond 이중화 구축
2개 이상의 포트를 묶을 때 사용하며 옵션은 다음과 같습니다.
| 옵션 | 기본값 | 내용 |
| mode | - | active-backup |
| primary | - | 메인 인터페이스 지정 (DEVICE 이름으로 넣어야 함) |
| num_grat_arp | 1 | 장애 발생 시 Gratuitous ARP 전송 횟수 |
| primary_reselect | 0 | 0 : 즉각 복구 1 : 속도나 듀플렉스 보고 복구 2 : 수동 복구. 인터페이스가 복구돼도 Currently Active Slave 가 바뀌진 않음. |
2개 포트 active-standby 만들기
bond0 인터페이스 생성하기
nmcli con add type bond con-name bond0 ifname bond0 bond.options "mode=active-backup,miimon=100,primary_reselect=2"
eth0, eth1 를 bond0-active, bond0-backup 이름으로 bond0 에 추가하기
nmcli con add type ethernet slave-type bond con-name bond0-active ifname eth0 master bond0
nmcli con add type ethernet slave-type bond con-name bond0-backup ifname eth1 master bond0
bond0 에 대해 IP 설정 진행
nmcli con mo bond0 connection.autoconnect yes
nmcli con mo bond0 ipv4.address 192.168.0.11/24
nmcli con mo bond0 ipv4.gateway 192.168.0.1
nmcli con mo bond0 ipv4.method manual
설정 반영하기
nmcli con up bond0-active
nmcli con up bond0-backup
nmcli con up bond0
eth0 이름으로 된 컨넥션은 비활성화되고 bond0-active 로 올라온다. (eth0 device 가 쓰는 컨넥션이 eth0 -> bond0-active 로 바뀜)
bond0-active 컨넥션이 지워진다면 비활성화 된 eth0 컨넥션이 다시 올라온다. (/etc/NetworkManager/system-connections 확인)
messages 로그
test01 kernel: bond0: (slave enp1s0): link status definitely up, 0 Mbps full duplex
test01 kernel: bond0: (slave enp1s0): making interface the new active one
test01 kernel: bond0: (slave enp7s0): link status definitely down, disabling slave
'OS > Install & Modify' 카테고리의 다른 글
| 명령어 모음 (0) | 2026.01.15 |
|---|---|
| [Rocky Linux] opendkim 설치하기 (0) | 2025.12.15 |
| [Linux] MariaDB 10.6 수동 설치 (2) | 2025.09.15 |
| [WS 2025] 선택적 기능(WMIC, .NET Framework 3.5) 및 언어 팩 수동 설치하는 방법 (0) | 2025.06.11 |