Quiz 6 - L3 (fragmentation + routing) Flashcards

(35 cards)

1
Q

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

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

For a datagram that is 4000 bytes (including 20-byte header), what is the max data payload when the MTU is 1500 bytes?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is IP fragmentation?

A

Breaking large IP datagram into small pieces to fit links w/ small MTUs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the fragmentation fields in the IP header?

A
  • 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)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Why is fragmentation inefficient?

A
  • 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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How does path MTU discovery work to find optimal packet sizes?

A

The sender sets DF; if a router can’t forward due to MTU, it returns an ICMP “Fragmentation Needed” message.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is ICMP?

A

Internet control message protocol
- supporting protocol that provides error reporting and diagnostic capabilities for IP.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the protocol number for ICMP in IP?

A

1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does ICMP provide encapsulation?

A

ICMP messages are carried inside IP packets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a limitation of ICMP?

A

unreliable (no ACKS or retramsmission)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does the ICMP application ping do?

A
  • tests connectivity and measures RTT
  • reveal indo about network path
  • uses Echo request/reply
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does traceroute use ICMP?

A
  • Sends packets with increasing TTLs; routers reply with ICMP Time Exceeded when TTL = 0.
  • reveals path packets take through network
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How does Path MTU discovery use ICMP?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the four-setup DHCP process?

A

Discover → Offer → Request → Acknowledge.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the purpose of the ARP protocol?

A

Map IP addresses to MAC addresses on a local network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the purpose of Dynamic Host Configuration Protocol (DHCP)?

A
  • automatically assign IP addresses and network configuration
17
Q

What problem does NAT solve?

A
  • not enough public IPv4 addresses for all devides
  • allows multiple devices to share single public IP address
  • Security
18
Q

How does NAT work?

A

Changes source IP and port for outgoing packets and destination IP and port for incoming packets.

19
Q

Why does NAT require checksum recalculation?

A

Because NAT changes header fields, affecting checksum values.

20
Q

What are limitations of NAT?

A
  • difficult to initiate connections to internal hosts
  • more processing overhead at router that does NAT
21
Q

What is an autonomous system?

A
  • collection of netwroks and routers under the control of a single org.
22
Q

What is the difference between routing and forwarding?

A

Forwarding is moving packets; routing is deciding paths and building forwarding tables.

23
Q

What is a forwarding table?

A

set of pairs containing network prefix and next-hop IP address (direct or next-hop)

24
Q

What is Longest Prefix Match?

A

A rule for forwarding where the route with the longest matching prefix is chosen.

25
How do hosts and routers handle incoming packets differently in IP forwarding?
Hosts: - Check if the packet’s destination address matches their own. - Accept the packet if it matches; otherwise, discard it. Routers: - Look up the packet’s destination address in the forwarding table using longest prefix match. - If a match is found, forward to the specified next hop or interface. - If no match is found, forward using a default route (if available) or discard the packet.
26
How does Distance-Vector Routing work?
Routers share vectors of costs to all destinations with neighbors (Bellman-Ford algorithm).
27
What is convergence?
process of getting consistent routing info to all nodes
28
how is convergence handled with distance-vector protocols?
- update periodically (30 secs) to indicate node is still alive - triggered update - send immediately when topology changes
29
What is the count-to-infinity problem?
A routing loop issue where incorrect paths increase metric values indefinitely.
30
How is count-to-infinity mitigated?
- Split horizon (don't advertise routes back to neighbor from which they learned) - small infinity (e.g., setting 16 as unreachable in RIP).
31
What is link rate routing?
if every node knows the state of evert link, then every node can compute optimal routes
32
What is reliable flooding of link-state info?
process of distributing Link-State Packets (LSPs) to all routers. - Each router sends LSPs to neighbors. - Neighbors forward them to others (except the sender). - Sequence numbers prevent duplicates; TTL limits spread.
33
What’s inside a Link-State Packet (LSP)?
Node ID, neighbor list with link costs, sequence number, and TTL.
34
How do Distance-Vector and Link-State routing compare?
Information shared: - Distance-Vector: Distance to all nodes - Link-State: State of directly connected links Shared with: - Distance-Vector: Immediate neighbors - Link-State: All routers in the network Convergence speed: - Distance-Vector: Slower - Link-State: Faster Memory and computation: - Distance-Vector: Lower resource use - Link-State: Higher resource use Loop prevention: - Distance-Vector: Split horizon, small infinity - Link-State: Full network view prevents loops Scalability: - Distance-Vector: Limited - Link-State: More scalable (supports hierarchy)
35
Name five routing metrics.
Hop count, bandwidth, delay, load, reliability.