Networking Forums

Networking Forums > Computer Networking > Linux Networking > Linux Routing Woes

Reply
Thread Tools Display Modes

Linux Routing Woes

 
 
Jeff
Guest
Posts: n/a

 
      03-06-2005, 09:54 PM
The following routing table is from my Solaris box (172.16.24.89):

Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
172.16.24.0 172.16.24.89 U 1 70 hme0
224.0.0.0 172.16.24.89 U 1 0 hme0
default 172.16.24.100 UG 1 494
127.0.0.1 127.0.0.1 UH 6 129 lo0

I want to dublicate that configuration on my Linux box (SuSE) but I've
encountered a proble. It keeps placing 0.0.0.0 for the host route:

Destination Gateway Genmask Flags Mss Window Iface
172.16.24.0 0.0.0.0 255.255.255.0 U 40 0 eth0
224.0.0.0 0.0.0.0 240.0.0.0 U 40 0 eth0
0.0.0.0 172.16.24.100 0.0.0.0 UG 40 0 eth0

I'm at wit's end. My route.conf on Linux has this entry:
default 172.16.24.100

I've tried adding the address and routes manually with ifconfig and
route and I've tried to add them with SuSE's init.d scripts. No matter
what, I'm left with that routing table. Any thoughts?

Jeff

 
Reply With Quote
 
 
 
 
Michael Heiming
Guest
Posts: n/a

 
      03-06-2005, 10:13 PM
In comp.os.linux.networking Jeff <(E-Mail Removed)>:
> The following routing table is from my Solaris box (172.16.24.89):


> Routing Table: IPv4
> Destination Gateway Flags Ref Use Interface
> -------------------- -------------------- ----- ----- ------ ---------
> 172.16.24.0 172.16.24.89 U 1 70 hme0
> 224.0.0.0 172.16.24.89 U 1 0 hme0
> default 172.16.24.100 UG 1 494
> 127.0.0.1 127.0.0.1 UH 6 129 lo0


> I want to dublicate that configuration on my Linux box (SuSE) but I've
> encountered a proble. It keeps placing 0.0.0.0 for the host route:


> Destination Gateway Genmask Flags Mss Window Iface
> 172.16.24.0 0.0.0.0 255.255.255.0 U 40 0 eth0
> 224.0.0.0 0.0.0.0 240.0.0.0 U 40 0 eth0
> 0.0.0.0 172.16.24.100 0.0.0.0 UG 40 0 eth0


> I'm at wit's end. My route.conf on Linux has this entry:
> default 172.16.24.100


> I've tried adding the address and routes manually with ifconfig and
> route and I've tried to add them with SuSE's init.d scripts. No matter
> what, I'm left with that routing table. Any thoughts?


What's the problem? Looks perfectly valid, Linux doesn't set the
own IP as gateway in the local lan route unlike many other unix
do, nothing to worry about. Things should work fine.

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo (E-Mail Removed) | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 371: Incorrectly configured static routes on
the corerouters.
 
Reply With Quote
 
Jeff
Guest
Posts: n/a

 
      03-06-2005, 11:23 PM

Michael Heiming wrote:
> In comp.os.linux.networking Jeff <(E-Mail Removed)>:
> > The following routing table is from my Solaris box (172.16.24.89):

>
> > Routing Table: IPv4
> > Destination Gateway Flags Ref Use

Interface
> > -------------------- -------------------- ----- ----- ------

---------
> > 172.16.24.0 172.16.24.89 U 1 70 hme0
> > 224.0.0.0 172.16.24.89 U 1 0 hme0
> > default 172.16.24.100 UG 1 494
> > 127.0.0.1 127.0.0.1 UH 6 129 lo0

>
> > I want to dublicate that configuration on my Linux box (SuSE) but

I've
> > encountered a proble. It keeps placing 0.0.0.0 for the host route:

>
> > Destination Gateway Genmask Flags Mss Window Iface
> > 172.16.24.0 0.0.0.0 255.255.255.0 U 40 0 eth0
> > 224.0.0.0 0.0.0.0 240.0.0.0 U 40 0 eth0
> > 0.0.0.0 172.16.24.100 0.0.0.0 UG 40 0 eth0

>
> > I'm at wit's end. My route.conf on Linux has this entry:
> > default 172.16.24.100

>
> > I've tried adding the address and routes manually with ifconfig and
> > route and I've tried to add them with SuSE's init.d scripts. No

matter
> > what, I'm left with that routing table. Any thoughts?

>
> What's the problem? Looks perfectly valid, Linux doesn't set the
> own IP as gateway in the local lan route unlike many other unix
> do, nothing to worry about. Things should work fine.
>
> --
> Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
> mail: echo (E-Mail Removed) | perl -pe 'y/a-z/n-za-m/'
> #bofh excuse 371: Incorrectly configured static routes on
> the corerouters.



The linux machine can't reach the gateway (172.16.24.100). When it
pings other devices on the 172.16.24.* network, it experiences
significant packet loss. It can ping the gateway (with significant
packet loss) but it doesn't seem to recognize 172.16.24.100 as its
default gateway.

Jeff

 
Reply With Quote
 
Floyd L. Davidson
Guest
Posts: n/a

 
      03-07-2005, 01:18 AM
"Jeff" <(E-Mail Removed)> wrote:
>The following routing table is from my Solaris box (172.16.24.89):
>
>Routing Table: IPv4
> Destination Gateway Flags Ref Use Interface
>-------------------- -------------------- ----- ----- ------ ---------
>172.16.24.0 172.16.24.89 U 1 70 hme0
>224.0.0.0 172.16.24.89 U 1 0 hme0
>default 172.16.24.100 UG 1 494
>127.0.0.1 127.0.0.1 UH 6 129 lo0
>
>I want to dublicate that configuration on my Linux box (SuSE) but I've
>encountered a proble. It keeps placing 0.0.0.0 for the host route:


The 0.0.0.0 under the "Destination" heading is exactly the same
as "default". Under the "Gateway" heading it means no gateway
(With no gateway, the host with the addressed IP address must be
physically on the ethernet segment connected to the interface
the packets are routed to.)

The above routing table sends *all* traffic to one of two hosts
on your LAN (via interface hme0). Addresses in the 172.16.24.0
subnet and the 224.0.0.0 subnet are addressed to 172.16.24.89,
which *must* be a host physically on your ethernet. All other
traffic is addressed to 172.16.24.100, which also must be a
host physically on your ethernet.


>Destination Gateway Genmask Flags Mss Window Iface
>172.16.24.0 0.0.0.0 255.255.255.0 U 40 0 eth0
>224.0.0.0 0.0.0.0 240.0.0.0 U 40 0 eth0
>0.0.0.0 172.16.24.100 0.0.0.0 UG 40 0 eth0


The difference is that the Linux box is not routing to the
specific gateway, 172.16.24.89, that the Solaris box is.

With this route table the Linux box will route all 172.16.24.0
network and 224.0.0.0 network traffic to the addressed hosts on
the physical ethernet. It will fail if there is such host with
that IP address. Other than those two networks, all traffic
will be routed to eth0 addressed to 172.16.24.100, which must be
a host on your ethernet.

>I'm at wit's end. My route.conf on Linux has this entry:
>default 172.16.24.100


That's the only part that seems to be right!

>I've tried adding the address and routes manually with ifconfig and
>route and I've tried to add them with SuSE's init.d scripts. No matter
>what, I'm left with that routing table. Any thoughts?


I don't know SuSE, so I can't tell you how to configure it. But
the route commands themselves are fairly easy.

First, there must be a route to the gateway. Due to the way routes
are used that can either be a "host" route or a "network" route.

Any of one these commands will do it:

/sbin/route add -host 172.16.24.89 eth0
/sbin/route add -net 172.16.24.89 netmask 255.255.255.255 eth0
/sbin/route add -net 172.16.24.0 netmask 255.255.255.0 eth0

Note that the first two are actually exactly the same thing,
just expressed different ways. A network route with a mask
allowing only one host, is a host route! The third command
covers the entire subnet, but since the next thing you'll do is
send the entire subnet to a gateway, it is not a problem if the
routing entry is overly broad.

These two commands will then gateway the specific subnets to
that particular host.

route add -net 172.16.24.0 gw 172.16.24.89 netmask 255.255.255.0 eth0
route add -net 224.0.0.0 gw 172.16.24.89 netmask 255.0.0.0 eth0

Now you want to add the default gateway to 172.16.24.100. If
the host route command was used above, you'll need another one
for this host.

/sbin/route add -host 172.16.24.89 eth0

If the net route command was used, it already has a route, and
that is not necessary. Just add the default route,

/sbin/route add default gw 172.16.24.100 eth0

Different versions of the route command print the tables with different
formatting, but it appears to me that your Linux box would then have a
route table that is printed something like this, if the individual host
route commands are used:

Destination Gateway Genmask Flags Mss Window Iface
172.16.24.89 0.0.0.0 255.255.255.255 UH 40 0 eth0
172.16.24.100 0.0.0.0 255.255.255.255 UH 40 0 eth0
172.16.24.0 172.16.24.89 255.255.255.255 UG 40 0 eth0
224.0.0.0 172.16.24.89 240.0.0.0 UG 40 0 eth0
0.0.0.0 172.16.24.100 0.0.0.0 UG 40 0 eth0

If the network route command is used, it will look a little different:

Destination Gateway Genmask Flags Mss Window Iface
172.16.24.0 172.16.24.89 255.255.255.255 UG 40 0 eth0
224.0.0.0 172.16.24.89 240.0.0.0 UG 40 0 eth0
172.16.24.0 0.0.0.0 255.255.255.0 U 40 0 eth0
0.0.0.0 172.16.24.100 0.0.0.0 UG 40 0 eth0

Note that the most restrictive route is listed first, hence the switch
in the order they are listed. The results are exactly the same though.

Note also that current version of ifconfig will automatically add a
network route to whatever subnet matches the configured IP address.
You may want to delete that, or you might want to use it... depending
one what it is. For example, if eth0 is configured with an IP address
of 172.16.24.5, the above "172.16.24.0 0.0.0.0 255.255.255 ..."
network route will already be there. If the eth0 address is in some
other subnet range, it will need to be deleted.

--
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) (E-Mail Removed)
 
Reply With Quote
 
Floyd L. Davidson
Guest
Posts: n/a

 
      03-07-2005, 01:32 AM
"Jeff" <(E-Mail Removed)> wrote:
>> In comp.os.linux.networking Jeff <(E-Mail Removed)>:
>> > The following routing table is from my Solaris box (172.16.24.89):
>> > Destination Gateway Flags Ref Use Interface
>> > -------------------- -------------------- ----- ----- ---------------
>> > 172.16.24.0 172.16.24.89 U 1 70 hme0
>> > 224.0.0.0 172.16.24.89 U 1 0 hme0
>> > default 172.16.24.100 UG 1 494
>> > 127.0.0.1 127.0.0.1 UH 6 129 lo0

>>
>> > I want to dublicate that configuration on my Linux box (SuSE) but I've
>> > encountered a proble. It keeps placing 0.0.0.0 for the host route:

>>
>> > Destination Gateway Genmask Flags Mss Window Iface
>> > 172.16.24.0 0.0.0.0 255.255.255.0 U 40 0 eth0
>> > 224.0.0.0 0.0.0.0 240.0.0.0 U 40 0 eth0
>> > 0.0.0.0 172.16.24.100 0.0.0.0 UG 40 0 eth0



>The linux machine can't reach the gateway (172.16.24.100).


That statement doesn't make sense when you then immediately
below say that yes it in fact does reach the gateway. (So I'll
ignore the above... :-)

>When it
>pings other devices on the 172.16.24.* network, it experiences
>significant packet loss. It can ping the gateway (with significant
>packet loss) but it doesn't seem to recognize 172.16.24.100 as its
>default gateway.


The high packet losses indicate you have a separate, perhaps
hardware based, problem.

The problems with the routing is addressed in detail in another
post that followed up your original article.

As is, the above should be able to ping the 172.16.24.100
gateway. It should also be able to ping any host on the
ethernet with a 172.16.24.0 or 224.0.0.0 IP address. It will
*not* route those addresses to the gateway though, which means
it will only work if they are physically on your ethernet.

As configured, the only time the gateway is going to act as a
gateway is when the IP address is not a 172.16.24.0 or 224.0.0.0
address.

High packet losses to hosts on the ethernet suggests either a
physical network problem, or a very congested network. That is
totally separate from routing problems. You might have a bad
cable or a defective network interface card, for example.

--
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) (E-Mail Removed)
 
Reply With Quote
 
Michael Heiming
Guest
Posts: n/a

 
      03-07-2005, 05:00 AM
In comp.os.linux.networking Jeff <(E-Mail Removed)>:

> Michael Heiming wrote:
>> In comp.os.linux.networking Jeff <(E-Mail Removed)>:
>> > The following routing table is from my Solaris box (172.16.24.89):

>>
>> > Routing Table: IPv4
>> > Destination Gateway Flags Ref Use

> Interface
>> > -------------------- -------------------- ----- ----- ------

> ---------
>> > 172.16.24.0 172.16.24.89 U 1 70 hme0
>> > 224.0.0.0 172.16.24.89 U 1 0 hme0
>> > default 172.16.24.100 UG 1 494
>> > 127.0.0.1 127.0.0.1 UH 6 129 lo0

>>
>> > I want to dublicate that configuration on my Linux box (SuSE) but

> I've
>> > encountered a proble. It keeps placing 0.0.0.0 for the host route:

>>
>> > Destination Gateway Genmask Flags Mss Window Iface
>> > 172.16.24.0 0.0.0.0 255.255.255.0 U 40 0 eth0
>> > 224.0.0.0 0.0.0.0 240.0.0.0 U 40 0 eth0
>> > 0.0.0.0 172.16.24.100 0.0.0.0 UG 40 0 eth0

[..]

>> What's the problem? Looks perfectly valid, Linux doesn't set the
>> own IP as gateway in the local lan route unlike many other unix
>> do, nothing to worry about. Things should work fine.


> The linux machine can't reach the gateway (172.16.24.100). When it
> pings other devices on the 172.16.24.* network, it experiences
> significant packet loss. It can ping the gateway (with significant
> packet loss) but it doesn't seem to recognize 172.16.24.100 as its
> default gateway.


Package loss is usually due to duplex miss-match, try 'mii-tool',
the routing should be fine. "172.16.24.89" is the IP of the
solaris box, the route pointing to his own address is fine, Linux
doesn't use that for the route to the LAN it's directly connected
to, it uses the "0.0.0.0".

You say it can't reach the gateway and below it could ping it
with significant packet loss? What you mean with it doesn't
recognize 172.16.24.100 as default gateway sounds like the
gateway, a firewall or so, isn't configured to let packets from
your box through.

You need to fix your duplex miss-match errors and ask the guy in
charge for the default gateway to configure it to allow packets
from your box to pass.

Good luck

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo (E-Mail Removed) | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 222: I'm not sure. Try calling the Internet's
head office -- it's in the book.
 
Reply With Quote
 
Sir Jackery
Guest
Posts: n/a

 
      03-07-2005, 05:01 AM


On 6 Mar 2005, Jeff wrote:

> The following routing table is from my Solaris box (172.16.24.89):
>
> Routing Table: IPv4
> Destination Gateway Flags Ref Use Interface
> -------------------- -------------------- ----- ----- ------ ---------
> 172.16.24.0 172.16.24.89 U 1 70 hme0
> 224.0.0.0 172.16.24.89 U 1 0 hme0
> default 172.16.24.100 UG 1 494
> 127.0.0.1 127.0.0.1 UH 6 129 lo0
>
> I want to dublicate that configuration on my Linux box (SuSE) but I've
> encountered a proble. It keeps placing 0.0.0.0 for the host route:
>
> Destination Gateway Genmask Flags Mss Window Iface
> 172.16.24.0 0.0.0.0 255.255.255.0 U 40 0 eth0
> 224.0.0.0 0.0.0.0 240.0.0.0 U 40 0 eth0
> 0.0.0.0 172.16.24.100 0.0.0.0 UG 40 0 eth0
>
> I'm at wit's end. My route.conf on Linux has this entry:
> default 172.16.24.100
>
> I've tried adding the address and routes manually with ifconfig and
> route and I've tried to add them with SuSE's init.d scripts. No matter
> what, I'm left with that routing table. Any thoughts?
>
> Jeff
>
>


I don't have a solution to your problem (I can't figure out what exactly
your problem is (-: ).

I would just like to point out that you are comparing a "route" with a
"route -n"

Think of the word "default" as a hostname that resolves to 0.0.0.0. The
zeros in a net route refer to wildcards, so 0.0.0.0 would be *.*.*.*. To
compare routing tables type use the -n command to display your routing
table on your solaris box and then compare the two outputs.

-jackery

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multihomed Server Routing Woes: Two network segments can't communi E. Lavidor Windows Networking 5 07-18-2007 05:58 PM
Linksys WRT54GC routing woes /mel/ Broadband 2 09-03-2005 06:40 PM
vnc woes (Windows -> Linux) kj Linux Networking 2 03-03-2005 02:44 PM
routing woes /dev/null Linux Networking 5 11-10-2004 05:39 PM
Linux ADSL PPPoA woes... chris Linux Networking 0 08-30-2004 06:34 PM



1 2 3 4 5 6 7 8 9 10 11