Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
20.7 Legacy Series
»
lost wan ip
« previous
next »
Print
Pages: [
1
]
Author
Topic: lost wan ip (Read 2226 times)
hboetes
Newbie
Posts: 15
Karma: 4
lost wan ip
«
on:
November 19, 2020, 11:08:35 am »
Yesterday I was called out of bed because one of our VPNs was down. When I finally got access to the remote OPNsense box, with the help of a junior support engineer who was on site, I discovered the WAN interface had no external IP. So I pressed the save button to restart dhclient and lo and behold the interface came up again.
I just checked the log output and it sort of baffles me. Have a look for yourself.
# strings system.log | sort | grep dhclient
(SNIP)
Nov 18 09:16:47 kiwifw dhclient[43029]: DHCPREQUEST on igb1 to 192.168.2.1 port 67
Nov 18 09:17:01 kiwifw dhclient[3610]: send_packet: No route to host
Nov 18 09:17:01 kiwifw dhclient[43029]: DHCPREQUEST on igb1 to 192.168.2.1 port 67
Nov 18 09:17:18 kiwifw dhclient[3610]: send_packet: No route to host
Nov 18 09:17:18 kiwifw dhclient[43029]: DHCPREQUEST on igb1 to 192.168.2.1 port 67
Nov 18 09:17:56 kiwifw dhclient[3610]: send_packet: No route to host
Nov 18 09:17:56 kiwifw dhclient[43029]: DHCPREQUEST on igb1 to 192.168.2.1 port 67
Nov 18 09:19:24 kiwifw dhclient[3610]: send_packet: No route to host
Nov 18 09:19:24 kiwifw dhclient[43029]: DHCPREQUEST on igb1 to 192.168.2.1 port 67
Nov 18 09:21:52 kiwifw dhclient[3610]: send_packet: No route to host
Nov 18 09:21:52 kiwifw dhclient[43029]: DHCPREQUEST on igb1 to 192.168.2.1 port 67
Nov 18 09:22:08 kiwifw dhclient[3610]: send_packet: No route to host
Nov 18 09:22:08 kiwifw dhclient[43029]: DHCPREQUEST on igb1 to 192.168.2.1 port 67
Nov 18 09:22:22 kiwifw dhclient[3610]: send_packet: No route to host
Nov 18 09:22:22 kiwifw dhclient[43029]: DHCPREQUEST on igb1 to 192.168.2.1 port 67
Nov 18 09:22:50 kiwifw dhclient[3610]: send_packet: No route to host
Nov 18 09:22:50 kiwifw dhclient[43029]: DHCPREQUEST on igb1 to 192.168.2.1 port 67
Nov 18 09:23:32 kiwifw dhclient[3610]: send_packet: No route to host
Nov 18 09:23:32 kiwifw dhclient[43029]: DHCPREQUEST on igb1 to 192.168.2.1 port 67
Nov 18 09:24:25 kiwifw dhclient[3610]: send_packet: No route to host
Nov 18 09:24:25 kiwifw dhclient[43029]: DHCPREQUEST on igb1 to 192.168.2.1 port 67
Nov 18 09:25:52 kiwifw dhclient[3610]: send_packet: No route to host
Nov 18 09:25:52 kiwifw dhclient[43029]: DHCPREQUEST on igb1 to 192.168.2.1 port 67
Nov 18 09:27:43 kiwifw dhclient[43029]: DHCPREQUEST on igb1 to 255.255.255.255 port 67
Nov 18 09:29:18 kiwifw dhclient[43029]: DHCPREQUEST on igb1 to 255.255.255.255 port 67
Nov 18 09:32:30 kiwifw dhclient[43029]: DHCPREQUEST on igb1 to 255.255.255.255 port 67
Nov 18 09:34:27 kiwifw dhclient[43029]: DHCPREQUEST on igb1 to 255.255.255.255 port 67
Nov 18 09:37:39 kiwifw dhclient[43029]: DHCPREQUEST on igb1 to 255.255.255.255 port 67
Nov 18 09:39:03 kiwifw dhclient[3610]: connection closed
Nov 18 09:39:03 kiwifw dhclient[3610]: exiting.
Nov 18 09:39:04 kiwifw dhclient: Comparing IPs: Old: 192.168.2.116 New:
Nov 18 09:39:04 kiwifw dhclient: Comparing IPs: Old: 192.168.2.116 New: 192.168.2.116
Nov 18 09:39:04 kiwifw dhclient: Creating resolv.conf
Nov 18 09:39:04 kiwifw dhclient: New Broadcast Address (igb1): 192.168.2.255
Nov 18 09:39:04 kiwifw dhclient: New IP Address (igb1): 192.168.2.116
Nov 18 09:39:04 kiwifw dhclient: New Routers (igb1): 192.168.2.1
Nov 18 09:39:04 kiwifw dhclient: New Subnet Mask (igb1): 255.255.255.0
Nov 18 09:39:04 kiwifw dhclient: Removing states from old IP '192.168.2.116' (new IP '')
Nov 18 09:39:04 kiwifw dhclient: Starting delete_old_states()
Nov 18 09:39:04 kiwifw dhclient: Starting delete_old_states()
Nov 18 09:39:04 kiwifw dhclient: route add default 192.168.2.1
Nov 18 09:39:04 kiwifw dhclient[57449]: DHCPACK from 192.168.2.1
Nov 18 09:39:04 kiwifw dhclient[57449]: DHCPREQUEST on igb1 to 255.255.255.255 port 67
Nov 18 09:39:07 kiwifw dhclient[57449]: bound to 192.168.2.116 -- renewal in 43200 seconds.
Nov 18 21:39:04 kiwifw dhclient: Creating resolv.conf
Nov 18 21:39:04 kiwifw dhclient[7973]: DHCPACK from 192.168.2.1
Nov 18 21:39:04 kiwifw dhclient[7973]: DHCPREQUEST on igb1 to 192.168.2.1 port 67
Nov 18 21:39:04 kiwifw dhclient[7973]: bound to 192.168.2.116 -- renewal in 43200 seconds.
Nov 19 09:39:04 kiwifw dhclient: Creating resolv.conf
Nov 19 09:39:04 kiwifw dhclient[7973]: DHCPACK from 192.168.2.1
Nov 19 09:39:04 kiwifw dhclient[7973]: DHCPREQUEST on igb1 to 192.168.2.1 port 67
Nov 19 09:39:04 kiwifw dhclient[7973]: bound to 192.168.2.116 -- renewal in 43200 seconds.
Apparently the provider does something to the network at night, I can't tell what.
I like the flexibility of DHCP ensuring that whatever the external provider changes things keep working. But in this case dhclient wasn't very resilient in keeping the connection working.
What are your thoughts on the matter?
«
Last Edit: November 19, 2020, 11:19:00 am by hboetes
»
Logged
hboetes
Newbie
Posts: 15
Karma: 4
Re: lost wan ip
«
Reply #1 on:
November 19, 2020, 12:09:14 pm »
According to the local network engineer there was a power outage, because of the UPS our devices didn't shut down.
dhclient kept asking for an ip, even though the dhcpserver was already up it kept reporting it had no route to it.
Restarting dhclient(by pressing the save button)got dhclient working again.
Logged
l8gravely
Newbie
Posts: 5
Karma: 0
Re: lost wan ip
«
Reply #2 on:
December 02, 2020, 04:07:40 am »
It would still be nice if it was a bit more robust on the WAN port. My ISP (Charter) does something stupid and my APU1 (now APU4d4) running 20.7.<latest> keeps dropping the WAN connection randomly. So the kids/wife yell and I scurry off to hit reload on the Interfaces page. Total pain. It *never* used to do this with 19.x or earlier releases, but I also suspect my ISP is under alot more load now that we're all home.
But.... how can I make it more robust? Or how can I log more and better data to see what's actually happening? That's the big question.
Logged
hboetes
Newbie
Posts: 15
Karma: 4
Re: lost wan ip
«
Reply #3 on:
January 07, 2021, 12:40:38 pm »
I can think of 2 solutions, you can explain your family to reconnect the external cable after the connection got restored.
You could also set up a cronjob which checks internet connection with a ping to the gateway and restarts if it's unreachable.
Logged
marjohn56
Hero Member
Posts: 1701
Karma: 179
Re: lost wan ip
«
Reply #4 on:
January 07, 2021, 06:25:47 pm »
That's exactly what I have, a Cron script that runs every few minutes and pings upstream. If it gets no response after a minute ( or two.. can't remember ) it will try a WAN down/up, if still no go after another minute then it will reboot.
Logged
OPNsense 24.7
-
Qotom Q355G4
- ISP -
Squirrel 1Gbps
.
Team Rebellion Member
- If we've helped you remember to applaud
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
20.7 Legacy Series
»
lost wan ip