How to configure a bonded network interface in rescue mode?
Environment
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Issue
- In a rescue mode, ifenslave command is missing.
- How to configure a bonded network interface in rescue mode?
Resolution
- Boot a system in rescue mode without selecting "Setup Networking".
Note! The IP addresses in the below steps are examples, you need to use IP address, subnet mask and gateway IP address as appropriate for your local networking environment setup.
-
Load a bonding module.
# modprobe bonding mode=1 miimon=500 (The bonding mode used is "active-backup")-
Add a bond device in RHEL8/RHEL9:
# ip link add bond0 type bond -
Bring the bond device up:
# ip link set dev bond0 up -
Set up IP address into the bond device.
# ip addr add 192.168.122.10/24 brd 192.168.122.255 dev bond0 label bond0 -
Set up Gateway address into the bond device.
# ip route add default via 192.168.122.1 -
Add interfaces to the bond.
# ip link set dev eth1 down # ip link set dev eth2 down # echo "+eth1" > /sys/class/net/bond0/bonding/slaves # echo "+eth2" > /sys/class/net/bond0/bonding/slaves # ip link set dev eth1 up # ip link set dev eth2 up -
Update a mac table in the same subnet.
# arping -q -U -c 2 -I bond0 192.168.122.10 -
If VLAN is required to be configured, check How to configure VLAN over bonding in rescue mode?
-
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.