Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Linux Newbie > DHCP ip address after boot?
 Linux Newbie   If you're new to the wonderful world of Linux, start here!

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 10-13-2004   #1 (permalink)
Just Joined!
 
Join Date: Oct 2004
Posts: 8
DHCP ip address after boot?

Hi all,

It's probably something really obvious, but I can't figure out how to get my eth0 to renew it's IP address from a DHCP server after boot. If I forget to plug in my ethernet cable on boot (it's a laptop) then the eth0 interface doesn't obtain an ip address, and hence the interface is not brought up. I typed:

# ifconfig eth0 up

which brings up the interface, but doesn't poll the DHCP server for an address. In the windows world I'd type ipconfig/renew but I can't find the equivalent in linux.

Thanks in advance
archon_aus is offline  

Reply With Quote
Old 10-13-2004   #2 (permalink)
Just Joined!
 
Join Date: Sep 2004
Posts: 35
I could be wrong but i think it is

# dhcpcd eth0
Nallelcm is offline   Reply With Quote
Old 10-13-2004   #3 (permalink)
Linux Newbie
 
Join Date: Sep 2003
Location: St.Charles, Missouri, USA
Posts: 201
Send a message via AIM to gwalters Send a message via MSN to gwalters Send a message via Yahoo to gwalters
usually your net configs can be found in /etc/conf.d/net

Code:
# To use DHCP on eth0, simply uncomment the following line:
ifconfig_eth0=( "dhcp" )
or oldschool:
Code:
iface_eth0="dhcp"
good luck
__________________
Powered by Gentoo
never ever ever use the hardened option in make.conf!
gwalters is offline   Reply With Quote
Old 10-13-2004   #4 (permalink)
Just Joined!
 
Join Date: Oct 2004
Posts: 8
Hi, thanks for the replys

I'm using Fedora core 2, so I think all my net configs are in /etc/sysconfig/network-scripts (though i could be wrong as I'm a newb)

In the ifcfg-eth0 file I have...
BOOTPROTO=dhcp

...which as far as I know enables DHCP on this interface, but it only seeks an ip address at boot. Can I run this as a script and reset the interface? (I thought by bringing the interface up it would do this, but apparently not)
archon_aus is offline   Reply With Quote
Old 10-13-2004   #5 (permalink)
Just Joined!
 
Join Date: Oct 2004
Posts: 8
OK, I got the answer from the Fedora irc channel...

ifup eth0

Apparently "ifup is a script that reads your network card configuration from a file and does the ifconfig and dhcp client stuff for you". I was trying to use ifconfig unsuccesfully.

Thanks for the help guys
archon_aus is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Free Network Mapping Tool for Microsoft® Office Visio® Professional 2007 Users
Don't map your network by hand – let LANsurveyor Express for Microsoft Visio Professional 2007 automatically create network diagrams for you.
subscribe
Free eBook:"Vulnerability Management for Dummies"
Get all the Facts and See How to Implement a Successful Vulnerability Management Program.
subscribe
Google vs The World: The Battle of the Message Security Vendors
With such a powerful name behind it, Google Message Security stands out in a sea of products that do exactly the same thing - or so they say.
subscribe

Safe, Secure Backup


All times are GMT. The time now is 01:04 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2