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

    Intervlan between mixed layer 2 and layer 3 switches

    Scheduled Pinned Locked Moved Routing and Multi WAN
    7 Posts 2 Posters 762 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.
    • G
      gjaltemba
      last edited by

      My layer 3 switch is all setup but it does not do policy based routing. I need to separate vlans so that some will use isp1 and others will use isp2. This is done by using an additional layer 2 switch and pfsense as router.

      Now the internet connection is sorted out, my problem is connecting vlans on the layer 2 switch with the vlans on the layer 3 switch.

      How do I connect vlans (192.168.2.2) on a L2 switch with routes to isp1 to vlans (172.16.3.2) on L3 with routes to isp2?

      L2 switch
      pfsense wan connected to isp1
      pfsense lan 192.168.2.254/24 connect to vlan2 access port
      L2 host 192.168.2.2 gateway 192.168.2.254 (pfsense)

      L3 switch
      vlan99 subnet 172.16.99.0/30 is transit vlan
      vlan99 default route 172.16.99.1 connected to isp2
      vlan3 subnet 172.16.3.0/24
      vlan3 management interface 172.16.3.254/24
      L3 host 172.16.3.2 gateway 172.16.3.254 connected to vlan3 access port

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

        Why would you not connect both ISPs to pfsense - let it do the policy routing of who goes to what isp.

        Your downstream networks would be connected via transit network to pfsense.

        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
        • G
          gjaltemba
          last edited by

          @johnpoz:

          Why would you not connect both ISPs to pfsense - let it do the policy routing of who goes to what isp.

          Your downstream networks would be connected via transit network to pfsense.

          Thank you for your help. Your solution is definitely the right way to proceed. Please let me know if you have altenative solutions using the mixed L2 L3 switches scenario so I can test them before the do over.

          1 Reply Last reply Reply Quote 0
          • G
            gjaltemba
            last edited by

            I tried adding an opt interface as 172.16.3.1/24 in pfsense on the L2 switch and plugged it in a vlan3 access port on the L3 switch. Now vlan2 (192.168.2.0/24) and vlan3 (172.16.3.0/24) hosts can ping. They also have access to dns and management web on vlan2 (192.168.2.254) and vlan3 (172.16.3.254). Unfortunately, other services like ssh between 192.168.2.2 and 172.16.3.2 is unstable or not working at all.

            Any idea?

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

              Draw up what you did…

              Here is nice drawing Derelict has used multiple times showing both layer 3 and layer 2 together no reason for me to redraw it

              Please draw your setup so we can see what you could be doing wrong.. My guess is asymmetrical

              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
              • G
                gjaltemba
                last edited by

                Nice drawing. My situation differs in that 172.26.1.1/29 is connected to another router that I do not control. Also, that router is connected to an isp that pfSense has no connection to. It would be great if Host A and Host C can connect within these constraints.

                intervlan.PNG
                intervlan.PNG_thumb

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

                  "hat router is connected to an isp that pfSense has no connection to"

                  Well then your kind of screwed.. Can you share routing protocols with that router that is downstream?  If not even if you send traffic to it from pfsense, those clients would just send traffic out the default gateway since it has no route back.  You would have to source nat all your traffic from your downstream to look like its on the transit network.

                  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
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.