Subject: Re: dhcp help
To: Geiregat Jonas <eniac@sdf-eu.org>
From: Eric Fox <eric@fox.phoenix.az.us>
List: netbsd-help
Date: 08/29/2003 09:35:38
Configure dhclient by creating a /etc/dhclient.conf file as follows:

  # /etc/dhclient.conf
  request subnet-mask, broadcast-address, routers, domain-name,
          domain-name-servers;

  timeout 30;
  retry 60;
  select-timeout 5;

  script "/sbin/dhclient-script";

  lease {
    interface "vr0";
    option subnet-mask 255.255.255.0;
    renew 2 2010/1/12 00:00:01;
    rebind 2 2010/1/12 00:00:01;
    expire 2 2010/1/12 00:00:01;
  }


Create an empty /var/db/dhclient.leases file:

  touch /var/db/dhclient.leases


Add the following to the bottom of /etc/rc.conf:

  dhclient=YES		dhclient_flags="vr0"


You can then start dhcient with the following command:

  /etc/rc.d/dhclient start


With the entry in /etc/rc.conf, it will automatically start upon reboot.

---
  /\---/\  Eric J Fox
 /  o o  \ Home & Small Business Computer Support
 \.\   /./ in the Phoenix Metropolitan Area
    \@/    http://fox.phoenix.az.us/
.


On Fri, 29 Aug 2003, Geiregat Jonas wrote:

> Hey I'm new to netbsd,
> I've got my network working, I can ping computers inside my network.
> I've set it up using this command
> ifconfig vr0 inet 192.168.0.3 netmask 255.255.255.0
> Now I would like to get dhcp working so I can make use of the internet
> and learn more about netbsd.
> I do dhclient vr0
> and I get no route to host network is down msg
> --
> Geiregat Jonas
>
>