Brendan Ang

Search

Search IconIcon to open search

Internet Protocol

Last updated Nov 8, 2022 Edit Source

# Internet Protocol (IP)

A protocol designed to deliver datagrams from the source to destination host based on their addresses. It provides host-to-host routing and addressing.

# IPv4

# Datagram Fragmentation

Not all link-layer protocols can carry network layer packets of the same size. For example, Ethernet frames can carry up to 1500 bytes while wide area links can carry no more than 576 bytes. This maximum amount of data is called Maximum Transmission Unit (MTU). When the router determines that the outgoing link has an MTU that is smaller than the length of the IP datagram:

  1. The payload is fragmented into 2 or more pieces. Each fragment shares the same identification number, but have different fragment offset bits
  2. Using this information, end systems can identify fragmented packets and piece them back together.

# Addressing

A host typically has 2 links (Ethernet and wireless 802.11). A router has multiple links. Each boundary between a host/router and the physical link is an interface, and each interface needs its own unique IP address.

# Subnets

The isolated islands of network interfaces formed when disconnected from the router/host is a subnet. A topology with 6 subnets: 500

1 IP address is reserved for the network and 1 is reserved for the broadcast address A /24 netmask will only have $2^8-2=254$ available host addresses

# Obtaining an IP address

An organisation can request for a block of IP addresses from an ISP. An ISP can split up its own allocated block in this way: The ISP itself obtains its set of IP addresses through a global authority called Internet Corporation for Assigned Names and Numbers (ICANN).

# Dynamic Host Configuration Protocol (DHCP)

Once an organisation has obtained a block of addresses, it can assign individual addresses to the host an router interfaces. This can be done manually, but DHCP allows the host to obtain an IP address automatically from a DHCP server. 400

  1. Discover: client sends a discover message with UDP on port 67 to the broadcast address 255.255.255.255 since it does not know the IP address of the network.
  2. Offer: server broadcasts a message (on 255.255.255.255) containing transaction ID of the received message, proposed IP address and IP address lease time
  3. Request: client chooses from 1 or more offers and responds
  4. ACK: server responds to the request message DHCP can also provide:

# IPv6

The IPv4 32 bit address space was beginning to be used up. In February 2011, IANA allocated out the last remaining pool of unassigned IPv4 addresses.

# Datagram