Networking Forums

Networking Forums > Computer Networking > Linux Networking > routing problems on linux

Reply
Thread Tools Display Modes

routing problems on linux

 
 
Mark
Guest
Posts: n/a

 
      06-03-2005, 02:40 AM
Hi,

I have a problem where I can't get my linux pc ( running SUSE ) to see the
internet
through a DLink DSL-G604T wireless router/hub.

The PC is connected to the router via one of its ethernet ports.
The PC can see the router. I can ping its address successfully.
Any attempts to ping addresses on the other side of the router result in
"Network unreachable" message.
There are no firewalls in place.
I can ping other machines connected to the same network via the device
successfully.
I have a laptop running XP on the same network that can successfully see the
internet.
The router can see addresses on the WAN, so I don't think its a problem with
the
router...possible something to do with the routing setup.

I've currently got my routed.conf set up as simply
default 192.168.0.1 255.255.255.0 eth0

where 192.168.0.1 is the address of my router.


Any help on this problem, gratefully received.

Mark


 
Reply With Quote
 
 
 
 
lasseboo
Guest
Posts: n/a

 
      06-03-2005, 07:26 AM
Hi, Mark,

I experienced the same problem sometimes; mostly it was either

- a wrong interface for the default gateway
- or a wrong default gateway

what shows

route

on the linux-box?

and on the XP-box, when you open a dos-box (if you have one, press
Windowskey and R and then type cmd). what shows

route print

there?

greetings


lasseboo

 
Reply With Quote
 
Mark
Guest
Posts: n/a

 
      06-03-2005, 02:39 PM
>
> what shows
>
> route
>
> on the linux-box?
>


on the linux box I get ...

default 192.168.0.1 255.255.255.255 UGH 0 0 0 eth0
default 192.168.0.1 255.255.255.0 UG 0 0 0 eth0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
192.168.0.0 * 255.255.0.0 U 0 0 0 eth0

I'm not sure why the routes are shown twice, as I only specify the
default route once in routed.conf.

> and on the XP-box, when you open a dos-box (if you have one, press
> Windowskey and R and then type cmd). what shows
>


on the XP box I get ....

alot of other routes..
+
default gateway 192.168.0.1



Mark


 
Reply With Quote
 
David Efflandt
Guest
Posts: n/a

 
      06-03-2005, 06:25 PM
On Fri, 3 Jun 2005, Mark <(E-Mail Removed)> wrote:
>>
>> what shows
>>
>> route
>>
>> on the linux-box?
>>

>
> on the linux box I get ...
>
> default 192.168.0.1 255.255.255.255 UGH 0 0 0 eth0
> default 192.168.0.1 255.255.255.0 UG 0 0 0 eth0
> 192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
> 192.168.0.0 * 255.255.0.0 U 0 0 0 eth0
>
> I'm not sure why the routes are shown twice, as I only specify the
> default route once in routed.conf.


Why did you set a -host route for 192.168.0.1 and default route for
192.168.0.1/255.255.255.0 network only, when both of those are local
networks covered by one of your last 2 routes (why 2 different netmasks
for 192.168.0.0 network?)?

You need a default route using gateway 192.168.0.1, assuming that is
router LAN IP, and netmask for default route should automatically be
0.0.0.0 (since it covers any IP not covered by another route).

So get rid of however you set your "not really" default route, configure
your eth0 for the proper netmask you want it to have (255.255.255.0 OR
255.255.0.0, not both), and if you cannot figure out how to configure
routed.conf, try:

route add default gw 192.168.0.1 dev eth0
 
Reply With Quote
 
Mark
Guest
Posts: n/a

 
      06-03-2005, 09:51 PM
> Why did you set a -host route for 192.168.0.1 and default route for
> 192.168.0.1/255.255.255.0 network only, when both of those are local
> networks covered by one of your last 2 routes (why 2 different netmasks
> for 192.168.0.0 network?)?


the only route I have explicitly set ( in route.conf file ) is
default 192.168.0.1 255.255.255.0

which is the same as the gateway configuration on my XP box.

I'm not sure where the other lines are coming wrong since I have'nt ( to my
knowledge )
explicitly set them...

Mark


 
Reply With Quote
 
David Efflandt
Guest
Posts: n/a

 
      06-04-2005, 09:07 PM
On Fri, 3 Jun 2005, Mark <(E-Mail Removed)> wrote:
>> Why did you set a -host route for 192.168.0.1 and default route for
>> 192.168.0.1/255.255.255.0 network only, when both of those are local
>> networks covered by one of your last 2 routes (why 2 different netmasks
>> for 192.168.0.0 network?)?

>
> the only route I have explicitly set ( in route.conf file ) is
> default 192.168.0.1 255.255.255.0
>
> which is the same as the gateway configuration on my XP box.


I doubt it. Where my XP box shows "Default Gateway:" it just shows an IP,
NOT a Netmask. Like I said, the above in Linux is not a default route
and the default route should end up at the bottom of your routing looking
similar to:

default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0

> I'm not sure where the other lines are coming wrong since I have'nt ( to my
> knowledge )
> explicitly set them...


Something is apparently setting 2 different netmasks. Maybe the netmask
for your eth0 is set different from your routing, or is is due to the
misconfigured default route. But I do not recall if you mentioned whether
your LAN uses 255.255.255.0 or 255.255.0.0 netmask.
 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      06-04-2005, 09:52 PM
(E-Mail Removed) (David Efflandt) writes:

>On Fri, 3 Jun 2005, Mark <(E-Mail Removed)> wrote:
>>> Why did you set a -host route for 192.168.0.1 and default route for
>>> 192.168.0.1/255.255.255.0 network only, when both of those are local
>>> networks covered by one of your last 2 routes (why 2 different netmasks
>>> for 192.168.0.0 network?)?

>>
>> the only route I have explicitly set ( in route.conf file ) is
>> default 192.168.0.1 255.255.255.0


This makes no sense at all. The default netmask is 0.0.0.0
The default address is 0.0.0.0 with your netmask this would only match an
address of the form 0.0.0.x
which does not exist.


>>
>> which is the same as the gateway configuration on my XP box.


>I doubt it. Where my XP box shows "Default Gateway:" it just shows an IP,
>NOT a Netmask. Like I said, the above in Linux is not a default route
>and the default route should end up at the bottom of your routing looking
>similar to:


>default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0


>> I'm not sure where the other lines are coming wrong since I have'nt ( to my
>> knowledge )
>> explicitly set them...


>Something is apparently setting 2 different netmasks. Maybe the netmask
>for your eth0 is set different from your routing, or is is due to the
>misconfigured default route. But I do not recall if you mentioned whether
>your LAN uses 255.255.255.0 or 255.255.0.0 netmask.


No that is just another number in the route. He does not need it as long as
he has an entry which tells the system how to send messages to 192.168.0.1
since that is needed for the default route. But his default route is
screwed up.


 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      06-04-2005, 10:00 PM
In article <d7pq30$ojo$(E-Mail Removed)>, Mark wrote:

>on the linux box I get ...


Wow, that is extremely broken. I don't know if your DLink box is
misconfigured (the cause if using DHCP), or the SuSE box is misconfigured
(the cause if static IPs), or both, but this:

>default 192.168.0.1 255.255.255.255 UGH 0 0 0 eth0
>default 192.168.0.1 255.255.255.0 UG 0 0 0 eth0
>192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
>192.168.0.0 * 255.255.0.0 U 0 0 0 eth0


should look like this

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 95017 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 420 lo
default 192.168.0.1 0.0.0.0 UG 0 0 55 eth0

and that's it.

>on the XP box I get ....
>
>alot of other routes..


Yeah, that's because windoze is trying to baffle you with bullshit.
Remember, microsoft got into this networking business over ten years
after everyone else, and when they did, they screwed it up mightily. It
was several years before they realized that few people were using their
broken methods, and started using TCP/IP like everyone else (though
unable to simply copy it from elsewhere, they fscked it up in their
own unique way), so they really lack experience.

Old guy
 
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
Need some help in Routing in Linux GS Linux Networking 13 11-28-2006 06:53 PM
If I replace my existing Linksys box with Linux Router, how can I know what kind of Routing to be enabled on my Linux Box? santa19992000@yahoo.com Linux Networking 3 01-06-2005 01:18 PM
linux routing Jemy Linux Networking 2 08-24-2004 03:21 AM
linux ppp routing problems - can't ping anything! Kaman Linux Networking 11 07-21-2004 01:34 PM
Routing on Red Hat Linux 9 Aleksandr Zingorenko Linux Networking 3 07-09-2003 12:56 PM



1 2 3 4 5 6 7 8 9 10 11