Re: ifconfig eth0 down works but it won't go up!

From: Bruce Stewart (bruce_stewart_at_by.co.uk)
Date: 11/14/04


Date: Sun, 14 Nov 2004 14:02:49 GMT

Al. C wrote:

> Timothy Murphy wrote:
>
>> Al. C wrote:
>>
>>>>> If I do ifconfig eth0 down and then an ifconfig eth0 up, I can't do
>>>>> a simple ping -c google.com. I get:
>>>>> ping: unknown host google.com
>>
>> So why do you say "ifconfig eth0 down" ??
>>
>>> I've tried runnin inetd and intet1 and inet2 and nothing seems to
>>> restore the network.... except a reboot.
>>
>> You don't say what system you're running.
>> On Redhat/Fedora you probably need to say "service network restart".
>> On other systems it might be "/etc/rc.d/init.d/network restart"
>> or something like that.
>>
>
> First of all, I'm sure in the opening post I said I run Slackware 9.1
> with KDE.
>
> OK, here is the answer (or at least AN answer.... the gurus here might
> have a better one.)
>
> It seems (for me anyway) that "ifconfig eth0 down" deletes the default
> gateway from route table. (And it makes sense if the gateway is the
> ethernet card... so if it goes down, Linux is correct in erasing an
> entry from the route table (if there is such an animal.)
>
> Did some more reading and from
>
> http://tinyurl.com/3kgm9
>
> I found that doing the command:
>
> route add default gw 129.168.1.1
>
> brings back network functionality after an "ifconfig eth0 up" command.
> The web page cited above uses a different command and the man route page
> is cryptic as hell, but after trying to put the man page together with
> the above web page, I think I figured it out.
>
> Which comes down to this. For me, if I want to use the modem AND I'm
> connected to the router at boot time, I need to do the "ifconfig eth0
> down" command and then dial out. After hanging up, I can bring DSL
> connectivity back by doing the "up" command and then the route command
> above. If I boot laptop without the cable connected to the router, I
> don't have to do the eth0 down thing. Not sure why.
>
> I really thought there was a way to be online with DSL and the modem at
> the same time, but I guess not. (Why would you want to do this? Some
> people still have dial-up to their bank to send credit card sales txns.)
>
> Thanks for the help. I hope some of this is useful to someone else
> sometime. It's been a learning experience for me.
>
> Al

Al,
You shouldn't need to drop eth0 before or after raising a ppp connection.
KInternet should handle the setup of the ppp connection, this will change
the gateway to the ppp connection, but should allow access to your local
network, in addition it can change the nameservers to the ones for your
ppp connection.
If you are directly connecting to the internet with your DSL, not through
a local network and you are using your ppp connection, you will more than
likely need a slightly more complex routing table to be able to route to
the bank IP ranges as well as the internet through the DSL connection.

Regards
Bruce.

-- 
Replace by by blueyonder


Relevant Pages

  • Re: Linux is Driving me $#@!!!! nutz!!!
    ... :Doing a route call from terminal ... via nic card on eth0. ... time since I had to configure a PPP connection, ... from the command line. ...
    (rec.crafts.metalworking)
  • Re: Aggregating 2 ISP links (DSL)
    ... > the balancing algorithm to either of the DSL modems. ... > DSL modem and arrives at the linux box. ... > is handled by the load-balancing algorithm and a route is ... > the connection succeeds. ...
    (comp.os.linux.networking)
  • Re: how do I choose which network connection to use?
    ... This answer applies to all versions of Windows. ... Windows uses a dial-up connection instead of a LAN ... It adds 1 to the metric of a LAN connection's default route. ... Use the "route delete" command to delete the default routes. ...
    (microsoft.public.windowsxp.network_web)
  • Re: VPN and remote gateway
    ... > It seems you use the wrong route add command. ... > when the VPN connection is established. ... > | using the remote network as my gateway. ...
    (microsoft.public.windows.server.sbs)
  • Re: IP Routing
    ... Using command line apps isn't the easiest way to use a PocketPC, ... You could then build the route.exe app from the sources that are released ... >>> After the VPN connection is established, ... This default route will have a ...
    (microsoft.public.pocketpc.developer.networking)