# Slash Notation IP - What is what?

We just signed up with a new ISP and we got a static IP from them.

Our previous ISP just gave one IP and we were able to configure our web server using that. Now, we have got this new IP with a slash notation. This type is new to me. When I used the CIDR calculator, it gave me the following results:

    202.184.7.52/30
IP: 202.184.7.52
Number of hosts: 2


Can someone please help me by explaining what these are? I could not understand what the number of hosts means. Is that telling that I can use two different IP for DNS (A) records? Also, which one should I setup in my router? The network address or broadcast address?

Thank you very much for any answer you may provide.

The /30 means all but two of the 32 bits are used to define the netmask. It also means you've got four IP addresses to play with. (But in reality, only two of which can be hosts)

Your last octet of the netmask is (in binary) 11111100, which leaves the last two bits for you to define your network. (hence the four addresses)

Just looking at the last two bits:

00 = 202.184.7.52 - I've forgotten why, but there's a reason you don't use 00.
My network theory is rusty.
01 = 202.184.7.53 - Host 1
10 = 202.184.7.54 - Host 2
packets.


Clear as mud I'm sure.. but hope that adds a little to your understanding

• As far as I remember there's nothing in the specs that stops your from using .52 (or the all-0 host address) as a host address. It's just problematic because that address is usually used to refer to the network as a whole and using it for a host as well would lead to confusion. But then again, my network theory is rusty as well. Commented Oct 14, 2009 at 11:50
• Thank you! That clarified what I wanted to know. Appreciate your help. Commented Oct 14, 2009 at 13:03
• I think it depends on how the "upstream" network is set up. In some cases you can use all 4 as IP addresses, but if set up as a "true" vlan, you can not use the network and broadcast IP addresses. (My network theory is a bit rusty as well!) Commented Oct 14, 2009 at 13:50
• That's right - you can actually use that subnet by assigning 4 IPs as /32s on your web server: 202.184.7.52/32, 202.184.7.53/32, 202.184.7.54/32, 202.184.7.55/32. Commented Oct 14, 2009 at 16:08
• I actually had this question come up in a discussion a few years ago. Despite the people involved having over 60 years (combined) at an organization that has its own /16 (yes, that's a full Class B, 65,536 IPv4 addresses), nobody could come up with a better answer than "that's the convention. The first address is used as the network name". My own understanding is that it dates back to classful routing, when the network address actually determined the route to a given network. Commented Oct 14, 2009 at 17:34

/20 means use the first 20 bits as a netmask. It's usually expressed where the bits outside the netmask are 0 so 206.89/16 is roughly 64K addresses all starting with 203.89. The netmask is 0xFFFF0000.

So 202.184.7.52/30 means:

    Network: 202.184.7.52


The last 2 bits are used for hosts within that subnet. See IP Routing on Subnets.

From 202.184.7.52/30 the ip is:202.184.7.52

Let us find the Netmask. /30 means 30 "1" s, 8 in the first octet, 8 in the 2nd, 8 in the 3rd and only 6 in the 4th.

We use the last octet only because we know eight '1's =255

128 64 32 16 8 4 2 1
1   1  1  1 1 1 0 0 means we have six '1's
We add them to give 128=64=32=16=8=4=252


The number of hosts= 2^N -2 =2^2 -2 =2 ( since No of Zeroes in last octet is 2, so N=2)

202. 184. 7. 52 AND
255. 255.255.252

128 64 32 16 8 4 2 1
0   0  1  1  0 1 0 0 =52
1   1  1  1  1 1 0 0 =252 ANding

0   0  1  1  0 1 0 0


Replace the last two zeroes by 1

0   0  1  1  0 1 1 1 =55 to give the broadcast address
202.184.7.55