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
- IP addresses are universal identifiers.
- IP addresses are inserted in packets as source and destination addresses.
- Communication schemes:
- Unicast: one-to-one
- Multicast: one-to-many
- Broadcast: one-to-all (only local to one network).
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
- IP addresses (logical) are unique universally.
- MAC addresses (physical) are unique locally (within the same network).
- Applications use IP addresses to specify destinations.
- Link layers only recognize MAC addresses.
Mapping IP to MAC Address
Cases:
- A host has a packet to send to another host on the same network.
- A host has a packet to send to another host on another network.
- A router receives a packet to be sent to a host on another network.
- 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.