Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    2 lan on the same interface

    Scheduled Pinned Locked Moved HA/CARP/VIPs
    5 Posts 2 Posters 1.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      danielos
      last edited by

      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??

      1 Reply Last reply Reply Quote 0
      • johnpozJ Offline
        johnpoz LAYER 8 Global Moderator
        last edited by

        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

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        1 Reply Last reply Reply Quote 0
        • D Offline
          danielos
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • johnpozJ Offline
            johnpoz LAYER 8 Global Moderator
            last edited by

            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?

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            1 Reply Last reply Reply Quote 0
            • D Offline
              danielos
              last edited by

              It's a HP 2810-48G J9022A

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

              switch.PNG
              switch.PNG_thumb

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.