LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-04-2009, 04:30 PM   #1
Akheron
LQ Newbie
 
Registered: May 2009
Posts: 26

Rep: Reputation: 16
Slackware Ethernet auto detect


hey guys. i noticed when im starting up my laptop (wireless is busted) and i dont have the ethernet cable plugged in, it doesnt seem to detect it after that. basically after slackware has already been booted, if i want to connect to the internet i have to restart it with the ethernet cable plugged in. is there anyway i can get slackware to detect and configure when i plug in my cable, or is there a command to refresh the network?

Any help would be awesome, thanks in advance!
 
Old 06-04-2009, 06:15 PM   #2
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 71
Could you post the output of the

ifconfig

command on your machine booted with the cable unplugged? Are you using dhcp or a static IP? Normally, Slackware will detect and configure your ethernet card with or without the cable, unless you're using dhcp, in which case, of course, there's no way to get an IP without the cable.
 
Old 06-05-2009, 07:44 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

You should look at 'ifplugd'. 'ifplugd is a Linux daemon which will automatically configure your ethernet device when a cable is plugged in and automatically unconfigure it if the cable is pulled. This is useful on laptops with onboard network adapters, since it will only configure the interface when a cable is really connected. ifplugd interfaces with your distribution's native network configuration utilities.'

This link and others are available from 'Slackware-Links'. More than just SlackwareŽ links!
 
Old 06-05-2009, 06:40 PM   #4
Akheron
LQ Newbie
 
Registered: May 2009
Posts: 26

Original Poster
Rep: Reputation: 16
hey thanks onebuck that seems to be just what i need! And yes im using DHCP.

Here you go uncle_theodore

/sbin/ifconfig output:

eth0 Link encap:Ethernet HWaddr 00:e0:b8:5c:05:41
inet addr:192.168.6.9 Bcast:192.168.6.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:b8ff:fe5c:541/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1081 errors:0 dropped:0 overruns:0 frame:0
TX packets:1026 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:891612 (870.7 KiB) TX bytes:175657 (171.5 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

EDIT: ifplugd didnt seem to work, im going to try again

Last edited by Akheron; 06-05-2009 at 06:55 PM.
 
Old 06-05-2009, 07:07 PM   #5
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 71
Well, your eth0 interface is up and even has an IP. Is it the one we are talking about? So, the problem is not in the interface.
What probably happens, when you boot with the cable unplugged, the system obviously can't get an IP from the DHCP server and assigns some other IP to the device. This IP is not valid in your network, so when you plug the cable, there's no internet access.

I would try the following:
Since you have to use DHCP you must get your IP _after_ you plug in the cable anyway. So, try to run (as root)
/etc/rc.d/rc.inet1 restart
right after you do that. If it still doesn't work, we'll need to look into routing and DNS issues.
 
Old 06-05-2009, 07:26 PM   #6
Akheron
LQ Newbie
 
Registered: May 2009
Posts: 26

Original Poster
Rep: Reputation: 16
Beautiful! Worked perfect, thanks alot uncle-theodore!

I love slackware (been using it for a month, used fedora for a few years before), whenever theres an issue ive been able to solve it. and even better there not really problems, usually its just a configuration thing. anyway thanks again.
 
  


Reply



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
Auto detect of ethernet cards / network installation wimnat Linux - Hardware 2 05-19-2009 09:15 PM
Auto detect a closing connection helpmhost Linux - Networking 4 01-23-2007 02:08 PM
How does auto-detect work in Linux? paulsiu Linux - Hardware 2 04-25-2006 02:35 PM
auto detect proxy ilnli Linux - General 4 03-10-2006 12:44 AM
X Windows Auto-detect Brother Michael Debian 3 05-13-2004 11:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:15 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
Open Source Consulting | Domain Registration