Developers guide
Chapter 5
Copyright © 2008-2013 Inverse inc.
Configuration 24
By default no DHCP Server should be running on that interface where you are sending the requests. This
is by design otherwise PacketFence would reply to the DHCP requests which would be a bad thing.
Obtain a copy of the DHCP traffic
Get a copy of all the DHCP Traffic to a dedicated physical interface in the PacketFence server and
run pfdhcplistener on that interface. It will involve configuring your switch properly to perform port
mirroring (aka network span) and adding in PacketFence the proper interface statement at the operating
system level and in pf.conf.
/etc/sysconfig/network-scripts/ifcfg-eth2:
DEVICE=eth2
ONBOOT=yes
BOOTPROTO=none
Add to pf.conf: (IPs are not important they are there only so that PacketFence will start)
[interface eth2]
mask=255.255.255.0
type=dhcp-listener
gateway=192.168.1.5
ip=192.168.1.1
Restart PacketFence and you should be good to go.
Interface in every VLAN
Because DHCP traffic is broadcast traffic, an alternative for small networks with few local VLANs is to
put a VLAN interface for every VLAN on the PacketFence server and have a pfdhcplistener listen on
that VLAN interface.
On the network side you need to make sure that the VLAN truly reaches all the way from your client to
your DHCP infrastructure up to the PacketFence server.
On the PacketFence side, first you need an operating system VLAN interface like the one below. Stored
in /etc/sysconfig/network-scripts/ifcfg-eth0.1010:
# Engineering VLAN
DEVICE=eth0.1010
ONBOOT=yes
BOOTPROTO=static
IPADDR=10.0.101.4
NETMASK=255.255.255.0
VLAN=yes
Then you need to specify in pf.conf that you are interested in that VLAN’s DHCP by setting type to
dhcp-listener.