I have this setup:
10.5.128.150
Ubuntu Ubuntu eth2 <------> server (10.5.128.154)
client eth1 <----> eth1 Router eth3 <------>
10.5.129.179 10.5.129.39 10.5.130.201
Thus the Ubuntu router is managing three domains:
- 10.5.129.0/24 : This is where the client lives
- 10.5.128.0/24 : Governed by eth2 and connects to the server.
- 10.5.130.0/24 : Governed by eth3
Following the answer here: https://askubuntu.com/a/168037/347674, I've configured the client to use the router as the gateway for 10.5.128.0/24 traffic.
Here's the route table on the router:
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
....
10.5.128.0 * 255.255.255.0 U 0 0 0 eth2
10.5.129.0 * 255.255.255.0 U 0 0 0 eth1
10.5.130.0 * 255.255.255.0 U 0 0 0 eth3
This all looks fine to me, but when I try to ping that server from the client, I get no reply:
# ping -n -I eth1 10.5.128.154
PING 10.5.128.154 (10.5.128.154) from 10.5.129.179 eth1: 56(84) bytes of data.
The router shows the ping traffic correctly coming into the router's eth1:
# tcpdump -n -i eth1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 262144 bytes
15:20:17.428153 IP 10.5.129.179 > 10.5.128.154: ICMP echo request, id 909, seq 170, length 64
15:20:17.618104 IP 10.5.129.179 > 10.5.128.154: ICMP echo request, id 874, seq 2534, length 64
15:20:18.427959 IP 10.5.129.179 > 10.5.128.154: ICMP echo request, id 909, seq 171, length 64
But the ping blackholes on the router. It never goes out the eth2 interface like I'd expect it to:
# tcpdump -n -i eth2
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth2, link-type EN10MB (Ethernet), capture size 262144 bytes
(It's empty.)
In fact it's not going anywhere:
# tcpdump -n -i any icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
15:31:53.138046 IP 10.5.129.179 > 10.5.128.154: ICMP echo request, id 874, seq 3224, length 64
15:31:54.145980 IP 10.5.129.179 > 10.5.128.154: ICMP echo request, id 874, seq 3225, length 64
15:31:55.154033 IP 10.5.129.179 > 10.5.128.154: ICMP echo request, id 874, seq 3226, length 64
Shouldn't the ping's requests egress on eth2 per its route table? Or is there something else I need to configure on the Ubuntu router to get the packets to egress from eth2?
sysctl
to make that permanent) – dirkt Oct 02 '18 at 06:00