Newbie. Virtual IP question Device another subnet

Started by potes, November 18, 2021, 09:46:16 AM

Previous topic - Next topic
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

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

(Unoffial Community) OPNsense Telegram Group: https://t.me/joinchat/0o9JuLUXRFpiNmJk

PM for paid support

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.

You can add VLAN manually on Linux machine - here are more details 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.