LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-02-2007, 02:30 PM   #1
glopv2
LQ Newbie
 
Registered: Sep 2007
Posts: 14

Rep: Reputation: 0
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!
 
Old 10-02-2007, 02:33 PM   #2
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
are you using dhcp?
 
Old 10-02-2007, 02:34 PM   #3
The_JinJ
Member
 
Registered: Apr 2004
Location: Scotland
Distribution: Suse, OpenWRT
Posts: 299

Rep: Reputation: 30
Try
Code:
ifdown eth0
ifup eth0
not sure if Debian has it but could also use
Code:
rcnetwork restart
 
Old 10-02-2007, 03:12 PM   #4
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
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).
 
Old 10-02-2007, 03:32 PM   #5
gundumfx
Member
 
Registered: Jul 2007
Location: Linux( Fedora core 7 Admin)
Distribution: fedora core 7
Posts: 148

Rep: Reputation: 15
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.?
 
Old 10-02-2007, 03:43 PM   #6
The_JinJ
Member
 
Registered: Apr 2004
Location: Scotland
Distribution: Suse, OpenWRT
Posts: 299

Rep: Reputation: 30
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
 
Old 10-02-2007, 04:03 PM   #7
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Rep: Reputation: 38
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.
 
  


Reply


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
How to detect programatically if a USB device is is plugged-in / plugged out? franc Linux - Software 3 02-01-2007 05:01 AM
WIreless won't surf internet unless wired card has IP even if not plugged in tuxkwb Linux - Wireless Networking 4 12-28-2006 02:07 AM
Plugged in mouse, dmesg said found, but don't know how to enable it. Gentoo Linux. RHLinuxGUY Linux - Hardware 0 07-21-2006 10:52 PM
LXer: Major X security hole found, plugged LXer Syndicated Linux News 0 05-02-2006 07:54 PM
fc2 freezes on startup w/ ethernet plugged in atatsch Linux - General 0 12-10-2004 06:53 PM


All times are GMT -5. The time now is 02:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration