So in short, I have 3 network interface on my Ubuntu Server 18.04

ens160 - LAN 192.168.1.50/24 set by dhcp

ens192 - LAB 10.10.10.50/24 set by dhcp

ens224 - SAN 10.10.15.50/24 static ip.

They are on the same router as different VLAN's.

I can't seem to ping the server on both interfaces if they are up at the same time. If one is down I can ping the other but if they are both up only one is accessible.

My netplan config is:

network:
  version: 2
  renderer: networkd
  ethernets:
# Lab Network
    ens160:
     dhcp4: yes
     dhcp6: no
# VM Network    
    ens192:
     dhcp4: yes
     dhcp6: no
# Internal Storage Network  #This is not routable anyways
    ens224:
     dhcp4: no
     addresses: [10.10.15.50/24]

I'm guessing there is some routing issue here but not sure how to fix it.

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         _gateway        0.0.0.0         UG    100    0        0 ens160
default         therouter.test  0.0.0.0         UG    200    0        0 ens192
10.10.10.0      0.0.0.0         255.255.255.0   U     0      0        0 ens160
_gateway        0.0.0.0         255.255.255.255 UH    100    0        0 ens160
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 ens192
therouter.test  0.0.0.0         255.255.255.255 UH    200    0        0 ens192

You appear to have two default routes on the two interfaces, both provided by DHCP. If you try to ping the 192.168.1.50 address from another machine not on the 192.168.1.0/24 network, the response will be sent via the 10.10.10.50 interface, which is not what the network is expecting.

To have two remotely-accessible addresses, you likely need to configure policy-based routing instead of accepting default routes from dhcp.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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