radtest failed to send request to radius server having ipv6 address.

Arran Cudbard-Bell a.cudbardb at freeradius.org
Wed Dec 3 08:00:13 CET 2014


> On 3 Dec 2014, at 01:08, timingsrc src <timingsrc at gmail.com> wrote:
> 
> 
> Hello, 
> 
> I have made radius server 3.0.5 setup in my PC. It worked fine with IPV4 addresses, radtest fails to send request with IPV6 addresses. 
> 
> Below command worked fine,user authenticated. 
> radtest -x USER  72e#05  192.168.242.43 1812 testinglab
> 
> Where as with IPV6 address it throws an error. 
> radtest -x -6  USER 72e#05 2001:e30:1400:1:208:c7ff:fecf:9f0f  1812  testinglab 
> 
> (0) Error parsing "-": ip_hton: No address associated with hostname
> 
> Please let me know how i should send radius auth requests with IPV6 address. 

When the NAS isn't explicitly specified, radtest adds the pair:

	NAS-IPv6-Address = `hostname`

If `hostname` doesn't have a v6 address associated with it, you'll get that error.

You can either edit /etc/hosts and add a v6 address for `hostname` or pass one explicitly to 
radtest e.g:

	radtest -x -6 USER 72e#05 2001:e30:1400:1:208:c7ff:fecf:9f0f 1812 testinglab 0 ::1

I've pushed a fix to make the error message a bit more useful:

radtest -x -6 USER 72e#05 2001:e30:1400:1:208:c7ff:fecf:9f0f 1812 testinglab
(0) Error parsing "stdin": Failed resolving "shinyhead.local" to IPv6 address: nodename nor servname provided, or not known

Still not great, but at least gives you an idea of what might be going on :)

-Arran 

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS development team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2



More information about the Freeradius-Users mailing list