In general a packet follows the 5 layer-structure.
L1: Physical Layer (Ethernet or coaxial cable)
L2: Datalink Layer (Ethernet or WIFI)
L3: Network Layer (IP)
L4: Transport Layer (TCP, UDP)
L5: Application Layer (e.g. HTTP)
UDP advantages:
smaller packet sizes
UDP header: 8 bytes
TCP header: 20 bytes
Connectionless (you don't have to create a connection for sending something)
More control, when data is sent
TCP:
Connection needed
It's used, where no data loss can be tolerated!
L1: Physical Layer (Ethernet or coaxial cable)
L2: Datalink Layer (Ethernet or WIFI)
L3: Network Layer (IP)
L4: Transport Layer (TCP, UDP)
L5: Application Layer (e.g. HTTP)
UDP advantages:
smaller packet sizes
UDP header: 8 bytes
TCP header: 20 bytes
Connectionless (you don't have to create a connection for sending something)
More control, when data is sent
TCP:
Connection needed
It's used, where no data loss can be tolerated!
Questions & Answers:
- What is the purpose of the transport layer?
One application can use multiple ports at the same time, if it wants.
For instance, an application reserves port4917 for sending an message to another machine. This message is passed on to the transport layer. The message is packed in a segment, which has the source (port4917) and the destination( port80) in it.
Then this is passed on to the network layer.
On the receiver site, the segment with the message passes from the network layer to the transport layer. There the segment will be unpacked, so the message can move to the destination port (port80).
- How is the PDU (protocol data unit) called in the transport layer?
- What has to be done before the PDU from the transport layer is passed to the network layer?
- Why can packets containing UDP be much smaller than that containing TCP?
- What is the main charactersitic of a connection-oriented transmission?
- What happens at UDP and TCP when a segment gets corrupted?
At UDP lost packets are not retransmitted
- What happens in UDP when an older segments arrives after a newer one?
- Explain the term "congestion control". What does it mean when a network is "congested"?
Congested: when the network is overloaded
- What are the key characteristics of TCP?
It offers retransmission, UDP not!
It's used for file transfers, remote access,...
- Is the checksum mandatory in UDP?
In UDP, the checksum is just mandatory in IPv6.
- Which disadvantages does TCP show over UDP?
Data doesn't always get send out immediately (cause: congestion control)
Bigger overhead (Retransmission of packets, acknowledgement of packets
Which transport layer protocol is used in realtime communication applications (Skype, VoIP)?
UDP, also for video streaming, where an amount of package-loss can be ok.
- What's the difference between a stream oriented and a message oriented protocol?
The application sends data in distinct chunks
A stream-oriented protocol is TCP:
Used as a continuous flow of data
Split up in chunks by TCP
Phone conversation
- When is it better to use TCP rather than UDP?
TCP 3-way-handshake
The transmitter asks the recipient, if he wants to setup a connection.
Then the recipient replies to this request of the transmitter.
When the transmitter receives the request-package, it sends an acknowledge to the recipient.
- What is the TCP window size?
- How many bits are used for sending the sequence number? Why does the sequence number start with a random number?
- By which number is the sequence number incremented when the sender is acknowledging the SYN(Synchronized Sequence Number) packet from the receiver?
Keine Kommentare:
Kommentar veröffentlichen