forced reboot results in IP address errors

Started by ajoeiam, November 04, 2023, 07:20:13 PM

Previous topic - Next topic
Greetings

Totally new to opnsense - - still running system without it being 'the system' (opnsense is running but another router is doing my work at present).
Had a power outage - - that means a forced reboot (power goes down and I have a short time using a ups to shut down all systems active). Power was just terminated (not a clean shutdown - - - using a system shutdown).
When power was reapplied the system came back up but some things that had been set were incorrect.
System had been set with igc0 and igc1 activated.
igc0 was WAN and set to IPV4/DHCP
igc1 was LAN and set to IPV4/192.168.1.1/24

After reboot igc0 was listed as LAN and 192.168.1.1
igc1 was listed but had no ip address

So I used 1) Assign interfaces to change igc0 to WAN and igc1 to LAN
then I used 2) Set interface ip address to set igc0 to  IPV4/DHCP

presently see LAN (igc1) blank and WAN (igc0) as v4/DHCP4: xx.xx.xx.xx (ip address from my isp)

(system setup)

optical converter ---- 5 port unmanaged switch ----  router (192.168.50.1) ------  24 port unmanaged switch ---- wired and wireless clients (various 192.168.50.xx)
                                                                          ------ opnsense box (  ) ------   no load at present

Questions:

Did I set up something wrong initially so that igc0 and 1 were changed upon reboot?
If so - - - what do I change?
Ports igc2 through 4 are available - - - I want to use say igc2 for a wireless AP when opnsense goes live - - - - is that a good idea?


TIA


Connect to the firewall console, log in and set the interfaces correctly using option 1

Are you still booting from the installer ISO? How else could you fall back to what seem to be the default settings?
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

Sorry - - - made an error in my documenting what I saw when I did that first reboot.

Please invert the listing for igc0 and igc1.

(igc1 was WAN and set to IPV4/192.168.1.1 and
ig0 was LAN and IPV4/DHCP)

it was this change of the WAN and the LAN ports that was most disconcerting.

Quote from: bartjsmit on November 05, 2023, 09:52:05 AM
Connect to the firewall console, log in and set the interfaces correctly using option 1

option '1' only activates the port - - - it takes option '2' to set the interface ip address

(as I found when I tried to do just that)

Quote from: meyergru on November 05, 2023, 10:52:17 AM
Are you still booting from the installer ISO? How else could you fall back to what seem to be the default settings?

Most definitely NOT any kind of default setting that I could understand.

(Need to see the revision to the original post to make sense of this.)

Let me repeat the question:

Quote
Are you still booting from the installer ISO? How else could you fall back to what seem to be the default settings?

Remove the install media.

November 05, 2023, 05:02:03 PM #7 Last Edit: November 05, 2023, 05:36:51 PM by Mega32
Quote from: doktornotor on November 05, 2023, 01:39:22 PM
Quote
Are you still booting from the installer ISO? How else could you fall back to what seem to be the default settings?

Well i had somewhat the same experience here
https://forum.opnsense.org/index.php?topic=36683.msg179463#msg179463

I had the console active, and discovered that OPNsense was somehow thinking it had to run the "interface importer" on rebot. And then you'll end up with Lan on first phys , and Wan on 2'nd.

My solution was to tick "Prevent Interface removal" , on every interface.
So it is possible to get your interfaces reassigned, if/when some "Boot time algo" decides "No default interfaces found - Running interface assignments".

That said I was importing lot's of interfaces from a pfS config ...
But they all looked valid before the reboot.
And was left "untouched" on boot , if i ticked "Prevent Interface removal" ...

I'll be ticking that on all my IF's .. Don't want any surprises.

If my posts helped you remember to applaud

Experienced Newbie

Quote from: Mega32 on November 05, 2023, 05:02:03 PM
Quote from: doktornotor on November 05, 2023, 01:39:22 PM
Quote
Are you still booting from the installer ISO? How else could you fall back to what seem to be the default settings?

Well i had somewhat the same experience here
https://forum.opnsense.org/index.php?topic=36683.msg179463#msg179463

I had the console active, and discovered that OPNsense was somehow thinking it had to run the "interface importer" on rebot. And then you'll end up with Lan on first phys , and Wan on 2'nd.

My solution was to tick "Prevent Interface removal" , on every interface.
So it is possible to get your interfaces reassigned, if/when some "Boot time algo" decides "No default interfaces found - Running interface assignments".

That said I was importing lot's of interfaces from a pfS config ...
But they all looked valid before the reboot.
And was left "untouched" on boot , if i ticked "Prevent Interface removal" ...

I'll be ticking that on all my IF's .. Don't want any surprises.

I'm as green a June grass here - - - where do I find this 'Prevent Interface removal' tick box - - please?

November 06, 2023, 06:41:57 AM #9 Last Edit: November 06, 2023, 06:43:45 AM by Mega32
Quote from: ajoeiam on November 06, 2023, 03:43:26 AM
I'm as green a June grass here - - - where do I find this 'Prevent Interface removal' tick box - - please?

In the Interfaces section - On every IF definition

If my posts helped you remember to applaud

Experienced Newbie


Btw:

I just learned about one reason, for the interface migrater to reassign interfaces on boot.

Using (The new) pfSense 2.7.0 Vlan's and Vlan-Interface names
https://forum.opnsense.org/index.php?topic=36683.msg179265#msg179265

If my posts helped you remember to applaud

Experienced Newbie

September 18, 2024, 11:07:40 PM #12 Last Edit: September 18, 2024, 11:09:11 PM by marceloengecom
Quote from: ajoeiam on November 04, 2023, 07:20:13 PM
Greetings

Totally new to opnsense - - still running system without it being 'the system' (opnsense is running but another router is doing my work at present).
Had a power outage - - that means a forced reboot (power goes down and I have a short time using a ups to shut down all systems active). Power was just terminated (not a clean shutdown - - - using a system shutdown).
When power was reapplied the system came back up but some things that had been set were incorrect.
System had been set with igc0 and igc1 activated.
igc0 was WAN and set to IPV4/DHCP
igc1 was LAN and set to IPV4/192.168.1.1/24

After reboot igc0 was listed as LAN and 192.168.1.1
igc1 was listed but had no ip address

So I used 1) Assign interfaces to change igc0 to WAN and igc1 to LAN
then I used 2) Set interface ip address to set igc0 to  IPV4/DHCP

presently see LAN (igc1) blank and WAN (igc0) as v4/DHCP4: xx.xx.xx.xx (ip address from my isp)

(system setup)

optical converter ---- 5 port unmanaged switch ----  router (192.168.50.1) ------  24 port unmanaged switch ---- wired and wireless clients (various 192.168.50.xx)
                                                                          ------ opnsense box (  ) ------   no load at present

Questions:

Did I set up something wrong initially so that igc0 and 1 were changed upon reboot?
If so - - - what do I change?
Ports igc2 through 4 are available - - - I want to use say igc2 for a wireless AP when opnsense goes live - - - - is that a good idea?


TIA

Hello,

I have the same issue. I Have the latest version of OPNsense (24.7).

After tick the 'Prevent Interface removal', all NICs are recognized, but after the automatic return of the energy fault, my WANs interfaces are not  load your respective configuration.


My NICs are:

- Realtek PCie GbE Family - onboard (Re0) -> Not in use
- Realtek PCie GbE Family - single network card (Re1) -> LAN
- Intel dual Intel Pro/1000 82576 (igb0, igb1) -> WAN1 (DHCP), WAN2 (PPoe)


I appreciate anyone who can help!
Marcelo Costa
-------------------------------------
e-mail: contato@engesis.com.br
web-site: www.engesis.com.br
Porto Alegre, Brazil