If the unreachable destination is a network or host, the message is sent by an intermediate gateway. But if the destination is an unreachable port, the destination host sends the message. We discuss ports in Chapter 2. A gateway sends the ICMP Redirect Message to tell a host to use another gateway, presumably because the other gateway is a better choice. This message can be used only when the source host is on the same network as both gateways.
To better understand this, refer to Figure If a host on the X. On the other hand, if a host on the token ring network sent a datagram to G1 , the host could not be redirected to use G2. This is because G2 is not attached to the token ring. When a system receives an echo message, it replies and sends the data from the packet back to the source host. The ping command uses this message. TCP provides reliable data delivery service with end-to-end error detection and correction.
UDP provides low-overhead, connectionless datagram delivery service. Both protocols deliver data between the Application Layer and the Internet Layer.
Applications programmers can choose whichever service is more appropriate for their specific applications. The User Datagram Protocol gives application programs direct access to a datagram delivery service, like the delivery service that IP provides.
This allows applications to exchange messages over the network with a minimum of protocol overhead. UDP is an unreliable, connectionless datagram protocol. Within your computer, UDP will deliver data correctly. UDP uses bit Source Port and Destination Port numbers in word 1 of the message header to deliver data to the correct applications process. Figure shows the UDP message format. Why do applications programmers choose UDP as a data transport service?
There are a number of good reasons. If the amount of data being transmitted is small, the overhead of creating connections and ensuring reliable delivery may be greater than the work of re-transmitting the entire data set. Applications that fit a query-response model are also excellent candidates for using UDP. The response can be used as a positive acknowledgment to the query. Imposing another layer of acknowledgment on any of these types of applications is inefficient.
Applications that require the transport protocol to provide reliable data delivery use TCP because it verifies that data is delivered across the network accurately and in the proper sequence. TCP is a reliable , connection-oriented , byte-stream protocol. Simply stated, a system using PAR sends the data again unless it hears from the remote system that the data arrived OK. The unit of data exchanged between cooperating TCP modules is called a segment see Figure Each segment contains a checksum that the recipient uses to verify that the data is undamaged.
If the data segment is received undamaged, the receiver sends a positive acknowledgment back to the sender. If the data segment is damaged, the receiver discards it. After an appropriate timeout period, the sending TCP module re-transmits any segment for which no positive acknowledgment has been received. TCP is connection-oriented. It establishes a logical end-to-end connection between the two communicating hosts. Control information, called a handshake , is exchanged between the two endpoints to establish a dialogue before data is transmitted.
TCP indicates the control function of a segment by setting the appropriate bit in the Flags field in word 4 of the segment header. The type of handshake used by TCP is called a three-way handshake because three segments are exchanged. Figure shows the simplest form of the three-way handshake. This segment tells host B that A wishes to set up a connection, and it tells B what sequence number host A will use as a starting number for its segments.
Sequence numbers are used to keep data in the proper order. As soon as the connection is established, data can be transferred. It is the end-to-end exchange of data that provides the logical connection between the two systems.
TCP views the data it sends as a continuous stream of bytes, not as independent packets. Therefore, TCP takes care to maintain the sequence in which bytes are sent and received. The TCP standard does not require that each system start numbering bytes with any specific number; each system chooses the number it will use as a starting point. The two ends of the connection synchronize byte-numbering systems by exchanging SYN segments during the handshake.
For security reasons the ISN should be a random number. The Sequence Number in the header of a data segment identifies the sequential position in the data stream of the first data byte in the segment. The acknowledgment tells the sender how much data has been received and how much more the receiver can accept. The Acknowledgment Number is the sequence number of the next byte the receiver expects to receive. The standard does not require an individual acknowledgment for every packet.
The acknowledgment number is a positive acknowledgment of all bytes up to that number. For example, if the first byte sent was numbered 1 and bytes have been successfully received, the Acknowledgment Number would be The Window field contains the window , or the number of bytes the remote end is able to accept.
If the receiver is capable of accepting more bytes, the window would be The window indicates to the sender that it can continue sending segments as long as the total number of bytes that it sends is smaller than the window of bytes that the receiver can accept. The receiver controls the flow of bytes from the sender by changing the size of the window. A zero window tells the sender to cease transmission until it receives a non-zero window value.
The receiving system has received and acknowledged bytes, so the current Acknowledgment Number is The receiver also has enough buffer space for another bytes, so it has advertised a window of The sender is currently sending a segment of bytes starting with Sequence Number The sender has received no acknowledgment for the bytes from on, but continues sending data as long as it is within the window.
If the sender fills the window and receives no acknowledgment of the data previously sent, it will, after an appropriate timeout, send the data again starting from the first unacknowledged byte. In Figure re-transmission would start from byte if no further acknowledgments are received. This procedure ensures that data is reliably received at the far end of the network. TCP is also responsible for delivering data received from IP to the correct application. The application that the data is bound for is identified by a bit number called the port number.
The Source Port and Destination Port are contained in the first word of the segment header. Correctly passing data to and from the Application Layer is an important part of what the Transport Layer services do. This layer includes all processes that use the Transport Layer protocols to deliver data. There are many applications protocols. Most provide user services, and new services are always being added to this layer.
The Network Terminal Protocol, which provides remote login over the network. The File Transfer Protocol, which is used for interactive file transfer. The Simple Mail Transfer Protocol, which delivers electronic mail. The Hypertext Transfer Protocol, which delivers web pages over the network. Also called name service , this application maps IP addresses to the names assigned to network devices. DNS is discussed in detail in this book.
OSPF is used by network devices to exchange routing information. Routing is also a major topic of this book. This protocol allows files to be shared by various hosts on the network. Some protocols, such as Telnet and FTP, can be used only if the user has some knowledge of the network. Other protocols, like OSPF, run without the user even knowing that they exist. We have examined the function of each of these layers.
In the next chapter we look at how the IP datagram moves through a network when data is delivered between hosts. Skip to main content. Start your free trial. Chapter 1. Standardized high-level protocols for consistent, widely available user services.
Protocol Standards. Proposed Standard This is a protocol specification that is important enough and has received enough Internet community support to be considered for a standard. Draft Standard This is a protocol specification for which at least two independent, interoperable implementations exist. Internet Standard A specification is declared a standard only after extensive testing and only if the protocol defined in the specification is considered to be of significant benefit to the Internet community.
Elective This standard is optional. Experimental An experimental RFC is limited to use in research and development.
Historic A historic RFC is outdated and no longer recommended for use. Informational An informational RFC provides information of general interest to the Internet community; it does not define an Internet standard protocol.
A Data Communications Model. Application Layer The Application Layer is the level of the protocol hierarchy where user-accessed network processes reside. Presentation Layer For cooperating applications to exchange data, they must agree about how data is represented. Network Layer The Network Layer manages connections across the network and isolates the upper layer protocols from the details of the underlying network.
Data Link Layer The reliable delivery of data across the underlying physical network is handled by the Data Link Layer. Physical Layer The Physical Layer defines the characteristics of the hardware needed to carry the data transmission signal.
TCP IP Model encourages you to decide how a particular PC ought to be connected with the web and how the data ought to be sent between them. It encourages you to make a virtual network when numerous PC networks are conjunctive. The application layer is the Open System Interconnection layer, which is nearest to the end-user. It implies the Open System Interconnection application layer permits clients to associates with another software application.
The application of the TCP IP model associates with software applications to actualize a communicating part. It chooses if data transmission ought to be in a single path or a parallel path. The transport layer additionally manages the packets to be sent in succession.
The transport layer in the TCP IP model breaks the message into little units to take care of all the more proficiently by the network layer. The transport layer adds header information to the data. The applications can peruse and keep in touch with the transport layer. For example, functions such as splitting, segmenting, or multiplexing of the data are finished by the transport layer. It is otherwise called a network layer. IP is responsible for defining how applications and devices exchange packets of data with each other.
It is the principal communications protocol responsible for the formats and rules for exchanging data and messages between computers on a single network or several internet-connected networks. Its main purpose is to deliver data packets between the source application or device and the destination using methods and structures that place tags, such as address information, within data packets. TCP and IP are separate protocols that work together to ensure data is delivered to its intended destination within a network.
IP obtains and defines the address—the IP address—of the application or device the data must be sent to. TCP is then responsible for transporting and routing data through the network architecture and ensuring it gets delivered to the destination application or device that IP has defined.
In other words, the IP address is akin to a phone number assigned to a smartphone. TCP is the computer networking version of the technology used to make the smartphone ring and enable its user to talk to the person who called them. It was developed by the United States Department of Defense to enable the accurate and correct transmission of data between devices.
It breaks messages into packets to avoid having to resend the entire message in case it encounters a problem during transmission. Packets are automatically reassembled once they reach their destination.
Every packet can take a different route between the source and the destination computer, depending on whether the original route used becomes congested or unavailable.
As a connection based protocol, the TCP establishes and maintains a connection between applications or devices until they finish exchanging data. It determines how the original message should be broken into packets, numbers and reassembles the packets, and sends them on to other devices on the network, such as routers, security gateways, and switches, then on to their destination.
TCP also sends and receives packets from the network layer, handles the transmission of any dropped packets, manages flow control, and ensures all packets reach their destination. A good example of how this works in practice is when an email is sent using SMTP from an email server.
To start the process, the TCP layer in the server divides the message into packets, numbers them, and forwards them to the IP layer, which then transports each packet to the destination email server.
Both the device and server must synchronize and acknowledge packets before communication begins, then they can negotiate, separate, and transfer TCP socket connections. The model represents how data is exchanged and organized over networks.
It is split into four layers, which set the standards for data exchange and represent how data is handled and packaged when being delivered between applications, devices, and servers.
For this reason, it is vital to avoid using public Wi-Fi networks for sending private data and to ensure information is encrypted.
0コメント