OPNsense Forum

English Forums => General Discussion => Topic started by: indgepr on October 30, 2024, 09:22:01 PM

Title: Problems setting up second LAN Interface
Post by: indgepr on October 30, 2024, 09:22:01 PM
I have installed Version24.7.5 with a single WAN and LAN interface and it is working fine. the machine that it is installed on has a second set of interfaces (SFP+) that I decided to use for a higher speed connection for the kids gaming computors.

I created a new interface LAN2 (Static IP set to x.x.x.2 LAN static IP x.x.x.1 and enabled it, looked ok seemed to be working, I then enables the DHCP on LAN2 and updated the DHCP for LAN & LAN2 with different ranges (LAN x.x.x.10 to x.x.x.110 and LAN2 x.x.x.111 to x.x.x.210).

This resulted in all the connected devises when their DHCP lease expired being given a new IP adress in the 111 to 210 range and the gateway x.x.x.2 irrespetive of what port they were physically connected to. As there were no Firewall rules for LAN2 this led them to being disconnected

What have I done wrong ? is this the best way to setup 2 Lan interfaces or was I trying to do something fundementally wrong ?

Thanks
Title: Re: Problems setting up second LAN Interface
Post by: Patrick M. Hausen on October 30, 2024, 09:37:05 PM
You cannot have x.x.x.*/24 on two interfaces at the same time. You need to pick a different x.x.x for LAN2.

Like 192.168.1.* for LAN and 192.168.2.* for LAN2.
Title: Re: Problems setting up second LAN Interface
Post by: meyergru on October 30, 2024, 09:40:54 PM
Yup. Try reading this (https://forum.opnsense.org/index.php?topic=42985.0).
Title: Re: Problems setting up second LAN Interface
Post by: cookiemonster on October 30, 2024, 09:41:50 PM
And there is no security risk in sharing the private network but makes it clearer to anyone trying to work out the problem.
Mine are:
LAN1: 192.168.5.0/24
LAN2: 192.168.6.0/24
there are more but you get the idea.