I have a router with two nets
eth0: 192.168.1.0/24, default gateway is 192.168.1.1
eth2: 10.0.88.0/24, default gateway is 10.0.88.1
Both networks use Gateway 192.168.2.1 to the Internet being connected to the router via third interface. All servers from both nets having one Nic each can ping any address properly.
I need now to set up a few ubuntu servers with 2 Nics, one leg in each net (eno1 in 192.168.1.0 and eno4 in 10.0.88.0). Consequently I have used iproute2 and have the following config:
ip route show
default via 192.168.1.1 dev eno1 onlink
10.0.88.0/24 dev eno4 proto kernel scope link src 10.0.88.11
192.168.1.0/24 dev eno1 proto kernel scope link src 192.168.1.14
and
ip route show table mng
default via 10.0.88.1 dev eno4
10.0.88.0/24 dev eno4 scope link src 10.0.88.11
The rules are set as follows
ip rule show
0: from all lookup local
32760: from all to 10.0.88.11 lookup mng
32761: from 10.0.88.11 lookup mng
32762: from all lookup main
32763: from all lookup default
I have furthermore set my rp_filter to 1 for all networks/nics.
Now to the question: I can successfully ping the default gateways on both interfaces.
I can successfully ping my Internet gateway from the eno1 network
ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
64 bytes from 192.168.2.1: icmp_seq=1 ttl=63 time=0.572 ms
(...)
but I can NOT ping the Internet gateway from the eno4 network:
ping -I eno4 192.168.2.1
PING 192.168.2.1 (192.168.2.1) from 10.0.88.11 eno4: 56(84) bytes of data.
From 10.0.88.11 icmp_seq=1 Destination Host Unreachable
This also what the command confirms:
ip neigh show
(...)
192.168.2.1 dev eno4 FAILED
(...)
What do I need to configure that eno4 can also reach my gateway to the internet (and any other internet address) via its default gateway?
Thank you very much in advance for any answer
Best regards
br