how to configure ens9 and en10 as main and bu for vlan tagging and set static ip
First, bitmap image screenshots are not convenient to work with. Text can be copied and formatted for easy reading.
Rather than ip a
, you can run nmcli
, nmcli c s
, and nmcli d s
to see some details of network config.
You show three subnets. (The third is created by libvirtd.service and probably unnecessary in a VM, like your server seems to be.)
VLAN tags are used when more than one subnet has to share one physical link.
Bond combines multiple physical links for redundancy or capacity. man nmcli-examples
has an example on how to set up a bond. The bond connection acts/looks like “regular interface”.
VLAN is a separate connection that can bound to Ethernet port or bond. It will filter/tag part of the traffic of the base connection.
An alternative way to configure network settings is to use Ansible. An example that has VLANs: Chapter 8. Configuring network settings by using RHEL System Roles Red Hat Enterprise Linux 9 | Red Hat Customer Portal
Hi,
i managed to configured the bond and vlan.
however, when i check the bond status i don’t see that ports enp0s9 and enp0s10 are connectiong to bond.
what could be the reason for that?
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: ens8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:ec:38:d0 brd ff:ff:ff:ff:ff:ff
altname enp0s8
inet 192.168.0.4/24 brd 192.168.0.255 scope global noprefixroute ens8
valid_lft forever preferred_lft forever
3: ens9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:ae:c9:87 brd ff:ff:ff:ff:ff:ff
altname enp0s9
inet6 fe80::5054:ff:feae:c987/64 scope link
valid_lft forever preferred_lft forever
4: ens10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:06:62:62 brd ff:ff:ff:ff:ff:ff
altname enp0s10
inet6 fe80::5054:ff:fe06:6262/64 scope link
valid_lft forever preferred_lft forever
5: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:2c:0f:64 brd ff:ff:ff:ff:ff:ff
altname enp0s3
inet 190.104.166.21/29 brd 190.104.166.23 scope global noprefixroute ens3
valid_lft forever preferred_lft forever
inet6 fe80::80d9:ac9d:6d58:9e2/64 scope link noprefixroute
valid_lft forever preferred_lft forever
6: nm-bond: <NO-CARRIER,BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 86:8c:1b:9a:67:6f brd ff:ff:ff:ff:ff:ff
7: nm-bond.1124@nm-bond: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 1000
link/ether 86:8c:1b:9a:67:6f brd ff:ff:ff:ff:ff:ff
inet 192.168.100.120/24 brd 192.168.100.255 scope global noprefixroute nm-bond.1124
valid_lft forever preferred_lft forever
inet6 fe80::7f98:e0c1:13a8:99c2/64 scope link tentative noprefixroute
valid_lft forever preferred_lft forever
8: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:7e:fa:e2 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
[root@fdo-harmonic-xos-sw-1 harmonicsupp]# cat /proc/net/bonding/nm-bond
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: None
MII Status: down
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0
Another way to look at what one has is:
nmcli
nmcli c s
nmcli d s
nmcli
ens3: connected to ens3
"Intel 82540EM"
ethernet (e1000), 52:54:00:2C:0F:64, hw, mtu 1500
ip4 default
inet4 190.104.166.21/29
route4 default via 190.104.166.17 metric 100
route4 190.104.166.16/29 metric 100
inet6 fe80::80d9:ac9d:6d58:9e2/64
route6 fe80::/64 metric 1024
nm-bond.1124: connected to VLAN connection 1
"nm-bond.1124"
vlan, 86:8C:1B:9A:67:6F, sw, mtu 1500
inet4 192.168.100.120/24
route4 default via 192.168.100.1 metric 400
route4 192.168.100.0/24 metric 400
inet6 fe80::7f98:e0c1:13a8:99c2/64
route6 fe80::/64 metric 1024
ens8: connected to ens8
"Red Hat Virtio"
ethernet (virtio_net), 52:54:00:EC:38:D0, hw, mtu 1500
inet4 192.168.0.4/24
route4 192.168.0.0/24 metric 101
route4 224.0.0.0/8 metric 101
nm-bond: connecting (getting IP configuration) to Bond connection 1
"nm-bond"
bond, 86:8C:1B:9A:67:6F, sw, mtu 1500
virbr0: disconnected
"virbr0"
bridge, 52:54:00:7E:FA:E2, sw, mtu 1500
ens10: unmanaged
"Red Hat Virtio"
ethernet (virtio_net), 52:54:00:06:62:62, hw, mtu 1500
ens9: unmanaged
"Red Hat Virtio"
ethernet (virtio_net), 52:54:00:AE:C9:87, hw, mtu 1500
lo: unmanaged
"lo"
loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536
DNS configuration:
servers: 190.104.166.1 190.104.166.44
interface: ens3
Use "nmcli device show" to get complete information about known devices and
"nmcli connection show" to get an overview on active connection profiles.
Consult nmcli(1) and nmcli-examples(7) manual pages for complete usage details.
nmcli c s
NAME UUID TYPE DEVICE
Bond connection 1 f171c2e3-9daa-4d81-96ae-b02a99e59b11 bond nm-bond
ens3 b336d49a-19d1-4397-b96f-125807824b94 ethernet ens3
VLAN connection 1 2e5128fc-95cf-497b-b86f-b2ef0f492c61 vlan nm-bond.1124
ens8 b336d49a-19d1-4397-b96f-125807824b95 ethernet ens8
ens9 77906717-f366-4a43-8ccc-f91b7e5a9a69 ethernet --
Ethernet connection 10 df84faa2-335b-4b75-abb5-1049c4309907 ethernet --
Ethernet connection 9 42bb6520-eb11-48d1-8fa0-99229219c863 ethernet --
[root@fdo-harmonic-xos-sw-1 harmonicsupp]# nmcli d s
DEVICE TYPE STATE CONNECTION
ens3 ethernet connected ens3
nm-bond.1124 vlan connected VLAN connection 1
ens8 ethernet connected ens8
nm-bond bond connecting (getting IP configuration) Bond connection 1
virbr0 bridge disconnected --
ens10 ethernet unmanaged --
ens9 ethernet unmanaged --
lo loopback unmanaged
First, I’ve added code tags to your posts to make their format easier to read.
The bond is not properly up, because the component ports are not up.
A question is, what makes the devices “ens9” and “ens10” unmanaged
?
I’ve seen that on the fora before, but not by myself, so I don’t have a solution for that issue.
Edit: Red Hat shows how to make device unmanaged in: Chapter 15. Configuring NetworkManager to ignore certain devices Red Hat Enterprise Linux 8 | Red Hat Customer Portal
If that has been done in your system somehow, then perhaps it could be undone?