NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/52403: dhclient program doesn't send dhcp-client-identifier set in /etc/dhclient.conf



>Number:         52403
>Category:       bin
>Synopsis:       dhclient program doesn't send dhcp-client-identifier set in /etc/dhclient.conf
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 14 17:30:01 +0000 2017
>Originator:     Mickaël Viey
>Release:        7.0.2
>Organization:
>Environment:
NetBSD 7.0.2 (GENERIC.201610210724Z) amd64
>Description:
Hi,

I have a router One access One50 on this I try to configure a DHCP IP binding for my NetBSD. 

This router has two means to declare a binding (from documentation):

"To configure a manual binding, first enter in DHCP configuration mode:
         CLI(configure)> ip dhcp pool <pool-name>
To create a manual binding between IP address and hardware address, use the following command:
         CLI(dhcp-config)> host <ip-address>
         CLI(dhcp-config)> hardware-address <MAC-address> ethernet
The MAC address is in a format such as: '00:80:DE:AD:BE:EF'. Following the above-referenced
commands, one can also set other DHCP options associated with the host; client name, hostname, etc.
Alternatively, a binding may be declared without using the ?hardware-address ...? command if the client-
identifier command is used:
         CLI(dhcp-config)> host <ip-address>
         CLI(dhcp-config)> client-identifier <string>
To remove the manual binding or an option in a manual binding, use the 'no' form of the corresponding
command."

Unfortunately, NetBSD send a client-identifier which is not understood by the router. Because the client identifier take the precedence to the mac address if I want get a static IP from the router from NetBSD I must configure the BSD dhcp client for it doesn't send this identifier. But whatever I try to do with the configuration file /etc/dhclient.conf the router always receive a bytes sequence in place of client identifier, and another IP than expected is attribued.

Here is my last try /etc/dhclient.conf:
"
send dhcp-client-identifier "\0";

request ;

timeout 30;
retry 60;
select-timeout 5;

script "/sbin/dhclient-script":

lease {
  interface "re0";
}
"

I try many combination:

send dhcp-client-identifier "dk-17";

Try to remove the line. Anyway the behaviour it the same I get this when I get binding configuration in the router:
mika-ftth>sh ip dhcp binding
IP address      Hardware address    Client identifier    Expire in   Type
192.168.15.3    00:25:22:59:a0:88   Y&#65533;&#65533;                23:54:30    Automatic
192.168.15.1    00:25:22:59:a0:88           -             -          Manual
192.168.15.2    78:a3:51:26:4c:17           -            23:31:20    Manual
mika-ftth>

192.168.15.1 it's the IP I want to get, and 192.168.15.3 the IP I actually get with the client identifier like this: Y&#65533;&#65533;.

------------------------------------
The configuration of the router is bellow:
Building configuration...

Current configuration: 

[...]

interface FastEthernet 0/0
 no ip address
 [...]
 description * FTTH DIALER *
exit
interface FastEthernet 0/1
 bridge-group 123
exit
interface FastEthernet 0/2
 bridge-group 123
exit
interface FastEthernet 0/3
 ip address 192.168.23.253 255.255.255.0
 description backup
 ip nat inside overload
exit
interface Bvi 123                     
 ip address 192.168.15.254 255.255.255.0
 bridge-group 123
exit
virtual-template ppp 2

[...]

ip dhcp pool Private
 dns-server 195.5.209.150 194.79.128.150
 default-router 192.168.15.254
 network range 192.168.15.1 192.168.15.10
exit
ip dhcp pool rt1
 default-router 192.168.15.254
 dns-server 195.5.209.150 194.79.128.150
 host 192.168.15.2
 hardware-address 78:A3:51:26:4C:17 ethernet
exit
ip dhcp pool dk17
 dns-server 195.5.209.150 194.79.128.150
 default-router 192.168.15.254        
 host 192.168.15.1
 hardware-address 00:25:22:59:A0:88 ethernet
exit

[...]

end

---------------------------


Here the log from the router for a DHCP request from NetBSD:

00:18:31.261 #NOTIFY# IF: FastEthernet 0/2 is DOWN
00:18:33.461 #NOTIFY# IF: FastEthernet 0/2 is UP
00:18:39.661 #NOTIFY# IF: FastEthernet 0/2 is DOWN
00:18:41.861 #NOTIFY# IF: FastEthernet 0/2 is UP
00:18:46.394 DHCPS: receive DHCPREQUEST for 192.168.15.3 from 0x00:25:22:59:a0:88
00:18:46.394 DHCPS: send DHCPACK on 192.168.15.3 to 0x00:25:22:59:a0:88
00:18:46.394 DHCPS: 192.168.15.3 assigned to client "0:0xff2259a08800010001203a470000252259a088" for 24:00:00
00:24:33.461 #NOTIFY# IF: FastEthernet 0/2 is DOWN
00:24:35.661 #NOTIFY# IF: FastEthernet 0/2 is UP
00:24:41.861 #NOTIFY# IF: FastEthernet 0/2 is DOWN
00:24:44.061 #NOTIFY# IF: FastEthernet 0/2 is UP
00:24:44.632 DHCPS: receive DHCPREQUEST for 192.168.15.3 from 0x00:25:22:59:a0:88
00:24:44.633 DHCPS: send DHCPACK on 192.168.15.3 to 0x00:25:22:59:a0:88
00:24:44.633 DHCPS: 192.168.15.3 assigned to client "0:0xff2259a08800010001203a470000252259a088" for 24:00:00

the client identifier 0:0xff2259a08800010001203a470000252259a088 seems to be very long and I think it's a part of the problem. If I compare with the transaction from another dhcp request from another device (a router on openwrt)this identifier is shorter:

mika-ftth>debug ip dhcp
mika-ftth>monitor trace
mika-ftth>00:44:28.443 DHCPS: receive DHCPDISCOVER from 0x78:a3:51:26:4c:17
00:44:28.443 DHCPS: arp checking, send ARP for 192.168.15.2 to Bvi 123
00:44:28.940 DHCPS: 192.168.15.2 is available
00:44:28.940 DHCPS: send DHCPOFFER on 192.168.15.2 to 0x78:a3:51:26:4c:17
00:44:28.960 DHCPS: receive DHCPREQUEST for 192.168.15.2 from 0x78:a3:51:26:4c:17
00:44:28.960 DHCPS: send DHCPACK on 192.168.15.2 to 0x78:a3:51:26:4c:17
00:44:28.960 DHCPS: 192.168.15.2 assigned to client "1:0x78a351264c17" for 24:00:00


This another router get the expected IP address counter to NetBSD. (we see it in "sh ip dhcp binding" output above)


Here the OS version of the router One Access:

mika-ftth>sh version
Software version    : ONEOS10-ADVIP_11N-V4.3R6E19
Software created on : 13/03/13 18:48:55
mika-ftth> 




>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index