LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   two routing tables (https://www.linuxquestions.org/questions/linux-networking-3/two-routing-tables-262181/)

fugzi 12-03-2004 12:11 PM

two routing tables
 
I want to set up two routing tables for my linux router. one table i want it to use all the time. and the other table i want it to use when a certain web site is trying to be accessed. how do i set this up.

sigsegv 12-03-2004 01:17 PM

What are you trying to accomplish? If you're wanting to create a blackhole for a certain website, just block access to it with iptables (or set a host entry pointing it to 127.0.0.1 if it's just for that box). If you're wanting to take an alternate path to that website, do route add <website IP> <nexthop IP>

fugzi 12-03-2004 05:02 PM

well i have sorta a odd configuration and am having trouble with a website that i visit. the web site uses a kebros login and will only auth for 1 ip range. i have 4 wans that get load balanced though 3 daul wan routers. 2 wans for for each router and then an other daul wan to load balance them. i have one of the routers on the same group of ip addresses. so i want to direct all traffic to my.website.edu to 172.16.62.1 instead of the default gw 10.16.60.1. the linux box that i am using has 3 eth cards in it. eth0 is set up for testing on the wan right now with ip address 10.16.62.241. then eth1 is the card i want to direct all traffice to my.website.edu to. and eth2 is local

vald 12-03-2004 05:08 PM

as says sigsegv you just need to say your linux, that you want to go to my.website.edu throught 172.16.62.1

route add -host my.website.edu.ip 172.16.62.1

Good luck!

fugzi 12-03-2004 05:27 PM

a little visual
http://home.comcast.net/~fugzi/setup.jpg

fugzi 12-03-2004 05:33 PM

when i use that scheme, i get an error "SIOCADDRT: No such device"

here is the cmd:
Code:

route add -host 169.237.x.x 172.16.62.1

here is my current routing table:
Code:

Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
172.16.62.0    *              255.255.255.248 U    0      0        0 eth1
192.168.1.0    *              255.255.255.0  U    0      0        0 eth2
10.16.60.0      *              255.255.254.0  U    0      0        0 eth0
loopback        localhost      255.0.0.0      UG    0      0        0 lo
default        10.16.60.1      0.0.0.0        UG    0      0        0 eth0


sigsegv 12-03-2004 05:45 PM

What IP do you have on 172.16.62.0/29? It thinks you're not on the same network as 172.16.62.1 (and if you're above 172.16.62.6, it's right)

fugzi 12-03-2004 06:02 PM

the ip is 172.16.62.3 for the linux box with the same mask


All times are GMT -5. The time now is 03:41 PM.