Single NIC Setup

Started by Tesuci, July 23, 2025, 07:22:14 PM

Previous topic - Next topic
Hello everyone,

I am currently using a dual NIC Setup where the igc0 is used for the LAN Interface and igc1 is used for WAN. This was nice to get going and is the basic setup as far as I can tell.

However, since I moved and now only have to option to use a single ethernet cable between the OPNsense and the managed switch I will have to change to a single NIC setup.

Here is what I did and what problems I came across where I would need help.

I created 2 additional VLANs. One called LAN_VLAN with the ID 98 and one called WAN_VLAN with the ID 99. Both have the parent interface on igc0.

Now I assigned the 98 and activated it with static IP on 192.168.98.1 and also enabled the DHCP. (currently i'm using only IPv4 to reduce complexity).
Then I updated the switch to have port 1 with only VLAN99 untagged and port 2 with VLAN98 + 99 tagged. I then plugged the OPNsense to port 2 and the modem to port 1.

When I plugged in a laptop to the switch I recieved the desired IP Range.

Now the tricky part began. Getting the WAN configured.

I activated the WAN_VLAN with DHCP instead of static IP. There was no Gateway installed automatically so I copied the existing one and changed the interface. Then I disabled the old gateway to not have 2 upsteam gateways.

However I won't get a IP Adress from my provider. No reboot of the devices helped.
I don't know where I went wrong or what I need to make it happen.

Additional information: The modem is a Vodafone Station and the connection is made via cable internet.

I hope some of you can help. Thanks a lot!

You are trying to implement a very unorthodox solution so no wonder you haven't received any reply so far.

I think it can be done, but that's really a dead-ened solution to me and, if I ever try to do that, it would be for a learning experience only.

So, the LAN side would be a pretty standard. It is the WAN side that needs to be treated uniquely. That's because you want to feed it through a switch and on a single link.

I think you can make it work by making that link a trunk, but it is the "WAN" VLAN that I would make tagged on that link. But, that tag should be dropped in the link between your switch and the modem.

Well again, try to get it set up in a more orthodox way.

Good luck!

What's unorthodox about a router on a stick?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Today at 02:27:46 AM #3 Last Edit: Today at 02:34:12 AM by OPNenthu
Just a random thought from me (maybe garbage)...

Are you sure there is no DHCP service enabled for VLAN 99?  Something could be detecting a rogue DHCP server and causing a block, if both your ISP and OPNsense are handing out IPs on that VLAN.

I'm assuming also that your modem is only a modem and not also a router that needs to be put into bridge mode.

Also worth double-checking the firewall rules for the gateway interface.
"The power of the People is greater than the people in power." - Wael Ghonim

Site 1 | N5105 | 8GB | 256GB | 4x 2.5GbE (I226-V)
Site 2 |  J4125 | 8GB | 256GB | 4x 1GbE (I210)

Quote from: Patrick M. Hausen on Today at 01:32:40 AMWhat's unorthodox about a router on a stick?

Nothing, but I don't think that's about a router-on-a-stick. My understanding is that the OP wants to use just a single NIC for both WAN and LAN.

With an individual VLAN for each - so that's what I would call a router on a stick.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)