Download presentation
Presentation is loading. Please wait.
1
Basic Concepts EE 122, Fall 2013 Sylvia Ratnasamy http://inst.eecs.berkeley.edu/~ee122/
2
Administrivia Instructional account forms have been sent by email to registered students (not wait list) you should have them by now email apanda@eecs and sylvia@eecs if you don’t Size of discussion sections raised to 45 Reminder: sections start this Friday
3
Today Basic concepts links packet delays circuit switching packet (datagram) switching Layering (if we have time)
4
Nodes and Links AB
5
Properties of Links Bandwidth (capacity): “width” of the link number of bits sent (or received) per unit time (bits/sec or bps) Latency (delay): “length” of the link propagation time for data to travel along the link (seconds) Bandwidth-Delay Product (BDP): “volume” of the link amount of data that can be “in flight” at any time propagation delay × bits/time = total bits in link bandwidth Latency delay x bandwidth
6
Examples of Bandwidth-Delay Same city over a slow link: BW~100Mbps Latency~0.1msec BDP ~ 10,000bits ~ 1.25KBytes Cross-country over fast link: BW~10Gbps Latency~10msec BDP ~ 10 8 bits ~ 12.5GBytes
7
time=0 Packet Delay Sending a 100B packet from A to B? AB 100Byte packet Time 1Mbps, 1ms Time to transmit one bit = 1/10 6 s Time to transmit 800 bits=800x1/10 6 s Time when that bit reaches B = 1/10 6 +1/10 3 s The last bit reaches B at (800x1/10 6 )+1/10 3 s = 1.8ms Packet Delay = Transmission Delay + Propagation Delay Packet Delay = (Packet Size ÷ Link Bandwidth) + Link Latency
8
Packet Delay Sending a 100B packet from A to B? AB 100Byte packet Time 1Mbps, 1ms 1Gbps, 1ms? The last bit reaches B at (800x1/10 6 )+1/10 3 s = 1.8ms 1GB file in 100B packets The last bit reaches B at (800x1/10 9 )+1/10 3 s = 1.0008ms The last bit in the file reaches B at (10 7 x800x1/10 9 )+1/10 3 s = 8001ms 10 7 x 100B packets
9
Packet Delay: The “pipe” view Sending 100B packets from A to B? AB 100Byte packet Time 1Mbps, 10ms 100Byte packet time BW pkt tx time
10
Packet Delay: The “pipe” view Sending 100B packets from A to B? 1Mbps, 10ms (BDP=10,000) time BW 10Mbps, 1ms (BDP=10,000) time BW 1Mbps, 5ms (BDP=5,000) time BW
11
Packet Delay: The “pipe” view Sending 100B packets from A to B? 1Mbps, 10ms (BDP=10,000) time BW 200B? 1Mbps, 10ms (BDP=10,000) time BW
12
Any questions?
13
Nodes and Links AB
14
What if we have more nodes? One link for every node? Need a scalable way to interconnect nodes
15
What if I have more nodes? One link for all nodes? This is a broadcast network
16
Solution: A switched network Nodes share network link resources How is this sharing implemented?
17
Two forms of switched networks Circuit switching (used in the telephone network) Packet switching (used in the Internet)
18
Circuit switching (1) Node A sends a reservation request (2) Interior switches establish a connection -- i.e., “circuit” (3) A starts sending data (4) A sends a “teardown circuit” message Idea: source reserves network capacity along a path A B 10Mb/s?
19
Circuit Switching: Sharing a Link Time-division Each circuit allocated certain time slots Frequency-division Each circuit allocated certain frequencies time frequency time
20
Time-Division Multiplexing/Demultiplexing Time divided into frames; frames into slots Relative slot position inside a frame determines to which conversation data belongs e.g., slot 0 belongs to orange conversation Slots are reserved (released) during circuit setup (teardown) If a conversation does not use its circuit capacity is lost! Frames 012 3 45012 3 45 Slots =
21
time Timing in Circuit Switching
22
time Timing in Circuit Switching
23
time Timing in Circuit Switching
24
time Timing in Circuit Switching
25
Circuit Establishment time Timing in Circuit Switching
26
Information Circuit Establishment Transfer time Timing in Circuit Switching
27
Information Circuit Establishment Transfer Circuit Teardown time Timing in Circuit Switching
28
Circuit switching: pros and cons Pros guaranteed performance fast transfer (once circuit is established) Cons
29
Information Circuit Establishment Transfer Circuit Teardown time Timing in Circuit Switching
30
Circuit switching: pros and cons Pros guaranteed performance fast transfer (once circuit is established) Cons wastes bandwidth if traffic is “bursty”
31
Information Circuit Establishment Transfer Circuit Teardown time Timing in Circuit Switching
32
Information Circuit Establishment Circuit Teardown time Data transfer Timing in Circuit Switching
33
Circuit switching: pros and cons Pros guaranteed performance fast transfers (once circuit is established) Cons wastes bandwidth if traffic is “bursty” connection setup time is overhead
34
Circuit switching A B Circuit switching doesn’t “route around trouble”
35
Circuit switching: pros and cons Pros guaranteed performance fast transfers (once circuit is established) Cons wastes bandwidth if traffic is “bursty” connection setup time is overhead recovery from failure is slow
36
Circuit switching: pros and cons Pros guaranteed performance fast transfers (once circuit is established) Cons wastes bandwidth if traffic is “bursty” connection setup adds delay recovery from failure is slow [in the telephone network] designed for a specific app
37
Two forms of switched networks Circuit switching (e.g., telephone network) Packet switching (e.g., Internet)
38
Packet Switching Data is sent as chunks of formatted bits (Packets) Packets consist of a “header” and “payload”* © Nick McKeown 2006 01000111100010101001110100011001 1.Internet Address 2.Age 3.Checksum to protect header Header Data headerpayload
39
Packet Switching Data is sent as chunks of formatted bits (Packets) Packets consist of a “header” and “payload”* payload is the data being carried header holds instructions to the network for how to handle packet (think of the header as an interface!)
40
Packet Switching Data is sent as chunks of formatted bits (Packets) Packets consist of a “header” and “payload” Switches “forward” packets based on their headers
41
Switches forward packets to MIT to UW UCB to NYU DestinationNext Hop UCB4 UW5 MIT2 NYU3 Forwarding Table 111010010 MIT switch#2 switch#5 switch#3 switch#4
42
time Timing in Packet Switching payl oad hdrhdr What about the time to process the packet at the switch? We’ll assume it’s relatively negligible (mostly true)
43
time Timing in Packet Switching payl oad hdrhdr Could the switch start transmitting as soon as it has processed the header? Yes! This would be called a “cut through” switch
44
time Timing in Packet Switching payl oad hdrhdr We will always assume a switch processes/forwards a packet after it has received it entirely. This is called “store and forward” switching
45
Packet Switching Data is sent as chunks of formatted bits (Packets) Packets consist of a “header” and “payload” Switches “forward” packets based on their headers
46
Packet Switching Data is sent as chunks of formatted bits (Packets) Packets consist of a “header” and “payload” Switches “forward” packets based on their headers Each packet travels independently no notion of packets belonging to a “circuit”
47
Packet Switching Data is sent as chunks of formatted bits (Packets) Packets consist of a “header” and “payload” Switches “forward” packets based on their headers Each packet travels independently No link resources are reserved in advance. Instead packet switching leverages statistical multiplexing
48
Statistical Multiplexing
49
Data Rate 1 Data Rate 2 Data Rate 3 Three Flows with Bursty Traffic Time Capacity
50
Data Rate 1 Data Rate 2 Data Rate 3 When Each Flow Gets 1/3 rd of Capacity Time Frequent Overloading
51
When Flows Share Total Capacity Time No Overloading Statistical multiplexing relies on the assumption that not all flows burst at the same time. Very similar to insurance, and has same failure case
52
Data Rate 1 Data Rate 2 Data Rate 3 Three Flows with Bursty Traffic Time Capacity
53
Data Rate 1 Data Rate 2 Data Rate 3 Three Flows with Bursty Traffic Time Capacity
54
Data Rate 1+2+3 >> Capacity Three Flows with Bursty Traffic Time Capacity What do we do under overload?
55
Statistical multiplexing: pipe view time BW pkt tx time
56
Statistical multiplexing: pipe view
57
No Overload !
58
Statistical multiplexing: pipe view Transient Overload Not a rare event! Queue
59
Statistical multiplexing: pipe view Transient Overload Not a rare event! Queue
60
Statistical multiplexing: pipe view Transient Overload Not a rare event! Queue
61
Statistical multiplexing: pipe view Transient Overload Not a rare event! Queue
62
Statistical multiplexing: pipe view Transient Overload Not a rare event! Queue
63
Statistical multiplexing: pipe view Queue Transient Overload Not a rare event! Queues absorb transient bursts!
64
Statistical multiplexing: pipe view What about persistent overload? Will eventually drop packets
65
Queues introduce queuing delays Recall, packet delay = tx delay + prop delay With queues (stat. muxing) packet delay = tx delay + prop delay + queuing delay Queuing delay caused by “packet interference” Made worse at high load less “idle time” to absorb bursts think about traffic jams at rush hour
66
Basic Queuing Theory Terminology Arrival process: how packets arrive Average rate A Peak rate P Service process: transmission times Average transmission time (function of packet size) W: average time packets wait in the queue W for “waiting time” L: average number of packets waiting in the queue L for “length of queue” Two different quantities
67
Little’s Law (1961) L = A x W Compute L: count packets in queue every second How often does a single packet get counted? W times Why do you care? Easy to compute L, harder to compute W
68
Statistical Multiplexing is a recurrent theme in computer science Phone network rather than dedicated lines Ancient history Packet switching rather than circuits Today’s lecture Cloud computing Shared datacenters, rather than single PCs
69
Packet Switching Data is sent as chunks of formatted bits (Packets) Packets consist of a “header” and “payload” Switches “forward” packets based on their headers Each packet travels independently No link resources are reserved in advance. Instead packet switching leverages statistical multiplexing allows efficient use of resources but introduces queues and queuing delays
70
Circuit switching: pros and cons Pros guaranteed performance fast transfers (once circuit is established) Cons wastes bandwidth if traffic is “bursty” connection setup adds delay recovery from failure is slow
71
Packet switching: pros and cons Cons no guaranteed performance header overhead per packet queues and queuing delays Pros efficient use of bandwidth (stat. muxing) no overhead due to connection setup resilient -- can `route around trouble’
72
Recap: you should leave this lecture with… A sense of how the basic `plumbing’ works links and switches packet delays (tx, propagation, queuing) statistical multiplexing and queues circuit vs. packet switching Next: back to lofty principles protocols and layering
73
Layering
74
Three (networking) design steps Break down the problem into tasks Organize these tasks Decide who does what
75
Tasks in Networking What does it take to send packets across country? Simplistic decomposition: Task 1: send along a single wire Task 2: stitch these together to go across country This gives idea of what I mean by decomposition
76
Tasks in Networking (bottom up) Bits on wire Packets on wire Deliver packets within local network Deliver packets across global network Ensure that packets get to the destination Do something with the data
77
Resulting Modules Bits on wire (Physical) Packets on wire (Physical) Delivery packets within local network (Datalink) Deliver packets across global network (Network) Ensure that packets get to the dst. (Transport) Do something with the data (Application) This is decomposition… Now, how do we organize these tasks?
78
Dear John, Your days are numbered. --Pat Inspiration… CEO A writes letter to CEO B Folds letter and hands it to administrative aide Aide: Puts letter in envelope with CEO B’s full name Takes to FedEx FedEx Office Puts letter in larger envelope Puts name and street address on FedEx envelope Puts package on FedEx delivery truck FedEx delivers to other company 78
79
CEO Aide FedEx CEO Aide FedEx LocationFedex Envelope (FE) The Path of the Letter 79 Letter Envelope Semantic Content Identity “Peers” on each side understand the same things No one else needs to Lowest level has most packaging
80
The Path Through FedEx 80 Truck Sorting Office Airport FE Sorting Office Airport Truck Sorting Office Airport Crate FE New Crate FE Higher “Stack” at Ends Partial “Stack” During Transit Deepest Packaging (Envelope+FE+Crate) at the Lowest Level of Transport Highest Level of “Transit Stack” is Routing
81
In the context of the Internet Applications …built on… Reliable (or unreliable) transport Best-effort global packet delivery Best-effort local packet delivery Physical transfer of bits
82
Three Observations Each layer: Depends on layer below Supports layer above Independent of others Multiple versions in layer Interfaces differ somewhat Components pick which lower-level protocol to use But only one IP layer Unifying protocol 82
83
Layering Crucial to Internet’s Success Reuse Hides underlying detail Innovation at each level can proceed in parallel Pursued by very different communities 83
84
Distributing Layers Across Network Layers are simple if only on a single machine Just stack of modules interacting with those above/below But we need to implement layers across machines Hosts Routers (switches) What gets implemented where? 84
85
What Gets Implemented on Host? Bits arrive on wire, must make it up to application Therefore, all layers must exist at host! 85
86
What Gets Implemented on Router? Bits arrive on wire Physical layer necessary Packets must be delivered to next-hop Datalink layer necessary Routers participate in global delivery Network layer necessary Routers don’t support reliable delivery Transport layer (and above) not supported 86
87
What Gets Implemented on Switches? Switches do what routers do, except they don’t participate in global delivery, just local delivery They only need to support Physical and Datalink Don’t need to support Network layer Won’t focus on the router/switch distinction When I say switch, I almost always mean router Almost all boxes support network layer these days 87
88
88 Complicated Diagram HTTP TCP IP Ethernet interface HTTP TCP IP Ethernet interface IP Ethernet interface Ethernet interface SONET interface SONET interface host router HTTP message TCP segment IP packet
89
89 Simple Diagram Lower three layers implemented everywhere Top two layers implemented only at hosts Transport Network Datalink Physical Transport Network Datalink Physical Network Datalink Physical Application Host AHost BRouter
90
90 Logical Communication Layers interacts with peer’s corresponding layer Transport Network Datalink Physical Transport Network Datalink Physical Network Datalink Physical Application Host AHost BRouter
91
91 Physical Communication Communication goes down to physical network Then from network peer to peer Then up to relevant layer Transport Network Datalink Physical Transport Network Datalink Physical Network Datalink Physical Application Host AHost BRouter
92
92 Layer Encapsulation Trans: Connection ID Net: Source/DestLink: Src/Dest Appl: Get index.html User AUser B Common case: 20 bytes TCP header + 20 bytes IP header + 14 bytes Ethernet header = 54 bytes overhead
93
Next time. Recap layering Protocols Introduction to the network layer
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.