OPNsense Forum

Archive => 19.7 Legacy Series => Topic started by: verulian on May 06, 2020, 08:38:09 AM

Title: Two subnets on a single interface with the same WAN?
Post by: verulian on May 06, 2020, 08:38:09 AM
I've got a scenario where I need to set up a test network that emulates a customer's network. Their network is 10.0.0.1/8 and my LAN is 192.168.0.1/24. These two networks will be going to the same switch without DHCP. 

I have workstations set up with the 192.168.0.0 subnet as the primary interface config and will set up 10.0.0.0 as a second one with lower priority, but it simply facilitates testing and going to network devices with static IPs prior to deploying onsite.

192.168.0.0 works fine right now, but my (failed) attempts so far don't allow visiting of 10.0.0.1 or any other device (such as 10.0.0.2) on the subnet and 10.0.0.1 doesn't act as a gateway for internet traffic yet.

How is this configured with OPNsense?

I could do this the "dumb" way and just plug in another router, but I know this must be possible with OPNsense...
Title: Re: Two subnets on a single interface with the same WAN?
Post by: Maurice on May 06, 2020, 12:46:06 PM
You can assign additional IP addresses / subnets to an interface by using virtual IPs. The type "IP Alias" should be fine in this case.

Cheers

Maurice
Title: Re: Two subnets on a single interface with the same WAN?
Post by: verulian on May 06, 2020, 06:19:58 PM
Thank you so much: Firewall > Virtual IPs > Settings