OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • 23.7 Production Series »
  • WAN Interface not renewing IP
« previous next »
  • Print
Pages: [1]

Author Topic: WAN Interface not renewing IP  (Read 597 times)

tga

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
WAN Interface not renewing IP
« on: September 06, 2023, 03:17:43 pm »
I have the a strange issue with a setup that used to work without problems before. I can't pinpoint it exactly but I would say it startet with the Update to the Version 23.1.x.

My setup is: ISP Modem(Bridge mode) -> Opnsense Firewall(a small supermicro server)
OPNsense version: 23.7.2

Sometimes the Modem looses connection(Firmwareupdates, ISP Network issues) afterwards Opnsense is unable to reestablish the connection even if the connection between the Modem and the ISP comes back up.

I've noticed that the Modem, if it can't connect to the ISP starts it's own DHCP Server and gives out addresses in the 192.168.100.x range. However when the connection to the ISP is reestablished Opnsense sees the new IP Adresse but never renews it on the WAN interface. It just shows 0.0.0.0 on the dashboard.

I tried the following things that do not work:
 - plug in/out the cabel to the modem
 - deactivate/reactivate the wan interface

The only thing that works is to reboot Opnsens. Only then it will pick up the public IP


Code: [Select]
2023-09-06T08:49:35 Notice dhclient New Routers (igb0): 185.33.226.1
2023-09-06T08:49:34 Notice dhclient New Routers (igb0): 185.33.226.1
2023-09-06T08:49:34 Notice dhclient New Broadcast Address (igb0): 185.33.227.255
2023-09-06T08:49:34 Notice dhclient New Subnet Mask (igb0): 255.255.254.0
2023-09-06T08:49:34 Notice dhclient New IP Address (igb0): 185.33.227.119
2023-09-06T08:48:19 Notice dhclient New Routers (igb0): 185.33.226.1
2023-09-06T08:48:18 Notice dhclient New Routers (igb0): 185.33.226.1
2023-09-06T08:48:18 Notice dhclient New Broadcast Address (igb0): 185.33.227.255
2023-09-06T08:48:18 Notice dhclient New Subnet Mask (igb0): 255.255.254.0
2023-09-06T08:48:18 Notice dhclient New IP Address (igb0): 185.33.227.119
2023-09-06T08:47:02 Notice dhclient New Routers (igb0): 185.33.226.1
2023-09-06T08:47:01 Notice dhclient New Routers (igb0): 185.33.226.1
2023-09-06T08:47:01 Notice dhclient New Broadcast Address (igb0): 185.33.227.255
2023-09-06T08:47:01 Notice dhclient New Subnet Mask (igb0): 255.255.254.0
2023-09-06T08:47:01 Notice dhclient New IP Address (igb0): 185.33.227.119
2023-09-06T08:45:46 Notice dhclient New Routers (igb0): 185.33.226.1
2023-09-06T08:45:45 Notice dhclient New Routers (igb0): 185.33.226.1
2023-09-06T08:45:45 Notice dhclient New Broadcast Address (igb0): 185.33.227.255
2023-09-06T08:45:45 Notice dhclient New Subnet Mask (igb0): 255.255.254.0
2023-09-06T08:45:45 Notice dhclient New IP Address (igb0): 185.33.227.119
2023-09-06T08:44:26 Error dhclient unknown dhcp option value 0xfe
2023-09-06T08:44:09 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : webgui_configure_do(,wan))
2023-09-06T08:44:09 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : vxlan_configure_do())
2023-09-06T08:44:08 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : unbound_configure_do(,wan))
2023-09-06T08:44:08 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : openssh_configure_do(,wan))
2023-09-06T08:44:08 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : opendns_configure_do())
2023-09-06T08:43:32 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : ntpd_configure_do())
2023-09-06T08:43:32 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : dnsmasq_configure_do())
2023-09-06T08:43:32 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (,wan)
2023-09-06T08:43:32 Notice opnsense /usr/local/etc/rc.newwanip: Resyncing OpenVPN instances for interface IF_IGB0_WAN.
2023-09-06T08:43:32 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (execute task : openvpn_configure_do(,wan))
2023-09-06T08:43:32 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (execute task : ipsec_configure_do(,wan))
2023-09-06T08:43:32 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (,wan)
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (execute task : dpinger_configure_do(,IF_IGB0_WAN_DHCP))
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (,IF_IGB0_WAN_DHCP)
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: keeping current inet default gateway '192.168.100.1'
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: configuring inet default gateway on wan
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: entering configure using 'wan'
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure dns (execute task : unbound_configure_do())
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure dns (execute task : dnsmasq_configure_do())
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure dns ()
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.newwanip: IP renewal starting (new: 192.168.100.10, old: 192.168.100.10, interface: wan, device: igb0, force: yes)
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure dhcp (execute task : dhcpd_dhcp_configure())
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure dhcp ()
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure ipsec (execute task : ipsec_configure_do(,wan))
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure ipsec (,wan)
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure monitor (execute task : dpinger_configure_do(,IF_IGB0_WAN_DHCP))
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure monitor (,IF_IGB0_WAN_DHCP)
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.linkup: ROUTING: setting inet default route to 192.168.100.1
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.linkup: ROUTING: configuring inet default gateway on wan
2023-09-06T08:43:31 Notice opnsense /usr/local/etc/rc.linkup: ROUTING: entering configure using 'wan'
2023-09-06T08:43:30 Notice dhclient Creating resolv.conf
2023-09-06T08:43:30 Notice dhclient New Routers (igb0): 192.168.100.1
2023-09-06T08:43:30 Notice dhclient New Broadcast Address (igb0): 192.168.100.255
2023-09-06T08:43:30 Notice dhclient New Subnet Mask (igb0): 255.255.255.0
2023-09-06T08:43:30 Notice dhclient New IP Address (igb0): 192.168.100.10
2023-09-06T08:43:29 Notice opnsense /usr/local/etc/rc.linkup: DEVD: Ethernet attached event for wan(igb0)
2023-09-06T08:43:29 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : webgui_configure_do(,wan))
2023-09-06T08:43:28 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : vxlan_configure_do())
2023-09-06T08:43:28 Critical dhclient exiting.
2023-09-06T08:43:28 Error dhclient connection closed
2023-09-06T08:43:28 Notice opnsense /usr/local/etc/rc.linkup: DEVD: Ethernet detached event for wan(igb0)
2023-09-06T08:43:27 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : unbound_configure_do(,wan))
2023-09-06T08:43:27 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : openssh_configure_do(,wan))
2023-09-06T08:43:27 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : opendns_configure_do())
2023-09-06T08:43:27 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : ntpd_configure_do())
2023-09-06T08:43:27 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : dnsmasq_configure_do())
2023-09-06T08:43:27 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure newwanip (,wan)
2023-09-06T08:43:27 Notice opnsense /usr/local/etc/rc.newwanip: Resyncing OpenVPN instances for interface IF_IGB0_WAN.
2023-09-06T08:43:27 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (execute task : openvpn_configure_do(,wan))
2023-09-06T08:43:27 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (execute task : ipsec_configure_do(,wan))
2023-09-06T08:43:27 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure vpn (,wan)
2023-09-06T08:43:27 Notice opnsense /usr/local/etc/rc.newwanip: IP address change detected, killing states of old ip 185.33.227.119
2023-09-06T08:43:27 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (execute task : dpinger_configure_do(,IF_IGB0_WAN_DHCP))
2023-09-06T08:43:27 Notice opnsense /usr/local/etc/rc.newwanip: plugins_configure monitor (,IF_IGB0_WAN_DHCP)
2023-09-06T08:43:27 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: keeping current inet default gateway '192.168.100.1'
2023-09-06T08:43:27 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: configuring inet default gateway on wan
2023-09-06T08:43:26 Notice opnsense /usr/local/etc/rc.newwanip: ROUTING: entering configure using 'wan'
2023-09-06T08:43:26 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure dns (execute task : unbound_configure_do())
2023-09-06T08:43:26 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure dns (execute task : dnsmasq_configure_do())
2023-09-06T08:43:26 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure dns ()
2023-09-06T08:43:26 Notice opnsense /usr/local/etc/rc.newwanip: IP renewal starting (new: 192.168.100.10, old: 185.33.227.119, interface: wan, device: igb0, force: yes)
2023-09-06T08:43:26 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure dhcp (execute task : dhcpd_dhcp_configure())
2023-09-06T08:43:26 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure dhcp ()
2023-09-06T08:43:26 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure ipsec (execute task : ipsec_configure_do(,wan))
2023-09-06T08:43:26 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure ipsec (,wan)
2023-09-06T08:43:26 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure monitor (execute task : dpinger_configure_do(,IF_IGB0_WAN_DHCP))
2023-09-06T08:43:26 Notice opnsense /usr/local/etc/rc.linkup: plugins_configure monitor (,IF_IGB0_WAN_DHCP)
2023-09-06T08:43:26 Notice opnsense /usr/local/etc/rc.linkup: ROUTING: setting inet default route to 192.168.100.1
2023-09-06T08:43:26 Notice opnsense /usr/local/etc/rc.linkup: ROUTING: configuring inet default gateway on wan
2023-09-06T08:43:26 Notice opnsense /usr/local/etc/rc.linkup: ROUTING: entering configure using 'wan'
2023-09-06T08:43:26 Notice dhclient Creating resolv.conf
2023-09-06T08:43:26 Notice dhclient New Routers (igb0): 192.168.100.1
2023-09-06T08:43:26 Notice dhclient New Broadcast Address (igb0): 192.168.100.255
2023-09-06T08:43:26 Notice dhclient New Subnet Mask (igb0): 255.255.255.0
2023-09-06T08:43:26 Notice dhclient New IP Address (igb0): 192.168.100.10
2023-09-06T08:42:54 Notice kernel <6>igb0: link state changed to UP
2023-09-06T08:42:46 Error dhclient send_packet: Network is down
2023-09-06T08:42:42 Error dhclient send_packet: Network is down
2023-09-06T08:42:40 Error dhclient send_packet: Network is down
2023-09-06T08:42:39 Error dhclient send_packet: Network is down
2023-09-06T08:42:36 Error dhclient send_packet: Network is down
2023-09-06T08:42:35 Notice kernel <6>igb0: link state changed to DOWN
2023-09-06T08:42:27 Notice opnsense /usr/local/etc/rc.linkup: DEVD: Ethernet attached event for wan(igb0)
2023-09-06T08:42:26 Notice kernel <6>igb0: link state changed to UP
2023-09-06T08:42:09 Critical dhclient exiting.
2023-09-06T08:42:09 Error dhclient connection closed
2023-09-06T08:42:09 Notice opnsense /usr/local/etc/rc.linkup: DEVD: Ethernet detached event for wan(igb0)
2023-09-06T08:42:09 Notice kernel <6>igb0: link state changed to DOWN

Any suggestions on things to try/check?
Logged

CJ

  • Hero Member
  • *****
  • Posts: 633
  • Karma: 23
    • View Profile
    • Have Answer, Will Blog
Re: WAN Interface not renewing IP
« Reply #1 on: September 20, 2023, 04:26:57 pm »
Add the modem's IP to the ignore DHCP setting of your WAN interface.  That will prevent it from binding.

That said, it should eventually automatically switch back to the correct DHCP server once the connection is up.  It may just take a bit of time.  Telling OPNSense to ignore the modem DHCP server just allows it to realize the link is actually down when using gateway monitoring.
« Last Edit: September 30, 2023, 02:34:04 pm by CJ »
Logged
Have Answer, Will Blog

tga

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: WAN Interface not renewing IP
« Reply #2 on: September 30, 2023, 09:43:53 am »
Thanks for your Answer. I will add the IP to the ignore option, and see if it helps.

I was thinking the same that it should correct itself, but it didn't. I tryed it 2 times, when this happened and waited for more than one hour but it did not pick up the new WAN Address.

Anyways i will test the configuration with the ignore option and report back if it works.
Logged

CJ

  • Hero Member
  • *****
  • Posts: 633
  • Karma: 23
    • View Profile
    • Have Answer, Will Blog
Re: WAN Interface not renewing IP
« Reply #3 on: September 30, 2023, 02:35:05 pm »
If ignore doesn't fix the issue, try doing a clean install and see if you can replicate the issue.  That will help determine if it's a problem with your settings or not.
Logged
Have Answer, Will Blog

tga

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: WAN Interface not renewing IP
« Reply #4 on: November 15, 2023, 03:23:22 pm »
I just wanted to let you know that the ignore option seems to work. The IP renewing problem did not happen again on this specific firewall.

But I had the same problem on another location on a clean new install of Opnsense.  I think it has something to do with the ISP or Cabelmodem  in combination with Opnsense, since it is the same(ISP and Modem) on both locations.
But with the IP configured in the ignore options it works without problems.

Thanks again.
Logged

CJ

  • Hero Member
  • *****
  • Posts: 633
  • Karma: 23
    • View Profile
    • Have Answer, Will Blog
Re: WAN Interface not renewing IP
« Reply #5 on: November 17, 2023, 05:53:10 pm »
Sounds like the modem isn't properly shutting down it's DHCP so OPNSense can transition back to the ISP one.

Glad it's working with ignore.
Logged
Have Answer, Will Blog

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • 23.7 Production Series »
  • WAN Interface not renewing IP
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2