dhclient on boot

If none of the more specific forums is the right place to ask

dhclient on boot

Postby btartsa@drippingdead.com » 2004-05-21 15:17

Hey folks...
I'm trying to eliminate the need to run dhclient every time I start Debian. I have read the docs on init.d and rc*.d and am very confused. When I did net install it failed and I had to run dhclient first.

Any and all help greatly appreciated!

Ben
btartsa@drippingdead.com
 

Postby lacek » 2004-05-24 09:05

If I understand you well, you want to assign a static IP address to your computer. You don't need any knowledge about rc.* scripts, just do the following:
Edit (or create) a file called /etc/network/interfaces.
It should contain the following:
Code: Select all
# The loopback interface
auto lo
iface lo inet loopback

# The first network card
auto eth0
iface eth0 inet static
address YOUR_IP_HERE
network YOUR_NETWORK_HERE
broadcast BROADCAST_ADDRESS_HERE
netmask NETMASK_HERE
gateway GATEWAY_HERE_IF_ANY


After it is done, do a /etc/init.d/networking restart. After it finishes, you should have the address you set up in the interfaces file.
If so, you may safely remove the dhcp client; you won't need it.
Hope this helps.
lacek
Moderator Team Member
 
Posts: 769
Joined: 2004-03-11 18:49
Location: Budapest, Hungary


Return to General Questions

Who is online

Users browsing this forum: arzgi and 9 guests

fashionable