Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just wondering, how can a network block have a "2" in "192.0.2.0/24"? Shouldn't it be "192.0.0.0/24"?


No, 192.0.0.0/24 and 192.0.2.0/24 are completely separate networks.

See "Classless Inter-Domain Routing" [0] (a.k.a. "CIDR")

--

[0]: https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing


/24 is a 256 host subnet, so you can have 1-254 (0 and 255 are special) in the last "octet" (each section of an IP address is denoted as an octet).

You can play with the numbers here [0] to see valid combos, like this: 192.1.254.19/24 (or use a 255.255.255.0 subnet mask)

0 - https://www.calculator.net/ip-subnet-calculator.html?cclass=...


/24 means that the first 24 bits are the subnetwork mask, ie: xxxxxxxx.xxxxxxxx.xxxxxxxx.NNN, where the x represent the network and the N represent hosts on said network.

192.168.1.x/24 and 192.168.2.x/24 are two separate networks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: