IP Addressing

Why
IP Addressing is important because it allows us to correctly find and send messages between two hosts on the internet using IP

What
IP Addressing is the formal system of defining a host's location in a network according to IP. More specifically, it refers to a particular interface, which is the physical connection between hosts and their routers. We note that hosts usually only have 1 interface whereas routers have multiple interfaces, one for each of its links

Obtaining IP Addresses
As an organization who was trying to obtain more IP addresses, you would probably contact your ISP for a block that had already been allocated to it from an even larger block.

As an IP, if you wanted to obtain an IP block, you would go to the ICANN (International Corporation for Assigned Names and Numbers)

IPv4
IPv4 addressing is different than IPv6 addressing that will be covered later. In IPv4, the addresses have the following properties:
 * 1) 32 bits long
 * 2) subnet mask. Variable length bits that denote the leftmost n bits to consider the subnet address
 * 3) Follows the CIDR convention of a.b.c.d/x where the leftmost x bits are considered to be the prefix and the rest of the bits specified the exact host/device within the network to route to

Dynamic Host Configuration Protocol
After an organization receives a block of IPs that it was looking for, then one of its network admins must assign each of its router interfaces. However, there is a better way to configure host IPs known as the Dynamic Host Configuration Protocol or DHCP

Under it, every time a host connects to a router, it will automatically receive an IP address. This IP address can either be This protocol also allows a host to learn the following information: The exact steps to obtain an IP address according to the DHCP is as described below:
 * the same every time it connects
 * a temporary IP address that could be different every time it connects
 * subnet mask
 * address of its first-hop router
 * address of its local DNS server
 * 1) DHCP Server Discovery: A host sends a DHCP discover message within a UDP packet to port 67. It uses source address of 0.0.0.0 and a destination address of 255.255.255.255 and the IP layer passes it down to the link layer which sends it to all connected nodes in the subnet
 * 2) DHCP Server Offer: A DHCP server receiving a DHCP server discovery message responds with an IP broadcast to 255.255.255.255. This message contains
 * 3) transaction Id
 * 4) network mask
 * 5) IP address lease time
 * 6) DHCP Request: A host picks among the DHCP offers that it has received and it echoes back the parameters back to the DHCP server
 * 7) DHCP ACK: The server responds to a DHCP request message with an ACK packet and transactions can begin