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

Multiple VLAN routing issue - works on F5 but cant emulate on PFS

Scheduled Pinned Locked Moved Routing and Multi WAN
10 Posts 3 Posters 1.0k 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.
  • A
    alexnyc
    last edited by Oct 5, 2023, 3:51 PM

    Hi Everyone.
    We have a bit of an interesting issue. Our production setup is currently on F5 7000S as main router and we are attempting to emulate a specific functionality on PFS.

    Long story short, the basic issue is this:

    Multiple VLANs defined on the device. (Public IP (/24) VLANs and NAT VLANS (RFC1918). The issue exists for all combinations of VLAN connection.

    Issue example:
    Consider a device, dual homed attached to 2 separate VLANs. Lets assume all subnets are /24 for my example.
    For example NIC1 is attached to VLAN1 and has IP and GW from that VLAN. IP 192.168.0.50 Gateway 192.168.0.1
    NIC2 is attached to VLAN2 and has ONLY the IP from that VLAN (no default GW). IP 192.168.1.50 NO GW
    Now, we have a second device on VLAN1. IP 192.168.0.60 GW 192.168.0.1
    When you attempt to ping (or connect) from 192.168.0.60 to the NIC2 IP of the Dual Homed machine above (192.168.1.50) you get a failure.
    Now, i believe that the behavior is actually correct, as the second NIC does NOT have a default GW so that packet gets lost.
    However, and this is the kicker - this behavior works with F5 being the main router, and we are being pressured to "make it work" just like F5 does with PFS.
    Adding a default GW on NIC2 solves the issue (obviously), but it is probably not a good idea to have a machine with 2 default gateways on separate interfaces/separate VLANs.
    Are there any advanced settings on PFS that would enable such behavior?

    V J 2 Replies Last reply Oct 5, 2023, 4:28 PM Reply Quote 0
    • V
      viragomann @alexnyc
      last edited by Oct 5, 2023, 4:28 PM

      @alexnyc said in Multiple VLAN routing issue - works on F5 but cant emulate on PFS:

      When you attempt to ping (or connect) from 192.168.0.60 to the NIC2 IP of the Dual Homed machine above (192.168.1.50) you get a failure.

      I would expect, that the request packet is routed through the router, since the destination IP is in the other VLAN. But normally the device should respond on NIC1, since the destination is in VLAN1 then.
      I would expect, that this works for ICMP, but not for TCP.

      However, and this is the kicker - this behavior works with F5 being the main router, and we are being pressured to "make it work" just like F5 does with PFS.

      Can you sniff the traffic to see, how it behaves?
      Maybe the F5 is masquerading the traffic, so the device would respond on NIC2. This can also be done on pfSense with an outbound NAT rule.

      1 Reply Last reply Reply Quote 0
      • J
        johnpoz LAYER 8 Global Moderator @alexnyc
        last edited by Oct 5, 2023, 4:37 PM

        @alexnyc said in Multiple VLAN routing issue - works on F5 but cant emulate on PFS:

        Consider a device, dual homed attached to 2 separate VLANs

        Well yeah that is problematic for sure.. That is almost always a horrible idea, unless one of the vlans is only used for backup or storage without any gateways set on it, etc..

        Can almost promise you your running into asymmetric traffic flow..

        "router" is way different than a router/firewall.. You can for sure make it work via what @viragomann mentions in natting traffic, ie outbound so traffic is sure to route back the same way through your "firewall".. I personally would rethink what your accomplishing with multihomed devices..

        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

        V 1 Reply Last reply Oct 5, 2023, 4:42 PM Reply Quote 0
        • V
          viragomann @johnpoz
          last edited by Oct 5, 2023, 4:42 PM

          @johnpoz said in Multiple VLAN routing issue - works on F5 but cant emulate on PFS:

          I personally would rethink what your accomplishing with multihomed devices..

          At least, what's the sense of accessing a device which has an IP within the some VLAN by using the IP of another.

          1 Reply Last reply Reply Quote 0
          • A
            alexnyc
            last edited by alexnyc Oct 5, 2023, 4:53 PM Oct 5, 2023, 4:50 PM

            I agree with both of you on the reason.
            Multihomed boxes are NGNX+ load balancers that the devs insist on having, they also have a good "defence" "it works on F5" so lets make it work on PFS.
            I have explained that it is a bad idea but i have been overruled :)

            Also, F5 is absolutely configured with asymmetric profile. The reason for this is that we are actually multiwan, aggregating 2 separate /30's from the ISP. The profile applies to the entire routing domain on F5, so that probably explains why F5 can handle it.

            I tried playing with asymmetric routing options on PFS (advanced FW rules and advanced NAT option disable reply-to), but it did not help.

            V 1 Reply Last reply Oct 5, 2023, 5:05 PM Reply Quote 0
            • V
              viragomann @alexnyc
              last edited by Oct 5, 2023, 5:05 PM

              @alexnyc
              No, that has nothing to do with reply-to. If it is due to asymmetric routing, you can try to add a pass rule on both interface and allow sloppy states in the advanced options.

              A 1 Reply Last reply Oct 5, 2023, 5:58 PM Reply Quote 0
              • A
                alexnyc @viragomann
                last edited by Oct 5, 2023, 5:58 PM

                @viragomann
                That is what i tried. Sloppy state on advanced rule.
                Did not help.
                Firewall already configured to allow any.
                Is there anything specific needed on outbound NAT?
                For public VLANs we bypass NAT entirely (For obvious reasons).

                J 1 Reply Last reply Oct 5, 2023, 7:17 PM Reply Quote 0
                • J
                  johnpoz LAYER 8 Global Moderator @alexnyc
                  last edited by Oct 5, 2023, 7:17 PM

                  @alexnyc if you want help running in a asymmetrical flow a drawing would be every helpful.. It impossible to say where you need what without some clue to the traffic pattern.

                  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
                  • A
                    alexnyc
                    last edited by alexnyc Oct 5, 2023, 7:52 PM Oct 5, 2023, 7:41 PM

                    Here is the diagram with the issue.

                    I verified this to be the same issue in simpler setup (isolated PFS with 2 VLANS and dual homed box attached to both, no fancy multiwan or public vlans).
                    The issue is only with dual homed boxes.
                    Setting default GW(10.10.10.1) on nic2 fixes the issue but is suboptimal for known reasons.

                    f5_pfs.jpg

                    J 1 Reply Last reply Oct 5, 2023, 8:51 PM Reply Quote 0
                    • J
                      johnpoz LAYER 8 Global Moderator @alexnyc
                      last edited by johnpoz Oct 5, 2023, 8:55 PM Oct 5, 2023, 8:51 PM

                      @alexnyc On vlan3 set an outbound nat so that when 77.4.5 pings 10.10.10.4 it looks like it comes from pfsense 10.10.10.1 address.

                      But why would you even want that to be used, why would 77.4.5 not just access 777.4.4?

                      I would put a outbound nat on that vlan3 so any source comming from 71.77.4/24 going to 10.10.10/24 would look like it came from 10.10.10.1

                      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
                      10 out of 10
                      • First post
                        10/10
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                        This community forum collects and processes your personal information.
                        consent.not_received