Re: DHCP configuration WARNING

2012-03-29 Thread Fajar A. Nugraha
On Thu, Mar 29, 2012 at 4:29 PM, Peter Balsianok
 wrote:
> Hi,
>
> I try to use the DHCP virtual server. I`m using DEFAULT configuration.
> After start of the Freeradius/DHCP server, i can see WARNING message in the
> dhcp section.
> Is it correct ?

Yes :)
http://permalink.gmane.org/gmane.comp.freeradius.devel/7193

You should use latest version from v2.1.x git branch though, as it has
some dhcp-related improvements (including dynamic IP assignment using
SQL) compared to 2.1.12 (which, I assume, is what you're using)

-- 
Fajar
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


DHCP configuration WARNING

2012-03-29 Thread Peter Balsianok
Hi,

I try to use the DHCP virtual server. I`m using DEFAULT configuration.
After start of the Freeradius/DHCP server, i can see WARNING message in the
dhcp section. 
Is it correct ?

radiusd -X
...
server dhcp { # from file /usr/local/etc/raddb/sites-enabled/dhcp
 modules {
 } # modules
} # server
*WARNING: Server dhcp is empty, and will do nothing!*
radiusd:  Opening IP addresses and Ports 
listen {
type = "auth"
ipaddr = *
port = 0
}
listen {
type = "acct"
ipaddr = *
port = 0
}
listen {
type = "control"
 listen {
socket = "/usr/local/var/run/radiusd/radiusd.sock"
 }
}
listen {
type = "auth"
ipaddr = 127.0.0.1
port = 18120
}
listen {
type = "dhcp"
ipaddr = 127.0.0.1
port = 6700
}
Listening on authentication address * port 1812
Listening on accounting address * port 1813
Listening on command file /usr/local/var/run/radiusd/radiusd.sock
Listening on authentication address 127.0.0.1 port 18120 as server
inner-tunnel
Listening on dhcp address 127.0.0.1 port 6700 as server dhcp
Ready to process requests.


configuration file sites-available/dhcp:
#
#  The DHCP functionality goes into a virtual server.
#
server dhcp {

listen {
ipaddr = 127.0.0.1
port = 6700
type = dhcp
#   interface = lo0
broadcast = no
}

#  Packets received on the socket will be processed through one
#  of the following sections, named after the DHCP packet type.
#  See dictionary.dhcp for the packet types.
dhcp DHCP-Discover {
update reply {
   DHCP-Message-Type = DHCP-Offer
}

#  The contents here are invented.  Change them!
update reply {
DHCP-Domain-Name-Server = 127.0.0.1
DHCP-Domain-Name-Server = 127.0.0.2
DHCP-Subnet-Mask = 255.255.255.0
DHCP-Router-Address = 192.168.1.1
DHCP-IP-Address-Lease-Time = 86400
DHCP-DHCP-Server-Identifier = 192.168.1.1
}

#  Do a simple mapping of MAC to assigned IP.
#
#  See below for the definition of the "mac2ip"
#  module.
#
mac2ip

#  If the MAC wasn't found in that list, do something else.
#  You could call a Perl, Python, or Java script here.

#if (notfound) {
# ...
#}

ok
}

dhcp DHCP-Request {
update reply {
   DHCP-Message-Type = DHCP-Ack
}

#  The contents here are invented.  Change them!
update reply {
DHCP-Domain-Name-Server = 127.0.0.1
DHCP-Domain-Name-Server = 127.0.0.2
DHCP-Subnet-Mask = 255.255.255.0
DHCP-Router-Address = 192.168.1.1
DHCP-IP-Address-Lease-Time = 86400
DHCP-DHCP-Server-Identifier = 192.168.1.1
}

#  Do a simple mapping of MAC to assigned IP.
#
#  See below for the definition of the "mac2ip"
#  module.
#
mac2ip

#  If the MAC wasn't found in that list, do something else.
#  You could call a Perl, Python, or Java script here.

#if (notfound) {
# ...
#}

ok
}

#  If there's no named section for the packet type, then the packet
#  is processed through this section.
dhcp {
# send a DHCP NAK.
reject
}


}

passwd mac2ip {
filename = ${confdir}/mac2ip
format = "*DHCP-Client-Hardware-Address:=DHCP-Your-IP-Address"
    delimiter = ","
}


--
View this message in context: 
http://freeradius.1045715.n5.nabble.com/DHCP-configuration-WARNING-tp5603160p5603160.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html