Lecture 3 Flashcards
Transport Layer
What does the Transport layer do?
It provides logical communication between processes.
The sender breaks the message into segments for the network layer below it to use. And the receiver is passed the segments by its network layer, and resembles the segments into a message and passes it to its ends application layer for processing.
What is the difference between the network layer and the transport layer?
The network layer us logical communication between hosts.
The transport layer is logical communication between processes.
What is the Internet’s network layer protocol called?
Internet protocol (IP)
What is multiplexing?
Multiplexing happens at the sender. It consists of handling data from multiple sockets and adding transport headers for demultiplexing at the receiver.
What is demultiplexing?
Happens at the receiver/destination host. It uses the deader information of a packet to deliver the received segments to the correct sockets.
The destination IP address is used to get the datagram to the correct host and the destination port number contained in the datagram gets it to the correct socket to be sent.
What does an IP datagram contain?
- Source port number
- destination port number
- other unspecified header fields
- the payload or message
Explain connectionless demultiplexing.
It uses UDP sockets.
All the data needed for sending the datagrams is store within the datagram as header lines. The client sents the message to the socket with the address and port number of the destination (The socket implicitly adds a return address and port). When the host receivers the segment, it uses the address and port number to sent it through the socket of that port number to the destination. Due to there being no connection the server extracts the client address and port number sent through the datagram.
Explain connection oriented demultiplexing.
Uses TCP sockets.
A TCP socket is identified by a 4 tuple value (Source IP and port number, and the destination IP and port number). The receiver uses all four values to sent the segment to the correct socket.
Why does UDP exist?
For efficiency:
- no handshaking reduces overhead
- smaller segment header (only 8 bytes instead of 20)
For simplicity:
- No connection needed
- there is no Congestion control required
What are the 4 fields of a UDP header?
- The port numbers used in demultiplexing
- The host address handled by the IP
- The length (Total number of bytes in the segment)
- A checksum for basic error detection
How is the checksum transmitted in UDP?
The sender treats the segment contents as a 16 bit integers. It calculates the sum of the segments added together using binary addition. Puts the 1’s compliment of the sum into the checksum field (Makes it the flipped version of the sum answer e.g. 10011011 is the 1s compliment version of 01100100).
The receiver also treats the segment as a 16 bit integer, and also treats the checksum as a 16 bit integer. It also calculates the sum of the checksum and the data. The sum should equal all 1s.if this is true then no errors detected, but if it is false there must have been an error in transmission.