Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 07-01-2004, 01:21 AM   #1
LQ Newbie
Registered: Aug 2003
Posts: 13

Rep: Reputation: 0
Routing to switch

My problem is practially identical to Entropius' but, unfortunately, there was no resolution offered in that thread. I too feel like an idiot

With ppp0 down and eth0 up, I can connect to the router/switch/WAP fine via (configured using DHCP). With ppp0 up and eth0 down, I can connect to my ISP and use the internet. With both interfaces up, I can't do anything. I can't talk to the router and domains will not resolve.

This is the routing table by default when both interfaces are up:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   *      UH    0      0        0 ppp0     *        U     0      0        0 eth0
default         UG    0      0        0 eth0
default         UG    0      0        0 ppp0
The IP on ppp0 is updated automatically whenever I dial in to my ISP. 'route del default dev eth0' lets me resolve domains but I can't get to How can I add a route to it?

Any help would be much appreciated
Old 07-01-2004, 01:45 AM   #2
Senior Member
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
Re: Routing to switch

Originally posted by thinkninja

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   *      UH    0      0        0 ppp0     *        U     0      0        0 eth0
default         UG    0      0        0 eth0
default         UG    0      0        0 ppp0
this routing table seems ok instead of loopback. where is it? i think if u add loopback, your trouble can be solved.
Old 07-01-2004, 01:49 AM   #3
Senior Member
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
Well it's not going to be workable if you have two default routes each with an equal metric. The poor kernel will probably try to split packets evenly between them, or something ridiculous like that. You should alter your netstart scripts so that if-up'ing eth0 does not add a default gateway.

As for the WAP, you don't mention what subnet it's on. I'm assuming it's not on, because you already have a route to that pointing to the local ethernet segment. Deleting the default route won't destroy the route to 192.168/24. Find out what subnet your wireless clients are on and have that added when eth0 is brought up. You just want to do a route add for the -net of whatever the WAP is on and use a gw of
Old 07-01-2004, 12:22 PM   #4
Registered: Oct 2003
Distribution: Just about anything... so long as it is Debain based.
Posts: 297

Rep: Reputation: 30
There's no need for a gateway on any network unless you are trying to get to another ip scheme.

You need a default gw to tell you computer how to get to any network that is not otherwise stated in your route table, or if you have multiple pipes to the internet.

I'd check you DHCP server and remove the default gateway offer from its config.

You could also just address your ethernet interface statically. That would also solve the problem.

You state that once you do a 'route del default dev eth0' you can not get to The only entry you need in your routing table to get to that address is what is already in your list: * U 0 0 0 eth0

Old 07-01-2004, 12:45 PM   #5
LQ Newbie
Registered: Aug 2003
Posts: 13

Original Poster
Rep: Reputation: 0
Trying just eth0:
fire:/home/ninja# ifup eth0
sit0: unknown hardware address type 776
sit0: unknown hardware address type 776
Listening on LPF/eth0/00:50:8d:f9:44:f0
Sending on   LPF/eth0/00:50:8d:f9:44:f0
Sending on   Socket/fallback/fallback-net
DHCPREQUEST on eth0 to port 67
DHCPREQUEST on eth0 to port 67
DHCPDISCOVER on eth0 to port 67 interval 6
DHCPREQUEST on eth0 to port 67
bound to -- renewal in 129600 seconds.
fire:/home/ninja# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     *        U     0      0        0 eth0
default         UG    0      0        0 eth0
Okay, I'm making progress. I can't connect to the router ( at all now, and yes, I have pushed the reset button + plus power-cycled it. I also tried deleting the route to and re-adding one to Probably a stupid idea.

Chort, I knew (even though I readily admit I know nothing about is patently obvious) that having two default routes just wasn't going to work. I couldn't connect to anything on the internet like that until I did 'route del default dev eth0'.

Regarding WAP, I have no wireless clients, nor is anything else connected to the switch...yet. So that's an issue for another day. I am, however, super keen to reconnect to the router itself with a view to attempting further configuration. As it stands, I can't even ping it.

I've reset it again, disconnected the cable, and turned it off while I take a shower. This is making me hot and bothered.
Old 07-01-2004, 04:11 PM   #6
Registered: Sep 2002
Location: lahore pakistan
Distribution: slackware,redhat, FreeBSD,openbsd
Posts: 219

Rep: Reputation: 30
kernel always applies first match in routing table

so in caseDestination Gateway Genmask Flags Metric Ref Use Iface * UH 0 0 0 ppp0 * U 0 0 0 eth0
default UG 0 0 0 eth0
default UG 0 0 ppp0 is your default gw.

simply just do
route del default gw
before dialing or after dialing.


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
why switch? NOT because it's not MS titanium_geek Linux - News 61 10-12-2006 10:50 PM
thread switch results in kernel stack switch superstition Linux - General 1 05-17-2005 11:48 PM
set up DSL thru SWITCH - winXp connected to SWITCH too husz Linux - Newbie 5 04-22-2004 12:08 AM
real routing under nat routing nothingmuch Linux - Networking 4 10-27-2003 03:11 PM
how to switch off ... Xing Linux - Software 4 10-13-2003 07:33 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:25 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration