Traduisez - Übersetzen - Traduzca - Traduza - Tradurre - Translate

VanLUG Email Archive

Re: ADSL DHCP

Slava Voronin
Sat, 17 Oct 1998 03:26:13 -0700

Wesley Terpstra wrote:

> > I just got my ADSL installed but I am having problems getting a connection.
> > I am able to obtain an IP address from the DHCP server and I get a netmask
> > of 255.255.0.0 but I don't get a gateway address or DNS.
>
> On my system (debian slink), I had to make a startup script to make DHCP
> use the router as a default route. My dhcpcd is:
>
> ]iota:~# dhcpcd -v
> ]dhcpcd 0.70-karn
>
> My startup script is:
> ]#!/bin/sh
> ]
> ]# Delay to allow resolv.conf to finish
> ]sleep 1
> ]
> ]# Fix my hostname
> ]hostname -F /etc/hostname
> ]
> ]# Fill in the resolv.conf
> ]rm -f /etc/resolv.conf
> ]cp /etc/resolv.conf.correct /etc/resolv.conf
> ]grep nameserver /etc/dhcpc/resolv.conf >> /etc/resolv.conf
> ]
> ]# Correct my hosts file
> ]cp /etc/hosts.correct /etc/hosts
> ]echo $IPADDR iota.ml.org iota >> /etc/hosts
> ]
> ]# Setup my router
> ]route add default gw $ROUTER
>
> The whole hostname mess you probably don't need. The last line is probably
> what cocerns you. Incidently, if you know how to tell the DHCP server a
> hostname so it doesn't change it, I'd love to know. (-h doesn't work)
>
> My dhcpcd is invoked with:
> ]dhcpcd -c <above script> eth0
>
> If you run debian you'll have to change your /etc/init.d/dhcpcd

Slava wrote:
When I use dhcpcd under debian I had /etc/init.d/dhcpc to start and stop
dhcpcd
and did initialization fot eth0 jpico /etc/dhcpc/config
# List here the interface that the dhcpcd daemon should use.
# The default is to assign an IP address to eth0.
# If you want to disable the daemon, enter "none" here.
#IFACE=eth0
IFACE ="your externel NIC" check for your case