I'm migrating old ubuntu install to 18 version, but it seems to have some static routing issues when using different networks.
First, I tried using NetPlan. I configured TWO NICS with different networks on each one, but, I dont know if this is a kernel issue (maybe missing some module) or if its a ubuntu 18 problem (doubt that).
The sympton is that only default route is working. I can add multiple NICs with different networks and static routes and gateways, but only the default route will work.
Here is my NetPlan config file:
network:
version: 2
renderer: networkd
ethernets:
ens32:
addresses:
- 177.185.x.66/29
- 177.185.x.67/29
- 177.185.x.68/29
- 177.185.x.69/29
- 177.185.x.70/29
gateway4: 177.185.x.65
nameservers:
addresses:
- 8.8.8.8
search:
- mydomain.net
routes:
- to: 0.0.0.0/0
via: 177.185.x.65
optional: true
ens34:
addresses:
- 168.96.x.2/24
routes:
- to: 168.96.x.0/24
via: 168.96.x.1
The NetPlan works almost fine: no issue when applying new config. Routing table looks normal:
default via 177.185.x.65 dev ens32 proto static
168.96.x.0/24 via 168.96.x.1 dev ens34
168.96.x.0/24 dev ens34 proto kernel scope link src 168.96.x.10
177.185.x.64/29 dev ens32 proto kernel scope link src 177.185.x.66
But I can only ping the 177.185.x.64/29 network. The other one doesn't respond.
When I change the default route to the secondary network (168.96.x.0/24), the other one stops responding.
I first thought that it might be related to IP routing kernel modules, but I couldn't find the same options from older kernels on the 4.15 one.
Any help would be much appreciated.
Thanks in advance.
BR, Rafael