IP addresses

IPv4

image.png

An IPv4 address is a 32 bit decimal dot separated number used for identifying computers on a network. They are formatted with up to 3 digits per octet boundary, and each address has 4 octet boundaries. EX: 23.133.248.1

Currently, and for a long time there has been a large scale shortage of IPv4 addresses, leading to the need for things like NAT and CG-NAT, which is why IPv6 currently being rolled out to at some point replace IPv4. Obtaining v4 addresses due to the mass shortage of them is very expensive, they generally cost upwards of $100 a month for a single range of v4 IPs.

IPv6

image.png

An IPv6 address is a 128 bit hexadecimal number, and is the second major in-use revision of the TCP-IP protocol. It's far more common than IPv4, and is generally cheap or even free to get depending on where you go for the addresses. An IPv6 address is formatted like this 2602:fba2:feed:feed:feed:feed:feed:feed with each octet being able to take hex, so anything from 0-9 and a thru f.

LIRs and some other services often give away subnets of IPv6.

Subnet

A subnet in it's most basic form is a group of IP addresses, subnetting is the act of breaking up chunks of address space into smaller sizes.

Technically speaking, there are two types of subnetting, but in reality only one is used in todays modern networks. In the older times, and specifically with IPv4, you had classful networking, which is where terms like class A, B, C, D and E came from, if you've ever heard them. This was how subnetting was originally done with IPv4, and it's part of why some random organizations hold absolutely excessive amounts of v4 address space, further increasing the shortage of IPs on the internet in the v4 address space. Later on, classless networking came around (the type we use today) and it's typically denoted with a slash followed by a number to specify the subnet mask. A subnet mask identifies which part of the IPspace identifies the network (first chunk) and which part can identify hosts (the second chunk)

For example, a /24 in IPv4 networking would look like this

23.133.248.0/24

Red is the network ID, and purple is the host ID, since IPv4 IPs allow for 255 addresses per octet (each number in-between dots is an octet, that allows for 255 valid IPs out of a /24)

IPv6 is similar, except it's hexadecimal and it's chunks are separated with colons (:). There are also 8 full chunks in a v6 IP, meaning a v6 IP is 128 bits, vs IPv4's 32 bits.

a /48 in IPv6 would look like this

2602:fba2:dead::/48

If you noticed there is no host bits there, that's because two colons back to back fills the rest of the IP with zeros, that IPv6 address expanded out into full form would look like this

2602:fba2:dead:0000:0000:0000:0000:0000

And since it's hexidecimal, that goes all the way to 2602:fba2:dead:ffff:ffff:ffff:ffff:ffff!

That's a lot of IPs!

v6 is the future, and it's what you should be using in all new network buildouts.