2 lan on the same interface



  • I'm quite new using networking and pfsense, and I have a WAN and a LAN net on the pfsense box. The interface on the LAN is configured with 192.168.1.1 as IP and servers on that LAN can access internet using 192.168.1.1 as gateway. But now I need another LAN on that same net, 192.168.2.0, so I made a virtual IP 192.168.2.1 on the LAN interface in pfsense and setup 192.168.1.2 and 192.168.1.3 on two other servers. The two servers with IP 192.168.1.2 and .1.3 can ping to one and another and reach internet thru gateway 192.168.1.1. The servers with IP 192.168.2.2 and .2.3 can ping each other, but none of the servers with IP 192.168.2.2 and .2.3 can reach internet thru gateway 192.168.2.1. The servers with IP 192.168.2.3 and .2.4 can't even ping 192.168.2.1, but 192.168.1.2 and .1.3 can ping 192.168.2.1

    What can be wrong??


  • LAYER 8 Global Moderator

    running multiple layer 3 on the same layer 2 is BORKED!!  I you want more than 1 layer 3 on same physical interface then use vlans.  This creates different layer 2 networks.

    If what you need is more IPs then change your mask to /23 vs /24 then your IP range would be 192.168.0/23 would be 192.168.0.1 to 192.168.1.254 or you could use 192.168.2/23 which would be 192.168.2.1 - 192.168.3.254



  • Thanks for answer! I tried to create 2 VLANS on my LAN interface. I started to create one VLAN, I assigned that VLAN to my nic interface with the same IP as before, 192.168.1.1/24 but, now the LAN does not work anymore. My servers can't ping 192.168.1.1 and my pfsense can't ping my servers.


  • LAYER 8 Global Moderator

    you can not just create vlans on pfsense ;) does your switch support vlans?  Did you put the ports in the same vlan where your servers are connected.  Did you configure the port connect to pfsense as trunked, ie to carry your vlan tags?



  • It's a HP 2810-48G J9022A

    pfsense is connected to port 23. Should I select MODE tagged there?



Log in to reply