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

    Expanding iprange to 23 bit mask

    Scheduled Pinned Locked Moved Routing and Multi WAN
    4 Posts 4 Posters 1.3k 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.
    • S Offline
      sebna
      last edited by

      Hi All,

      Not sure if this is a right place to post it but I will start here.

      My pfSense is acting as Router / Firewall / Gateway.

      Currently the LAN interface is set with /24 bit mask on 192.168.1.0 network and I am looking to expand IP range to 23 bit mask expanding to192.168.2.0 address range.

      Is there anything else that needs to be done other then changing the mask to 23 bit in LAN interface settings (so in my case it would be 192.168.1.0 /23?

      I did above but cannot ping any host in 192.168.2.0 range of addresses from 192.168.1.0 and the other way around as well.

      Thank you.

      1 Reply Last reply Reply Quote 0
      • P Offline
        phil.davis
        last edited by

        A /23 always extends over 2 adjacent /24 ranges, starting with an even, followed by an odd number. e.g.
        192.168.0.0/24 and 192.168.1.0/24 together = 192.168.0.0/23

        You can't make a subnet that has just 192.168.1.0/24 and 192.168.2.0/24 together - the binary arithmetic does not work out.

        You can make 192.168.0.0/22 which will be 4 /24 subnets together, and includes both the ranges you are interested in:

        192.168.0.0/24 +
        192.168.1.0/24 +
        192.168.2.0/24 +
        192.168.3.0/24 =
        192.168.0.0/22

        As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
        If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

        1 Reply Last reply Reply Quote 0
        • H Offline
          heper
          last edited by

          for future reference:
          http://www.subnet-calculator.com/cidr.php

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

            As phil pointed out while /22 gives you the 192.168.2.0 to work with – Your other option would of been to just use 192.168.0 vs 192.168.2 -- so when you changed your pfsense lan IP from 192.168.1.x/24 to 192.168.1.x/23 you would of been fine talking to devices using 192.168.0.x/23 where pfsense IP would just be in the second /24 in the /23 mask.

            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 25.07.1 | Lab VMs 2.8.1, 25.07.1

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