OS RHEL8부터는 네트워크 본딩을 구성하려면 nmcli 유틸리티를 사용해야 합니다. 레드햇 권고입니다.
페이지 정보
작성자 OSworker 아이디로 검색 전체게시물 댓글 0건 조회 1,915회 좋아요 1회 작성일 24-02-28 19:29본문
오늘은 좀 늦은감은 있지만, RHEL8 이상에서 본딩하는법을 알려드리려 합니다.
RHEL7까지는 우리가 network-scripts 사용하여 구성했지만,
RHEL8부터는 네트워크 본딩을 구성하려면 nmcli 유틸리티를 사용해야 합니다. 레드햇 권고입니다.
- 서버에 두 개 이상의 실제 또는 가상 네트워크 장치가 설치되어 있습니다.
- 이더넷 장치를 본딩의 포트로 사용하려면 물리적 또는 가상 이더넷 장치를 서버에 설치해야 합니다.
> 현재 상태 확인
# ifconfig
enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.122.180 netmask 255.255.255.0 broadcast 192.168.122.255
inet6 fe80::5054:ff:fea7:ee27 prefixlen 64 scopeid 0x20<link>
ether 52:54:00:a7:ee:27 txqueuelen 1000 (Ethernet)
RX packets 607 bytes 1392158 (1.3 MiB)
RX errors 0 dropped 30 overruns 0 frame 0
TX packets 521 bytes 50577 (49.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp7s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 52:54:00:f5:2f:7a txqueuelen 1000 (Ethernet)
RX packets 95 bytes 9280 (9.0 KiB)
RX errors 0 dropped 30 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
1. 본딩 디바이스 연결 프로파일 생성과 모드 설정
# nmcli connection add type bond con-name bond0 ifname bond0 bond.options "mode=active-backup,miimon=100"
Connection 'bond0' (fc98198e-227b-4b2b-92fa-efdcac3fd785) successfully added.
- 본딩 디바이스 연결 프로파일 생성 확인
# nmcli connection show
NAME UUID TYPE DEVICE
bond0 fc98198e-227b-4b2b-92fa-efdcac3fd785 bond bond0
enp1s0 c0ab6b8c-0eac-a1b4-1c47-efe4b2d1191f ethernet enp1s0
- 본딩 디바이스 상태 확인
# nmcli dev status
DEVICE TYPE STATE CONNECTION
enp1s0 ethernet connected enp1s0
bond0 bond connecting (getting IP configuration) bond0
enp7s0 ethernet disconnected --
lo loopback unmanaged --
2. 본딩 디바이스에 슬레이브 디바이스(enp1s0, enp7s0) 2개를 bond0-port1, bond0-port2 연결 프로파일로 추가
# nmcli connection add type ethernet slave-type bond con-name bond0-port1 ifname enp1s0 master bond0
Connection 'bond0-port1' (8ac7cefa-1ec2-4d5f-88ea-ea2ddd763b3d) successfully added.
# nmcli connection add type ethernet slave-type bond con-name bond0-port1 ifname enp1s0 master bond0
Connection 'bond0-port1' (dc65f666-17c2-4c45-9785-f3e31c6391a2) successfully added.
- 본딩 디바이스와 추가한 2개의 슬레이브 디바이스의 bond0-port1, bond0-port2 연결 상태 확인
# nmcli dev status
DEVICE TYPE STATE CONNECTION
enp1s0 ethernet connected enp1s0
bond0 bond connecting (getting IP configuration) bond0
enp7s0 ethernet disconnected --
3. 본딩 디바이스에 ip, gateway, static 모드 설정
# nmcli connection modify bond0 ipv4.addresses '192.168.122.180/24' ipv4.gateway '192.168.122.1' ipv4.method manual
4. 향후 부팅시 본딩 디바이스가 연결 up 될때 슬레이브 디바이스도 자동으로 같이 up되도록 설정
# nmcli connection modify bond0 connection.autoconnect-slaves 1
5. 본딩 디바이스 최종 연결 up
# nmcli connection up bond0
- 본딩 디바이스에 설정된 ip 확인
# ifconfig
bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST> mtu 1500
inet 192.168.122.180 netmask 255.255.255.0 broadcast 192.168.122.255
inet6 fe80::e371:6bc7:61d8:3ff9 prefixlen 64 scopeid 0x20<link>
ether 52:54:00:a7:ee:27 txqueuelen 1000 (Ethernet)
RX packets 25 bytes 5808 (5.6 KiB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 33 bytes 4434 (4.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp1s0: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500
ether 52:54:00:a7:ee:27 txqueuelen 1000 (Ethernet)
RX packets 549759 bytes 1595962422 (1.4 GiB)
RX errors 0 dropped 671 overruns 0 frame 0
TX packets 309496 bytes 22855286 (21.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp7s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 52:54:00:f5:2f:7a txqueuelen 1000 (Ethernet)
RX packets 787 bytes 47578 (46.4 KiB)
RX errors 0 dropped 672 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
- 본딩 디바이스 연결내용 확인
# 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: enp1s0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0
Slave Interface: enp1s0
MII Status: up
Speed: Unknown
Duplex: Unknown
Link Failure Count: 0
Permanent HW addr: 52:54:00:a7:ee:27
Slave queue ID: 0
> 추가 설명
- 본딩에 추가 ip 추가 (vip설정)
# nmcli connection modify bond0 +ipv4.address 192.168.122.181/24 ipv4.method manual
- 본딩에 추가된 ip (vip) 확인
# nmcli connection up bond0
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc fq_codel master bond0 state UP group default qlen 1000
link/ether 52:54:00:a7:ee:27 brd ff:ff:ff:ff:ff:ff
3: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:f5:2f:7a brd ff:ff:ff:ff:ff:ff
4: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 52:54:00:a7:ee:27 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.180/24 brd 192.168.122.255 scope global noprefixroute bond0
valid_lft forever preferred_lft forever
inet 192.168.122.181/24 brd 192.168.122.255 scope global secondary noprefixroute bond0 <---------------VIP 확인
valid_lft forever preferred_lft forever
inet6 fe80::e371:6bc7:61d8:3ff9/64 scope link noprefixroute
valid_lft forever preferred_lft forever
참고링크 :
댓글목록
등록된 댓글이 없습니다.