Article View: comp.os.linux.networking
Article #523dhcpcd gets dynamic IP and nameserver
From: Bob
Date: Mon, 18 Jan 1999 00:00
Date: Mon, 18 Jan 1999 00:00
53 lines
2447 bytes
2447 bytes
Debian's dhcpcd .70-5 deb pkg wasn't working with my Intel eth0
and potato kernel 2.1.125 so I couldn't get a DSL account. Now I'm set,
thanks to Sergei Viznyuk. /etc/dhcpc/ has a file written by dhcpcd
which has my IP and the DNS nameserver assigned by ISP.
To get your IP assigned dynamically as by dial-up or ADSL or
cable modem, and to find out nameserver IP's--it's also necessary
to upgrade dhcpcd for kernels 2.1.125 and up, and for certain
netcards such as Intel--
ftp://phystech.com/pub
get the latest dhcpcd dhcp client by Sergei Viznyuk [applause, cheers]
which today is 1.3.17-pl2
untar ungzip cd
make ; make install
Now you have /sbin/dhcpcd
Get your old dhcpcd out of the way--it was /usr/sbin/dhcpcd
In Debian it seemed logical to load dhcpcd using /etc/init.d/network
script--
most of this varies according to site-- "dhcpcd -h username" wasn't
working
from /etc/init.d/dhcpc script's line using start-stop-daemon, so--
#! /bin/sh
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
ISP_USER_ID=username
ifconfig lo 127.0.0.1
route add -net 127.0.0.0 netmask 255.0.0.0 lo
if dhcpcd -h $ISP_USER_ID -d eth0 ; then
echo -n "DHCP succeeded..."
logger "DHCP succeeded..."
else
echo -n "DHCP failed..."
logger "DHCP failed... "
IPADDR=192.168.1.2
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
GATEWAY=192.168.1.1
ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
route add ${NETWORK} famlan
[ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1
fi
-Bob Dodds
Technical Details
Message-ID:
<36A2E633.CEDA234A@erols.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb7a0,cdbdb2bd48b05dcd,start X-Google-Attributes: gidfb7a0,public X-Google-Thread: 10669a,cdbdb2bd48b05dcd,start X-Google-Attributes: gid10669a,public X-Google-Thread: 11663c,cdbdb2bd48b05dcd,start X-Google-Attributes: gid11663c,public From: Bob <recbo@erols.com> Subject: dhcpcd gets dynamic IP and nameserver Date: 1999/01/18 Message-ID: <36A2E633.CEDA234A@erols.com> X-Deja-AN: 433908934 Content-Transfer-Encoding: 7bit To: clameter@debian.org, dunham@debian.org, sviznyuk@columbus.rr.com X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@rcn.com X-Trace: 48WVu2f1TCAwRG0R5Uv79Sq+YNZQE45C/yRQvdR7sLY= Mime-Version: 1.0 NNTP-Posting-Date: 18 Jan 1999 07:19:53 GMT Newsgroups: comp.os.linux.networking,linux.debian.user,dc.org.linux-users