HTB Academy IP-protocols
HTB Academy IP-protocols: IPv4 The size of the prefix, in bits, is written after the oblique. This is called "slash notation". There is a total of 32 bits in IPv4 address space. For example, if a network has the address “192.0.2.0/24”, the number “24” refers to how many bits are contained in the... • HTB Academy • cidr, htb-academy
IPv4
The size of the prefix, in bits, is written after the oblique. This is called "slash notation". There is a total of 32 bits in IPv4 address space. For example, if a network has the address “192.0.2.0/24”, the number “24” refers to how many bits are contained in the network.
From this, the number of bits left for address space can be calculated. As all IPv4 networks have 32 bits, and each “section” of the address denoted by the decimal points contains eight bits, “192.0.2.0/24” leaves eight bits to contain host addresses. This is enough space for 256 host addresses. These host addresses are the IP addresses that are necessary to connect your machine to the Internet.
A network numbered “10.0.0.0/8” (which is one of those reserved for private use) is a network with eight bits of network prefix, denoted by "/8" after the oblique. The "8" denotes that there are 24 bits left over in the network to contain IPv4 host addresses: 16,777,216 addresses to be exact.
Classless Inter-Domain Routing (CIDR) Chart
The Classless Inter-Domain Routing (CIDR) is commonly known as the CIDR chart and is used by those running networks and managing IP addresses. It enables them to see the number of IP addresses contained within each “slash notation” and the size of each “slash notation” in bits.
IPv6
IPv6 is similar to IPv4, but it is structured so that all LANs have 64 bits of network prefix as opposed to the variable length of network prefix1 that IPv4 networks have. All IPv6 networks have space for 18,446,744,073,709,551,616 IPv6 addresses.
Currently, most ISPs assign /48 network prefixes to subscribers' sites (the End Users' networks). Because all IPv6 networks have /64 prefixes, a /48 network prefix allows 65,536 LANs in an End User's site.
The current minimum IPv6 allocation made by the RIPE NCC is a /32 network prefix. If the LIR only made /48 assignments from this /32 network prefix, they would be able to make 65,536 /48 assignments. If they decided to only assign /56 network prefixes they would have 24 bits available to them, and so could make 16,777,216 /56 assignments.For example, if a /24 IPv6 allocation is made to an LIR, it would be able to make 16,777,216 /48 assignments or 4,294,967,296 /56 assignments.
To give some perspective, it is worth noting that there are 4,294,967,296 IPv4 addresses in total, significantly less than the number of IPv6 addresses.
IPv6 Relative Network Sizes
/128 1 IPv6 address A network interface /64 1 IPv6 subnet 18,446,744,073,709,551,616 IPv6 addresses /56 256 LAN segments Popular prefix size for one subscriber site /48 65,536 LAN segments Popular prefix size for one subscriber site /32 65,536 /48 subscriber sites Minimum IPv6 allocation /24 16,777,216 subscriber sites 256 times larger than the minimum IPv6 allocation 1 RFC2526, Reserved IPv6 Subnet Anycast Addresses (Proposed Standard)
