0

i have two computers.

computer A network devices:

dev   address
-------------
wlan0 192.168.1.2
eth0  10.42.0.1

computer A routing table:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0
10.42.0.0       10.42.0.1       255.255.255.0   UG    0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0

computer B network devices:

dev   address
-------------
eth0  10.42.0.2

computer B routing table:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.42.0.1       0.0.0.0         UG    0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0

So computers A and B are connected via ethernet through a switch and computer A is connected to another network (192.168.1.0) though a wireless router (192.168.1.1). I thought this setup would connect the two networks.

On computer B, I try to ping the wireless router

ping 192.168.1.1

I'm running iptraf on computer A and I can see the request being routed through computer A

ICMP echo req (84 bytes) from 10.42.0.2 to 192.168.1.1 on eth0

but there is no response.

I thought I understood the route table but I guess I was wrong. Please help!

EDIT:

I added an entry in the wireless router routing table:

Destination LAN IP Subnet Mask    Gateway      Interface
0.0.0.0            255.255.255.0  x.x.x.x       WAN (Internet)
0.0.0.0            0.0.0.0        x.x.x.1       WAN (Internet)
10.42.0.0          255.255.255.0  192.168.1.2   LAN & Wireless
x.x.x.0            255.255.252.0  x.x.x.x       WAN (Internet)
192.168.1.0        255.255.255.0  192.168.1.1   LAN & Wireless

and that appears to have done the trick! it works now, thanks garethTheRed

  • what does sysctl net.ipv4.ip_forward show? – garethTheRed Sep 16 '15 at 20:08
  • net.ipv4.ip_forward = 0. should it be 1? – chuck1 Sep 16 '15 at 20:20
  • Oh yes :-) Run sysctl -w net.ipv4.ip_forward=1 as root and try again. – garethTheRed Sep 16 '15 at 20:21
  • ok did that, but I still cant ping the wireless router (192.168.1.1) from computer B. however, there are two other devices on the wireless network and I can ping one but not the other. (both can be pinged from computer A). very confused – chuck1 Sep 16 '15 at 20:32
  • Do these devices have a firewall? Also, you'll need to have a static route on the router that sends traffic for computer B to computer A, otherwise it will send it down your wireless device's default route. – garethTheRed Sep 16 '15 at 20:35
2

I added an entry in the wireless router routing table:

Destination LAN IP Subnet Mask    Gateway      Interface
0.0.0.0            255.255.255.0  x.x.x.x       WAN (Internet)
0.0.0.0            0.0.0.0        x.x.x.1       WAN (Internet)
10.42.0.0          255.255.255.0  192.168.1.2   LAN & Wireless
x.x.x.0            255.255.252.0  x.x.x.x       WAN (Internet)
192.168.1.0        255.255.255.0  192.168.1.1   LAN & Wireless

and that appears to have done the trick! it works now, thanks garethTheRed

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.