Transport Layer protocol Flashcards
Extra Notes from the Book
Transmission Control Protocol Brief…
It is a full-featured, connection-oriented, reliable Transport protocol for TCP/IP apps.
It provides a transport layer addressing that allows multiple software applications to simultaneously use a single IP address and it allows a pair of devices to establish a virtual connection and the pass data Bi-directionally
User Datagram Protocol (UDP)
It is a very simple protocol in contrast to TCP. It provides transport layer addressing just like TCP but little else. It is barely even a wrapper protocol that provides a way for applications to access IP.
No connection is establishes, transmissions are unreliable and data can be lost.
Was ist TCP und was macht es?
TCP - Transmission Control Protocol
- Verbindungsorientiertes Protokoll
- Garantiert eine zuverlässige Verbindung über ein unzuverlässiges Netzwerk (reliable vs unreliable)
TCP Multiplexing:
TCP verwendet sog. sockets
How does the IP layer know which Datagramms go where if they all have the same IP address?
Protocol Field - it is included in the header of each IP Datagram. The protocol field tells the IP to pass data to either TCP/UDP as appropriate
TCP/UDP must figure out which process to send data to. We need an additional addressing element for this. What is it?
It is a transport layer address called a port
How many types of port do we have? How many bits in length are the TCP/UDP port Numbers?
Source port and destination port.
- 16 bits in length
How does transport layer addressing (port addressing) work in TCP and UDP? - Step by step **2 main steps
- Sending datagrams.
- An app specifies the source and destination port it wishes to use for the communication.
- The port numbers are encoded into the TCP/UDP header, depending on the transport layer protocol the app is using - determined in the protocol field of the IP Datagrams - Receiving Datagrams - The IP software receives a datagram and decides which protocol the datagram belongs to.
TCP/UDP receive the datagram and passes its contents to the appropriate process based on the destination port number…
What is the overall identifier of a TCP/IP application process on a device?
A socket: It is the combination of its IP address and port number
How are sockets specified? Writing format?
:
or you can resolve a name to an IP address using DNS, then…the socket is specified like so…
:
Each device can have multiple active TCP connections at a time . How is each connection uniquely identified?
Using the combination of the Client socket and the server socket, which contains 4 elements: Client IP address and port and Server IP address and port. e.g ( 41.199.222.3:80, 177.41.72.6:3022)
Why doesn’t UDP use connections?
It’s a connectionless protocol!
TCP Data packaging: Explain the process in 6 steps:
- TCP gets bytes from an application
- TCP sends them using a network layer protocol(IP in this case)
**IP is a message oriented protocol, it is not stream oriented.
- TCP had taken the stream from the application and divide it into discrete messages for IP
* *These messages are called TCP Segments** - IP treats the TCP segments like all other discrete messages for transmission. It places them into datagrams and transmits them to the destination device
- The recipient unpackages the segments and passes them to TCP.
- TCP converts the packages back to a byte stream in order to send them to the Application
TCP Datenübertragung
- Nimmt Daten vom Application Layer entgegen
- TCP-Sender teilt Daten in Segmente
- TCP-Empfänger assembliert Segmente zu Data Streams
- Data Stream wird an den Application Layer weitergereicht
TCP Verbindung diagram**
- PDF, also on page 730 in the book
TCP Übertragung Diagramm
- Wer assembliert empfangene Segmente?
- Wie heißen die assemblierte Segmente?
- An wem wird Data stream übergeben?
- Empfänger
- Data stream
- Data stream wird an Applikation übergeben.
Draw TCP Header Diagram with all components…
SYN Flag in TCP Header:
wofür steht SYN?
Was macht der SYN?
- Synchronise Flag
2. Inttiiert eine TCP Verbindung
Wie antwortet der Server im Normalfall als Bestätigung?
Mit SYN-ACK
Synchronisation von Sequence Numbers:
Wozu brauchen wir das
notwendig für die Fehlererkennung
ACK im TCP header.
Wofür steht ACK?
Was macht der ACK Flag?
Acknowledgement Flag
Bestätigt den Empfang einer Nachricht.
Bsp. TCP 3 way Handshake
FIN im TCP Header.
Wofür steht FIN?
wozu brauchen wir den Flag?
- Schlussflag(Finish)
- signalisiert dem TCP Gegenüber einen Verbindungsabbau
- Dient zur Freigabe der TCP Verbindung
- Zeigt dem Empfänger, das es keine weiteren Daten vom Sender Kommen
PSH(PSH BIT) im TCP Header.
Wofür steht PSH?
wozu brauchen wir den Flag?
- Empfänger sammelt Daten im TCP Buffer
- Ist der Buffer voll, werden die Daten an die Applikation übertragen
**Problem: Echtzeichtapplikationen (z.b.: telnet, ssh)
- PSH-Flag sorgt dafür, dass die Daten sofort an die Applikation weitergegeben werden (unabhängig vom Füllstand des Buffers)
- Umgeht damit den Buffer von Sender und Empfänger