Subject: Re: IPnat used as a throttle, net.inet.ip.forwarding, installboot, and dhclient questions....
To: Luke Mewburn <lukem@goanna.cs.rmit.edu.au>
From: James Webster <james3838@tsi-net.com>
List: netbsd-help
Date: 04/25/1999 13:59:14
From: Luke Mewburn <lukem@goanna.cs.rmit.edu.au>

> "James Webster" writes:
> > 1) Is there some way to use IPnat (or maybe something else) to throttle
> > the bandwidth?  I want to limit the speed of my internal network to
> > around 256k, as the external is 1.1Mbs and is used by other people.
>
> not sure about this. i've been meaning to provide application-level
> mods to ftp and ftpd to support this for a while...

How were you planning on implenting this?  I was thinking of inserting some
sort of delay between packets.  I figured NAT would be the ideal place for
that, but figured I check if there was anything before I did something
myself.

>
> > 2) I've got IPnat working, but only after sysctl -w =
> > net.inet.ip.forwarding=1.  My problem is that it is reset to 0 every
> > time I reboot.  How do I change this permanently.  I saw something about
> > option GATEWAY in the man pages, but that sounded like rebuilding the
> > kernel (something I haven't done before).
>
> add it to /etc/netstart.local

I took the plunge and rebuilt the kernel.  The kernel help page was quite
straight forward, and I was able to get it done with minimal hassle.  I
figured that adding it to netstart.local was probably not the proper thing
to do, though it would work.

>
> > 3) Upon booting, I get a warning that I have an old NetBSD or FreeBSD
> > boot partition, and should use installboot to fix it.  The installboot
> > man page doesn't seem clear (at least to me) how to fix the problem.  My
> > understanding is that I need to change the boot partition ID from 165 to
> > 169, but this man page doesn't say how. =20
>
> i use `fdisk -u'.

Thanks.  Maybe the message should be changed, since installboot will not fix
the problem.

>
> > 4) I'm currently using dhclient to obtain a DHCP address for my internet
> > side network.  I added /sbin/dhclient ep0 to my netstart.local file.
> > Problem is, every time I boot, it claims it can't read or create
> > /var/db/dhclient.leases.  This file does exist, and /sbin/dhclient will
> > start under root after I start up.  Do I need to make any permission
> > changes to this file so that dhclient can use it to startup
> > automatically?
>
> my setup is similar to this and i don't recall having to make any
> special changes like this.
>

Ok, I may have more info.  When I manually boot, it says something about not
being able to open sysconf socket.  Looking at the man page for sysconf, it
appears that this has been replaced by sysctl.  Did I miss a step setting
the dhclient up?

Thanks,
James