Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

[Laptop] waiting for dhcp without cable

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
10 posts • Page 1 of 1
Author
Message
Remenic
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Sat May 10, 2003 6:27 pm

[Laptop] waiting for dhcp without cable

  • Quote

Post by Remenic » Sun May 30, 2004 9:18 am

Hi,

I have just installed Gentoo on a friends laptop. So far, I have gotten everything working (swsusp2, wlan, pcmcia, usb, sound, xorg-x11, etc.). But one thing that bothers me is the built-in network card.

I have set it up to use dhcp, but when there is no cable plugged in at boot-time, it waits for 5 minutes to continue. Is there a way to skip the whole dhcp thing if there's no cable attached?

The network card is a:

Code: Select all

0000:00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 51)
All works well if there's a cable attachted, but, since it's a laptop, there won't always be a wired network connection.
Top
xces
Guru
Guru
User avatar
Posts: 515
Joined: Fri Oct 11, 2002 7:23 pm

  • Quote

Post by xces » Sun May 30, 2004 10:05 am

Either you use something like ifplugd (which is in portage) or you set the DHCP timeout by hand.
To do this, you have to edit your /etc/conf.d/net.

There should be something like

Code: Select all

iface_eth0="dhcp"
dhcpcd_eth0="-t 5"
The value after '-t' is the time in seconds, that dhcpcd should wait for a lease.
Top
Remenic
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Sat May 10, 2003 6:27 pm

Subject

  • Quote

Post by Remenic » Sun May 30, 2004 2:53 pm

xces wrote:Either you use something like ifplugd (which is in portage) or you set the DHCP timeout by hand.
To do this, you have to edit your /etc/conf.d/net.

There should be something like

Code: Select all

iface_eth0="dhcp"
dhcpcd_eth0="-t 5"
The value after '-t' is the time in seconds, that dhcpcd should wait for a lease.
Hmm, both are not ideal solutions. The second one is better than the first though. I seriously *hate* it when all my connections are brutally brought down when connection is lost for just a few seconds. Especially on wireless connection. It's something I'd expect of a Windows 2000/XP machine, not a Linux machine.

Is there no way to let dhcpcd daemonize the minute its started? I don't see the option list in the man page, but maybe there's another dhcp client that does this? Also, I think I've seen XandrOS machines simply skipping dhcp when the cable was not plugged at boot. Anyone know how they did that?
Top
ynef
n00b
n00b
User avatar
Posts: 69
Joined: Wed Jan 14, 2004 6:29 am
Location: Lund, Sweden

  • Quote

Post by ynef » Sun May 30, 2004 5:24 pm

Stupid but working solution: add a shell script that will ask the user if he wants to start DHCP or not... ;)
Top
GurliGebis
Retired Dev
Retired Dev
User avatar
Posts: 509
Joined: Thu Aug 08, 2002 7:40 am
Contact:
Contact GurliGebis
Website

  • Quote

Post by GurliGebis » Sun May 30, 2004 8:50 pm

install ifplugd , configure it and add it to the default runlevel, then remove net.eth0 from the default runlevel.
As soon as the cable is inserted, net.eth0 is started, and when the cable is removed, net.eth0 is stoped.
Using this on my own laptop, and it runs lovely.
Queen Rocks.
Top
Remenic
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Sat May 10, 2003 6:27 pm

  • Quote

Post by Remenic » Mon May 31, 2004 9:01 am

GurliGebis wrote:install ifplugd , configure it and add it to the default runlevel, then remove net.eth0 from the default runlevel.
As soon as the cable is inserted, net.eth0 is started, and when the cable is removed, net.eth0 is stoped.
Using this on my own laptop, and it runs lovely.
I'm sure it runs lovely for you, but I also have a wireless lan card in this laptop. Our school's wlan isn't exactly great, and Windows users often complain about the bad quality. Every now and then their connection completely drops. MSN disconnects, etc. Guess why? It's because Windows though it would be nice to bring the whole interface down when there's no more connection. Even for 2 seconds! There is *no* way I will work for that same behaviour on my laptop.

I'm sure it works great for wired connections though. Is there a way to specify which network cards it has to bring down/up on the fly when a cable is plugged? If I can tell it to leave my wlan card alone, I will try it.

Thanks.
Top
xces
Guru
Guru
User avatar
Posts: 515
Joined: Fri Oct 11, 2002 7:23 pm

  • Quote

Post by xces » Mon May 31, 2004 9:34 am

Remenic wrote:I'm sure it works great for wired connections though. Is there a way to specify which network cards it has to bring down/up on the fly when a cable is plugged? If I can tell it to leave my wlan card alone, I will try it.
Actually you just have to specify the interfaces in /etc/conf.d/ifplugd.
Top
Remenic
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Sat May 10, 2003 6:27 pm

SWEEEEEET

  • Quote

Post by Remenic » Mon May 31, 2004 8:59 pm

Oh-my-god. ifplugd is totally friggin' SWEET!!!!!!!!!!!

I can specify a timeout for dropping connection! that's like totally what I want!

Thank you all for persuading me to use ifplugd :)
Top
GurliGebis
Retired Dev
Retired Dev
User avatar
Posts: 509
Joined: Thu Aug 08, 2002 7:40 am
Contact:
Contact GurliGebis
Website

  • Quote

Post by GurliGebis » Mon May 31, 2004 9:24 pm

About the timeout for dhcpcd, xces's tip about dhcpcd_eth0="-t 5" in /etc/conf.d/net should work :)
Queen Rocks.
Top
Karlo
n00b
n00b
User avatar
Posts: 3
Joined: Wed Jun 02, 2004 8:12 pm

question

  • Quote

Post by Karlo » Thu Jun 03, 2004 4:38 am

I emerged ifplugd, but now everytime my lap boots it skips the dhcp procees (even the cable is plugged)

I did the following things

- emerge ifplugd
- rc-update del net.eth0 default
- rc-update add ifplugd default


I have the following lines in /etc/conf.d/ifplugd

INTERFACES="eth0"

ARGS="-f -u0 -d20 -w"


I'm new with gentoo.

thanks
Top
Post Reply

10 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic