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

    Specify Netmask rather than CIDR

    Scheduled Pinned Locked Moved Routing and Multi WAN
    7 Posts 4 Posters 3.2k 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.
    • T
      tim
      last edited by

      Hi all,
      I want to load-balance two WAN links, based on destination IP (even or odd). Example.

      10.10.10.1 -> WAN1
      10.10.10.2 -> WAN2

      I can specify similar in normal FreeBSD IPFW using 0.0.0.1 or 0.0.0.2.  But pfsense only allow /28 type netmask.

      So, anyone know how I can do it ?

      1 Reply Last reply Reply Quote 0
      • S
        sai
        last edited by

        google says that http://www.tech-faq.com/convert-netmask-to-cidr.shtml is a good place to look

        1 Reply Last reply Reply Quote 0
        • T
          tim
          last edited by

          yes, but having netmask 0.0.0.1 can't convert to CIDR :-(  which is the only input method on pfsense.

          @sai:

          google says that http://www.tech-faq.com/convert-netmask-to-cidr.shtml is a good place to look

          1 Reply Last reply Reply Quote 0
          • S
            sullrich
            last edited by

            What exactly are you looking for in terms of hosts?  1 host only?

            1 Reply Last reply Reply Quote 0
            • dotdashD
              dotdash
              last edited by

              @tim:

              yes, but having netmask 0.0.0.1 can't convert to CIDR :-(  which is the only input method on pfsense.

              The problem is that 0.0.0.1 is not a netmask. I thought you might be talking about an inverse netmask, but 0.0.0.2 isn't even a valid inverse netmask. Anyway, I don't think ipfw uses inverse wildcarding. I've only seen it on Cisco IOS devices…

              1 Reply Last reply Reply Quote 0
              • T
                tim
                last edited by

                sorry for the confusion. I wrongly mention .2.

                Previously, I try on FreeBSD, with rc.firewall & PF work together and achieve policy routing & NAT

                the idea is to have traffic to

                • odd destination IP, go into one WAN link (odd destination IP, like 10.10.1.1)
                • even destination IP, go into another link (even destination IP, like 10.10.1.2)

                I remember something similar to below in configure file:
                fwd 0.0.0.0 0.0.0.1 Wan1Gateway -> packet to WAN1 link
                fwd 0.0.0.1 0.0.0.1 Wan2Gateway -> packet to WAN2 link
                {Sorry, exact syntax I need to double check}

                1 Reply Last reply Reply Quote 0
                • S
                  sullrich
                  last edited by

                  This will not work in pfSense.

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