While we doing some initial configuration for Red Hat Virtualization, Ovirt Virtualization, OpenStack we required to configure interfaces using the Non-Persistent method. To do that we can go through the below step by step guides.
Here we are using VLAN 18 and two NICs need to be bonded under a single VLAN.
First, enable the bonding type using the modprobe command.
modprobe bonding mode=4
Confirm whether required bonding type has been assigned.
Bring UP the bond0 interface to UP state.
ip link set dev bond0 up
Add the available interfaces to the existing bond interface as slaves.
ifenslave bond0 enp2s0f1
ifenslave bond0 enp129s0f1
To confirm the same run below command, We should get two interfaces as slaves under bond0.
Add the VLAN interface using VLAN ID 18
ip link add link bond0 name bond0.18 type vlan id 18
Add an IP for VLAN interface by following bring up the VLAN interface to UP state.
ip addr add 192.168.1.150/24 dev bond0.18
ip link set dev bond0.18 up
Add a route to reach 192.168.1.x network from any other servers.
ip route add default via 192.168.1.254
Steps to verify.
ip addr show bond0.18
ip -s -d link show dev bond0.18
We have done with configuring NON-Persistent IP for a VLAN interface by Bonding two interfaces.
Once we reboot the server this configuration will be discarded.To make it persistent under virtualization environment we need to configure those NIC from RHEV Console or from Ovirt-Console.
To make it persistent under virtualization environment we need to configure those NIC from RHEV Console or from Ovirt-Consoles.