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

    2 WAN IPs (same subnet+gateway) and 2 LAN subnets. Can I route to both WANs?

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

      I have been trying to get this to work for ages, and looking through this forum I just can not seem to find anyone with my kind of setup and needs.

      (i am referencing LAN as LAN1 and WAN as WAN1 below)

      What I have is a ISP that delivers me 2 IPs, which I have assigned 2 NICs to - WAN1 and WAN2(OPT1).
      My LAN has 2 subnets - 192.168.0.x (LAN1) and 192.168.1.x (LAN2(OPT2) or through IP Alias). The subnets reside on the same physical network, so using either a NIC or a Virtual IP (alias) is available for me.

      I want to make sure all traffic from LAN1 goes to WAN1 and all traffic from LAN2(or the alias of LAN1) goes to WAN2.

      So far I have been able to get the 2 subnets work through WAN1 (with an alias on LAN1). I had to turn on AON and add a rule for the alias subnet, and a Firewall rule for the same subnet on LAN1.

      Is it possible to do this kind of mapping when both gateways of WAN1 and WAN2 are identical? Or is this a no-go?

      To narrow it down further. What I really want is to make WAN2 map 1 to 1 to my main computer, while the rest of my LAN uses WAN1.

      Anyone able to help with some inputs?

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        Having two NICs in the same subnet with the same gateway does not work.

        If that is a single ISP link, you don't want multi-wan anyhow. Just add the second IP as a Virtual IP (CARP or Proxy ARP) and then you can use it for outbound NAT for LAN2 as you want.

        Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • W
          wolf5
          last edited by

          Problem with Virtual IP is that it is statically configured. It can not get its IP through DHCP. (?) And all 4 IPs I get from my ISP are all DHCP delivered. Unless there is a trick to get the second as well.

          And thanks for answering.

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            Ah, well then that is a little different. You should have mentioned that up front.

            I believe there are some other examples of configuring what you're after with DHCP on the forum here. I don't recall the specifics, but it wasn't an ideal situation.

            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

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