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

Cannot set a static address on a VLAN interface

Scheduled Pinned Locked Moved L2/Switching/VLANs
10 Posts 6 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.
  • M
    morgenstern
    last edited by Jul 10, 2019, 3:12 PM

    Hi all, I am plannining to replace a Draytek VDSL router with a pfsense box on one of our remote sites.

    The previous admin had the VLAN interfaces for the WiFi network set as:

    VLAN 30 - 10.0.30.0 /28
    VLAN 40 - 10.0.40.0 /29
    VLAN 50 - 10.0.99.0 /24

    When enabling this on pfSense tho, (specifically VLAN 30, 10.0.30.0 /28) I am getting this error:

    "This IPv4 address is the network address and cannot be used"

    I guess "10.0.x.x" is not an officially reserved range but is there perhaps a way of circumventing this without having to repogram the connected access points?

    Thanks!

    V 1 Reply Last reply Jul 10, 2019, 3:34 PM Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator
      last edited by johnpoz Jul 10, 2019, 3:36 PM Jul 10, 2019, 3:32 PM

      well because .0 is the wire or network, not a host address. When setting an IP on the host you would actually set the address.. For all of those masks and ranges the first viable host IP would be .1

      and yeah 10.anything or 10/8 is reserved rfc1918 space..

      Do you have 10.0.30 with other masks being used elsewhere - its common to use /24 when your not worried about stepping on other networks.. Makes it easier to see the network..

      For example your 10.0.30.0/30 network is limited .1-14 as host address
      your /29 is .1-.6

      Why not just make them all /24?

      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.7.2, 24.11

      1 Reply Last reply Reply Quote 1
      • V
        viragomann @morgenstern
        last edited by Jul 10, 2019, 3:34 PM

        The problem is what the error massage tries to tell you:
        10.0.30.0 is a network address and cannot be used as an interface address.
        So set the interface IP to something from 10.0.30.1 to 10.0.30.14.

        1 Reply Last reply Reply Quote 1
        • M
          morgenstern
          last edited by Jul 10, 2019, 4:06 PM

          Of course! Apologies that was a human error really.

          I was setting up single interfaces / nodes on those networks, not the networks themselves!

          I will no go and shoot myself.

          Thanks guys! 👍 ☺

          J 1 Reply Last reply Jul 12, 2019, 12:58 AM Reply Quote 0
          • J
            jahonix @morgenstern
            last edited by Jul 12, 2019, 12:58 AM

            @morgenstern said in Cannot set a static address on a VLAN interface:

            that was a human error really.

            Not necessarily!
            Since the death of Windows 95/98 it is officially possible to use the network address for a host. Windows95/98 used that for directed broadcast traffic but that's history.
            I just found this info: Cisco routers (from IOS 12.0 onwards) now have ip subnet-zero enabled by default
            I read about this in an RFC some time ago but I cannot find it right now.

            For same subnet traffic it is absolutely fine to use the .0 address for a host. It is discouraged to use in routed traffic mainly because of older devices that still exclude the all-0 and all-1 addresses from routing. Like pfSense obviously...

            J 1 Reply Last reply Jul 12, 2019, 1:47 AM Reply Quote 0
            • J
              johnpoz LAYER 8 Global Moderator
              last edited by johnpoz Jul 12, 2019, 1:09 AM Jul 12, 2019, 1:04 AM

              While I concur that you "could" use the wire as a host address - you have been able to do it for years actually... Its still not a "good" idea.. And with rfc1918 space it for sure make zero sense to do.. Not like you are limited on IP space :) Might be different if you are limited to a /29 or something with public space..

              You can in theory also use the broadcast address as host.. But again it make no sense to do so really "ever" ;)

              If you "really" have a need - you could put in a feature request.. They could maybe add a checkbox to allow for the wire address to be used.. Wouldn't suggest anyone actually do that - but sure you could put in a request.. Even if technically possible its not good practice.

              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.7.2, 24.11

              1 Reply Last reply Reply Quote 0
              • J
                jahonix
                last edited by Jul 12, 2019, 1:19 AM

                While it's hard to run out of addresses in RFC1918 I had this problem with a public /25.

                The broadcast address actually has traffic to it so I wouldn't think of using it for anything other than broadcasts. But subnet-zero is just a relict from the pre-CIDR past and doesn't see any actual traffic.

                Just use it as another tool in your bag when you're one short. As usual.
                Same holds true for switch ports, patch cables needed right now ... 😉

                1 Reply Last reply Reply Quote 0
                • J
                  johnpoz LAYER 8 Global Moderator
                  last edited by johnpoz Jul 12, 2019, 1:25 AM Jul 12, 2019, 1:22 AM

                  @jahonix said in Cannot set a static address on a VLAN interface:

                  Just use it as another tool in your bag when you're one short. As usual.

                  True - but I personally would only use it as a stop gap measure until you get more space, or move to ipv6 for whatever it your short on. If you are only 1 IP short, more than likely your going to be 2 short in the near future ;) or 3 or 4, etc. etc.. ;)

                  Using your wire address as a host, is not going to be a forever fix is my point... And is not to me a good idea.. Not saying you couldn't leverage that in a "pinch" but I am all for pfsense screaming at the user that its not valid.

                  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.7.2, 24.11

                  1 Reply Last reply Reply Quote 0
                  • J
                    JKnott @jahonix
                    last edited by JKnott Jul 12, 2019, 1:48 AM Jul 12, 2019, 1:47 AM

                    @jahonix said in Cannot set a static address on a VLAN interface:

                    Since the death of Windows 95/98 it is officially possible to use the network address for a host. Windows95/98 used that for directed broadcast traffic but that's history.
                    I just found this info: Cisco routers (from IOS 12.0 onwards) now have ip subnet-zero enabled by default

                    Subnet 0 is not the lowest address in a subnet. It's the lowest subnet supported by the subnet mask. For example, with a /24 subnet mask the subnet with 0 in the 3rd octet was not permitted. It now is. Similar applied to the highest subnet or 255 in the 3rd octet in this case. The network address is the lowest address within a subnet.

                    PfSense running on Qotom mini PC
                    i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                    UniFi AC-Lite access point

                    I haven't lost my mind. It's around here...somewhere...

                    1 Reply Last reply Reply Quote 0
                    • D
                      Derelict LAYER 8 Netgate
                      last edited by Jul 12, 2019, 5:00 AM

                      This is a case where just because you can doesn't mean you should.

                      On an IPv4 broadcast network, the first address in the subnet is the network address and the last address is the broadcast address. Pretend they don't exist for interface numbering purposes and spend your time by the pool instead of chasing problems because some stupid new device doesn't understand the aggressive network numbering scheme you implemented 18 months ago.

                      Chattanooga, Tennessee, USA
                      A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                      DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                      Do Not Chat For Help! NO_WAN_EGRESS(TM)

                      1 Reply Last reply Reply Quote 1
                      7 out of 10
                      • First post
                        7/10
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                        This community forum collects and processes your personal information.
                        consent.not_received