Rocky9

[Linux] Rocky Linux 9.5 nmcli로 이중화(Bonding) 구성






1. 개요

  • 서버에 2개 이상의 NIC(Network Interface Card)가 있을 때, 고가용성과 장애 대응을 위해 두 인터페이스를 하나로 묶는 Bonding 구성이 자주 사용됩니다.
  • Rocky Linux 9.5에서 nmcli를 사용하여 active-backup 방식의 네트워크 Bonding을 구성하고 확인하는 방법을 단계별로 정리합니다.



2. 버전

  • Rocky Linux 9.5



3. 설명




3-1. Bonding이란?

  • Bonding은 여러 NIC를 하나의 논리적 인터페이스로 묶어 대역폭 확장 또는 이중화(HA) 를 실현하는 기술입니다.



3-2. 주요 Bond 모드

모드설명
active-backup하나는 Active로 사용, 나머지는 Standby로 대기
balance-rr라운드로빈 방식으로 트래픽 분산
802.3ad (LACP)스위치와 협업하여 Link Aggregation 구성



4. 기존 연결 삭제 및 디바이스 상태 확인




4-1. 기존 연결 목록 확인

# nmcli connection show


출력 예시:

NAME                UUID                                  TYPE      DEVICE
Wired connection 1  ce15884d-c679-4912-a235-bc1506b01684  ethernet  eth0
Wired connection 2  cc5b7165-bb84-42db-94f5-ac38eb6cad5c  ethernet  eth1
lo                  41db8522-cd1b-4de3-9255-600fce58750c  loopback  lo



4-2. 기존 연결 삭제

# nmcli connection delete "Wired connection 1"
# nmcli connection delete "Wired connection 2"



5. Bonding 구성




5-1. 디바이스 상태 확인

# nmcli device


출력 예시:

DEVICE  TYPE      STATE                   CONNECTION
lo      loopback  connected (externally)  lo
eth0    ethernet  disconnected            --
eth1    ethernet  disconnected            --



5-2. Bond 인터페이스 생성 (active-backup 모드)

# nmcli connection add type bond ifname bond0 mode active-backup



5-3. Slave 인터페이스 추가

# nmcli connection add type ethernet slave-type bond con-name slave-eth0 ifname eth0 master bond0
# nmcli connection add type ethernet slave-type bond con-name slave-eth1 ifname eth1 master bond0



6. IP 주소 및 Gateway 설정




6-1. Bond 인터페이스에 IP, Gateway, 수동 모드 설정

# nmcli connection modify bond-bond0 ipv4.addresses 192.168.204.245/24
# nmcli connection modify bond-bond0 ipv4.gateway 192.168.204.254
# nmcli connection modify bond-bond0 ipv4.method manual



7. 설정 확인 및 활성화




7-1. 연결 확인

# nmcli connection show


출력 예시:

NAME        UUID                                  TYPE      DEVICE
slave-eth0  addb7811-7d61-4334-b896-0b45d1eb6c4f  ethernet  eth0
slave-eth1  8ca32426-2b05-434e-97e9-d31f2cf3a5ed  ethernet  eth1
bond-bond0  4e875f8a-1085-4105-afbc-12a703c29e4f  bond      bond0
lo          41db8522-cd1b-4de3-9255-600fce58750c  loopback  lo



7-2. Bond 연결 활성화

# nmcli connection up bond-bond0



8. Bonding 상태 확인




8-1. IP 주소 확인

# ip address show bond0


출력 예시:

7: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:25:90:e0:b6:0e brd ff:ff:ff:ff:ff:ff
    inet 192.168.204.245/24 brd 192.168.204.255 scope global noprefixroute bond0
       valid_lft forever preferred_lft forever
    inet6 fe80::98d2:62d2:944e:7e43/64 scope link noprefixroute
       valid_lft forever preferred_lft forever



8-2. 라우팅 테이블 확인

# ip route show


출력 예시:

default via 192.168.204.254 dev bond0 proto static metric 300
192.168.204.0/24 dev bond0 proto kernel scope link src 192.168.204.245 metric 30



9. 장애 전환 테스트



9-1. Bodning 상태 확인

# cat /proc/net/bonding/bond0


출력 예시:

Ethernet Channel Bonding Driver: v5.14.0-503.14.1.el9_5.x86_64

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0

Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:25:90:e0:b6:0e
Slave queue ID: 0

Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:25:90:e0:b6:0f
Slave queue ID: 0



9-2. eth1 비활성화

  • Currently Active Slave: eth1 상태이므로 eth1 비활성화


# ip link set eth1 down



9-3. Bodning 상태 확인

# cat /proc/net/bonding/bond0



9-4. eth1 복구

# ip link set eth1 up


출력 예시:

Ethernet Channel Bonding Driver: v5.14.0-503.14.1.el9_5.x86_64

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0

Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:25:90:e0:b6:0e
Slave queue ID: 0

Slave Interface: eth1
MII Status: down
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 00:25:90:e0:b6:0f
Slave queue ID: 0



9-5. Bodning 상태 확인

# cat /proc/net/bonding/bond0


출력 예시:

Ethernet Channel Bonding Driver: v5.14.0-503.14.1.el9_5.x86_64

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0

Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:25:90:e0:b6:0e
Slave queue ID: 0

Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 00:25:90:e0:b6:0f
Slave queue ID: 0



seuheu

최근 게시물

[Linux] Rocky Linux 9.5 LVM 스냅샷 실습 ext4/XFS 스냅샷 생성·변경·병합(롤백) 가이드[Linux] Rocky Linux 9.5 LVM 스냅샷 실습 ext4/XFS 스냅샷 생성·변경·병합(롤백) 가이드

1. 개요 본 글은 LVM의 스냅샷(snapshot) 기능으로 복구 지점 생성 → 파일 변경 → 스냅샷 병합(rollback) 과정을 실습합니다. 동일한…

%일 전

[Linux] Rocky Linux 9.5 LVM PV/VG/LV 구축, 온라인 확장, ext4 오프라인 축소

https://youtu.be/ZcxB7akkDKs 1. 개요 두 개의 디스크(/dev/vdb, /dev/vdc)로 LVM을 구성하고, ext4·XFS 파일시스템 생성 → 마운트 → VG/LV 확장 → ext4 축소(오프라인)까지 전체…

%일 전

[Linux] Rocky Linux 9.5 Parted로 GPT 파티셔닝: ext4/XFS 포맷과 fstab 자동 마운트

https://youtu.be/XYBR1ZFrV9s 1. 개요 parted를 사용해 새 디스크에 GPT 라벨 생성 → 파티션 생성(ext4/XFS) → 포맷/마운트 →…

%일 전

[Linux] Rocky Linux 9.5 FDISK MBR 파티셔닝 : ext4/XFS 포맷과 fstab 자동 마운트

https://youtu.be/yYV8RQKCFzA 1. 개요 이 문서는 fdisk를 사용해 MBR(DOS) 디스크에 파티션을 생성하고, ext4/XFS 파일시스템을 포맷·마운트, /etc/fstab에 등록했다가, 안전하게 해제·삭제하는 전…

%일 전

[Linux] MBR vs GPT : 리눅스 파티션 방식 쉽게 비교

1. 개요 Linux에서 디스크 파티션 스타일은 MBR(Master Boot Record) 와 GPT(GUID Partition Table)에 대해 설명합니다. 2. MBR이란? 디스크…

%일 전

[WindowsServer] Windows Server 2025 설치

https://youtu.be/CNd1bJV4wGY 1. 개요 Windows Server를 새로 설치할 때의 설치 과정을 단계별로 정리하였습니다. Windows Server 설치…

%일 전