Subject: Re: dhcp client configuration
To: NetBSD netbsd-help mailing list <netbsd-help@netbsd.org>
From: Julian Coleman <jdc@coris.demon.co.uk>
List: netbsd-help
Date: 06/19/2001 09:42:17
> > 	map ppp0 192.168.13.0/24 -> 0/32 portmap tcp/udp 2000:60000
> > 	map ppp0 192.168.13.0/24 -> 0/32
> 
> So you don't need to specify a particular IP address?  I don't
> understand how the proper address is made known.

That's correct.  It's determined based on the interface name (ppp0 in this
case).  You'll need to put in tlp0, or ex0 (or whatever interface you're
using).

> > 	/usr/sbin/ipnat -F
> 
> Do you do this manually?  Or is this a line in /etc/rc.d/network, or
> another startup file?  I'm not certain what it does, after reading the
> ipnat man page.

I do this from my PPP ip-up script.  You'll want to do it from your DHCP
script.

> I tried replacing the old IP address with what I know is my (current)
> correct number, but routing still stops working after a while.  Could I
> have neglected some step in converting from static to dynamic
> addressing?  For example, do I still need /etc/myname and mygate?

'myname' and 'mygate' are used at boot time to set the hostname and default
route, respectively.  After they have been set, it's perfectly possible to
change them.  You might need to change the default route in you DHCP script,
but it's usually fine to leave the hostname set to whatever you want.

When you say 'routing still stops working after a while', how long is a while?
Is it after you get a new address via DHCP, or does it stop without any other
(apparent) changes?  What does the routing table look like (`netstat -r`) and
can you `ping` your default router?

J

-- 
                    My other computer also runs NetBSD
                          http://www.netbsd.org/