OPNsense Forum

English Forums => General Discussion => Topic started by: potes on November 18, 2021, 09:46:16 AM

Title: Newbie. Virtual IP question Device another subnet
Post by: potes on November 18, 2021, 09:46:16 AM
Hi,

Can anybody help this newbie solving this issue.

I have a device (DEv1) in a VLAN subnet (subnet1). I need that device to have also an IP in another VLAN subnet (subnet2) to be discoverable. As the VLAN are assigned to different interfaces I cannot attach another network card to the Dev1 to connect to subnet2.

Can I use a Virtual IP on subnet2 that will forward all request to the DEv1 IP on subnet1?. How can I do it?

I have been looking on internet and in the forums but I cannot find anything, everything I found about Virtual IP deal with the WAN interfaces.

Thanks
Title: Re: Newbie. Virtual IP question Device another subnet
Post by: lfirewall1243 on November 18, 2021, 10:04:21 AM
Quote from: potes on November 18, 2021, 09:46:16 AM
Hi,

Can anybody help this newbie solving this issue.

I have a device (DEv1) in a VLAN subnet (subnet1). I need that device to have also an IP in another VLAN subnet (subnet2) to be discoverable. As the VLAN are assigned to different interfaces I cannot attach another network card to the Dev1 to connect to subnet2.

Can I use a Virtual IP on subnet2 that will forward all request to the DEv1 IP on subnet1?. How can I do it?

I have been looking on internet and in the forums but I cannot find anything, everything I found about Virtual IP deal with the WAN interfaces.

Thanks
When you are using VLANs, why not assign the VLAN directly to that Intetface?

Gesendet von meinem M2012K11AG mit Tapatalk

Title: Re: Newbie. Virtual IP question Device another subnet
Post by: potes on November 18, 2021, 11:33:22 AM
I also need the DEv1 connected to subnet1.

Now I have  VLAN50 (subnet1) on lagg1 interface and VLAN22 (subnet2) on lagg0 interface. Can I attach a VLAN22 to lagg0 and lagg1? That way I will be able to add another network card to Dev1 (is a LXC container) attached to subnet2.
Title: Re: Newbie. Virtual IP question Device another subnet
Post by: pankaj on November 21, 2021, 02:28:43 AM
You can add VLAN manually on Linux machine - here are more details https://www.linuxtechi.com/vlan-tagged-nic-ethernet-card-centos-rhel-servers/ (https://www.linuxtechi.com/vlan-tagged-nic-ethernet-card-centos-rhel-servers/)

But routing from newly created VLAN is a different ball game. If Dev1 is connected to a managed switch that allows more than one VLAN tagging per port then it might be a breeze otherwise it will get complicated.