Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "192.168.1.1/21" mean?

When they write a slash followed by a number after an IP address, what does that mean?

like image 317
Naughty.Coder Avatar asked Aug 11 '13 15:08

Naughty.Coder


People also ask

What does a 21 mean after IP address?

It's CIDR notation for a subnet. The /21 denotes that the first (most-significant) 21 bits are common to all addresses in the subnet. The individual hosts in the network have addresses that are different only in the last 11 bits.

What does IP 192.168 1.1 mean?

192.168. 1.1 is most often used as the default router IP address by Linksys, an American company selling data networking hardware products mainly to home users and small businesses.

What is the subnet mask 192.168 1.1 20?

The default LAN IP address of 192.168. 1.1 with a mask of 255.255. 255.0 , or /24 in CIDR notation has a network address of 192.168.


2 Answers

The part after the slash is how many subnet mask bits to use. Since the use of classless routing you use slash instead of saying class A or B whatever. Example:

192.168.1.1/24 is 192.168.1.1 255.255.255.0 

255.255.255.0 is using 24 of the 32 bits to create the subnet.

in binary it looks like this:

11111111.11111111.11111111.00000000 

so a /30 would look like:

255.255.255.252 or in binary  11111111.11111111.11111111.11111100 

the remaing 00 is for hosts; the 1's are the network.

like image 73
Ashwani Avatar answered Sep 19 '22 19:09

Ashwani


It's CIDR notation for a subnet.

The /21 denotes that the first (most-significant) 21 bits are common to all addresses in the subnet. The individual hosts in the network have addresses that are different only in the last 11 bits.

like image 36
Oliver Charlesworth Avatar answered Sep 21 '22 19:09

Oliver Charlesworth