0

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

Many thanks,

Arthur

0

To answer my own question - I had to set up a static route on the dhcp interface. This was because the DNS servers on my network had 10.78.72.x IPs and the default route rules were routing those requests through the static interfaces. Figured this out after noticing that IP addresses were pinging, but not hostnames.

[root@redhat1 network-scripts]# ip r
default via 10.0.4.2 dev enp0s9  proto static  metric 100 
10.0.0.0/8 dev enp0s8  proto kernel  scope link  src 10.0.2.10 
10.0.0.0/8 dev enp0s3  proto kernel  scope link  src 10.0.2.10  metric 100 
10.0.4.0/24 dev enp0s9  proto kernel  scope link  src 10.0.4.15  metric 100 
10.78.72.0/24 via 10.0.4.2 dev enp0s9  proto static  metric 100 
[root@redhat1 network-scripts]# 

Hopefully this might help someone else who runs into this issue.

Arthur

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.