본문 바로가기
IT/LINUX

[LINUX][RHEL7] NIC teaming 구성 방법 네트워크 이중화 (nmcli 사용)

by 양눈 2016. 12. 18.
반응형

 

[RHEL7] NIC teaming 구성 방법 - 네트워크 이중화 (nmcli 사용)

 

- RHEL7 버전부터는 nmcli를 통하여 NIC 티밍이 가능하다. 7이하 버전에서 사용하던 방식인 bonding도 물론가능하지만 nmcli 를 통해 NIC를 이중화 구성해보자

 

1. 인터페이스 확인
# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master Team0 state UP mode DEFAULT qlen 1000
link/ether 00:50:56:9b:24:4b brd ff:ff:ff:ff:ff:ff
3: ens224: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master Team0 state UP mode DEFAULT qlen 1000
link/ether 00:50:56:9b:24:4b brd ff:ff:ff:ff:ff:ff
8: Team0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT
link/ether 00:50:56:9b:24:4b brd ff:ff:ff:ff:ff:ff

2. 팀연결 Team0 생성
# nmcli con add type team con-name Team0 ifname Team0
config '{"runner":{"name":"activebackup"}}'

# 주의~! 컬럼 및 괄호 빠질경우 디바이스 인식자체가 되지 않음



3. Team0에 대한 ipv4 설정
# nmcli con mod Team0 ipv4.addresses '165.213.246.94/24 165.213.246.1'
# nmcli con mod Team0 ipv4.method manual


4. ens192, ens224에 대한 포트 인터페이스 지정
# nmcli con add type team-slave con-name Team0-port1 ifname ens192 master Team0
# nmcli con add type team-slave con-name Team0-port2 ifname ens224 master Team0

5. 기존연결 자동 비활성화, Team-port 연결 활성화 설정
# nmcli con mod ens192 connection.autoconnect no

# nmcli con mod ens224 connection.autoconnect no
# nmcli con mod Team0-port1 connection.autoconnect yes

# nmcli con mod Team0-port2 connection.autoconnect yes

6. 연결 활성화 시작
# nmcli con up Team0

7. 서비스 재시작 및 현재 구성 확인
# systemctl restart NetworkManager
# teamdctl Team0 state

setup:
runner: activebackup
ports:
ens192
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
ens224
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
runner:
active port: ens192

8. 연결 끊기 테스트
# nmcli dev dis ens192
# teamdctl team0 state
setup:
runner: activebackup
ports:
ens224
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
runner:
active port: ens224

반응형

댓글