The environment is FreeBSD for the most part and looks like this:
HOST_A <-> ROUTER <-> LOKI <-> HOST_B
Minimally, I would like to be able to ping ROUTER from HOST_B.
- ROUTER is assigned the IP 10.0.0.1
- LOKI is a multi-homed machine that is assigned IPs 10.0.0.2 and 192.168.200.1
- HOST_B is assigned the IP 192.168.200.3
- HOST_A is assigned the IP 10.0.0.3
I have set the network up as above and added gateway_enable="YES" to loki's rc.conf
netstat -r on LOKI produces:
Routing tables Internet: Destination Gateway Flags Netif Expire default 10.0.0.1 UGS em0 10.0.0.0 link#1 U em0 10.0.0.2 link#1 UHS lo0 loki link#2 UH lo0 192.168.200.0 link#3 U ue0 192.168.200.1 link#3 UHS lo0
which looks like a fine routing table and appears to work in all directions.
netstat -r on HOST_B produces:
Routing tables Internet: Destination Gateway Flags Netif Expire default 192.168.200.1 UGS em0 hostb link#2 UH lo0 192.168.200.0 link#1 U em0 192.168.200.3 link#1 UHS lo0
which looks like another fine routing table, but is only able to see LOKI.
- LOKI is able to ping HOST_A, HOST_B and ROUTER
- HOST_B is able to ping LOKI, but not ROUTER or HOST_A
Some additional notes: from HOST_B
ping 10.0.0.1 100% packet loss
In wireshark on LOKI, while pinging 10.0.0.1 from HOST_B:
120 40.549564000 192.168.200.3 10.0.0.1 ICMP 98 Echo (ping) request id=0x5a0e, seq=92/23552, ttl=63 (no response found!)
It appears to me that nothing is being routed from LOKI to ROUTER. What am I missing?
I confirmed that IP forwarding was taking place by commenting out gateway_enable="YES" in /etc/rc.conf and rebooting.
Then, I ran the following commands on loki:
sudo tcpdump -i em0 -nS sudo tcpdump -i ue0 -nS
to monitor activity on the two nics.
from hostb, I ran:
the ue0 interface on 192.168.200.1 reported:
14:44:21.870865 IP 192.168.200.3 > 10.0.0.1: ICMP echo request, id 21509, seq 0, length 64
nothing was reported on the em0 interface on 10.0.0.2.
I then ran:
sudo sysctl -w net.inet.ip.forwarding=1
and sure enough, em0 reported:
14:58:14.745369 IP 192.168.200.3 > 10.0.0.1: ICMP echo request, id 25861, seq 0, length 64
But no, reply such as what I get with a ping loki from hostb:
14:44:15.724200 IP 192.168.200.3 > 192.168.200.1: ICMP echo request, id 21253, seq 4, length 64 14:44:15.724207 IP 192.168.200.1 > 192.168.200.3: ICMP echo reply, id 21253, seq 4, length 64
If I ping router from loki, all is fine:
15:04:55.637839 IP 10.0.0.2 > 10.0.0.1: ICMP echo request, id 46852, seq 3, length 64 15:04:55.638324 IP 10.0.0.1 > 10.0.0.2: ICMP echo reply, id 46852, seq 3, length 64
Any ideas how to find the reply?