operating systems and computer networks...faculty of engineering institute of computer engineering...
TRANSCRIPT
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Operating Systems and
Computer NetworksTCP/IP
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Linux System Structure
Corbet et al, Linux Device Drivers, O‘Reilly , 2005
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Process Control
– load, execute, end, abort, create process (fork),
terminate process,…
File management
– create file, delete file, open, close, read, write,...
Device Management
– request device, release device, read, write,…
Information Maintenance
– get/set time or date, get/set system data,…
Communication
– create, delete communication connection, send,
receive messages, transfer status information,…
Categories of System Calls
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Network Fundamentals
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Types of transmission techniques
Broadcast LinksMulticastingWLANBus-/Ring-System
Point to Point LinksUnicastingLink between Pairs of Computers
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Connection oriented vs. connectionless oriented
Connection orientedTelephoneByte stream
Connectionless orientedPostal systemDatagram
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Unacknowledged vs. Acknowledged Connection
Unacknowledged connectionless service.
– No attempt to recover lost frame
Acknowledged connectionless service.
– Sender receives an acknowledgement for each and every successfully received frame
Acknowledged connection-oriented service.
– A connection is established prior to sending frames
– Sender receives an acknowledgement for each and every successfully received frame
– Sequenced delivery of frames
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Example
Service Primitives:-Listen-Connect-Receive-Send-Disconnect
Connection oriented Service
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Data Transmission in OSI
ApplicationLayer
PresentationLayer
Session Layer
Transport Layer
Network Layer
Data Link Layer
PhysicalLayer
ApplicationLayer
PresentationLayer
Session Layer
Transport Layer
Network Layer
Data Link Layer
PhysicalLayer
BitsDH DT
DataNH
TH DataNetwork
protocol
DataSHTransport
protocol
PH DataSession
protocol
AH DataPresentation
protocol
DataApplication
protocol
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
TCP/IP Model vs OSI Model
Application Layer
Presentation Layer
Session Layer
Transport Layer
Network Layer
Data Link Layer
Physical Layer1
2
3
4
5
6
7 Application Layer
Transport Layer
Internet Layer
Network Layer
OSI TCP/IP
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
The End-to-End Principle
Ford, A., Raiciu, C., Handley, M. & Bonaventure, O., 2013. RFC 6824: TCP Extensions for Multipath Operation with Multiple
Addresses, Internet Engineering Task Force.
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Leon-Garcia, A. & Widjaja, I., 2004. Communiation Networks – Fundamental Concepts and Key Architectures, 2. Ausg., McGraw-Hill.
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Transport Control Protocol - TCP
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Tasks and functions of TCP/IP
Logical addressing: IPv4- (32 Bit) / IPv6-Adressing (128 Bit)
Routing: Next lecture
Error and Flow control: ACK-/NAK-Transmissions
Application support: Software abstraction
Name Resolution: DNS (Domain Name System), works as a translator for Internet Domains to IP-addresses.
TCP IP Overview
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Webserver Listening
Client Server
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Client sends Request
SYN
Client Server
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Server sends Acknowledgment
SYN/ACK
Client Server
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Client sends Acknowledgment
ACK
Client Server
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Connection established
Client Server
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Server reads Request
Client Server
Data 01
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Server reads Request
Client Server
Data 02 Data 01
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Server reads Request
Data 03
Client Server
Data 02 Data 01
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Server send Acknowledgments
Client Server
Data 03 Data 02
ACK 01
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Server send Acknowledgments
Client Server
Data 03
ACK 02ACK 01
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Server send Acknowledgments
Client ServerACK 03ACK 02ACK 01
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Lost Packet
Data 03
Client Server
Data 01Data 02
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Server send Acknowledgments
Client ServerACK 03ACK 01
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
TCP State Machine: Open and Closing
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Most important Transport Layer Protocol on theInternet (developed 1974 by Cerf&Kahn)
Reliable and Connection oriented
Connection between two endpoints
Connection endpoint 5-Tupel<local IP address, local port number, protocol no, remote IP address, remote port number>
Byte stream bidirectional data communication
Connection in TCP
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Sending a file
ApplicationLayer
File
Divide in Segements
Socket
Transport Layer
Send tonext Layer
Network Layer
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
In-order delivery via sequence numbers
Automatic Repeat Request (ARQ) via Acknowledgements of each received packet (ACK)
Checksums for reliable data delivery(Sum of 16-bit words in Ones-complement)
Flow Control to not flood receiver
Congestion Control to not flood the network
Reliability of TCP
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Synchronization of Data between Sender & Receiver
Payload (Byte) increasingly numbered (use first Databyte)
e.g.: DS0: 0, DS1: 1059, DS2: 2118, ......
32-Bit-Sequence Number
Receiver is able to :
reassemble Data in right order
identify gaps or duplicates
TCP Sequencing
Data 03 Data 02 Data 01
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Three Way Handshake
:Host A :Host B
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Sequencing
:Host A :Host BSEQ=0
SEQ=1059
SEQ=2118
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Duplicate ACK & Resending
:Host A :Host B
Tim
er
SEQ=1059
SEQ=0
SEQ=1059
SEQ=2118
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Sending of a Datasegment Start Timer
Timeout of Timer: Datasegment loss Resending of Datasegment
Timeout Calculation:
Timeout = SRTT + 4 RTTVAR
where SRTT = α SRTT + (1 - α) RTT
RTTVAR = β RTTVAR + (1 – β) |SRTT - RTT|
α = 7/8, β = 3/4
Timeout
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Server send Acknowledgments
Client ServerACK 03ACK 01
Timer runs at Client site if no ACK – resending data
Client must buffer packets until ACKed
If packet is lost (or coming late) Server must buffer all incoming packets until problem is solved
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Flow Control
– Sender only sends as much data the receiver can take
– Packet size depends on receiver’s buffer/window(MSS – Maximum Segment Size)
MSS calculated with Maximum Transmission Unit (MTU)
– Value between 64 .. 1460 Byte
Calculation of Receiver Window:
Receiv_wnd = 2 BDP
where BDP = Bandwidth One-Way-Delay
Current Window Size sent by each ACK-Segment
Sliding Window
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
TCP Frame Structure
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Data Transmission – if possible: Maximum Utilization
Prevention of Network Congestion by
– Limiting data flow in the network
– Adjusting the sending buffer/window
Option: Measuring of Segment losses
The more segments error free, the less congestion
Size of Congestion Window correspond to number of possibleBytes the Network can admit
Congestion Control
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Four Algorithms:
1. Slow Start
2. Congestion Avoidance (Additive Increase)
3. Fast Retransmit
4. Fast Recovery
Slow Start-Algorithm: Datasegments sent slowly
Finding out available capacity of network
Not to flood network
Slow Start Threshold = MAX (Flight Size/2 , 2 MSS)
where Flight Size = Size of all unacknowledged Segments onthe Network
Congestion Control
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Congestion Window ≥ Threshold Congestion AvoidanceAlgorithmus
Congestion Avoidance Algorithm: Congestion Windowincreased linearly with one Segment size per RTT
if Packet loss: Slow Start starts again
Congestion Control
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Algorithms Fast Retransmit & Fast Recovery:
decrease Error Detection time
Sender assumes at a timeout that subsequent
packages are lost as well and retransmits them.
Duplicate ACK
ACK with same Sequence Number
Sequence number indicates the package the
receiver is waiting for
Duplicate ACK indicates loss of frames during
transmissions
Congestion Control I
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
If 3 Dup-ACKs then:
Multiple frames lost during transmission
Slow Start Threshold = Congestion Window / 2
Congestion Window = Slow Start Threshold + 3 MSS
Congestion Avoidance Algorithmus continues...
Congestion Control II
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Tanenbaum, A.S. & Wetherall, D.J., 2012. Computernetzwerke, 5. Ausg., München, BRD, Pearson Deutschland GmbH.
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Faculty of Engineering
Institute of Computer Engineering
Prof. Dr.-Ing. Axel Hunger
Operating Systems and
Computer Networks Exercises
Pascal A. Klein & Alexander Maxeinerti.uni-due.de
Sameer Seth, M. Ajaykumar Venkatesulu, TCP/IP Architecture, Design andImplementation in Linux, IEEE Computer Society, 2008
Andrew S. Tanenbaum, Computernetworks, 5th Edition, Pearson, 2012
Cerf, V., & Kahn, R. (5 1974). A Protocol for Packet Network Intercommunication. IEEE Transactions on Communications, 22(5), S. 637-648.
Postel, J. (09/1981). RFC 793, Transmission Control Protocol. Internet Engineering Task Force.
Jacobson, V. (1988). Congestion Avoidance and Control. SIGCOMM '88 Symposium proceedings on Communications architectures and protocols Aug 16-18, 18(4), S. 314–329.
Fall, K., & Stevens, W. (2012). TCP/IP Illustrated, Volume 1, The Protocols (2 Ausg.). Michigan, USA: Pearson Education Inc.
Wireshark, Protocol Analyzer, [Online], 2017, https://www.wireshark.org/.
References