on top of a bondEnvironment
- Red Hat Enterprise Linux 7
- NetworkManager
Issue
- Need an 802.1q VLAN in RHEL 7 when using NetworkManager.
Resolution
Remove Any existing connection profiles for the interface which would have the VLAN (s). Assuming this interface is eth0
:
# for connection in $ (nmcli-t--fields name,device Connection | awk-f ":" ' ($ ~ "eth0") {print $} '); Do NMCLI Connection Delete $connection; Done
Create a profile for the underlying interface with no IP addressing assigned:
# NMCLI Connection Add type Ethernet ifname eth0 con-name eth0# nmcli Connection modify eth0 ipv4.method disabled Ipv6.met Hod ignore# nmcli Connection up eth0
Create a VLAN on top of eth0 with the IP addressing. The following assumes a VLAN ID of 10. Use either DHCP or set a static IP address:
# # # Using DHCP for IP addressing:# nmcli connection add type VLAN ifname eth0.10 con-name eth0.10 ID ten dev eth0### with a Static IP of 192.168.1.10/24 and Gateway of 192.168.1.1:# NMCLI connection add type VLAN ifname eth0.10 con-name eth0 . Ten IDs Dev eth0 ip4 192.168.1.10/24 gw4 192.168.1.1
If using static addressing, want to also set DNS name server Entries:
# NMCLI Connection Modify eth0.10 Ipv4.dns 8.8.8.8
on top of a bondEnvironment
- Red Hat Enterprise Linux 7
- NetworkManager
Issue
- Need an 802.1q VLAN on top of the A bond in RHEL 7 when using NetworkManager.
Notice
- There is a bug on Rhel 7.0, and the problem are fixed in Rhel 7.1 kernel.
Resolution
The following instructions assume that eth0 and eth1 is the names of the interfaces to be used as the bond Slaves.
- Remove Any existing connection profiles for the interfaces which would be used as the bond slaves:
# for connection in $ (nmcli-t--fields name,device Connection | awk-f ":" ' ($ $ ~ "eth{0,1}") {print $} '); Do NMCLI Connection Delete $connection; done# NMCLI Connection Reload
- Create a bond with no IP addressing assigned:
# NMCLI Connection Add type Bond ifname bond0 con-name bond0 mode active-backup miimon 100# nmcli Connection Modify Bond0 Ipv4.method disabled# nmcli Connection Modify bond0 ipv6.method ignore# nmcli Connection Add type Bond-slave ifname eth0 c On-name eth0 Master bond0# nmcli Connection Add type Bond-slave ifname eth1 con-name eth1 master bond0# nmcli connection U P BOND0
- Create a VLAN on top of bond0 with the IP addressing. The following assumes a VLAN ID of 10. Use either DHCP or set a static IP address:
# # # Using DHCP for IP addressing:# nmcli connection add type VLAN ifname bond0.10 con-name bond0.10 ID ten dev bond0### Wit H a static IP of 192.168.1.10/24 and Gateway of 192.168.1.1:# NMCLI connection add type VLAN ifname bond0.10 con-name bond0.10 ID ten dev bond0 ip4 192.168.1.10/24 gw4 192.168.1.1
- If using static addressing, want to also set DNS name server Entries:
# NMCLI Connection Modify bond0.10 Ipv4.dns 8.8.8.8
Configure a VLAN (on top of a bond) with NetworkManager (nmcli) in RHEL7