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.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > Your Distro > Debian Linux Help
Reload this Page How to get DHCP to assign IP address
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Debian Linux Help Discussions related to Debian GNU/Linux.

Reply
 
Thread Tools Display Modes
Old 10-24-2005   #1 (permalink)
infoseeker
Just Joined!
 
Join Date: Mar 2005
Location: South Africa
Posts: 54
How to get DHCP to assign IP address

I connect to the internet via a network (a WinXP machine connects to the net which is shared via ICS), and DHCP normally assigns an IP adress as it should, but every now and then an address is not assigned (on bootup) . Only way to access the net is to disable ICS on the XP machine and then re-enable it, and will then assign an IP address as it should, but I then re-boot my Linux machine for DHCP to operate as it should.

Any way of starting DHCP manually with Linux from a console, preventing the reboot ?

Thanks.
infoseeker is offline   Reply With Quote
Old 10-24-2005   #2 (permalink)
protocol
Just Joined!
 
Join Date: Feb 2005
Posts: 21
Send a message via AIM to protocol Send a message via MSN to protocol Send a message via Yahoo to protocol
I believe that you can create a script which will manually start DHCP, or you have the option of adding DHCP, I think, to your init -- which will automatically load DHCP on boot.
protocol is offline   Reply With Quote
Old 10-24-2005   #3 (permalink)
psic
Linux Engineer
 
psic's Avatar
 
Join Date: Nov 2004
Location: Ljubljana, Slovenia
Posts: 1,163
Re: How to get DHCP to assign IP address

Quote:
Originally Posted by infoseeker
Any way of starting DHCP manually with Linux from a console, preventing the reboot ?

Thanks.
I used 'dhclient' for a while. There's others, such as 'dhcpcd'. Try it out if any of these work (you will have to be root).
psic is offline   Reply With Quote
Old 10-24-2005   #4 (permalink)
infoseeker
Just Joined!
 
Join Date: Mar 2005
Location: South Africa
Posts: 54
The 'dhclient' command seems to be the one to use :P . I will try using it when I have this problem next time, and will post if successful.

Just tried it with a valid IP address/connection and it successfully changed the assigned address to a new one.

Thanks.
infoseeker is offline   Reply With Quote
Old 10-24-2005   #5 (permalink)
psic
Linux Engineer
 
psic's Avatar
 
Join Date: Nov 2004
Location: Ljubljana, Slovenia
Posts: 1,163
Not a problem. I used it often on a laptop, which wasn't always connected (so whenever it was, I just ran it by hand so it got a valid IP).
psic is offline   Reply With Quote
Old 10-24-2005   #6 (permalink)
farslayer
Linux User
 
Join Date: Apr 2005
Location: Ohio
Posts: 326
IF I need my Debian box to get a new Address from dhcp I simply shut down the interface and bring it back up..

ifdown eth0
ifup eth0

once it comes up it grabs a new IP..
farslayer is offline   Reply With Quote
Old 10-25-2005   #7 (permalink)
infoseeker
Just Joined!
 
Join Date: Mar 2005
Location: South Africa
Posts: 54
Re: How to get DHCP to assign IP address

I have just had this problem again on bootup (see post above) and i entered 'dhclient' in root console and IT WORKS .

Thanks for the help.
infoseeker is offline   Reply With Quote
Old 10-25-2005   #8 (permalink)
Vergil83
Linux Guru
 
Vergil83's Avatar
 
Join Date: Mar 2004
Posts: 2,409
you can make it happen automatically by using the init scripts
it will be at
Code:
 /etc/inti.d/dhcpd
additionally, dhcp can be started/stopped by running
Code:
/etc/inti.d/dhcpd start
/etc/inti.d/dhcpd stop
__________________
Brilliant Mediocrity - Making Failure Look Good
Vergil83 is offline   Reply With Quote
Old 05-14-2008   #9 (permalink)
asifsehzaad
Just Joined!
 
Join Date: May 2008
Posts: 1
Unhappy how does a dhcp gets assigned

I want to know more about... how using dhcp... an ip address gets bound to a network interface as i am debugging an issue (I am not a pro at linux just a new user trying switch over from windows).

If you want to know... the issue it is this...

I am on a windowsxp machine (on a wireless network:192.168.1.*) and have VirtualBox image with ubuntu running on it (server edition)... the linux on VM get it's ip using dhcp configured in /etc/network/interfaces for eth0... it is in the range 10.0.*.*

now i changed from dhcp to static and i supplied the static ip address... 192.168.1.12 and the gateway as our wireless router 192.168.1.1 and nameserver in /etc/resolv.conf as 192.168.1.1 (this being an adsl modem also).... I am not able to ping anywhere from ubuntu.... and ubuntu from anywhere...

but one thing that i have noticed is that when i use a wget Google it get the file....

I am all confused as to what i going around with this setup...
asifsehzaad 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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 10:01 PM.

Powered by vBulletin 3.6.8 ©2000 - 2007, content relevant URLs by vBSEO, Property of Core Root.

Content Relevant URLs by vBSEO 3.0.0