thanks in advance

I have 2 networks and one debian gateway

network 1 (eth0) network 2 (eth1)

if I want ping from 10.... to 192.... do I need to add both gateways to the pcs ? like and If I put then like that the ping occur with no problems, if I put only has gateway, there is no ping. from 10 to 192


You can have many interfaces on a system. Each one can have an IP on a diffferent subnet. There's a default gateway where all traffic go to. You'll need to add static route for other subnets.

For example.

eth0 eth1 eth2 default gw:

If there's no other routes, all outgoing traffics will go to, even those for 10.x.x.x.

There should be gw for other subnet also, hopefully. You should have static routes such as

route add -net gw dev eth1

route add -net gw dev eth2

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.