]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Updated DHCP configuration template to be able to act as a DHCP server when on a...
authorRenaud Métrich <renaud.metrich@mancalanetworks.com>
Thu, 24 Nov 2011 09:42:57 +0000 (10:42 +0100)
committerRenaud Métrich <renaud.metrich@mancalanetworks.com>
Thu, 24 Nov 2011 09:42:57 +0000 (10:42 +0100)
raddb/sites-available/dhcp

index 2639900c58bb859bce45f68d1d6235b9f0ee6082..d1257d0a504a041a4c52aef2055b84ea4e257f50 100644 (file)
@@ -93,19 +93,41 @@ server dhcp {
 #
 # The other only solution is to update FreeRADIUS to use BPF sockets.
 #
-listen {
-       ipaddr = 127.0.0.1
-       port = 6700
-       type = dhcp
-#      interface = lo0
-
-       # The DHCP server defaults to allowing broadcast packets.
-       # Set this to "no" only when the server receives *all* packets
-       # from a relay agent.  i.e. when *no* clients are on the same
-       # LAN as the DHCP server.
-       #
-       # It's set to "no" here for testing.
-       broadcast = no
+
+       # When the machine is not Linux, or has only one network interface, use
+       # the following listener:
+       listen {
+               # Listen for broadcasts + unicast on lo0
+               ipaddr = *
+               port = 6700
+               type = dhcp
+               interface = lo0
+               # The DHCP server defaults to allowing broadcast packets.
+               # Set this to "no" only when the server receives *all* packets
+               # from a relay agent.  i.e. when *no* clients are on the same
+               # LAN as the DHCP server.
+               #
+               # It's set to "no" here for testing.
+               broadcast = no
+       }
+       # When the machine is Linux and has multiple network interfaces, use
+       # the following listeners instead:
+       listen {
+               # Listen for broadcasts on lo0
+               ipaddr = 255.255.255.255
+               port = 6700
+               type = dhcp
+               interface = lo0
+       }
+       listen {
+               # Listen for unicast on our IP address, not bound to any
+               # interface but telling on which interface to forward the
+               # packets to.
+               ipaddr = 127.0.0.1
+               port = 6700
+               type = dhcp
+               arp_interface = lo0
+       }
 
        # On Linux if you're running the server as non-root, you
        # will need to do:
@@ -113,8 +135,7 @@ listen {
        #       sudo setcap cap_net_admin=ei /path/to/radiusd
        #
        # This will allow the server to set ARP table entries
-       # for newly allocated IPs
-}
+       # for newly allocated IPs, but this has not been tested.
 
 #  Packets received on the socket will be processed through one
 #  of the following sections, named after the DHCP packet type.