LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 12-03-2004, 12:11 PM   #1
fugzi
LQ Newbie
 
Registered: Aug 2003
Distribution: gentoo
Posts: 9

Rep: Reputation: 0
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.

Last edited by fugzi; 12-03-2004 at 12:13 PM.
 
Old 12-03-2004, 01:17 PM   #2
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
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>
 
Old 12-03-2004, 05:02 PM   #3
fugzi
LQ Newbie
 
Registered: Aug 2003
Distribution: gentoo
Posts: 9

Original Poster
Rep: Reputation: 0
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

Last edited by fugzi; 12-03-2004 at 05:05 PM.
 
Old 12-03-2004, 05:08 PM   #4
vald
LQ Newbie
 
Registered: Sep 2004
Location: Bulgaria
Distribution: Fedora
Posts: 14

Rep: Reputation: 0
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!
 
Old 12-03-2004, 05:27 PM   #5
fugzi
LQ Newbie
 
Registered: Aug 2003
Distribution: gentoo
Posts: 9

Original Poster
Rep: Reputation: 0
a little visual
http://home.comcast.net/~fugzi/setup.jpg
 
Old 12-03-2004, 05:33 PM   #6
fugzi
LQ Newbie
 
Registered: Aug 2003
Distribution: gentoo
Posts: 9

Original Poster
Rep: Reputation: 0
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
 
Old 12-03-2004, 05:45 PM   #7
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
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)
 
Old 12-03-2004, 06:02 PM   #8
fugzi
LQ Newbie
 
Registered: Aug 2003
Distribution: gentoo
Posts: 9

Original Poster
Rep: Reputation: 0
the ip is 172.16.62.3 for the linux box with the same mask

Last edited by fugzi; 12-03-2004 at 06:09 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
routing tables props666999 Linux - Networking 1 10-14-2005 08:27 PM
Routing tables TPB Linux - Networking 3 07-27-2005 09:01 PM
IP Routing Tables collern2 Linux - Security 1 05-23-2005 10:48 AM
routing tables help hadoque Linux - Networking 0 08-28-2004 09:10 AM
routing tables dunkyb Linux - Networking 3 05-25-2003 02:10 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration