Sunteți pe pagina 1din 4

Chapter 3:

3.1 Introduction and Transport-Layer Services


logical communication - the connection between two hosts is as if both hosts were directly connected, when in reality they could be communicating through many routers and other link types as far away as possible. Transport -layer protocols ensure that both hosts do not need to be connected directly in order to communicate with each other. Applies only between processes. segment - a message from the sending host that is converted and broken into smaller pieces by the transport-layer. The transport-layer adds transport-layer headers to each piece of data, then sends the segment to the network-layer protocol so it may be added to a network-layer packet (datagram) and sent to the destination. The transport-layer data is not acted on by network routers. Instead, the transportlayer on the receiving side extracts the transport-layer segment data and processes the data so it may be used by the receiving application. Network applications may use more than one transport-layer protocol, such as TCP or UDP.

3.1.1 Relationship Between Transport and Network Layers


The network layer provides logical communication between hosts. Analogy: Two houses, A and B, send mail to each other. The post office delivers mail to house A and house B. Person A receives the mail and disperses it to its recipients within the house, and Person B does the same thing for their home. The post office provides logical communication to Person A and Person B, and Person A and Person B provide logical communication to the mail recipients in their home. application messages = letters in envelopes processes = people within each home (not Person A or Person B) hosts = houses transport-layer protocol = Person A and Person B network-layer protocol = postal service Different transport-layer protocols may function differently than the way seen in this model. For example, some protocols are less reliable than others and may result in lost or corrupted data. Transport-layer protocols are often affected by the limitations of the underlying network-layer protocol. For example, if the network-layer protocol cannot provide

delay or bandwidth guarantees for transport layer segments between hosts, then the transport-layer protocol cannot provide delay or bandwidth guarantees for application messages between processes. However, the transport-layer protocol is capable of providing services that the network-layer protocol may not provide, such as reliable data transfer if the networklayer protocol is unreliable (loses, damages, or duplicates packets), and encryption to prevent intruders from reading application messages, even if the network-layer protocol cannot guarantee segment confidentiality.

3.1.2 Overview of the Transport Layer in the Internet


A transport-layer packet for TCP is referred to as a segment. A transport-layer packet for UDP is referred to as a datagram. IP - Stands for Internet Protocol. Provides logical communication between hosts. Provides best-effort delivery service - makes its "best effort" to deliver segments between communicating hosts, but makes no guarantees. In particular, IP does not guarantee orderly delivery of segments and does not guarantee the integrity of the data. For this reason, IP is called an unreliable service. Note: Each host has an IP address. The most fundamental responsibility of UDP and TCP is to extend IP's delivery service between two hosts to a delivery service between two processes on the end systems. This is called transport-layer multiplexing and demultiplexing. UDP and TCP provide integrity checking by including error-detection fields in their segments' headers. UDP only provides multiplexing/demultiplexing and error checking, so it is said to be an unreliable service because it does not guarantee data will be sent intact to the destination. TCP provides the same service as UDP along with several additional services such as reliable data transfer (the use of flow control, sequence numbers, acknowledgements, and timers) to ensure data is deliver from the sending process to the receiving process correctly in order. TCP converts IP's unreliable service between end systems into a reliable data transport service between processes. TCP also provides congestion control, which prevents excessive traffic between hosts by regulating the amount of connections that can be made and sharing bandwidth equally between all connections. This is not provided by UDP.

3.2 Multiplexing and Demultiplexing


Transport-layer data is delivered to an intermediary socket. Sockets are identified uniquely depending on whether the socket is a UDP or TCP socket.

Demultiplexing: the delivery of transport-layer segments to their correct socket. Each segment is assigned a source port number and destination port number. When the segment arrives at the host, the transport layer examines the destination port number in the segment and sends it to the corresponding socket. Multiplexing: the gathering of data pieces at the source host from different sockets, encapsulation of each data piece with header information to create segments, and passing of the segments to the network layer. Source port number field: segment field that identifies which port the segment came from. The source port number is extracted from the segment by the destination host, then a response is sent using the source port number as the destination port number. Destination port number field: segment field that identifies which port the segment should be delivered to. Well-known port numbers: port numbers from 0-1023. Restricted and reserved for well-known application protocols like HTTP (80) and FTP (21). UDP sockets are identified by two numbers: destination IP address and destination port number. TCP sockets are identified by four numbers: source IP address, source port number, destination IP address, and destination port number. Segments sent to Web servers always have a destination port number of 80.

3.3 Connectionless Transport: UDP


UDP is preferable to TCP in situations where congestion control is not preferred, such as with real-time applications that require a minimum sending rate. The application may apply additional functionality beyond UDP's barebones delivery service. It is also preferable when no connection establishment is needed, such as for DNS, or when a maintained state of connection is not necessary. Finally, UDP segments only have 8 bytes of header overhead, whereas TCP packets have 20 bytes. A checksum is used by the receiving host to check for errors. It is used to determine

whether bits within the UDP segment have been altered during delivery by performing the 1s complement of all sum of all the 16-bit words in the segment, with any overflow encountered during the sum being wrapped around. UDP segments with errors are handled differently depending on the application - some discard the segments, while others warn that the segment is damaged, and some don't do anything.

S-ar putea să vă placă și