Download presentation
Presentation is loading. Please wait.
Published byArttu Juusonen Modified over 6 years ago
1
COT 5611 Operating Systems Design Principles Spring 2014
Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 3:30 – 5:30 PM
2
Lecture 13 Reading assignment: Last time:
Chapter 7 and 8 from the on-line text The detailed description of the FCFS algorithm on class Web site. Last time: Formal description of the FCFS algorithm 9/16/2018 Lecture 13
3
Today Control mechanisms and decisions in the Internet.
The network layer The end-to-end layers 9/16/2018 Lecture 13
4
Mechanisms to be implemented by protocols of a protocol stack
Error control Flow control Congestion control 9/16/2018 Lecture 13
5
Decisions in the Internet
9/16/2018 Lecture 13
6
The network layer The network layer transports packets
A network can be viewed as consisting of Network core – carries out segments from one communicating entity to another Network periphery – hosting the communicating entities at attachment points The network core consists of routers which forward packets using routing tables The entities at the periphery of the network use the transport service provided by the core to communicate with one another. For a host at the periphery of the network: the input for network layer on is a segment in a segment buffer at the transport layer. The output is a link layer buffer. Addressing – each communicating entity must have a unique address. The network layer transports packets The network layer communicates with the transport layer the data link layer 9/16/2018 Lecture 13
7
9/16/2018 Lecture 13
8
Encapsulation 9/16/2018 Lecture 13
9
9/16/2018 Lecture 13
10
9/16/2018 Lecture 13
11
The forwarding table at the nodes
Contains pairs (destination, link) A link is identified by a number. The ids of all links terminating at a node are determined by that node. A link connecting two nodes may have different ids, one at each end. 9/16/2018 Lecture 13
12
Forwarding table at node A
9/16/2018 Lecture 13
13
Forwarding table at node G
9/16/2018 Lecture 13
14
How to construct efficient forwarding tables
Path vector exchange Path vector a table providing a path to a destination in the network Each node maintains in addition to the forwarding table a path vector The algorithms consists of two steps Path advertizing Path selection A node learns about optimal paths 9/16/2018 Lecture 13
15
Initial state of path vector for node G
G starts with a path vector that contains just one item, an entry for itself 9/16/2018 Lecture 13
16
Path vectors received by G in the first round
9/16/2018 Lecture 13
17
First round path vector and forwarding table for G
9/16/2018 Lecture 13
18
Path vectors received by G in the second round
9/16/2018 Lecture 13
19
Second-round path vector and forwarding table for G
9/16/2018 Lecture 13
20
Sketch of path vector algorithm implementation
9/16/2018 Lecture 13
21
9/16/2018 Lecture 13
22
9/16/2018 Lecture 13
23
Requirements for routing algorithms
Routing algorithms should be dynamic and deal with: Topological changes: links go down and new links are added Congestion Run asynchronously Converge rapidly Avoid oscillatory behavior Ensure that no packet bounces around forever: add a hop count in the network header 9/16/2018 Lecture 13
24
Flat versus hierarchical addressing schemes
The scheme we discussed so far is based on flat addresses and has disadvantages: Each attachment point must have a unique address and the number of attachment points is equal to the number of systems connected to the network The number of path vectors increases linearly with the size of the network. Hierarchical addressing: e.g., two levels Region Address of the station/node within the region 9/16/2018 Lecture 13
25
Hierarchical addressing with two levels
9/16/2018 Lecture 13
26
Hierarchical addressing: advantages/disadvantages
Reduces the number of path vectors; a router for one region needs only to advertize a single path vector. Assignation of network addresses is manageable: a central authority assigns region addresses station addresses are assigned by a regional authority. The table lookup more complicated: (1) extract the region (2) forward to another region or forward within own region. The path may no longer the shortest, the information provided by the path vector is less accurate. The network addresses are location dependent. A mobile device must get a new address when it is connected in a different location. 9/16/2018 Lecture 13
27
Physical and logical addresses
All devices have a physical address of the interface Must obtain a logical address ARP – address resolution protocol is a protocol used by the Internet Protocol (IP), specifically IPv4, to map IP addresses to the hardware addresses used by a data link protocol. ARP operates only across the local link that a host is connected to. Types of ARP messages ARP request ARP response RARP request RARP response 9/16/2018 Lecture 13
28
Internet Protocol (IPv4) over Ethernet ARP packet
bit offset 0 – 7 8 – 15 Hardware type (HTYPE) 16 Protocol type (PTYPE) 32 Hardware address length (HLEN) Protocol address length (PLEN) 48 Operation (OPER) 64 Sender hardware address (SHA) (first 16 bits) 80 (next 16 bits) 96 (last 16 bits) 112 Sender protocol address (SPA) (first 16 bits) 128 144 Target hardware address (THA) (first 16 bits) 160 176 192 Target protocol address (TPA) (first 16 bits) 208 9/16/2018 Lecture 13
29
Dynamic IP address assignment –DHCP servers
9/16/2018 Lecture 13
30
From Wide Area Networks (WAN) to Local Area Networks (LAN) – the Ethernet
9/16/2018 Lecture 13
31
Ethernet frame 9/16/2018 Lecture 13
32
9/16/2018 Lecture 13
33
9/16/2018 Lecture 13
34
9/16/2018 Lecture 13
35
Internet addresses Internet provides a layered naming environment.
Internet address= Network number + host numbers Most network numbers are global names. Network 10 reserved for private networks 9/16/2018 Lecture 13
36
Network address translation
Private networks NAT (Network Address Translators) map host’s private address to/from a temporarily assigned public address. Problems Communications may involve multiple parties with the addresses buried into application protocols The router running NAT is a bottleneck What if two private organizations merge? 9/16/2018 Lecture 13
37
Network layer errors Messages originate at the network layer delivered to the end-to-end layer. Packets sent to the sender of the message with an error code: Packets are discarded – the router has depleted its buffer space The buffers of a router are depleted rapidly – stop sending The region identifier is invalid The station identifier is invalid The end type identifier is not valid The packet is larger than the MTU The packet hop has been exceeded The error packets include also a copy of the doomed packet The network layer implements a best-effort policy. It would be too complicated to provide guarantees of service. There is no message regarding packets dropped. It would only increase congestion!! ICMP – Internet Control Message Protocol to ping a host. Hop limit “hope limit exceeded” error message. 9/16/2018 Lecture 13
38
The network/transport interface
9/16/2018 Lecture 13
39
End-to-end layer Applications are too diverse to have a unique end-to-end protocol End-to end multiplexing is more complicate: You can have multiple instances of the same application running Ports – logical end points for an end-to end protocol SEND_MESSAGE (destination, service_port,reply_port,message) DELIVER_MESSAGE(source, reply_port,message) We need to identify individual segments by sequence numbers. Connection-oriented versus connectionless communication, Asymmetry of connection oriented end-to-end protocols: the server accepts the establishment of connections; the client initiates a connection. Transport protocols operate between two attachment points TCP UDP Request-response protocol RTP – Real-Time Transport protocol. 9/16/2018 Lecture 13
40
9/16/2018 Lecture 13
41
IPV4 and IPv6 formats 9/16/2018 Lecture 13
42
3-way handshake in TCP 9/16/2018 Lecture 13
43
Once delivery protocols
Persistent sender It requires the sender to maintain state in the form of a table including the sequence numbers of segments sent but not acknowledged yet. Limited number of retrys. Provide the assurance that If possible to get through messages will be delivered If not possible to confirm delivery the application will know; the sender Does not provide any assurance about duplicates Round Trip Time Timers could trigger retransmission Static timers RTT Adaptive timers Exponential backoff. Exponentially weighted moving average using a decay factor 9/16/2018 Lecture 13
44
At most once delivery protocols
Requires both the sender and the receiver to maintain state. Nonces segments that have been received and passed to the application layer The receiver must maintain a table of previously seen nonces. The list of nonces may grow; it may never be possible to delete the last nonce Long messages need to be reassembled from out of order segments 9/16/2018 Lecture 13
45
Reliable transport protocols
Data integrity assurance that the received message contains precisely the same information as the one sent. Sender adds trailer containing a checksum; Receiver computes the checksum and verifies that it is the same as the value in the trailer Should send a NAK if they do not correspond? What if the address of the sender was damaged? There is a check sum at the link layer but is this suffient? Reliable transport protocols protocol with a persistent sender and with support for data integrity. 9/16/2018 Lecture 13
46
Flow control Ensure that the sender, the communication channel, and the receiver could work at the same pace. The bottleneck could be any of them Stop and wait protocols (lock step) Overlapped transmission Window based – send a range of frame. The protocol: Sender – tell me how many frames I could send Receiver – send 100 frames Window based protocols Fixed window size Variable window size 9/16/2018 Lecture 13
47
Lock-step-transmission (send segment and wait for acknowledgment)
A message with N segments requires N round-trip times. 9/16/2018 Lecture 13
48
Overlapped transmission
The sender needs to maintain a list of segments sent. Remove a segment from this list when it gets an acknowledgment for it. 9/16/2018 Lecture 13
49
Flow control with a fixed window
The sender asks permission to send and the receiver responds with a window size; the sender sends all the data in the window size until it receives permission to send more. The receiver consumes the data in its window and then sends permission to send more. Problems: (i) missing permission message leaves the sender blocked; (ii) duplicate permission message. 9/16/2018 Lecture 13
50
Acknowledgments Purposes for an acknowledgment
OK to stop the timer associated with this segment OK to release the buffer holding a copy of the segment OK to send another segment The segment has been accepted The work requested in the acknowledged segment has been completed. A packet may carry several types of acknowledgments Piggybacking 9/16/2018 Lecture 13
51
Sliding window and self-pacing
Sliding window a window that can have space added to it. Once a segment buffer is freed the receiver should send the permission to advance the window. Bottlenecks that affect the flow control Sender’s rate of sending data Receiver‘s rate of accepting data The transmission capacity of the network RTT (round-trip time) Regardless of the bottleneck the solution is: Window size > = RTT x bottleneck data rate Self-pacing the rate at which the window adjusts itself to the bottleneck data rate Timer setting based on an estimation of the RTT For packet retransmission err by being too large to avoid unnecessary retransmissions For the window size err by being too small to avoid too large buffers for large window sizes 9/16/2018 Lecture 13
52
Jitter control Jitter variation of the end to end delay.
Important for real-time applications such as audio and video streaming. Acceptable failure rate e.g., we may miss one out of 100 frames A standard TV consumes a “frame” every msec. Strategy at the receiving site delay all arriving segments to make it look as all had the maximum allowable delay. Data buffering: Construct a histogram of the segment delivery delay (nr. of segments vs. delay). Choose the acceptable failure rate e% Determine Dlong the delay to ensure that (1-e) segment will be delivered in less than Dlong Determine Dshort the shortest delay observed Call Dheadway the average time between segments The number of buffers is N= (Dlong- Dshort)/ Dheadway 9/16/2018 Lecture 13
53
Managing shared resources
Congestion - a complex phenomena leads to wasting of resources congestion collapse Managing resources in a network rather complex More than one resource Congestion collapse occurs more easily Limited options to reduce capacity The means to reduce congestion are difficult to implement Feedback path is long Source of the traffic must be able to reduce the load willing to cooperate 9/16/2018 Lecture 13
54
9/16/2018 Lecture 13
55
Cross-layer cooperation
Feedback Source quench Congested routers add a bit in the packet header indicating congestion Discard a packet Control Automatic rate adaptation requires an estimation of the RTT 9/16/2018 Lecture 13
56
Congestion control in TCP
Slow start Duplicate acknowledgments Equilibrium Additive increase Multiplicative decrease 9/16/2018 Lecture 13
57
Bandwidth and latency 9/16/2018 Lecture 13
58
Application requirements
9/16/2018 Lecture 13
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.