I've been trying to set up a VM for study purposes that can share some iSCSI resources on a private network with the IP 10.0.2.10/8. However, I also want to be able to concurrently use the same VM to access the internet using another interface configured with dhcp.
While I have everything (share wise) set up correctly (I can mount the iSCSI targets), and I can access the internet, I cannot do both at the same time. So I have to disable the interface with a private IP to access the internet (thereby removing access to storage resources for any clients), and if I want to communicate on the private network I have to re-enable the static NIC. Is there a way I can run these 2 concurrently? The static interface always seems to "win" - if any static interface is up the dhcp one becomes useless.
[root@redhat1 ~]# nmcli con show NAME UUID TYPE DEVICE eno2 78f492b6-4bce-4806-8b05-373223c8404b 802-3-ethernet enp0s8 -> static eno1 0c4935a1-d5ad-42d6-adfb-4230f432fd16 802-3-ethernet -- eno3 8779f2f0-0804-40ab-a82f-1f8ebb53f871 802-3-ethernet enp0s9 -> dhcp [root@redhat1 ~]#
[root@redhat1 ~]# ip addr show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 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: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 08:00:27:11:7f:20 brd ff:ff:ff:ff:ff:ff 3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 08:00:27:b5:c5:1b brd ff:ff:ff:ff:ff:ff inet 10.0.2.10/8 brd 10.255.255.255 scope global enp0s8 valid_lft forever preferred_lft forever inet6 fe80::a00:27ff:feb5:c51b/64 scope link valid_lft forever preferred_lft forever 4: enp0s9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 08:00:27:14:69:00 brd ff:ff:ff:ff:ff:ff inet 10.0.4.15/24 brd 10.0.4.255 scope global dynamic enp0s9 valid_lft 85989sec preferred_lft 85989sec inet6 fe80::a00:27ff:fe14:6900/64 scope link valid_lft forever preferred_lft forever