-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathLecture-8.txt
More file actions
86 lines (75 loc) · 2.74 KB
/
Lecture-8.txt
File metadata and controls
86 lines (75 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
###Lecture 8
####Designing the IP Header
- Think of the IP as an interface
- between the source and destination end-systems
- between the source and network (routers)
- Designing an interface
- what task(s) are we trying to accomplish
- what information is needed to do it?
- Header reflects information needed for basic tasks
####What information do we need?
- Parse packet
- IP version number (4 bits), packet length (16 bits)
- Carry packet to the destination
- Destination's IP address (32 bits)
- Deal with problems along the way
- loops: TTL (8 bits)
- corruption: checksum (16 bits)
- packet too large: fragmentation fields (32 bits)
- Accomodate evolution
- version number (4 bits) (+ fields for special handling)
- Specify any special handling
- ToS (8 bits)
- Options (variable length)
#####Preventing Loops (TTL)
- Forwarding loops cause packets to cycle for a long time
- Left unchecked would accumulate to consume all capacity
- Time-to-Live (TTL) Field (8 bits)
- decremented at each hop, packet discarded if reaches 0
- ...and "time exceeded" message is sent to the source
#####Header Corruption (Checksum)
- Checksum (16 bits)
- Particular form of checksum **over packet header**
- If not correct, router discards packets
- So it doesn't act on bogus information
- Checksum recalculated at every router
- Why?
- Why only header?
#####Fragmentation
- Every link has a "Maximum Transmission Unit" (MTU)
- largest number of bits it can carry as one unit
- A router can split a packet into multiple "fragments" if the packet size exceeds the link's MTU
- Must reassemble to recover original packet
#####Special handling
- "Type of Service" (8 bits)
- also called "Differentiated Services Code Point (DSCP)"
- allow packets to be treated differently based on needs
- e.g., indicate priority, congestion notification
- has been redefined several times
#####Options
- Optional directives to the network
- not used very often
- 16 bits of metadata + option-specific data
- Examples of options
- Record Route
- Strict Source Route
- Loose Source Route
- Timestamp
---
####Parse packet
- Header length (4 bits)
- Number of 32-bit words in the header
- Typically "5" (for a 20-byte IPv4 header)
- Can be more when IP options are used
####What are these tasks? (at the destination end-system)
- Tell destination what to do with the received packet
- Transport layer protocol (8 bits)
- Get responses to the packet back to the source
- Source IP address (32 bits)
#####Telling End-Host how to handle packet
- Protocol (8 bits)
- identifies the higher-level protocol
- important for **de-multiplexing** at receiving host
- Most common examples
- E.g., "6" for the Transmission Control Protocol (TCP)
- E.g., "17" for the User Datagram Protocol (UDP)