LinuxQuestions.org
Help answer threads with 0 replies.
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 08-21-2005, 06:18 AM   #1
sti2envy
Member
 
Registered: Sep 2004
Posts: 43

Rep: Reputation: 15
static routes using route-eth0 file


I've got two ethernet interfaces eth0 and 1. I'm using eth1 for pppoe connection with a modem, and eth0 for dsl connection to a router. I have setup a static routing to my isp's smtp server using eth0 in the config file /etc/sysconfig/network-scripts/route-eth0:

192.168.2.0/24 via 192.168.1.1 # test to see if this route populate into routing table n it does.
smtp.xtra.co.nz via 192.168.1.1 # does not populate into routing table at all

What happens is that the second route does not popylate into routing table but first one does. Do I have to specify the static route by ip instead of domain name for this to work? This is my current routing table:

Destination Gateway Genmask Flags Metric Ref Use Iface
lns2.sky.woosh. * 255.255.255.255 UH 0 0 0 ppp0
192.168.2.0 192.168.1.1 255.255.255.0 UG 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default lns2.sky.woosh. 0.0.0.0 UG 0 0 0 ppp0

I know I can put this route into /etc/rc.local by doing:
route add -host smtp.xtra.co.nz gw 192.168.1.1 dev eth0

I just wanna know if the route-eth0 will support using domain names instead of IP's.

Thanks.
 
Old 08-22-2005, 12:49 PM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 47
At the time that eth0 is being activated, do you have a route for dns queries to resolve the mail server?

If not, add xtra's url to your /etc/hosts and try again..

Also have a look at http://tldp.org/HOWTO/Adv-Routing-HOWTO for the split routing setup.. Chapters 4 & 5
 
Old 09-08-2007, 10:10 AM   #3
hevercosta
LQ Newbie
 
Registered: Sep 2007
Posts: 1

Rep: Reputation: 0
destination route using hostname

It is not possible, because the package iproute2 used in network scripts, does not support routing by destination using hostnames.

In Centos 4.5
Ex:
#ip route add linux.com via 192.168.1.1
#Error: an inet prefix is expected rather than "linux.com".
ping linux.com
#PING linux.com (66.35.250.176) 56(84) bytes of data
#ip route add 66.35.250.176 via 192.168.1.1
ip route ls|grep 66.35
66.35.250.176 via 192.168.1.1 dev eth0

Hever Costa Rocha
 
  


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
How do I config static routes? mikezang Linux - Networking 4 10-31-2005 11:29 AM
Max Static Routes? roundst Linux - Networking 2 07-28-2005 03:51 AM
automatic static routes? eantoranz Linux - Networking 5 07-19-2005 09:30 PM
Static routes file error message jhimes Linux - Networking 0 09-29-2004 12:26 AM
What is eth0.route file? ebreiter Linux - Networking 1 09-09-2004 06:35 AM


All times are GMT -5. The time now is 02:46 AM.

Main Menu
Advertisement
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