IP Addressing and Network Protocols Explained

Packet Transmission Delay

The time needed to transmit an L-bit packet into a link is calculated as: L (bits) / R (bits/sec).

Internet Protocol Stack

  • Layer 5: Application: Supporting network applications like FTP, SMTP, HTTP.
  • Layer 4: Transport: Process-process data transfer using TCP, UDP (Port Address).
  • Layer 3: Network: ICMP, IGMP, ARP, RARP (IP Address).
  • Layer 2: Link: Data transfer between neighboring network elements like Ethernet, 802.11 (WiFi), PPP.
  • Layer 1: Physical: Bits “on the wire.”

L1 & L2 -> Physical address

IP Addresses

  1. IP addresses are universal identifiers.
  2. IP addresses are inserted in packets as source and destination addresses.
  3. Communication schemes:
  • Unicast: one-to-one
  • Multicast: one-to-many
  • Broadcast: one-to-all (only local to one network).
Internet Addresses (IPv4) are 32 bits long. Each Internet host has at least one globally unique IP address used for Internet communication. Each router has at least two globally unique IP addresses used for Internet communication.

Network and Host ID

An address is divided into two parts: Network ID (leftmost part) and Host ID (rightmost part). All hosts in the same network have IP addresses sharing the same Network ID.

IP Address Classes

  • Class A: 0 +7 Netid + 24 Host id.
  • Class B: 10 +14 Netid + 16 Host id.
  • Class C: 110 +21 Netid + 8 Host id.
  • Class D: 1110 + 28 bits (Multicast address).
  • Class E: 1111 + 28 bits (Reserved for future use).

Class A Networks

Number of Networks: 2^7 = 128. Number of hosts per network: 2^24. Total number of addresses: 2^7 * 2^24 = 2^31. Few networks need as many as 2^24 hosts. Many addresses are wasted in this class.

Network and Broadcast Addresses

  • Network address: Netid: Specific, Hostid: All 0s. Source or destination: none. This address represents the entire network and is not used to specify a particular host within that network.
  • Direct broadcast address: Netid: Specific, Hostid: All 1s. Source or destination: Destination.

Masking Example

The process of extracting a portion of the IP address. Example: IP address: 11000001 10000011 00011011 11001101 & Mask: 11111111 11111111 11111111 00000000 -> Network address: 11000001 10000011 00011011 00000000

Subnetting

A network assigned a class C 192.168.10.0/24 would like to split it into 4 subnets of equal size. -> 2 bits from the host ID part are used as subnet ID to distinguish between different subnets (/26 subnet masks).

Class C Subnetting

Class C: 110 +21 Netid + 2 Subnetid + 6 Host id.

ARP & RARP

  1. IP addresses (logical) are unique universally.
  2. MAC addresses (physical) are unique locally (within the same network).
  3. Applications use IP addresses to specify destinations.
  4. Link layers only recognize MAC addresses.

Mapping IP to MAC Address

Cases:

  1. A host has a packet to send to another host on the same network.
  2. A host has a packet to send to another host on another network.
  3. A router receives a packet to be sent to a host on another network.
  4. A router receives a packet to be sent to a host on the same network.

MAC Address to IP Address

Determining own IP address at startup.

HOwS1dbBWXkJuedKG5qWb7lRHcrOZ+NcieuNUE5UXcpDfrnLUeurUHg2GxdM9+hb7reVAvUVyM85hyaHa6Gos6YUF3JyUWBS4RbKaJEI2J2ADNjuNajzFwEREAERsCUBGbAtq00nLQIiIAIiYHcCMmC716DOXwREQAREwJYEZMC2rDadtAiIgAiIgN0JyIDtXoM6fxEQAREQAVsSkAHbstp00iIgAiIgAnYn0MSA77vvPgQHB2sUA2lAGpAGpAFpoJ010KVLF9B3u0yZMgUaxUAakAakAWlAGrhzGpg9ezb+H8EhpPVdFgDTAAAAAElFTkSuQmCC