I am struggling with the routing in my topology. In this topology I have the following structure with 2 PCs. Each one of them has 2 different interfaces configured in different subnets: (A wifi user) <-(wlp2s0-AP1- |PC1| (ra0-> <- (wlan1- |PC2| (wlan0->

From here, let's say that a wifi user connects to AP1 (at wlp2s0 interface of PC1) and gets IP Now, from the user I execute ping, which is the wlan0 interface of PC2. Given the following routing table at PC1,

enter image description here

and knowing that PC2 has another routing rule that enables the ping replies to come back (using Wireshark), I can see the ping requests and replies going out and coming back at PC1's wlp2s0. However, the final user ( connected to wlps0 ( is not getting the replies and therefore the ping fails.

Also, I think I enabled forwarding by executing:

sudo sysctl -w net.ipv4.ip_forward=1
  • When you say that you "can see the replies coming back at PC1's wlp2s0", do you mean that something like tcpdump or Wireshark on that interface shows the packets going out? – TooTea Apr 4 at 11:25
  • Yes, I'm sorry. I can see ICMP requests and replies in wireshark. Maybe these are not routed because they come through ra0? However I can see them with Wireshark at wlp2s0... – Gabriel Apr 4 at 11:25
  • But a similar Wireshark on the "wifi user" doesn't show the replies coming in? Does pinging from the "wifi user" work? Is the routing on the "wifi user" set up with the right prefix length and as the default gw? – TooTea Apr 4 at 11:30
  • Wireshark on an interface shows exactly what's passing through that interface (what's being fed to/read from the HW), so if you see the packets there, it means that all the forwarding/routing/firewall setup inside PC1 works fine. – TooTea Apr 4 at 11:31
  • Pinging from the "wifi user" to works fine and since the wifi user's ip is given by dhcp I assume that the prefix length and gw are ok. A Wireshark instance listening in the "wifi user" interface, shows the ICMP Requests to but not the replies, these are stuck at PC1's wlp2s0, which shows both requests and replies. Weird... – Gabriel Apr 4 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.