I have a Ubuntu 18.04 server that has three NICs, each connected to a different LAN, and each receiving network information from a DHCP server. By default, from what I can tell, is one interface gets set as the default and will correctly route outbound traffic, but any inbound traffic coming to the non-default interface will essentially get dropped as the response is sent out a different interface. In my scenario, I need to be able to access the server via SSH on each interface.
After a lot of digging around and playing with netplan, this is what I ended up with:
network: version: 2 renderer: networkd ethernets: ens192: dhcp4: yes ens224: dhcp4: yes dhcp4-overrides: use-routes: no routes: - to: 0.0.0.0/0 via: 192.168.2.1 metric: 100 table: 2 routing-policy: - from: 192.168.2.0/24 table: 2 ens256: dhcp4: yes dhcp4-overrides: use-routes: no routes: - to: 0.0.0.0/0 via: 192.168.1.1 metric: 100 table: 3 routing-policy: - from: 192.168.1.0/24 table: 3
It seems convoluted, but it does solve my original problem statement. I'm wondering if I'm just missing something obvious here or if this is indeed the right answer.