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

ens160 - LAN set by dhcp

ens192 - LAB set by dhcp

ens224 - SAN 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:

  version: 2
  renderer: networkd
# Lab Network
     dhcp4: yes
     dhcp6: no
# VM Network    
     dhcp4: yes
     dhcp6: no
# Internal Storage Network  #This is not routable anyways
     dhcp4: no
     addresses: []

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         UG    100    0        0 ens160
default         therouter.test         UG    200    0        0 ens192   U     0      0        0 ens160
_gateway UH    100    0        0 ens160     U     0      0        0 docker0   U     0      0        0 ens192
therouter.test 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 address from another machine not on the network, the response will be sent via the 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 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.