Purpose of a /32 host mask?

redgoblinredgoblin Member Posts: 57 ■■□□□□□□□□
I haven't come across /32 addresses (apart from loopbacks) and I was wondering what the point of them is. If they're /32 addresses then surely every bit will be a network bit, and therefore how could you assign this to a host?

Comments

  • faisal79faisal79 Member Posts: 47 ■■□□□□□□□□
    you always have to leave 2 bits for the host, so i think you can't have /32 practiclly.
    Faisal79.jpg
  • rjbarlowrjbarlow Member Posts: 411
    redgoblin wrote:
    I haven't come across /32 addresses (apart from loopbacks) and I was wondering what the point of them is. If they're /32 addresses then surely every bit will be a network bit, and therefore how could you assign this to a host?
    /32 mask is used only to designate a host, not network.
    Pork 3
    Maindrian's music

    WIP: 70-236, 70-293 and MCSE.
  • Paul BozPaul Boz Member Posts: 2,620 ■■■■■■■■□□
    I use them for loopbacks.
    CCNP | CCIP | CCDP | CCNA, CCDA
    CCNA Security | GSEC |GCFW | GCIH | GCIA
    pbosworth@gmail.com
    http://twitter.com/paul_bosworth
    Blog: http://www.infosiege.net/
  • dtlokeedtlokee Member Posts: 2,378 ■■■■□□□□□□
    /32 mask when applied to an interface defines only one address, which is useful for loopbacks because they don't waste addresses. Additionally OSPF by default will advertise any loopbacks as a /32 regardless of the actual mask used. When you configure PPP, the establishment of a session will add a "peer neighbor-route" which is a /32 address defining the address of the neighbor into the routing table.

    Just some examples of where a /32 could/will be used.

    HTH
    The only easy day was yesterday!
  • redgoblinredgoblin Member Posts: 57 ■■□□□□□□□□
    Thanks for you replies guys, but I'm still slightly in the dark about /32 addresses. I appreciate the situations in which they're used (loopbacks, OSPF etc) but my question is more focused on the mechanics of how and why they're used. In other words, lets say you have an IP of 192.168.1.124/24. This would obviously mean that 192.168.1.0 is the network address and 0.0.0.124 is the host address. Following this same logic, if we had the IP address 192.168.1.124/32 this would mean a network of 0.0.0.0 and a host of 192.168.1.124?? is this right?

    What then is the difference between 192.168.1.124/24 and 192.168.1.124/32 since they are both host addresses?

    The reason I ask about /32 addresses is because I work for an ISP and we give out /32 addresses for static ADSL IPs, and I've always wondered what the point of doing this was.
  • LOkrasaLOkrasa Member Posts: 343 ■■■□□□□□□□
    I am a little hesitant to reply bc my answer may not be correct but I think this is how it works.

    The 192.168.1.124/24 will have a host range of 192.168.1.1-192.168.1.254 where as with a /32 you have just ONE address like a static address. I believe thats why your ISP gives those out... That is my understaning... your ISP wont assign someone a /24 since they would be part of a network subnet of 192.168.1.0 or at least thats what I assume. Anyone possibly clarify this some more for me?
  • NetstudentNetstudent Member Posts: 1,693 ■■■□□□□□□□
    This could be an instance where an ISP charges by the number of IP's. They give one address with /32 and if the customer wants to add another PC or laptop then you would have to call and request another IP.

    I think it could also be related to NAT. Just giving out one public address with /32 that could be overloaded with PAT.
    There is no place like 127.0.0.1 BUT 209.62.5.3 is my 127.0.0.1 away from 127.0.0.1!
  • Darthn3ssDarthn3ss Member Posts: 1,096
    i've always thought if your ISP assigned something like 66.55.44.33/24, you wouldn't get the entire network, just that one host address? i donno, i've never seen my public mask.
    Fantastic. The project manager is inspired.

    In Progress: 70-640, 70-685
  • Paul BozPaul Boz Member Posts: 2,620 ■■■■■■■■□□
    When I build static routes for customers I typically give them a /30. In doing so, they're given one public static IP address, with a default gateway. If they need more I'll bump them to a /29 or a /28 if they really need the addressing space. ISP's hardly ever issue a /24 unless the organization is really large. The biggest allocation to a single customer I have in my static table right now (I just checked) is a /27 which is provisioned to a large chemical plant. Otherwise people typically use nat to push a /30 and save tons of money. ISP's don't issue /32's because as already stated, they're not usable outside of loopbacks or peering.
    CCNP | CCIP | CCDP | CCNA, CCDA
    CCNA Security | GSEC |GCFW | GCIH | GCIA
    pbosworth@gmail.com
    http://twitter.com/paul_bosworth
    Blog: http://www.infosiege.net/
  • ReardenRearden Member Posts: 222
    It must have been easier to get in the past, I assume? Our school has a /16.
    More systems have been wiped out by admins than any cracker could do in a lifetime.
  • Paul BozPaul Boz Member Posts: 2,620 ■■■■■■■■□□
    Rearden wrote:
    It must have been easier to get in the past, I assume? Our school has a /16.

    Major universities aren't exactly businesses. Typically universities can apply for public IP blocks directly from the RIR (in the US case, ICANN). Businesses on the enterprise level can still do it, but for *most* companies it's too cost prohibitive and wasteful to have a block of IP's. When I say *most* I'm not talking about Dell or Starbucks, I'm talking about 99% of other businesses, who would go through an ISP to obtain public addressing. Usually people only obtain their own IP blocks if they have level 1 network connections.
    CCNP | CCIP | CCDP | CCNA, CCDA
    CCNA Security | GSEC |GCFW | GCIH | GCIA
    pbosworth@gmail.com
    http://twitter.com/paul_bosworth
    Blog: http://www.infosiege.net/
  • waruwaru Member Posts: 41 ■■□□□□□□□□
    redgoblin wrote:
    I haven't come across /32 addresses (apart from loopbacks) and I was wondering what the point of them is. If they're /32 addresses then surely every bit will be a network bit, and therefore how could you assign this to a host?

    As already said a /32 inidicates one host address. i.e 192.168.1.5/32. I normally use them when specifying policies on firewalls that will only apply to one pc.
  • rjbarlowrjbarlow Member Posts: 411
    Netstudent wrote:
    This could be an instance where an ISP charges by the number of IP's. They give one address with /32 and if the customer wants to add another PC or laptop then you would have to call and request another IP.

    I think it could also be related to NAT. Just giving out one public address with /32 that could be overloaded with PAT.
    The /32 mask has not network number but, then is not possible that a ISP assign them, I could think (I have not enough experience to say: is that!), its main purpose at least, is to designate loopback interfaces (as has been said), in firewall policies (like earlier) and designation of special addresses for example when a route is related to the same local IP address or fixed addresses when the routing table is not a "real" routing table if not added static routes, but only a summary, like is that of windows xp (see through "route print" command).

    Bye

    rjbarlow
    Pork 3
    Maindrian's music

    WIP: 70-236, 70-293 and MCSE.
  • mgeorgemgeorge Member Posts: 774 ■■■□□□□□□□
    Some of my students ask me this alot and its really pretty simple, /32 or 255.255.255.255 is a
    designated host address on a given network.

    For example lets take this scenario, we have a 2620 router with a WIC-1ADSL. We have a dialer
    profile setup using CHAP authentication. After we authenticate with the service provider, they
    provide you a DHCP host address, which is a /32 or it could be a larger chunk of ips.

    Typically when you receive a /32 host address you will receive a default gateway as well.
    If you have a larger chunk of ips such as a /28, then the isp sets their routing tables to get to
    your router, then you do what you wish with your ips.

    Just because your IP address is a /32 does not mean you cannot communicate with other
    ip addresses in a /24 network. such as you have 72.147.20.12/32 and the isp uses the network
    72.147.20.0/24, and ur default gateway is 72.147.20.254, you would still be able to communicate
    into the isp network.

    Typically a DSL line's default gateway would be the DLSAM's (typically a BVI Interface) which in route is connected to a service provider link such as an oc3 etc...

    Does this help?
    There is no place like 127.0.0.1
  • rjbarlowrjbarlow Member Posts: 411
    mgeorge27 wrote:
    Typically when you receive a /32 host address you will receive a default gateway as well.
    If you have a larger chunk of ips such as a /28, then the isp sets their routing tables to get to
    your router, then you do what you wish with your ips.

    Just because your IP address is a /32 does not mean you cannot communicate with other
    ip addresses in a /24 network. such as you have 72.147.20.12/32 and the isp uses the network
    72.147.20.0/24, and ur default gateway is 72.147.20.254, you would still be able to communicate
    into the isp network.

    Typically a DSL line's default gateway would be the DLSAM's (typically a BVI Interface) which in route is connected to a service provider link such as an oc3 etc...

    Does this help?
    Much to me! Thank You! Excuse me for my previous incorrect statement!
    Pork 3
    Maindrian's music

    WIP: 70-236, 70-293 and MCSE.
  • redgoblinredgoblin Member Posts: 57 ■■□□□□□□□□
    Thanks for all the replies.

    One last question then - my old IP address used to be 82.32.4.53

    On my Netgear router, the WAN settings were 82.32.4.53/21, whereas doing a CIDR lookup for this block reveals my ip to be 82.32.4.53/32

    The question is, which is my ip address:

    82.32.4.53/21 or 82.32.4.53/32
  • rjbarlowrjbarlow Member Posts: 411
    redgoblin wrote:
    Thanks for all the replies.

    One last question then - my old IP address used to be 82.32.4.53

    On my Netgear router, the WAN settings were 82.32.4.53/21, whereas doing a CIDR lookup for this block reveals my ip to be 82.32.4.53/32

    The question is, which is my ip address:

    82.32.4.53/21 or 82.32.4.53/32
    Hi., excuse me, what is CIDR lookup? However I think /21 can be the IP addresses block managed from the ISP and /32 is the dhcp netmask advertised to Your router. How You have discovered these netmasks??
    Pork 3
    Maindrian's music

    WIP: 70-236, 70-293 and MCSE.
  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    redgoblin wrote:
    Thanks for all the replies.

    One last question then - my old IP address used to be 82.32.4.53

    On my Netgear router, the WAN settings were 82.32.4.53/21, whereas doing a CIDR lookup for this block reveals my ip to be 82.32.4.53/32

    The question is, which is my ip address:

    82.32.4.53/21 or 82.32.4.53/32

    The subnet mask is locally significant as your netgear router has a static route to the isp.Since you are not exchanging routes it doesnt matter what mask is configured on the netgear router as long as the mask encompasses your ip address .53 which /21 does.
    I'm not familiar with CIDR lookup, but im sure its some kind of script that polls this information from the upstream router, this router has you configured as a /32 host address.Nothing unusual here, all you need to know is your ip address is .53 .
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • redgoblinredgoblin Member Posts: 57 ■■□□□□□□□□
    EdTheLad wrote:
    redgoblin wrote:
    Thanks for all the replies.

    One last question then - my old IP address used to be 82.32.4.53

    On my Netgear router, the WAN settings were 82.32.4.53/21, whereas doing a CIDR lookup for this block reveals my ip to be 82.32.4.53/32

    The question is, which is my ip address:

    82.32.4.53/21 or 82.32.4.53/32

    The subnet mask is locally significant as your netgear router has a static route to the isp.Since you are not exchanging routes it doesnt matter what mask is configured on the netgear router as long as the mask encompasses your ip address .53 which /21 does.
    I'm not familiar with CIDR lookup, but im sure its some kind of script that polls this information from the upstream router, this router has you configured as a /32 host address.Nothing unusual here, all you need to know is your ip address is .53 .

    Ahhhhh thats cleared it up. Thx Ed! You've also indirectly helped me to understand the point of a /32 mask.

    I can see now that a /32 mask is used from the upstream routers point of view (ie the ISP) to have a route to an individual host, whereas the host itself would have a subnet mask that reflects the actual network it is part of (hence my confusion). Therefore, 82.32.4.53/32 would be my IP address from the point of view of the ISP and 82.32.4.53/21 would be my IP address from the point of view of MY router :)

    I can therefore understand why the ISP I work for gives out /32 addresses, as its from the upstream core routers point of view and not the actual customers point of view.

    I really didn't think about it like that!
  • rjbarlowrjbarlow Member Posts: 411
    EdTheLad wrote:
    The subnet mask is locally significant as your netgear router has a static route to the isp.Since you are not exchanging routes it doesnt matter what mask is configured on the netgear router as long as the mask encompasses your ip address .53 which /21 does.
    I'm not familiar with CIDR lookup, but im sure its some kind of script that polls this information from the upstream router, this router has you configured as a /32 host address.Nothing unusual here, all you need to know is your ip address is .53 .
    Therefore a /32 mask is used only in order to designate static routes from the point of view of the ISP. It is NEVER used locally as a netmask for a host. It is wrong?
    Pork 3
    Maindrian's music

    WIP: 70-236, 70-293 and MCSE.
  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    Thats wrong, i think you need to understand what the netmask is for, it is used to specify a group of ip addresses.In this case there is only one ip address so it can be specified with a /32 mask.A larger mask can also be used but whats the point since you only have one address in this instance.The isp has a hugh range of customers so it will try and make a nice addressing scheme, it will allocate a /32 addresses to a customer that only requires one address, the isp can then advertise a larger mask to it neighbors instead of advertising thousands of /32 addresses.This is just common sense.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • rjbarlowrjbarlow Member Posts: 411
    EdTheLad wrote:
    Thats wrong, i think you need to understand what the netmask is for, it is used to specify a group of ip addresses.In this case there is only one ip address so it can be specified with a /32 mask.A larger mask can also be used but whats the point since you only have one address in this instance.The isp has a hugh range of customers so it will try and make a nice addressing scheme, it will allocate a /32 addresses to a customer that only requires one address, the isp can then advertise a larger mask to it neighbors instead of advertising thousands of /32 addresses.This is just common sense.
    I have understood the purpose of the netmask, off course, and I think (hope...) I have understood that the ISP summarizes the routes of its blocks to their neighbors, hence my question were just to understand if the ISP can assign a /32 mask to a customer via dhcp or static locally and the customer remained capable to communicate with the ISP network.
    Now reflecting better also on the post of mrgeorge I think the key of the routing between ISP and customer is that the ISP assign /32 mask to customers and while also a proper default gateway in order to make the customers still able to communicate with ISP network. OK, sorry for my repetitive question.
    Pork 3
    Maindrian's music

    WIP: 70-236, 70-293 and MCSE.
  • ShiftInsertShiftInsert Registered Users Posts: 1 ■□□□□□□□□□
    I am sorry for necroposting here, but there's one question still remains unaddressed.


    We know that a host sends packets to the default gateway when a destination lies beyond the connected network.
    This is determined by ANDing the host netmask and destination IP
    How does the host with a /32 mask understand that?
    Does the host uses a default gateway for every destination?
  • davenulldavenull Member Posts: 173 ■■■□□□□□□□
    Does the host uses a default gateway for every destination?

    That sounds right to me. The sole purpose of a subnet mask from a host's perspective is to determine whether it needs to use the default gateway or not. With /32 mask, it will use the default gateway for all traffic except if it tried to ping itself.

    Edit: except it can't use the default gateway because the gateway would have to be in a different network from the host's perspective. Catch 22 situation.
  • pevangelpevangel Member Posts: 342
    A common use for a /32 is for route advertisements. Let's say you have an intranet with partners. Your partners need to be able to access specific applications in your network. Instead of advertising your entire network, you just advertise specific prefixes for the servers that they need to reach.

    A /32 with a default gateway won't work. It would work with a default route, but not a default gateway.
  • theodoxatheodoxa Member Posts: 1,340 ■■■■□□□□□□
    We use /32 sometimes for static routes. For example, you have a VPN that provides secure connectivity for various sites to reach a server at a main site. If there is only 1 server that you want to reach on the other end of the VPN, then you can use a /32 to direct traffic from other parts of your network towards the device terminating the VPN tunnel.
    R&S: CCENT CCNA CCNP CCIE [ ]
    Security: CCNA [ ]
    Virtualization: VCA-DCV [ ]
  • Params7Params7 Member Posts: 254
    I use it on loopbacks icon_cool.gif
  • DeathmageDeathmage Banned Posts: 2,496
    I use /32 for loop-backs, but I'm sure later on down the Cisco track I'll use them for something else.
Sign In or Register to comment.