RE: Howto configure for two Internet connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I've got a system that sees two gateways to the Internet and receives
> packets over both of them.  For reasons that I'd rather not have
> to explain
> I need to somehow make certain that replies go out through the
> same gateway
> through which the original message came.  Is there a way to
> configure this?
>

What does each NIC attach to?  Same router?  different router?  Check out
the route(8) man page.

route add default gw [default gateway1] eth0
route add default gw [default gateway2] eth1

If you don't have two separate routers for each NIC, I think you can specify
as the default gateway the address of the card itself also.  So if eth0 is
10.10.1.10 and eth1 is 10.10.1.11 you could do
route add default gw 10.10.1.10 eth0
route add default gw 10.10.1.11 eth1
I haven't had to do that before so I do'nt know if that will work .
According
to the route(8) man page it says this about adding the eth IP as the gw
itself

"If you specify the address of one of your local interfaces,  it  will  be
used  to
decide about the interface to which the packets should be routed
to. This is a BSDism compatibility hack."

I didn't quite understand what that meant . Anyway, give that a shot.

Ben Yau


-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux