Subject: Re: NetBSD-1.4: DHCP setup
To: Simon J. Gerraty <sjg@zen.cdn.telstra.com.au>
From: dustin sallings <dustin@spy.net>
List: port-sparc
Date: 05/19/1999 23:27:02
On Thu, 20 May 1999, Simon J. Gerraty wrote:

This is my dhclient.conf:

request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, host-name;

send dhcp-lease-time 300;

require subnet-mask, domain-name-servers;
timeout 60;
retry 60;
reboot 10;
select-timeout 5;
initial-interval 2;
script "/etc/dhclient-script";


	It's really better to go with the most minimum configuration to
start with.  I use the same config on every box except this one, which is
my laptop so I make sure it gets a short lease time.

	What does the DHCP server think?  I'm not sure where you got that
lease, but get rid of it and try over.  You shouldn't need anything but
the above configuration if the DHCP server is sending you enough
information.

// DHCP is comming to town... so as an experiment I setup a clean
// 1.4/sparc box (correctly I hope :-).
// 
// I enabled dhclient in rc.conf and created a dhclient.conf that
// contained a static lease for the existing setup:
// 
// vis:
// 
// interface "le0" {
//         send host-name "hobbit";
//         send dhcp-client-identifier 08:00:20:10:1d:55;
//         send dhcp-lease-time 3600;
// #       prepend domain-name-servers 127.0.0.1;
//         request subnet-mask, broadcast-address, time-offset, routers,
//                 domain-name, domain-name-servers, host-name;
//         require subnet-mask, domain-name-servers;
//            script "/etc/dhclient-script";
//            media "media 10baseT/UTP", "media 10base2/BNC";
// }
// 
// lease {
//   interface "le0";
//   fixed-address 144.136.188.252;
//   medium "media 10baseT/UTP";
//   option subnet-mask 255.255.255.192;
//   option routers 144.136.188.193;
//   option domain-name-servers 144.136.201.10,144.132.81.10;
//   option domain-name "cdn.telstra.com.au";
//   option broadcast-address 144.136.188.255;
//   option dhcp-server-identifier 144.135.128.15;
// }
// 
// and when I reboot (after tossing the old mygate and ifconfig.le0
// stuff) I get:
// 
// Listening on BPF/le0/08:00:20:10:1d:55
// Sending on   BPF/le0/08:00:20:10:1d:55
// Sending on   Socket/fallback/fallback-net
// Trying medium "media 10baseT/UTP" 1
// ifconfig: SIOCSIFMEDIA: Device not configured
// DHCPDISCOVER on le0 to 255.255.255.255 port 67 interval 8
// can't connect to sysconf socket: No such file or directory
// DHCPOFFER from 172.242.145.1
// DHCPREQUEST on le0 to 255.255.255.255 port 67
// DHCPACK from 172.242.145.1
// New Network Number: 172.242.145.0
// New Broadcast Address: 255.255.255.255
// ifconfig: SIOCSIFMEDIA: Device not configured
// bound to 172.242.145.57 -- renewal in 1800 seconds.
// 
// and as ifconfig shows we are not well.
// 
// root:50# ifconfig -a
// le0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
//         address: 08:00:20:10:1d:55
//         media: Ethernet 10base5
//         status: active
//         inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
// ...
// 
// # netstat -rn
// Routing tables
// 
// Internet:
// Destination        Gateway            Flags     Refs     Use    Mtu  Interface
// default            link#1             UC          0        0      -  le0 =>
// default            172.242.145.1      UGS         0        0      -  le0
// 127.0.0.1          127.0.0.1          UH          2       24      -  lo0
// 172.242.145.57     127.0.0.1          UGHS        0        0      -  lo0
// 
// # ping 172.242.145.1
// PING 172.242.145.1 (172.242.145.1): 56 data bytes
// ping: sendto: No route to host
// ping: sendto: No route to host
// ping: sendto: No route to host
// ^C
// ----172.242.145.1 PING Statistics----
// 3 packets transmitted, 0 packets received, 100.0% packet loss
// 
// This is running on the 1.4 GENERIC_SCSI3 kernel.
// 
// Have I missed something?
// 
// --sjg
// 
// 

--
Principal Member Technical Staff, beyond.com    The world is watching America,
pub  1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net>
|    Key fingerprint =  87 02 57 08 02 D0 DA D6  C8 0F 3E 65 51 98 D8 BE 
L______________________________________________ and America is watching TV. __