ch3_ip
ch3_ip
▪ Introduction
▪ IP Addressing
▪ Subnetting
▪ Variable Length Subnet Mask (VLSM)
Orientation
Network
ICMP IP IGMP
Layer
Network
ARP Link Layer
Access
Media
2
IP: The waist of the hourglass
TCP UDP
• Multiple higher-layer protocols
• Multiple lower-layer protocols IP
3
IP Service
• Consequences:
5
IP Address Classes
6
IP Address Classes
7
Private Address Range
8
Network/Subnet Masks
9
Subnetting
Example
10
Benefits of Subnetting
11
IP Service
unicast
broadcast multicast
12
IP Datagram Format
bit # 0 7 8 15 16 23 24 31
header
version DS ECN total length (in bytes)
length
D M
Identification 0 Fragment offset
F F
time-to-live (TTL) protocol header checksum
source IP address
destination IP address
options (0 to 40 bytes)
payload
4 bytes
• Flags (3 bits):
– First bit always set to 0
– DF bit (Do not fragment)
– MF bit (More fragments)
Will be explained later→ Fragmentation
15
Fields of the IP Header
16
Fields of the IP Header
• Protocol (1 byte):
• Specifies the higher-layer protocol.
4 = IP-in-IP
• Used for demultiplexing to higher layers. encapsulation
6 = TCP 17 = UDP
1 = ICMP 2 = IGMP
IP
• Options:
• Security restrictions
• Record Route: each router that processes the packet adds its IP
address to the header.
• Timestamp: each router that processes the packet adds its IP
address and time to the header.
• (loose) Source Routing: specifies a list of routers that must be
traversed.
• (strict) Source Routing: specifies a list of the only routers that
can be traversed.
• Padding: Padding bytes are added to ensure that header
ends on a 4-byte boundary
18
Maximum Transmission Unit
• Maximum size of IP datagram is 65535, but the data link layer protocol
generally imposes a limit that is much smaller
• Example:
– Ethernet frames have a maximum payload of 1500 bytes
→ IP datagrams encapsulated in Ethernet frame cannot be longer than
1500 bytes
• The limit on the maximum IP datagram size, imposed by the data link
protocol is called maximum transmission unit (MTU)
Ethernet
FDDI
Ring
Host A Router Host B
MTUs: FDDI: 4352 Ethernet: 1500
• Fragmentation:
• IP router splits the datagram into several datagram
• Fragments are reassembled at receiver
20
Where is Fragmentation done?
Router
21
What’s involved in Fragmentation?
23
VLSM Subnetting
Example
24