LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   DHCP client configuration (https://www.linuxquestions.org/questions/linux-newbie-8/dhcp-client-configuration-265194/)

TaNeK 12-11-2004 09:09 AM

DHCP client configuration
 
Hello.

I installed Debian sarge about 1½ week ago, and it's getting to the point where it's working smoothly :). Just now I'm trying to get bittorrent to work, and I found a wierd thing. Before I got my new kernel 2.6.8 I could easly connect the other computers in my LAN behind a Dlink DI-604 router and also I coould configure the firewall to not block incomming traffic on the ports that bittorrent uses :), but now I can't. This, I believe has something to do with my not having configured a DHCP-client on this machine. So my very basic question is: How do I configure my computer to use the router 192.168.0.1 as a DHCP-server, and then, how do I get hold of my IP adress in the LAN?

basileus 12-12-2004 06:23 AM

If you have not already installed a dhcp client:

apt-get update
apt-get install dhcp-client etherconf

Then do

dpkg-reconfigure etherconf

Say yes to "Configure device ethX" and make sure it uses dhcp.

I don't think you need to choose your dhcp server. I think dhclient just makes a broadcast and any dhcp server(s) respond. If you do have many dhcp servers in the same subnet, check "man dhclient", it might help. Never had to worry about several dhcp servers.

To obtain your ip-address give to you do a

ifconfig

You can also do

cat /var/log/daemon.log|grep bound

Dec 12 04:56:33 localhost dhclient: bound to 192.168.0.197 -- renewal in 43200 s

Btw. you have to do most of this as root.


All times are GMT -5. The time now is 04:56 AM.