OPNsense Forum

English Forums => Hardware and Performance => Topic started by: Tsuroerusu on April 06, 2019, 12:31:50 AM

Title: Changing NIC card without messing up configuration
Post by: Tsuroerusu on April 06, 2019, 12:31:50 AM
At the moment, I have a couple of redundant OPNsense firewalls using a 2-port Intel NIC card, which has been causing be problems since last August, and I am considering replacing it with a functionally identical Mellanox card. Thus I was thinking, how would OPNsense react to the NICs being changed, and would it mess up the configuration? Or would it simply say "Hmmm, the previous NICs are gone, where should I put the LAN and WAN interfaces?" and be on its merry way?
Title: Re: Changing NIC card without messing up configuration
Post by: Dngrsone on April 06, 2019, 12:55:31 AM
It would want you to configure the replacement NICs. The hard part will new knowing which one is which.

Sent from my SM-G935V using Tapatalk

Title: Re: Changing NIC card without messing up configuration
Post by: Tsuroerusu on April 06, 2019, 01:50:57 AM
Quote from: Dngrsone on April 06, 2019, 12:55:31 AM
It would want you to configure the replacement NICs. The hard part will new knowing which one is which.

Sent from my SM-G935V using Tapatalk
At the moment I have ix0 as the WAN, and several VLANs on ix1, but "ix1" itself remains unconfigured. So I would need to alter both the VLANs and the interfaces, hmmm. Perhaps it might be easier to just export the configuration, and do search+replace for "ix0" with "mlxen0", and "ix1" with "mlxen1" etc. and then just import this edited configuration.
Title: Re: Changing NIC card without messing up configuration
Post by: Dngrsone on April 06, 2019, 03:35:52 PM
 perhaps.

However the configuration setting that OPNSense will be looking for is literally which which MAC address is ix0 and which is ix1

Sent from my SM-G935V using Tapatalk

Title: Re: Changing NIC card without messing up configuration
Post by: Tsuroerusu on April 06, 2019, 04:16:21 PM
Hmmmm, but where does it store the MAC addresses of the interfaces? Because when I look through the configuration file, I only see interface names (like "ix0"), but not any related MAC addresses?
Title: Re: Changing NIC card without messing up configuration
Post by: staffa on May 14, 2025, 03:53:22 PM
Hey, did you manage to figure out some way to migrate cleanly? I'm having the same issue, but when I remove the faulty cards, ALL of my VLANS and bridges disappear, not just the ones assigned to that NIC.
Title: Re: Changing NIC card without messing up configuration
Post by: EricPerl on May 15, 2025, 10:23:21 PM
Replying to a thread from 2019?
You might as well have started a new one.
Anyway, I just migrated from a virtualized instance to bare metal, and I had done a pass-through to bridge migration before.
All I did was a global replace in the config.xml (vtnet -> igc). It took care of both vtnet0 and vtnet1.
I also replicated on the files in /conf/backup.

I did it before a configuration import during setup. I've never done it on a live instance though.