Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-31-2008, 08:08 PM   #1
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:-

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?

I also have specified a class A route ( 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 ( hence the hash everything works again.
Can anybody please give me more insight into why/how/fixes etc.

Thanks in advance.


======================= 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: bcast: mask:
eth1 link encap:ethernet hwaddr 00:0c:29:d7:eb:4c
inet addr: bcast: mask:
eth2 link encap:ethernet hwaddr 00:0c:29:d7:eb:56
inet addr: bcast: mask:

#> netstat -rnv

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface U 0 0 0 eth0 U 0 0 0 eth1 UG 0 0 0 eth2 U 0 0 0 eth2 UG 0 0 0 eth1 UG 0 0 0 eth0 UG 0 0 0 eth0 UG 0 0 0 eth0 U 0 0 0 lo UG 0 0 0 eth1

#> cd /etc/sysconfig/network
#> cat routes eth-id-00:0c:29:d7:eb:4c eth-id-00:0c:29:d7:eb:42
# eth-id-00:0c:29:d7:eb:42 eth-id-00:0c:29:d7:eb:42 eth-id-00:0c:29:d7:eb:42 eth-id-00:0c:29:d7:eb:56
#default - -

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

default 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 IP address: done
eth0 configuration: eth-id-00:0c:29:d7:eb:42
eth0 IP address:
Warning: Could not set up default route via interface
Command ip route replace to default via returned:
. RTNETLINK answers: Network is unreachable
Configuration line: default - -
This needs NOT to be AN ERROR if you set up multiple interfaces.
See man 5 routes how to avoid this warning.
eth1 configuration: eth-id-00:0c:29:d7:eb:4c
eth1 IP address: done
eth2 configuration: eth-id-00:0c:29:d7:eb:56
eth2 IP address: done
Setting up service network . . . . . . . . . . . . . . done



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
static routes and ifconfig yiux Linux - Networking 4 06-11-2007 07:24 PM
Problem with Static Routes kewlemer Linux - Networking 5 07-06-2006 02:18 AM
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 > Forums > Linux Forums > Linux - Networking

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

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