로그인
Sign in

Rocky Linux 9에서 bonding 설정 작업

1. /etc/default/grub 파일에 추가(아래 명령어 자동 추가)

# grubby --update-kernel=ALL --args="ipv6.disable=1 net.ifnames=0 biosdevname=0"

 

2. bond 설정 추가(ip도 같이 추가가 편함)

# nmcli connection add type bond ifname bond0 mode balance-rr ipv4.method manual ipv4.addresses 192.168.78.129/24 ipv4.gateway 192.168.78.2  ipv6.method ignore ipv4.dns 8.8.8.8,8.8.4.4

 

3. bond slave 설정 추가(eth0~3 추가)

# nmcli connection add type ethernet ifname eth0 master bond0

# nmcli connection add type ethernet ifname eth1 master bond0

# nmcli connection add type ethernet ifname eth2 master bond0

# nmcli connection add type ethernet ifname eth3 master bond0

 

4. 적용(eth로 인터페이스 바뀌기 전이면 reboot)

reboot  또는 systemctl restart NetworkManager

 

5. 확인

# nmcli connection 

# ip a

# ifconfig 

# cat /proc/net/bonding/bond0 

 

* 파일이 여럿 생성되어 지저분할때 삭제 명령어(nmcli 명령과 ls 명령으로 지저분한 파일 확인)

nmcli connection delete bond-bond0-1

 
 
설정파일 값
#cat bond-bond0.nmconnection
------------------------------------------------------------------------------------
[connection]
id=bond-bond0-3
uuid=940c9bab-3ea1-4921-a476-ec1ccde0543c
type=bond
interface-name=bond0
 
[bond]
mode=balance-rr
 
[ipv4]
address1=192.168.78.129/24,192.168.78.2
dns=8.8.8.8;8.8.4.4;
method=manual
 
[ipv6]
addr-gen-mode=default
method=ignore
 
[proxy]
------------------------------------------------------------------------------------
#cat bond-slave-eth0.nmconnection 
------------------------------------------------------------------------------------
[connection]
id=bond-slave-eth0
uuid=2a7474bf-94e7-4aa6-b5d8-52e1bc6a6dec
type=ethernet
controller=bond0
interface-name=eth0
port-type=bond
 
[ethernet]
 
[bond-port]
------------------------------------------------------------------------------------
수정하는 방법
# nmcli connection modify bond-bond0 ifname bond0 mode balance-rr ipv6.method ignore ipv4.method manual ipv4.addresses 192.168.78.129/24 ipv4.gateway 192.168.78.2  ipv6.method ignore ipv4.dns 8.8.8.8,8.8.4.4
 
 
 
 
/etc/NetworkManager/system-connections
[root@rocky9 system-connections]# ll
total 20
-rw-------. 1 root root 281 Feb 22 02:31 bond-bond0.nmconnection
-rw-------. 1 root root 165 Feb 22 01:46 bond-slave-eth0.nmconnection
-rw-------. 1 root root 165 Feb 22 01:48 bond-slave-eth1.nmconnection
-rw-------. 1 root root 165 Feb 22 01:45 bond-slave-eth2.nmconnection
-rw-------. 1 root root 165 Feb 22 01:45 bond-slave-eth3.nmconnection
 
 
 
-----------------------------------

ens160이란 인터페이스를 eth0으로 변경

mv /etc/NetworkManager/system-connections/ens160.nmconnection /etc/NetworkManager/system-connections/eth0.nmconnection

바꾼 파일의  ens160을 eth0으로 변경

sed -i 's/ens160/eth0/g' /etc/NetworkManager/system-connections/eth0.nmconnection

 
List of Articles
번호 제목 글쓴이 날짜 조회 수
공지 자주 사용하는 명령어 제비게릴라 2019-06-27 179
252 Centos 7에서 Docker, Docker Compose 설치 방법 제비게릴라 2025-02-25 6
» Rocky Linux 9에서 bonding 설정 작업 제비게릴라 2025-02-22 8
250 python 3.10 설치 방법 제비게릴라 2025-02-19 4
249 megaRaid 명령어 제비게릴라 2024-04-17 107
248 azcopy github에서 소스 받아 설치하기.. 제비게릴라 2024-01-23 13
247 ssh 접속 알고리즘 문제로 로그인 오류 제비게릴라 2024-01-10 169
246 centos7 firewalld 설정 방법 제비게릴라 2023-12-01 32
245 dmidecode 값 제비게릴라 2023-08-25 16
244 sftp umask 설정 방법 제비게릴라 2023-08-16 86
243 L4 설정 후 ftp 접속후 ls명령어 안되는 경우 제비게릴라 2023-07-12 64
242 Ubuntu 패키지 업데이트 에러: dpkg: error processing package update-notifier-common (–configure): 제비게릴라 2023-01-19 134
241 centos 6에서 gcc 5버전, cmake 설치 제비게릴라 2022-12-08 93
240 리눅스 백업 후 원복 제비게릴라 2022-10-17 14
239 php pdo-mysql 확장모듈 설치 제비게릴라 2022-01-10 85
238 apache 소스파일을 rpm으로 컴파일 방법 제비게릴라 2022-01-10 103
237 ACPI Error 해결방법 [1] 제비게릴라 2021-12-18 93
236 net_ratelimit ping: sendmsg: Invalid argument 또는 kernel: Neighbour table overflow 발생시.. 제비게릴라 2021-08-25 181
235 tar 디렉토리 구조만 묶는 방법 제비게릴라 2021-04-23 156
234 openssl source 설치 제비게릴라 2021-03-10 269
233 vnc 설정 방법 제비게릴라 2020-10-20 25