im having troubles with raspbian (raspberry's debian) while trying to route two networks. My network configuration is this (/etc/network/interfaces):

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

iface eth1 inet static

And this is what route prints:

root@raspberrypi:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         UG    0      0        0 eth0        *        U     0      0        0 eth1    *      U     0      0        0 eth0

root@raspberrypi:~# route -C
Kernel IP routing cache
Source          Destination     Gateway         Flags Metric Ref    Use Iface

When I execute "cat /proc/sys/net/ipv4/ip_forward" it returns 1, so I assume ipForwarding is running. But the problem is that it is not forwarding packets between network adapters..

I can ping between devices on the same network, but when I try to contact with hosts on the other network it fails... I don't know what im missing or why is my routing cache empty. Someone knows?

  • How do you know forwarding isn't working? Consider A → Raspbian → B, does A have a route to B's network via Raspbian, and does B have a route to A's network also via Raspbian? – roaima May 20 '15 at 23:16
  • I can ping from A to any host on A network and also to Raspbian (interface on A) But cannot connect from A to raspbians B network adapter. – Akiru May 20 '15 at 23:34


I was so much focused on raspbian, thinking that the issue should be there, and found that my internet (gateway) router on wasnt redirecting back to (raspbian). So, I manually added the route in and fixed!

Seems that my raspberry was successfully configured, and I was so blind looking at it that forgot to configure my main gateway (the one who exits to internet).

Thanks @roaima for opening my eyes!


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.