DHCP with FreeRADIUS

Jesús Jiménez jesus at bvox.net
Tue Apr 20 12:40:47 CEST 2010


Hi,
I'm having problems to configure the dhcp with freeradius (this is the
first time :$)
I have compiled it with the --with-dhcp option, and linked dhcp in
sites-available.

My dhcp server is 10.88.3.25 and the router is 10.88.3.1.

I have only modified the dhcp configuration and the mac2ip file.

This is the dhcp configuration:
______________________________________________
server dhcp {

listen {
	ipaddr = *
	port = 67
	type = "dhcp"	
	interface = eth0
}

dhcp DHCP-Discover {
	update reply {
	       DHCP-Message-Type = DHCP-Offer
	}

	update reply {
	        DHCP-Domain-Name-Server = 80.58.0.33
	        DHCP-Domain-Name-Server = 80.58.0.33
		DHCP-Subnet-Mask = 255.255.255.0
		DHCP-Router-Address = 10.88.3.1
		DHCP-IP-Address-Lease-Time = 86400
		DHCP-DHCP-Server-Identifier = 10.88.3.25
	}

	mac2ip
	ok
}

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

	update reply {
	        DHCP-Domain-Name-Server = 80.58.0.33
	        DHCP-Domain-Name-Server = 80.58.0.33
		DHCP-Subnet-Mask = 255.255.255.0
		DHCP-Router-Address = 10.88.3.1
		DHCP-IP-Address-Lease-Time = 86400
		DHCP-DHCP-Server-Identifier = 10.88.3.25
		DHCP-Gateway-IP-Address = 10.88.3.1
	}

	mac2ip

	ok
}

dhcp {
	# send a DHCP NAK.
	reject
}

}
_________________________________________________

I put the mac adress in mac2ip and it works, here is the file:
fa:b3:77:de:25:6b,10.88.3.20

When I launch it in debug mode I have this exit:

_________________________________________________

# freeradius -XX
Tue Apr 20 13:26:13 2010 : Info: FreeRADIUS Version 2.1.8, for host
i486-pc-linux-gnu, built on Apr 20 2010 at 13:19:48
Tue Apr 20 13:26:13 2010 : Info: Copyright (C) 1999-2009 The FreeRADIUS
server project and contributors. 
Tue Apr 20 13:26:13 2010 : Info: There is NO warranty; not even for
MERCHANTABILITY or FITNESS FOR A 
Tue Apr 20 13:26:13 2010 : Info: PARTICULAR PURPOSE. 
Tue Apr 20 13:26:13 2010 : Info: You may redistribute copies of
FreeRADIUS under the terms of the 
Tue Apr 20 13:26:13 2010 : Info: GNU General Public License v2. 
Tue Apr 20 13:26:13 2010 : Info: Starting - reading configuration
files ...
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/radiusd.conf
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/proxy.conf
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/clients.conf
Tue Apr 20 13:26:13 2010 : Debug: including files in
directory /etc/freeradius/modules/
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/krb5
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/always
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/realm
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/radutmp
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/digest
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/mac2vlan
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/perl
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/checkval
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/sradutmp
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/ldap
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/expiration
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/ntlm_auth
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/preprocess
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/exec
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/pam
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/detail.example.com
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/passwd
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/echo
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/chap
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/sqlcounter_expire_on_login
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/inner-eap
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/policy
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/counter
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/smbpasswd
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/detail.log
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/unix
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/mschap
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/etc_group
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/files
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/smsotp
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/wimax
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/acct_unique
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/cui
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/linelog
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/detail
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/sql_log
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/otp
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/pap
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/mac2ip
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/attr_rewrite
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/ippool
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/expr
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/attr_filter
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/modules/logintime
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/eap.conf
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/policy.conf
Tue Apr 20 13:26:13 2010 : Debug: including files in
directory /etc/freeradius/sites-enabled/
Tue Apr 20 13:26:13 2010 : Debug: including configuration
file /etc/freeradius/sites-enabled/dhcp
Tue Apr 20 13:26:13 2010 : Debug: main {
Tue Apr 20 13:26:13 2010 : Debug: 	user = "freerad"
Tue Apr 20 13:26:13 2010 : Debug: 	group = "freerad"
Tue Apr 20 13:26:13 2010 : Debug: 	allow_core_dumps = no
Tue Apr 20 13:26:13 2010 : Debug: }
Tue Apr 20 13:26:13 2010 : Debug: including dictionary
file /etc/freeradius/dictionary
Tue Apr 20 13:26:13 2010 : Debug: main {
Tue Apr 20 13:26:13 2010 : Debug: 	prefix = "/usr"
Tue Apr 20 13:26:13 2010 : Debug: 	localstatedir = "/var"
Tue Apr 20 13:26:13 2010 : Debug: 	logdir = "/var/log/freeradius"
Tue Apr 20 13:26:13 2010 : Debug: 	libdir = "/usr/lib/freeradius"
Tue Apr 20 13:26:13 2010 : Debug: 	radacctdir =
"/var/log/freeradius/radacct"
Tue Apr 20 13:26:13 2010 : Debug: 	hostname_lookups = no
Tue Apr 20 13:26:13 2010 : Debug: 	max_request_time = 30
Tue Apr 20 13:26:13 2010 : Debug: 	cleanup_delay = 5
Tue Apr 20 13:26:13 2010 : Debug: 	max_requests = 1024
Tue Apr 20 13:26:13 2010 : Debug: 	pidfile =
"/var/run/freeradius/freeradius.pid"
Tue Apr 20 13:26:13 2010 : Debug: 	checkrad = "/usr/sbin/checkrad"
Tue Apr 20 13:26:13 2010 : Debug: 	debug_level = 0
Tue Apr 20 13:26:13 2010 : Debug: 	proxy_requests = yes
Tue Apr 20 13:26:13 2010 : Debug:  log {
Tue Apr 20 13:26:13 2010 : Debug: 	stripped_names = no
Tue Apr 20 13:26:13 2010 : Debug: 	auth = no
Tue Apr 20 13:26:13 2010 : Debug: 	auth_badpass = no
Tue Apr 20 13:26:13 2010 : Debug: 	auth_goodpass = no
Tue Apr 20 13:26:13 2010 : Debug:  }
Tue Apr 20 13:26:13 2010 : Debug:  security {
Tue Apr 20 13:26:13 2010 : Debug: 	max_attributes = 200
Tue Apr 20 13:26:13 2010 : Debug: 	reject_delay = 1
Tue Apr 20 13:26:13 2010 : Debug: 	status_server = yes
Tue Apr 20 13:26:13 2010 : Debug:  }
Tue Apr 20 13:26:13 2010 : Debug: }
Tue Apr 20 13:26:13 2010 : Debug: radiusd: #### Loading Realms and Home
Servers ####
Tue Apr 20 13:26:13 2010 : Debug:  proxy server {
Tue Apr 20 13:26:13 2010 : Debug: 	retry_delay = 5
Tue Apr 20 13:26:13 2010 : Debug: 	retry_count = 3
Tue Apr 20 13:26:13 2010 : Debug: 	default_fallback = no
Tue Apr 20 13:26:13 2010 : Debug: 	dead_time = 120
Tue Apr 20 13:26:13 2010 : Debug: 	wake_all_if_all_dead = no
Tue Apr 20 13:26:13 2010 : Debug:  }
Tue Apr 20 13:26:13 2010 : Debug:  home_server localhost {
Tue Apr 20 13:26:13 2010 : Debug: 	ipaddr = 127.0.0.1
Tue Apr 20 13:26:13 2010 : Debug: 	port = 1812
Tue Apr 20 13:26:13 2010 : Debug: 	type = "auth"
Tue Apr 20 13:26:13 2010 : Debug: 	secret = "testing123"
Tue Apr 20 13:26:13 2010 : Debug: 	response_window = 20
Tue Apr 20 13:26:13 2010 : Debug: 	max_outstanding = 65536
Tue Apr 20 13:26:13 2010 : Debug: 	require_message_authenticator = no
Tue Apr 20 13:26:13 2010 : Debug: 	zombie_period = 40
Tue Apr 20 13:26:13 2010 : Debug: 	status_check = "status-server"
Tue Apr 20 13:26:13 2010 : Debug: 	ping_interval = 30
Tue Apr 20 13:26:13 2010 : Debug: 	check_interval = 30
Tue Apr 20 13:26:13 2010 : Debug: 	num_answers_to_alive = 3
Tue Apr 20 13:26:13 2010 : Debug: 	num_pings_to_alive = 3
Tue Apr 20 13:26:13 2010 : Debug: 	revive_interval = 120
Tue Apr 20 13:26:13 2010 : Debug: 	status_check_timeout = 4
Tue Apr 20 13:26:13 2010 : Debug: 	irt = 2
Tue Apr 20 13:26:13 2010 : Debug: 	mrt = 16
Tue Apr 20 13:26:13 2010 : Debug: 	mrc = 5
Tue Apr 20 13:26:13 2010 : Debug: 	mrd = 30
Tue Apr 20 13:26:13 2010 : Debug:  }
Tue Apr 20 13:26:13 2010 : Debug:  home_server_pool my_auth_failover {
Tue Apr 20 13:26:13 2010 : Debug: 	type = fail-over
Tue Apr 20 13:26:13 2010 : Debug: 	home_server = localhost
Tue Apr 20 13:26:13 2010 : Debug:  }
Tue Apr 20 13:26:13 2010 : Debug:  realm example.com {
Tue Apr 20 13:26:13 2010 : Debug: 	auth_pool = my_auth_failover
Tue Apr 20 13:26:13 2010 : Debug:  }
Tue Apr 20 13:26:13 2010 : Debug:  realm LOCAL {
Tue Apr 20 13:26:13 2010 : Debug:  }
Tue Apr 20 13:26:13 2010 : Debug: radiusd: #### Loading Clients ####
Tue Apr 20 13:26:13 2010 : Debug:  client localhost {
Tue Apr 20 13:26:13 2010 : Debug: 	ipaddr = 127.0.0.1
Tue Apr 20 13:26:13 2010 : Debug: 	require_message_authenticator = no
Tue Apr 20 13:26:13 2010 : Debug: 	secret = "testing123"
Tue Apr 20 13:26:13 2010 : Debug: 	nastype = "other"
Tue Apr 20 13:26:13 2010 : Debug:  }
Tue Apr 20 13:26:13 2010 : Debug: radiusd: #### Instantiating modules
####
Tue Apr 20 13:26:13 2010 : Debug:  instantiate {
Tue Apr 20 13:26:13 2010 : Debug:     (Loaded rlm_exec, checking if it's
valid)
Tue Apr 20 13:26:13 2010 : Debug:  Module: Linked to module rlm_exec
Tue Apr 20 13:26:13 2010 : Debug:  Module: Instantiating exec
Tue Apr 20 13:26:13 2010 : Debug:   exec {
Tue Apr 20 13:26:13 2010 : Debug: 	wait = no
Tue Apr 20 13:26:13 2010 : Debug: 	input_pairs = "request"
Tue Apr 20 13:26:13 2010 : Debug: 	shell_escape = yes
Tue Apr 20 13:26:13 2010 : Debug:   }
Tue Apr 20 13:26:13 2010 : Debug:     (Loaded rlm_expr, checking if it's
valid)
Tue Apr 20 13:26:13 2010 : Debug:  Module: Linked to module rlm_expr
Tue Apr 20 13:26:13 2010 : Debug:  Module: Instantiating expr
Tue Apr 20 13:26:13 2010 : Debug:     (Loaded rlm_expiration, checking
if it's valid)
Tue Apr 20 13:26:13 2010 : Debug:  Module: Linked to module
rlm_expiration
Tue Apr 20 13:26:13 2010 : Debug:  Module: Instantiating expiration
Tue Apr 20 13:26:13 2010 : Debug:   expiration {
Tue Apr 20 13:26:13 2010 : Debug: 	reply-message = "Password Has Expired
"
Tue Apr 20 13:26:13 2010 : Debug:   }
Tue Apr 20 13:26:13 2010 : Debug:     (Loaded rlm_logintime, checking if
it's valid)
Tue Apr 20 13:26:13 2010 : Debug:  Module: Linked to module
rlm_logintime
Tue Apr 20 13:26:13 2010 : Debug:  Module: Instantiating logintime
Tue Apr 20 13:26:13 2010 : Debug:   logintime {
Tue Apr 20 13:26:13 2010 : Debug: 	reply-message = "You are calling
outside your allowed timespan  "
Tue Apr 20 13:26:13 2010 : Debug: 	minimum-timeout = 60
Tue Apr 20 13:26:13 2010 : Debug:   }
Tue Apr 20 13:26:13 2010 : Debug:  }
Tue Apr 20 13:26:13 2010 : Debug: radiusd: #### Loading Virtual Servers
####
Tue Apr 20 13:26:13 2010 : Debug: server dhcp {
Tue Apr 20 13:26:13 2010 : Debug:  modules {
Tue Apr 20 13:26:13 2010 : Debug:  Module: Checking dhcp DHCP-Discover
{...} for more modules to load
Tue Apr 20 13:26:13 2010 : Debug:     (Loaded rlm_passwd, checking if
it's valid)
Tue Apr 20 13:26:13 2010 : Debug:  Module: Linked to module rlm_passwd
Tue Apr 20 13:26:13 2010 : Debug:  Module: Instantiating mac2ip
Tue Apr 20 13:26:13 2010 : Debug:   passwd mac2ip {
Tue Apr 20 13:26:13 2010 : Debug: 	filename = "/etc/freeradius/mac2ip"
Tue Apr 20 13:26:13 2010 : Debug: 	format =
"*DHCP-Client-Hardware-Address:=DHCP-Your-IP-Address"
Tue Apr 20 13:26:13 2010 : Debug: 	delimiter = ","
Tue Apr 20 13:26:13 2010 : Debug: 	ignorenislike = yes
Tue Apr 20 13:26:13 2010 : Debug: 	ignoreempty = yes
Tue Apr 20 13:26:13 2010 : Debug: 	allowmultiplekeys = no
Tue Apr 20 13:26:13 2010 : Debug: 	hashsize = 100
Tue Apr 20 13:26:13 2010 : Debug:   }
Tue Apr 20 13:26:13 2010 : Debug: rlm_passwd: nfields: 2 keyfield
0(DHCP-Client-Hardware-Address) listable: no
Tue Apr 20 13:26:13 2010 : Debug:     (Loaded rlm_always, checking if
it's valid)
Tue Apr 20 13:26:13 2010 : Debug:  Module: Linked to module rlm_always
Tue Apr 20 13:26:13 2010 : Debug:  Module: Instantiating ok
Tue Apr 20 13:26:13 2010 : Debug:   always ok {
Tue Apr 20 13:26:13 2010 : Debug: 	rcode = "ok"
Tue Apr 20 13:26:13 2010 : Debug: 	simulcount = 0
Tue Apr 20 13:26:13 2010 : Debug: 	mpp = no
Tue Apr 20 13:26:13 2010 : Debug:   }
Tue Apr 20 13:26:13 2010 : Debug:  Module: Checking dhcp DHCP-Request
{...} for more modules to load
Tue Apr 20 13:26:13 2010 : Debug:  Module: Checking dhcp (null) {...}
for more modules to load
Tue Apr 20 13:26:13 2010 :
Error: /etc/freeradius/sites-enabled/dhcp[49]: No name specified for
Post-Auth-Type block
Tue Apr 20 13:26:13 2010 : Debug:  } # modules
Tue Apr 20 13:26:13 2010 : Debug: } # server
Tue Apr 20 13:26:13 2010 : Debug: server {
Tue Apr 20 13:26:13 2010 : Debug:  modules {
Tue Apr 20 13:26:13 2010 : Debug:  } # modules
Tue Apr 20 13:26:13 2010 : Debug: } # server
Tue Apr 20 13:26:13 2010 : Debug: radiusd: #### Opening IP addresses and
Ports ####
Tue Apr 20 13:26:13 2010 : Debug: listen {
Tue Apr 20 13:26:13 2010 : Debug: 	type = "auth"
Tue Apr 20 13:26:13 2010 : Debug: 	ipaddr = *
Tue Apr 20 13:26:13 2010 : Debug: 	port = 0
Tue Apr 20 13:26:13 2010 : Debug: }
Tue Apr 20 13:26:13 2010 : Debug: listen {
Tue Apr 20 13:26:13 2010 : Debug: 	type = "acct"
Tue Apr 20 13:26:13 2010 : Debug: 	ipaddr = *
Tue Apr 20 13:26:13 2010 : Debug: 	port = 0
Tue Apr 20 13:26:13 2010 : Debug: }
Tue Apr 20 13:26:13 2010 : Debug: listen {
Tue Apr 20 13:26:13 2010 : Debug: 	type = "dhcp"
Tue Apr 20 13:26:13 2010 : Debug: 	ipaddr = *
Tue Apr 20 13:26:13 2010 : Debug: 	port = 67
Tue Apr 20 13:26:13 2010 : Debug: }
Tue Apr 20 13:26:13 2010 : Debug: Listening on authentication address *
port 1812
Tue Apr 20 13:26:13 2010 : Debug: Listening on accounting address * port
1813
Tue Apr 20 13:26:13 2010 : Debug: Listening on dhcp interface eth0
address * port 67 as server dhcp
Tue Apr 20 13:26:13 2010 : Debug: Listening on proxy address * port 1814
Tue Apr 20 13:26:13 2010 : Info: Ready to process requests.
____________________________________________________


and when I receive a dhcp-discover I have this:


____________________________________________________

Received DHCP-Discover of id 2b60f030 from 0.0.0.0:68 to
255.255.255.255:67
0: 01 01 06 00 2b 60 f0 30 00 00 00 00 00 00 00 00 
16: 00 00 00 00 00 00 00 00 00 00 00 00 fa b3 77 de 
32: 25 6b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
48: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
64: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
96: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
112: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
128: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
144: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
176: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
192: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
208: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
224: 00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63 
240: 35 01 01 37 0c 01 1c 02 03 0f 06 77 0c 2c 2f 1a 
256: 79 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
272: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
288: 00 00 00 00 00 00 00 00 00 00 00 00 
	DHCP-Opcode = Client-Message
	DHCP-Hardware-Type = Ethernet
	DHCP-Hardware-Address-Length = 6
	DHCP-Hop-Count = 0
	DHCP-Transaction-Id = 727773232
	DHCP-Number-of-Seconds = 0
	DHCP-Flags = 0
	DHCP-Client-IP-Address = 0.0.0.0
	DHCP-Your-IP-Address = 0.0.0.0
	DHCP-Server-IP-Address = 0.0.0.0
	DHCP-Gateway-IP-Address = 0.0.0.0
	DHCP-Client-Hardware-Address = fa:b3:77:de:25:6b
	DHCP-Message-Type = DHCP-Discover
	DHCP-Parameter-Request-List = DHCP-Subnet-Mask
	DHCP-Parameter-Request-List = DHCP-Broadcast-Address
	DHCP-Parameter-Request-List = DHCP-Time-Offset
	DHCP-Parameter-Request-List = DHCP-Router-Address
	DHCP-Parameter-Request-List = DHCP-Domain-Name
	DHCP-Parameter-Request-List = DHCP-Domain-Name-Server
	DHCP-Parameter-Request-List = DHCP-Domain-Search
	DHCP-Parameter-Request-List = DHCP-Hostname
	DHCP-Parameter-Request-List = DHCP-NETBIOS-Name-Servers
	DHCP-Parameter-Request-List = DHCP-NETBIOS
	DHCP-Parameter-Request-List = DHCP-Interface-MTU-Size
	DHCP-Parameter-Request-List = DHCP-Classless-Static-Route
Tue Apr 20 13:29:27 2010 : Info: server dhcp {
Tue Apr 20 13:29:27 2010 : Debug: Trying sub-section dhcp DHCP-Discover
{...}
Tue Apr 20 13:29:27 2010 : Info: +- entering group DHCP-Discover {...}
Tue Apr 20 13:29:27 2010 : Info: ++[reply] returns noop
Tue Apr 20 13:29:27 2010 : Info: ++[reply] returns noop
Tue Apr 20 13:29:27 2010 : Info: [mac2ip] Added DHCP-Your-IP-Address:
'10.88.3.20' to reply_items 
Tue Apr 20 13:29:27 2010 : Info: ++[mac2ip] returns ok
Tue Apr 20 13:29:27 2010 : Info: ++[ok] returns ok
Tue Apr 20 13:29:27 2010 : Info: } # server dhcp
Sending DHCP-Offer of id 2b60f030 from 0.0.0.0:67 to 255.255.255.255:68
	DHCP-Opcode = Server-Message
	DHCP-Hardware-Type = Ethernet
	DHCP-Hardware-Address-Length = 6
	DHCP-Hop-Count = 0
	DHCP-Transaction-Id = 727773232
	DHCP-Number-of-Seconds = 0
	DHCP-Flags = 0
	DHCP-Client-IP-Address = 0.0.0.0
	DHCP-Your-IP-Address = 10.88.3.20
	DHCP-Server-IP-Address = 10.88.3.25
	DHCP-Gateway-IP-Address = 0.0.0.0
	DHCP-Client-Hardware-Address = fa:b3:77:de:25:6b
	DHCP-Server-Host-Name = ""
	DHCP-Boot-Filename = ""
	DHCP-Subnet-Mask = 255.255.255.0
	DHCP-Router-Address = 10.88.3.1
	DHCP-Domain-Name-Server = 80.58.0.33
	DHCP-Domain-Name-Server = 80.58.0.33
	DHCP-IP-Address-Lease-Time = 86400
	DHCP-DHCP-Server-Identifier = 10.88.3.25
0: 02 01 06 00 2b 60 f0 30 00 00 00 00 00 00 00 00 
16: 0a 58 03 14 0a 58 03 19 00 00 00 00 fa b3 77 de 
32: 25 6b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
48: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
64: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
96: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
112: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
128: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
144: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
176: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
192: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
208: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
224: 00 00 00 00 00 00 00 00 00 00 00 00 63 82 53 63 
240: 35 01 02 01 04 ff ff ff 00 03 04 0a 58 03 01 06 
256: 08 50 3a 00 21 50 3a 00 21 33 04 00 01 51 80 36 
272: 04 0a 58 03 19 ff 00 00 00 00 00 00 00 00 00 00 
288: 00 00 00 00 00 00 00 00 00 00 00 00 
Error on call sendmsg: Invalid argument
errno = 22.
_____________________________________________________

It looks like it's sending the dhcp response but with tcpdump I can't
see anything (of the response), the I decided to see the code and went
to the call sendmsg in src/lib/udpfromto.c
and change this:
<<
return sendmsg(s, &msgh, flags);
<<
>>
int res = sendmsg(s, &msgh, flags);
	if (res == -1){
	perror("Error on call sendmsg");
	printf("errno = %d. \n", errno);
	exit(1);
}

return res;
>>

I think its something of the configuration.

I someone can help me I'll be really grateful.

Sorry for my english :D

Jewi.




More information about the Freeradius-Users mailing list