LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   internet only found if plugged in on startup (https://www.linuxquestions.org/questions/linux-newbie-8/internet-only-found-if-plugged-in-on-startup-588935/)

glopv2 10-02-2007 01:30 PM

internet only found if plugged in on startup
 
If my Ethernet cable is plugged in when booting up, then debian finds the cable, and after it boots up if I unplug it and plug it back in, debian is fine. But, if I boot up when it's not plugged in, and plug it in afterwards, the Internet doesnt work. How do I tell linux that I've plugged the cord in?

Thanks!

uselpa 10-02-2007 01:33 PM

are you using dhcp?

The_JinJ 10-02-2007 01:34 PM

Try
Code:

ifdown eth0
ifup eth0

not sure if Debian has it but could also use
Code:

rcnetwork restart

Poetics 10-02-2007 02:12 PM

The short answer for why this happens is your computer only checks for IP connectivity at bootup, unless you tell it to as the above posts mention. Unless dhcpcd is running (or something similar) to ask for an IP address at a given interval, you can't get online until your computer "figures out how" (the most common method being through DHCP).

gundumfx 10-02-2007 02:32 PM

well i can segjest you you something well the problem you are having alway try to google it. In linux if you google you will be abble to find a lot of help. So i see your problem but i am not familier with this type of problem.. well...are you using dhcp? because if you know oyu are maybe i can help you.?

The_JinJ 10-02-2007 02:43 PM

The network would start at bootup so should work when the cable is plugged in - DHCP should go looking for a connection...
Maybe it's set to start 'if present' - change this to start 'on boot'
Should be something like this in /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

SlowCoder 10-02-2007 03:03 PM

Like someone else said, it sounds like your computer detected that you aren't connected and disabled your ethernet port. Try ifup eth0 on the CLI to enable it. In Fedora I can use dhclient to force a DHCP request, which should get you your IP and access to the Internet.


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