Dhclient not renewing wan when lease is up.
-
I recently started having trouble with my wan connection. It seems to come when the wan dhcp lease is up for renewal.
If I go to interfaces and do release/renew, my connection is back up with no problems and is rock solid until the next renewal.
The typically lease length seems to be between 6 to 12 hours according to the log and is consistent to seeing port 1 go up/down 3 times in span of minute on the dlink switch. Another 6-12 hours go by, same thing.But does not seem like pfsense or dhclient in this case is attempting to renew the connection automatically.
The only change I did was by-passing my battery backup which had 10/100 ports, for a gigabit link due to a recent speed bump from ISP.
I use SBG6580 modem and pfsenese in KVM instance using vlans and dlink vlan capable switch. All was well until I bypassed the battery backup.I don't see pfsense send any kind of request to renew in the logs. I thought it was a firewall issue, got rid of RFC1918 on wan, allow udp 67-68, reject lease from 192.168.100.1 but nothing works.
Running dhclient em0_vlan100 from ssh, seems to renew just fine. If I run it again it tells me it's already running, pid: xxxxx. I'm not sure if this is desirable or norm.
Any ideas?
-
Just to add more information
It did this, everything should be ok? right? WRONG!
Jan 11 01:57:59 dhclient[81105]: bound to 142.196.XXX.XXX -- renewal in 43200 seconds. Jan 11 01:57:59 dhclient: Creating resolv.conf Jan 11 01:57:59 dhclient: RENEW Jan 11 01:57:59 dhclient[81105]: DHCPACK from 10.50.64.1 Jan 11 01:57:59 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 255.255.255.255 port 67 Jan 11 01:55:48 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 11 01:51:06 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 11 01:50:10 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 11 01:49:37 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 11 01:48:17 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 11 01:47:35 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 11 01:46:24 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 11 01:45:52 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 11 01:44:59 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 11 01:41:46 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 11 01:35:50 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 11 01:00:07 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 11 00:25:59 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 11 00:13:20 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 11 00:06:46 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 23:31:41 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 23:16:53 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 23:07:58 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 23:03:22 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 22:55:12 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 22:44:21 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 22:36:25 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 22:28:49 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 22:12:02 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 21:57:00 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 21:48:46 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 21:43:56 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 21:40:56 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 21:38:16 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 21:32:36 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 21:29:02 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 21:27:37 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 21:26:51 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 21:25:57 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 21:25:09 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 21:24:34 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 21:24:15 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 21:23:31 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 21:22:56 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67 Jan 10 21:18:02 dhclient[81105]: DHCPREQUEST on em0_vlan100 to 10.50.64.1 port 67
My connection went down 2 hours later.
I had to release/renew from interfaces in pfsense
Jan 11 04:18:51 dhclient[31046]: bound to 142.196.XXX.XXX -- renewal in 43200 seconds. Jan 11 04:18:51 dhclient: Creating resolv.conf Jan 11 04:18:51 dhclient: /sbin/route add default 142.196.XXX.X Jan 11 04:18:51 dhclient: Adding new routes to interface: em0_vlan100 Jan 11 04:18:51 dhclient: New Routers (em0_vlan100): 142.196.XXX.X Jan 11 04:18:51 dhclient: New Broadcast Address (em0_vlan100): 255.255.255.255 Jan 11 04:18:51 dhclient: New Subnet Mask (em0_vlan100): 255.255.192.0 Jan 11 04:18:51 dhclient: New IP Address (em0_vlan100): 142.196.XXX.XXX Jan 11 04:18:51 dhclient: ifconfig em0_vlan100 inet 142.196.148.106 netmask 255.255.192.0 broadcast 255.255.255.255 Jan 11 04:18:51 dhclient: Starting add_new_address() Jan 11 04:18:51 dhclient: REBOOT Jan 11 04:18:51 dhclient[31046]: DHCPACK from 10.50.64.1 Jan 11 04:18:51 dhclient[31046]: DHCPREQUEST on em0_vlan100 to 255.255.255.255 port 67 Jan 11 04:18:51 dhclient: PREINIT
So is something broken with dhclient or is it my ISP or the SBG6580?
-
I am having more or less the same problem.
Been using pfSense for ages without any problems but since a couple of weeks ago I'm loosing the internet connection and have to renew the lease from the web gui.
Is there a way to do it from the command line?
-
Mad Professor's issue is an ISP problem. First it's trying to renew via unicast to the server that gave it the lease, which isn't replying to unicast requests (which per RFC, it should, but that's not a problem in itself). Then it falls back to broadcast, and obtains a new lease from the same server. Then 2 hours after that, when it got a 12 hour lease, it stops working until released and renewed. It likely would have recovered on its own had you waited 6 hours, when it would have gone through renewal on its own. DHCP won't renew until half the lease time has past, so breaking your connection 2 hours into a 12 hour lease is the ISP breaking something.
pyttsen: no telling what's happening in your case without seeing the dhclient logs.