Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Classless Inter-Domain Routing
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==CIDR notation== '''CIDR notation''' is a compact representation of an IP address and its associated network mask. The notation was invented by [[Phil Karn]] in the 1980s.<ref name=kantor>{{cite web |title=Re: Stupid Question maybe? |url=https://seclists.org/nanog/2018/Dec/334 |publisher=North American Network Operators Group |author=Brian Kantor |date=December 2018 |quote=/24 is certainly cleaner than 255.255.255.0. I seem to remember it was Phil Karn who in the early 80's suggested that expressing subnet masks as the number of bits from the top end of the address word was efficient, since subnet masks were always a series of ones followd by zeros with no interspersing, which was incorporated (or independently invented) about a decade later as CIDR a.b.c.d/n notation in RFC1519.}}</ref><ref name=simpson>{{cite web |title=Re: Stupid Question maybe? |url=https://seclists.org/nanog/2018/Dec/368 |publisher=North American Network Operators Group |author=William Simpson |date=December 2018 |quote=Actually, Brian is correct. Phil was w-a-y ahead of the times. But I don't remember him talking about it until the late '80s.}}</ref> CIDR notation specifies an IP address, a [[slash (punctuation)|slash]] ('/') character, and a decimal number. The decimal number is the count of consecutive leading ''1''-bits (from left to right) in the network mask. Each 1-bit denotes a bit of the address range which must remain identical to the given IP address. The IP address in CIDR notation is always represented according to the standards for IPv4 or IPv6. The address may denote a specific interface address (including a host identifier, such as {{IPaddr|10.0.0.1|8}}), or it may be the beginning address of an entire network (using a host identifier of 0, as in {{IPaddr|10.0.0.0|8}} or its equivalent {{IPaddr|10|8}}). CIDR notation can even be used with no IP address at all, e.g. when referring to a {{IPaddr||24}} as a generic description of an IPv4 network that has a 24-bit prefix and 8-bit host numbers. For example: * {{IPaddr|198.51.100.14|24}} represents the IPv4 address {{IPaddr|198.51.100.14}} and its associated network prefix {{IPaddr|198.51.100.0}}, or equivalently, its subnet mask {{IPaddr||24|netmask=dotted}}, which has 24 leading ''1''-bits. * the IPv4 block {{IPaddr|198.51.100.0|22}} represents the 1024 IPv4 addresses from {{IPaddr|198.51.100.0}} to {{IPaddr|198.51.103.255}}. * the IPv6 block {{IPaddr|2001:db8::|48}} represents the block of IPv6 addresses from {{IPaddr|2001:db8:0:0:0:0:0:0}} to {{IPaddr|2001:db8:0:ffff:ffff:ffff:ffff:ffff}}. * {{IPaddr|::1|128}} represents the IPv6 [[loopback]] address. Its prefix length is 128 which is the number of bits in the address. In IPv4, CIDR notation came into wide use only after the implementation of the method, which was documented using [[dotted-decimal]] subnet mask specification after the slash, for example, {{IPaddr|192.24.12.0|22|netmask=dotted}}.<ref name="RFC 1519" /> Describing the network prefix width as a single number ({{IPaddr|192.24.12.0|22}}) was easier for network administrators to conceptualize and to calculate. It became gradually incorporated into later standards documents<ref>{{cite ietf |rfc=1878 |title=Variable Length Subnet Table For IPv4 |author1=T. Pummill |author2=B. Manning |date=December 1995}}</ref><ref>{{cite ietf |rfc=2167 |title=Referral Whois (RWhois) Protocol V1.5 |author1=S. Williamson |author2=M. Kosters |author3=D. Blacka |author4=J. Singh |author5=K. Zeilstra |date=June 1997 |quote=IP networks are also lexically hierarchical labels using the Classless Inter-Domain Routing (CIDR) notation, but their hierarchy is not easily determined with simple text manipulation; for example, 198.41.0.0/22 is a part of 198.41.0.0/16, which is a part of 198.40.0.0/15.}}</ref> and into network configuration interfaces. The number of addresses of a network may be calculated as 2<sup>address length β prefix length</sup>, where ''address length'' is 128 for IPv6 and 32 for IPv4. For example, in IPv4, the prefix length {{IPaddr||29}} gives: 2<sup>32β29</sup> = 2<sup>3</sup> = 8 addresses.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)