Link-Layer and ICMP: Project 1 Midterm
Link-Layer and ICMP: Project 1 Midterm
Project 1 Midterm
• Distribution of grades: • Average score 104 (out of 119)
– 50% perfect score of 240
• Standard deviation 11
– 90% above 140
• 50th percentile 107
• Giving people a second chance: • 90th percentile 115
– Fix your project, get it running
– We’ll figure out the penalties later
• Constraints:
– Fix must cause multiple test cases to go from fail to pass
– Regrades get maximum score of 200
– Contact Anand/Colin for details……
3 4
Question-by-question…. Question-by-question….
1. True/False: about 10% got full credit 6. Timer values: about 50% got full credit
Peak about 18 out of 20
7. Addressing: about 70% got full credit
2. Multiple choice: about 8% got full credit
Peak about 18 out of 20
8. Learning switch: about 60% got full credit
IP checksum only looks at header 9. DNS: about 70% got full credit
UDP header does not include addresses
10.Sliding window: about 70% got full credit
3. TCP Basics: about 50% got full credit
4. Seq. of Messages: about 80% got full credit
5. The Real World: about 90% got full credit
5 6
1
10/16/2012
• In what year?
– “1776”,
– “122 BCE”
– “12000 BC (there was time travel involved)” 7 8
9 10
2
10/16/2012
HTTP message
HTTP HTTP
router router
15 16
Ethernet frame SONET frame Ethernet frame
3
10/16/2012
• If have return MAC address, use that in response • But application might want to send “local”
broadcast
1.2.3.53 1.2.3.156
host ... DNS
host
IP packet
1.2.3.53 Steps in Sending a Packet
1.2.3.156
router
Mask: 255.255.255.0
What do hosts need to know?
And how do they find out?
• Adapters only understand MAC addresses
– Translate the destination IP address to MAC address
– Encapsulate the IP packet inside a link-level frame
23 24
4
10/16/2012
1.2.3.0/24 5.6.7.0/24
255.255.255.0 1.2.3.19
router router router
28 29
5
10/16/2012
1.2.3.0/24 5.6.7.0/24
255.255.255.0 1.2.3.19
• But: what if IP address not in the table?
– Sender broadcasts: “Who has IP address 1.2.3.156?”
router router router
– Receiver responds: “MAC address 58-23-D7-FA-20-B0”
– Sender caches result in its ARP table
• For the local case, need to determine the
destination’s MAC address 32 33
A A
R R
B B
A A
R R
B36 B37
6
10/16/2012
A A
R R
B38 B39
7
10/16/2012
44 45
What Errors Might A Router See? Which should network tell host about?
• Dead-end: No route to destination • No route to destination?
– Host can’t detect or fix routing failure.
• Sign of a loop: TTL expires • TTL expires?
– Host can’t detect or fix routing loop.
• Can’t physically forward: packet too big • Packet too big (with DF set)?
– And has DF flag set –This
Hostassumes
can adjustwe want
packet to but
size, bind thetell difference
can’t
meaning of packet drops
between congestion dropsand to congestion
MTU drops
• Can’t keep up with traffic: buffer overflowing • Buffer overflowing?
– Transport congestion control can detect/deal with this
• Header corruption or ill-formed packets
• Header corruption or ill-formed packets?
• …. 46 – Host can’t fix corruption, but can fix formatting errors47
8
10/16/2012
• TTL Expired
• ICMP packet sent back to the source IP address
– Includes the error information (e.g., type and code) – Decremented at each hop; generated if 0
– IP header plus 8+ byte excerpt from original packet • Unreachable
– Subtypes: network / host / port
• Source host receives the ICMP packet o (who generates Port Unreachable?)
– Inspects excerpt (e.g., protocol/ports) to identify socket
• Source Quench
– Old-style signal asking sender to slow down
• Exception: not sent if problem packet is ICMP
– And just for fragment 0 of a group of fragments • Redirect
50 – Tells source to use a different local router 51
• Ping:
52 – Simple RTT measurements 53
54 55
9
10/16/2012
Issues with Path MTU Discovery Discovering Routing via Time Exceeded
• What set of values should the sender try? • Host sends an IP packet
– Usual strategy: work through “likely suspects” – Each router decrements the time-to-live field
– E.g., 4352 (FDDI), 1500 (Ethernet),
1480 (IP-in-IP over Ethernet), 296 (some modems) • If TTL reaches 0
– Router sends Time Exceeded ICMP back to the source
• What if the PMTU changes? (how could it?) – Message identifies router sending it
– Sender will immediately see reductions in PMTU (how?) o Since ICMP is sent using IP, it’s just the IP source address
– Sender can periodically try larger values o And can use PTR record to find name of router
1.2.3.7 5.6.7.156
• What if Needs Fragmentation ICMP is lost? host ... DNS host ... DNS
host host
– Retransmission will elicit another one
Time
TTL=1 exceeded
destination
source TTL=2
60 61
10
10/16/2012
11