LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I need some routes (https://www.linuxquestions.org/questions/linux-newbie-8/i-need-some-routes-64239/)

|Drakehash| 06-07-2003 02:24 PM

I need some routes
 
I am here because i am newbie :)

i have 2 nics to go out (internet conection) and 2 for the internal network (i am using masq).

i need route one machine of my private lan to use a gateway, i donīt know how, i canīt and donīt want update linux (i have redhat with kernel 2.2.16).

see this:


Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 200.185.178.2 0.0.0.0 UG 0 0 0 eth3
0.0.0.0 200.185.178.100 0.0.0.0 UG 1 0 0 eth2

i want Destination 192.168.2.2 use as a default gw 200.185.178.2

and the other networks use as a default gw the 200.185.178.100

how i can do that? (kernel 2.2.16 with ipchains).

anon099 06-08-2003 12:22 AM

hmm...
well the first one should be:
Code:

route add -net 192.168.2.2 netmask 255.255.255.255 gw 200.185.178.2 dev eth3
and the second should be:
Code:

route add default gw 200.185.178.100 dev eth2
i would do at least a
Code:

man route
to find out some more about the route command and setting up gate ways


All times are GMT -5. The time now is 09:55 AM.