Subject: DHCP / FreeBSD Problems

From: "Erik M. Blankenship" <[email-masked]>
Date: Tue, 2 Jan 2001 14:44:49 -0600 (CST)

I'm having a real problem with FreeBSD 4.2-release, and getting dhcpd
version 2.0pl5 to work with it.  But for some odd reason, it works on an
old Slackware box that I am using for DHCP.  This is a long story, so I'll
try to make it short and sweet.  We are running DHCP dynamically for our
ADSL customers.  We're using a Cisco 3640 to do the routing.  Here is what
we put in on the router for the Slackware box (I've removed the actual IP
numbers for my own sake):

config t
ip dhcp-server SLACKWARE-IP
interface ATM3/0.20 multipoint
ip helper-address SLACKWARE-IP
interface BVI2
ip helper-address SLACKWARE-IP
end
wr mem

And I know it's screwed up, but it works!  But here's the dhcpd.conf file
that runs on my Slackware machine:

# Sample /etc/dhcpd.conf
# (add your comments here) 
default-lease-time 2200;
max-lease-time 7200;
option subnet-mask 255.255.252.0;
option broadcast-address 192.168.3.255;
option routers 192.168.1.254;
option domain-name-servers 206.52.158.251;
option domain-name "cjnetworks.com";

subnet 192.168.0.0 netmask 255.255.252.0 {
   range 192.168.2.1 192.168.3.254;
}

I have a real IP address for the slackware machine under the 'ed0' device
in Linux.  I setup an alias for the 192.168.0.0 subnet like this:

ifconfig eth0:1 192.168.0.1 netmask 255.255.252.0 up

After I do my ifconfig, and run 'dhcpd', everything works just fine.
Everyone can route on the machine, and everything.  It's pretty.  By the
way, we're doing NAT on the router to translate the 192.168.0.0 subnet to
a real IP.  We use fake IPs for our ADSL low-end customers so they can't
run servers...

However, I want to replicate this working DHCP server on a newer FreeBSD
4.2 machine, so I can nuke the old Slackware linux box because it is
ancient.  However, I find the above working configurations to fail
horribly on the FreeBSD box.  I'm guessing because Slackware is so old,
that I'm using a bad configuration above, and it's using it anyway because
it doesn't know any better?  And perhaps since FreeBSD is a newer version,
it is saying "hey, this doesn't work...but I can't tell you why!"...?

With the same router entries, but a different IP, we point the helper
address to the FreeBSD's IP number.  And this time, instead of doing NAT
and using a 192.168.0.0 subnet, we use a real subnet.  Here's my
configuration on the FreeBSD box:

# ADSL dhcpd.conf 12/21/00

default-lease-time 2200;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 199.240.152.255;
option routers 199.240.152.254;
option domain-name-servers 206.52.158.251;
option domain-name "cjnetworks.com";

subnet 199.240.152.0 netmask 255.255.255.0 {
   range 199.240.152.2 199.240.152.200;
}

And here's the ifconfig I do:

ifconfig vx0 alias 199.240.152.1 netmask 255.255.255.0 broadcast
199.240.152.255 up

I run 'dhcpd -d' in debug mode to see any entries connecting...and
nothing.  When we call up some of our ADSL customers to see if they can
get a new lease, nothing goes.  They can't find the new DHCP server.  I
removed the ifconfig, and stopped the DHCP server on the Slackware
machine, and started everything up on the FreeBSD machine.  It will NOT
work at ALL on the FreeBSD machine.  

What in the world could I possibly be doing wrong to not be able to have
DHCP run on this new machine?  I'm at a complete loss, and this mailing
list is my last resort.  I'm begging for someone to help me.

I look forward to hearing from someone that has a clue, unlike myself.

Regards,

---
Erik M. Blankenship			[email-masked]
Systems Administrator	   	    http://www.cjnetworks.com 		
CJNetWorks    			         voice:  785.270.1301

---

From: Ted Lemon <[email-masked]>
Date: Wed, 03 Jan 2001 15:49:29 -0500

> ifconfig eth0:1 192.168.0.1 netmask 255.255.252.0 up

You need to write subnet declarations for all the subnets that are
connected to the wire to which you are connecting vx0, and enclose all
of those subnet declarations in a shared-network declaration.

			       _MelloN_