CS代写 FIT3165 / FIT4165 COMPUTER NETWORKS

FIT3165 / FIT4165 COMPUTER NETWORKS
WEEK 3 – TRANSPORT LAYER – PART 1
Faculty of Information Technology © 2021 Monash University

Copyright By PowCoder代写 加微信 powcoder

Transport Layer

3.1 INTRODUCTION
3.2 TRANSPORT-LAYER PROTOCOLS

INTRODUCTION

Services of Transport layer
• The transport layer is located between the network layer and the application layer.
• The transport layer is responsible for providing services to the application layer;
• it receives services from the network layer.
• In this section, we discuss the services that can be provided by
the transport layer;
• in the next section, we discuss several transport-layer protocols.

Figure: Logical connection at the transport layer

Transport-Layer Services (continue)
❑ Process-to-Process Communication
❑ Addressing: Port Numbers
❑ ICANN Ranges
❖ Well-known ports
❖ Registered ports
❖ Dynamic ports
❑ Encapsulation and Decapsulation
❑ Multiplexing and Demultiplexing
❑ Flow Control
❖ Pushing or Pulling
❖ Flow Control at Transport Layer ❖ Buffers
❑ Error Control
❖ Sequence Numbers
❖ Acknowledgment
❑ Combination of Flow and Error Control
❖ Sliding Window
❑ Congestion Control
❑ Connectionless and Connection-Oriented
❖ Connectionless Service
❖ Connection-Oriented Service
❖ Finite State Machine
❑ Multiplexing and Demultiplexing

Process to process communication
Figure: Network layer versus transport layer

Addressing port numbers
Figure: Port numbers
Figure: IP addresses versus port numbers Figure: Socket address

ICANN Ranges
Figure: ICANN ranges
Internet Corporation for Assigned Names and Numbers (ICANN)

Encapsulation and decapsulation
Figure: Encapsulation and decapsulation

Multiplexing and demultiplexing
Multiplexing and demultiplexing in transport layer means extending the host-to-host delivery service provided by the network layer to a process-to-process delivery service for applications running on the hosts.
Figure: Multiplexing and demultiplexing

Flow and error control at transport layer
Figure: Pushing or pulling
Figure: Flow control at the transport layer
Figure: Error control at the transport layer

☞ The above discussion requires that the consumers communicate with the producers on two occasions:
☞ when the buffer is full and when there are vacancies.
☞ If the two parties use a buffer with only one slot, the communication can be easier.
☞ Assume that each transport layer uses one single memory location to hold a packet. When this single slot in the sending transport layer is empty, the sending transport layer sends a note to the application layer to send its next chunk; when this single slot in the receiving transport layer is empty, it sends an acknowledgment to the sending transport layer to send its next packet.
☞ As we will see later, however, this type of flow control, using a single-slot buffer at the sender and the receiver, is inefficient.

Flow and error control – Sliding Window
Figure: Sliding window in circular format
Figure: Sliding window in linear format

Connectionless and connection oriented services
Figure: Connectionless service
Figure: Connection-oriented service

TRANSPORT LAYER PROTOCOLS

A Simple Protocol
Our first protocol is a simple connectionless protocol with neither flow nor error control. We assume that the receiver can immediately handle any packet it receives. In other words, the receiver can never be overwhelmed with incoming packets. Figure below shows the layout for this protocol.
Figure 3.17: Simple protocol

A Simple Protocol – Flow control
The sender sends packets one after another without even thinking about the receiver.
Figure: Flow diagram of a simple protocol

Stop-and-Wait Protocol
• Our second protocol is a connection-oriented protocol called the Stop-and-Wait protocol, which uses both flow and error control.
• Both the sender and the receiver use a sliding window of size 1.
• The sender sends one packet at a time and waits for an acknowledgment before sending the next one.
• To detect corrupted packets, we need to add a checksum to each data packet. When a packet arrives at the receiver site,
Figure: Stop-and-Wait protocol

Stop-and-Wait Protocol
● Packet 0 is sent and acknowledged.
● Packet 1 is lost and resent after the time-out.
● The resent packet 1 is acknowledged and the
timer stops.
● Packet 0 is sent and acknowledged, but the
acknowledgment is lost.
● The sender has no idea if the packet or the
acknowledgment is lost, so after the time-out, it resends packet 0, which is acknowledged.
Figure: Flow diagram for a Stop and Wait scenario, lost packet and a lost acknowledgement.

Examples (bandwidth-delay product)
Problem: Assume that, in a Stop-and-Wait system, the bandwidth of the line is 1 Mbps, and 1 bit takes 20 milliseconds to make a round trip. What is the bandwidth-delay product?
If the system data packets are 1,000 bits in length, what is the utilization percentage of the link?
The bandwidth-delay product is
= BW × Delay = (1 × 106) × (20 × 10−3) = 20,000 bits.
The system can send 20,000 bits during the time it takes for the data to go from the sender to the receiver and the acknowledgment to come back.
However, the system sends only 1,000 bits. The link utilization is only 1,000/20,000 == 5 percent.
Problem: What is the utilization percentage of the link in the previous example if we have a protocol that can send up to 15 packets before stopping and worrying about the acknowledgments?
The bandwidth-delay product is still the same;
= BW × Delay = (1 × 106) × (20 × 10−3) = 20,000 bits.
Now the system can send up to 15 packets or 15 x 1000 = 15,000 bits during a round trip.
This means the utilization is now 15,000/20,000, or 75 percent. Of course, if there are damaged packets, the utilization percentage is much less because packets have to be resent.

Go-Back-N Protocol
To improve the efficiency of transmission, multiple packets must be in transition while the sender is waiting for acknowledgment.
In this section, we discuss one protocol that can achieve this goal; in the next section,
we discuss a second. The first is called Go-Back-N (GBN) (the rationale for the name will become clear later).
Figure: Send window
Sliding direction
Figure: Sliding the send window

Go-Back-N Protocol (send window size)
Figure : Send window size for Go-Back-N

Go-Back-N Protocol – Flow control diagram -1
Figure: Flow diagram Go Back N

Go-Back-N Protocol – Flow control diagram -1
Figure: Flow diagram Go Back N

Selective-Repeat Protocol
• The Go-Back-N protocol simplifies the process at the receiver.
• The receiver keeps track of only one variable, and there is no need to buffer out-of-order packets; they are simply discarded.
• Another protocol, called the Selective-Repeat (SR) protocol, has been devised.
• Selective-Repeat (SR) protocol, as the name implies, resends only selective packets, those that are actually lost.
Figure 3.36: Selective-Repeat, window size

Selective-Repeat Protocol – Flow diagram
Figure: Flow diagram for Selective Repeat

Using m-bit sequence number, what is the maximum size of the send-receive windows for each of the following protocols:
a) Stop-and-Wait
b) Go-Back-N
c) Selective-Repeat

Bidirectional Protocols
• The previous four protocols discussed earlier were all unidirectional;
• Data packets flow in only one direction and acknowledgments travel in the other direction.
• In real systems, data packets are normally flowing in both directions: from client to server and from server to client.
• This means that acknowledgments are also need to flow in both directions.
• A technique called piggybacking is used to improve the efficiency of the bidirectional protocols.
Figure: Design of piggybacking in Go-Back-N

Internet Transport-Layer Protocols
• A network is the interconnection of a set of devices capable of communication.
• In this definition, a device can be a host such as a large computer, desktop, laptop, workstation, cellular phone, or security system.
• A device in this definition can also be a connecting device such as a router a switch, a modem that changes the form of data, and so on.
Figure: Position of transport-layer protocols in the TCP/IP protocol suite

Some well-known ports used with UDP and TCP

● So far we have discussed
○ Introduction to transport layer
○ Transport Layer protocols
● Next week
○ Transport Layer – part 2
■ TCP and UDP

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com