LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 05-31-2008, 07:08 PM   #1
TimtheEagle
LQ Newbie
 
Registered: May 2008
Distribution: SLES 9 and 10
Posts: 1

Rep: Reputation: 0
Question Static routes using routes/ifroutes-eth-id.. files and default gateway disabled


Hi all,

I am configuring static routes on SLES 10 SP1 & SP2 but I believe that these are to a certain extent general problems.
I have come across a number of things that I have had to work around and I was hoping to get other people's feedback on them.

There are a number of config outputs etc below to make it easier to explain.
Basically I am setting up static routes on a 3 NIC host and if:-

1)
I only use the routes file I get the error right at the bottom ..."This needs NOT to be AN ERROR"... so after digging around I use the ifroute-eth-id-... file (see below) as well and remove the default gateway from the bottom of the routes file.
I can't find a decent explanation of why I need to use the ifroute-eth.. file(s) over routes anywhere.
The error goes but then "yast lan" does not show the gateway. Am I to assume that once you use these files it is outside of yast's view of the world?

2)
I also have specified a class A route (10.0.0.0/8) via a NIC that is not the overall default gateway. However, the overall default gateway address is also within this address range. The net effect is that the default gateway doen't work.
In other networking it is usually the most specific route that takes precedence but this doesn't seem to be happening here. Note you can ping devices that are on the local network so I know that the NIC works. In addition when I change the class A to a class B (10.240.0.0/16) hence the hash everything works again.
Can anybody please give me more insight into why/how/fixes etc.

Thanks in advance.

Cheers
Tim

======================= Configs and Outputs =========================

#> ifconfig -a | grep HW -A 1 | tr A-Z a-z

eth0 link encap:ethernet hwaddr 00:0c:29:d7:eb:42
inet addr:10.240.252.158 bcast:10.240.252.159 mask:255.255.255.248
--
eth1 link encap:ethernet hwaddr 00:0c:29:d7:eb:4c
inet addr:10.242.252.3 bcast:10.242.252.7 mask:255.255.255.248
--
eth2 link encap:ethernet hwaddr 00:0c:29:d7:eb:56
inet addr:10.230.230.99 bcast:10.230.230.255 mask:255.255.255.0

#> netstat -rnv

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.240.252.152 0.0.0.0 255.255.255.248 U 0 0 0 eth0
10.242.252.0 0.0.0.0 255.255.255.248 U 0 0 0 eth1
10.242.64.240 10.230.230.1 255.255.255.240 UG 0 0 0 eth2
10.230.230.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
10.241.0.0 10.242.252.1 255.255.0.0 UG 0 0 0 eth1
10.240.0.0 10.240.252.153 255.255.0.0 UG 0 0 0 eth0
192.168.0.0 10.240.252.153 255.255.0.0 UG 0 0 0 eth0
172.16.0.0 10.240.252.153 255.240.0.0 UG 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 10.242.252.1 0.0.0.0 UG 0 0 0 eth1


#> cd /etc/sysconfig/network
#> cat routes

10.241.0.0 10.242.252.1 255.255.0.0 eth-id-00:0c:29:d7:eb:4c
10.240.0.0 10.240.252.153 255.255.0.0 eth-id-00:0c:29:d7:eb:42
#10.0.0.0 10.240.252.153 255.0.0.0 eth-id-00:0c:29:d7:eb:42
172.16.0.0 10.240.252.153 255.240.0.0 eth-id-00:0c:29:d7:eb:42
192.168.0.0 10.240.252.153 255.255.0.0 eth-id-00:0c:29:d7:eb:42
10.242.64.240 10.230.230.1 255.255.255.240 eth-id-00:0c:29:d7:eb:56
#default 10.242.252.1 - -


#> cat ifroute-eth-id-00\:0c\:29\:d7\:eb\:4c

default 10.242.252.1 0.0.0.0 eth1


=======================================================================

>>> messages when default gateway is NOT hashed above in routes <<<
>>> file and ifroute-eth-id-00:0c:29:d7:eb:4c above is removed <<<

Setting up network interfaces:
lo
lo IP address: 127.0.0.1/8 done
eth0
eth0 configuration: eth-id-00:0c:29:d7:eb:42
eth0 IP address: 10.240.252.158/29
Warning: Could not set up default route via interface
Command ip route replace to default via 10.242.252.1 returned:
. RTNETLINK answers: Network is unreachable
Configuration line: default 10.242.252.1 - -
This needs NOT to be AN ERROR if you set up multiple interfaces.
See man 5 routes how to avoid this warning.
done
eth1
eth1 configuration: eth-id-00:0c:29:d7:eb:4c
eth1 IP address: 10.242.252.3/29 done
eth2
eth2 configuration: eth-id-00:0c:29:d7:eb:56
eth2 IP address: 10.230.230.99/24 done
Setting up service network . . . . . . . . . . . . . . done

=========================================================================
 
  


Reply



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
static routes and ifconfig yiux Linux - Networking 4 06-11-2007 06:24 PM
Problem with Static Routes kewlemer Linux - Networking 5 07-06-2006 01:18 AM
How do I config static routes? mikezang Linux - Networking 4 10-31-2005 10:29 AM
Max Static Routes? roundst Linux - Networking 2 07-28-2005 02:51 AM
automatic static routes? eantoranz Linux - Networking 5 07-19-2005 08:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:42 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
Open Source Consulting | Domain Registration