IP Addressing

What is an IP address and what are the differences between IPv4 and IPv6. (+ more)

COMPTIA A+ 220 1101

8/8/20232 min read

Internet Protocol (IP) address is used for directing network traffic by providing an exact location of where to deliver packets of data to. There are two types: IPv4 (the older and most commonly used, 32-bit) and IPv6 (the newer and here to provide far more addresses than the former, 128-bit).

Configuring a SOHO network

You need the following to set up a network:

IPv4

Typically you would see this as four sets of numbers (from 0-255) with periods in binary notation such as the following used by Google: 8.8.8.8 and 8.8.4.4. The first half is for the network the host belongs to. The second half is the location of that specific host. This would mean that 192.168.123.132 would mean that 192.168.123 is the network address while .132 is the host address. All hosts on a given network would have the same network address or network-prefix, but a different host number. This allows incoming packets to first come to the network, then the network sends it to the requesting host.

Check out these classes of IP address formats:

See the following for an example from "Understanding IP Addressing: Everything You Ever Wanted To Know" by Chuck Semeria (link to full document in the references):

Problem!

Under the original 32-bit address there was only 4,294,967,296 addresses available, which is clearly not enough. This is where subnetworks (subnets) come into play. Subnetting allows administrators to allocate addresses to users on a network. There is a range from 1-254 in the last octet. 0 and 255 cannot be used and are invalid to assign to a individual host. This turns the two-level class hierarchy network-prefix and host number into a three-level subnet hiearchy with a network-prefix, subnet-number, and host-number. These are not visible outside of the the given organization. Only the "parent" number is reached, and from there it is privately sorted.

This provides benefits!

  1. Administrators do not need more address space.

  2. Administrators have much more flexibility and control to make subnets without new network numbers

  3. These subnets are private and they do not hurt the great Internet routing table

  4. Individual devices do not take up IP addresses - the router does

Subnet mask

255.255.255.0

This is a common subnet mask seen on many home office devices. This is for the local network for internal communication.

Default Gateway

This is where the router allows hosts in the network to communicate with a host on a different network.

So... what about IPv6?

IPv6 gives a whopping 340 undecillion addresses. This is new and still being deployed. For now, IPv4 is the one to configure. A shorter version can look like this: 2001:0db8:582:ae33::29. Note that '::' represents a set of 0's.

Automatic Private IP Addressing (APIPA)

This is a link-local address used only for communications on subnets, routers do not reach out to other netowrks using this. The range is 169.254.0.0 through 169.254.255.255.

Static? Dynamic!?

Address assignment is automated by Dynamic Hospt Configuration Protocol (DHCP). It uses a pool of addresses to assign to a host. This can be made static by either disables DHCP and configuring it manually (yuck) or use an IP reservation on DHCP to link your MAC address to the desired IP address. More of this in another post.

Get in touch

Did I get something wrong?

Do you have feedback?

Let me know!