Quiz 6 - L3 (fragmentation + routing) Flashcards
(35 cards)
IPv4 Header fields:
- version
- Internet Header Length (IHL)
- Type of service (ToS)
- Total Length
- Identification
- Flags
- Fragment offset
- Time to Live
- Protocol
- Header Checksum
- Source IP address
- Destinationn IP Address
- Options
- version: format of IP header (4 for IPv4)
- Internet Header Length (IHL): length of header in 32-bit words
- Type of service (ToS): use for DiffServ and ECN
- Total Length: entire packet size in bytes
- Identification: identify fragments of an OG IP datagram
- Flags: 0 - Reserved; 1 - Don’t fragment; 2 - More fragment
- Fragment offset: indicated where in OG datagram this fragment belongs (in 8-bytes units)
- Time to Live: Lifetime of packet. Each router decrements. When it reaches 0, packet is discarded
- Protocol: next protocol used in data portion of IP datagram
- Header Checksum: error detection. recalculated at each router when TTL changes
- Source IP address
- Destination IP Address
- Options
For a datagram that is 4000 bytes (including 20-byte header), what is the max data payload when the MTU is 1500 bytes?
Fragment 1:
- length: 1500 bytes
- data: 1480 bytes
- offset: 0
- MF: 1
Fragment 2:
- length: 1500 bytes
- data: 1480 bytes
- offset: 1480
- MF: 1
Fragment 3:
- length: 1020 bytes
- data 1000 bytes
- offset: 1480 + 1000
- MF: 0
What is IP fragmentation?
Breaking large IP datagram into small pieces to fit links w/ small MTUs
What are the fragmentation fields in the IP header?
- Identification: identify fragments of an OG IP datagram
- Flags: 0 - Reserved; 1 - Don’t fragment; 2 - More fragment
- Fragment offset: indicated where in OG datagram this fragment belongs (in 8-bytes units)
Why is fragmentation inefficient?
- header increases overhead
- reassembling fragments is complex (buffering + handling timeouts)
- routers and endpoints have to do more work
- lost fragments cause entire datagram to be retransmitted
How does path MTU discovery work to find optimal packet sizes?
The sender sets DF; if a router can’t forward due to MTU, it returns an ICMP “Fragmentation Needed” message.
What is ICMP?
Internet control message protocol
- supporting protocol that provides error reporting and diagnostic capabilities for IP.
What is the protocol number for ICMP in IP?
1
How does ICMP provide encapsulation?
ICMP messages are carried inside IP packets
What is a limitation of ICMP?
unreliable (no ACKS or retramsmission)
What does the ICMP application ping do?
- tests connectivity and measures RTT
- reveal indo about network path
- uses Echo request/reply
How does traceroute use ICMP?
- Sends packets with increasing TTLs; routers reply with ICMP Time Exceeded when TTL = 0.
- reveals path packets take through network
How does Path MTU discovery use ICMP?
- Destination Unreachable, Code 4 (“Fragmentation Needed”).
- send packets w/ DF set
- routers that need to fragment send ICMP error w/ next-hop MTU
- can determine largest packet that can travel through the link w/o fragmentation
What is the four-setup DHCP process?
Discover → Offer → Request → Acknowledge.
What is the purpose of the ARP protocol?
Map IP addresses to MAC addresses on a local network
What is the purpose of Dynamic Host Configuration Protocol (DHCP)?
- automatically assign IP addresses and network configuration
What problem does NAT solve?
- not enough public IPv4 addresses for all devides
- allows multiple devices to share single public IP address
- Security
How does NAT work?
Changes source IP and port for outgoing packets and destination IP and port for incoming packets.
Why does NAT require checksum recalculation?
Because NAT changes header fields, affecting checksum values.
What are limitations of NAT?
- difficult to initiate connections to internal hosts
- more processing overhead at router that does NAT
What is an autonomous system?
- collection of netwroks and routers under the control of a single org.
What is the difference between routing and forwarding?
Forwarding is moving packets; routing is deciding paths and building forwarding tables.
What is a forwarding table?
set of pairs containing network prefix and next-hop IP address (direct or next-hop)
What is Longest Prefix Match?
A rule for forwarding where the route with the longest matching prefix is chosen.