Strange DHCP Client issue on 2.4



  • Hello,

    Just upgraded from 2.3.3.a.20161220.0605 to 2.4.0.b.20161220.0621.
    The DHCP Client on the WAN interfaces aren't getting an IP from the ISP, it's a /23 WAN IP.
    The gateway is 'Unknown' on both WAN's.
    I'm using Advanced Options on the DHCP Client Information to get the same IP from my ISP (Hostname and Protocol Timing Adjusted) again.
    On 2.3.3 there is no problem with it, on 2.4.0 there is, what could be wrong and how to debug?

    
    Dec 20 19:04:23	dhclient	44466	bound to 94.211.250.11 -- renewal in 299314 seconds.
    Dec 20 19:04:23	dhclient		New Routers (vmx2): 94.211.250.1
    Dec 20 19:04:23	dhclient		New Broadcast Address (vmx2): 255.255.255.255
    Dec 20 19:04:23	dhclient		New Subnet Mask (vmx2): 255.255.254.0
    Dec 20 19:04:23	dhclient		New IP Address (vmx2): 94.211.250.11
    Dec 20 19:04:23	dhclient	44466	DHCPACK from 10.255.75.1
    Dec 20 19:04:23	dhclient	44466	DHCPREQUEST on vmx2 to 255.255.255.255 port 67
    
    

    Best Regards,
    Donald.


  • Rebel Alliance Developer Netgate

    Is that the log from 2.3 or 2.4?

    Compare both logs, see what is different



  • The log above is from 2.4

    The log below is from 2.3.3

    
    Dec 21 17:14:18	dhclient		/sbin/route add default 94.211.250.1
    Dec 21 17:14:18	dhclient		Adding new routes to interface: vmx2
    Dec 21 17:14:18	dhclient		New Routers (vmx2): 94.211.250.1
    Dec 21 17:14:18	dhclient		New Broadcast Address (vmx2): 255.255.255.255
    Dec 21 17:14:18	dhclient		New Subnet Mask (vmx2): 255.255.254.0
    Dec 21 17:14:18	dhclient		New IP Address (vmx2): 94.211.250.11
    Dec 21 17:14:18	dhclient		ifconfig vmx2 inet 94.211.250.11 netmask 255.255.254.0 broadcast 255.255.255.255
    Dec 21 17:14:18	dhclient		Starting add_new_address()
    Dec 21 17:14:18	dhclient		REBOOT
    Dec 21 17:14:18	dhclient	5131	DHCPACK from 10.255.75.1
    Dec 21 17:14:18	dhclient	5131	DHCPREQUEST on vmx2 to 255.255.255.255 port 67
    
    

    It seems the gateway is not requested by dhcp or not getting set properly.


  • Rebel Alliance Developer Netgate

    The log messages are also different when they shouldn't be. I suspect it was somehow using the wrong dhclient script. Do you have any advanced DHCP client options set?

    I pushed a change for a reference I noticed to the wrong script, it's possible if you try again on a snapshot from tomorrow (or late today) that it might work better.



  • Yes, to get the same IP from my isp (still the same for over 5 years now) I have set the following advanced options:

    Hostname: cisco-modem

    Protocol Timing:
    timeout 30
    retry 10
    select timeout 0
    reboot 1
    backoff cutoff 2
    initial interval 2

    I will try the new snapshot tomorrow evening…


  • Rebel Alliance Developer Netgate

    That's probably the bug I fixed then. When advanced options were set, it used the wrong dhclient script.



  • Did that bug affect 2.3.2 as well or only 2.3.3 snaps?


  • Rebel Alliance Developer Netgate

    Only 2.4



  • You fixed it, working as expected now!

    Thank you @jimp