Data Communication

Published on January 2018 | Categories: Documents | Downloads: 50 | Comments: 0 | Views: 447
of 12
Download PDF   Embed   Report

Comments

Content

Transmission Control Protocol The Transmission Control Protocol (TCP) is one of the core protocols of the Internet Protocol Suite. TCP is so central that the entire suite is often referred to as "TCP/IP". Whereas IP handles lower-level transmissions from computer to computer as a message makes its way across the Internet, TCP operates at a higher level, concerned only with the two end systems, for example a Web browser and a Web server. In particular, TCP provides reliable, ordered delivery of a stream of bytes from one program on one computer to another program on another computer. Besides the Web, other common applications of TCP include e-mail and file transfer. Among its management tasks, TCP controls message size, the rate at which messages are exchanged, and network traffic congestion.

1- The TCP/IP Layers The TCP/Ip model organizes the communication task into five relatively independent layers:

• • • • •

Physical layer / Link Layer Network access layer Internet layer Transport layer Application layer

1.1- Physical layer The physical layer covers the physical interface between a data transm,ission device and a transmission medium or network.it is fconcerned with specifying the nature of the signals,the data rate, and the related matters.

1.2- Network access layer The network access layer is concerned with the exchange of data between an end system and the network to which it is attached.The sending computer must provide the destination address to route the data to the destination.

1.3- Internet layer The internet layer is used when two devices are attached to different networks, procedures are needed to allow data to traverse multiple interconnected networks.the internet protocol is used in this layer to provide the routing fenction across the multiple networks.this protocol is not only implemented on the end systems but also in routers.

1.4- Transport layer

The transport layer is responsible for the reliable and transparent transfer of data at the end points.the transmission control protocol is the most commonly used protocol in this layer.

1.5- Application layer The application layer contains the logic needed to support the various user applications.for each different types of application, such as file transfer, a separate module is needed that is peculiar to that application.

2- Comparison of TCP/IP and OSI: OSI Application

TCP/IP Application

Presentation Session Transport Transport

Network

Internet

Network Access Data Link

Physical

Fig : 1

Physical

Comparison of OSI and TCP/IP

3- Operation of TCP/IP:

Host A

Host B

App Y

App X

Global network address Network attachment point address

TCP IP Network access protocol Physical

IP

NETWORK 1 NAP1

Fig : 2

App X

Logical connection

TCP IP Network access protocol Physical

App Y

Port of Service access point

NETWORK 2 NAP2

TCP/IP Model

4- Layer names and number of layers in the literature The following table shows the layer names and the number of layers in the TCP/IP model as presented in widespread university course textbooks on computer networking used today.

Forouzan

Comer, Kozierok

Stallings Tanenbaum

Kurose

Cisco Academy

Arpanet Reference Model 1982

Five layers

Five layers

Five layers Four layers

Four layers Four layers

Three layers

L5

Application

Application Application Application

Application Application

Application/Process

L4

Transport

Transport

Host-to-host Transport or transport

Transport

Transport Host-to-host

L3

Network

Internet

Internet

L2

Data link

Data link (Network interface)

Network access

(Hardware)

Physical

L1

Physical

Internet

Internet

Host-to-network Link

5- The Internet Protocol Suite 5.1- Application Layer

              

BGP DHCP DNS GTP HTTP IMAP IRC MGCP NNTP FTP RTP RIP SMTP SNMP TLS/SSL

Border Gateway Protocol Dynamic Host Configuration Protocol Domain Name System GPRS Tunneling Protocol Hyper Text Transfer Protocol Internet Message Access protocol Internet Relay Chat Media Gateway Control Protocol Network News Transfer Protocol File Transfer Protocol Real Time Transport Protocol Routing Information Protocol Simple Mail Transfer Protocol Simple networking management Protocol Transport Layer Security

Internetwork

Network interface

Network interface

 XMPP  POP

Extensible Messaging and Presence Protocol Post Office Protocol

5.1.1- Border Gateway Protocol  The Border Gateway Protocol (BGP) is the core routing protocol of the Internet.  It maintains a table of IP networks or 'prefixes' which designate network reach ability among autonomous systems (AS). It is described as a path vector protocol. 5.1.2- Dynamic Host Configuration Protocol

 Dynamic Host Configuration Protocol (DHCP) is a network application protocol used by devices (DHCP clients) to obtain configuration information for operation in an Internet Protocol network.  This protocol reduces system administration workload, allowing devices to be added to the network with little or no manual intervention. 5.1.3- Domain Name System  The Domain Name System (DNS) is a hierarchical naming system for computers, services, or any resource participating in the Internet.  It associates various information with domain names assigned to such participants. 5.1.4- GPRS Tunneling Protocol  GPRS Tunneling Protocol (GTP) is a group of IP-based communications protocols used to carry General Packet Radio Service (GPRS) within GSM and UMTS networks. 5.1.5- Hypertext Transfer Protocol Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems.  Its use for retrieving inter-linked resources led to the establishment of the World Wide Web. 

5.1.6- Internet Message Access Protocol  The Internet Message Access Protocol or IMAP is one of the two most prevalent Internet standard protocols for e-mail retrieval, the other being POP3.  Virtually all modern e-mail clients and servers support both protocols as a means of transferring e-mail messages from a server, such as those used by G-mail. 5.1.7- Media Gateway Control Protocol

 MGCP is an implementation of the Media Gateway Control Protocol architecture for controlling Media Gateways on Internet Protocol (IP) networks and the public switched telephone network (PSTN).

5.1.8- Network News Transfer Protocol  The Network News Transfer Protocol or NNTP is an Internet application protocol used primarily for reading and posting Usenet articles as well as transferring news among news servers. 5.1.9- File Transfer Protocol  File Transfer Protocol (FTP) is a network protocol used to exchange and manipulate files over a TCP computer network, such as the internet.  An FTP client may connect to an FTP server to manipulate files on that server. 5.1.10- Real Time Transport Protocol  The Real-time Transport Protocol (RTP) defines a standardized packet format for delivering audio and video over the Internet. 5.1.11- Routing Information Protocol  The Routing Information Protocol (RIP) is a dynamic routing protocol used in local and wide area networks.  As such it is classified as an interior gateway protocol (IGP) using the distancevector routing algorithm. 5.1.12- Simple Mail Transfer protocol  Simple Mail Transfer Protocol (SMTP) is an Internet standard for electronic mail (e-mail) transmission across Internet Protocol (IP) networks.  While electronic mail server software uses SMTP to send and receive mail messages, client applications usually use either the Post Office Protocol (POP) or the Internet Message Access Protocol (IMAP) to access their mail box accounts on a mail server. 5.1.13- Simple Network Management Protocol  Simple Network Management Protocol (SNMP) is used in network management systems to monitor network-attached devices for conditions that warrant administrative attention.  It consists of a set of standards for network management, including an application layer protocol, a database schema, and a set of data objects. 5.1.14- Transport Layer Security  Transport Layer Security (TLS) and its predecessor, Secure Sockets Layer (SSL), are cryptographic protocols that provide security and data integrity for communications over TCP/IP networks such as the Internet.  TLS and SSL encrypt the segments of network connections at the Transport Layer end-to-end.

5.2- Transport Layer     

UDP DCCP SCTP RSVP ECN

User Datagram Protocol Datagram Congestion Control Protocol Stream Control Transmission Protocol Resources Reservation Protocol Explicit Congestion Notification

5.2.1- User Datagram Protocol  The User Datagram Protocol (UDP) is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. 5.2.2- Datagram Congestion Control Protocol  The Datagram Congestion Control Protocol (DCCP) is a message-oriented Transport Layer protocol.  DCCP implements reliable connection setup, teardown, ECN, congestion control, and feature negotiation. 5.2.3- Resource reservation protocol The Resource Reservation Protocol (RSVP), is a Transport layer protocol designed to reserve resources across a network for an integrated services Internet.  "RSVP does not transport application data but is rather an Internet control protocol, like ICMP, IGMP, or routing protocols“. 

5.2.4- Stream Control Transmission Protocol  The Stream Control Transmission Protocol (SCTP) is a Transport Layer protocol, serving in a similar role as the popular protocols Transmission Control Protocol (TCP) and User Datagram Protocol (UDP), but with the congestion control. 5.2.5- Explicit Congestion Notification  ECN allows end-to-end notification of network congestion without dropping packets.  It is an optional feature, and is only used when both endpoints signal that they want to use it.

5.3- Internet Layer  IP (IPv4, IPv6)

Internet Protocol

 ICMP  IGMP

Internet Control Management Protocol Internet Group Management Protocol

5.3.1- Internet Group Management Protocol  The Internet Group Management Protocol (IGMP) is a communications protocol used to manage the membership of Internet Protocol multicast groups.  IGMP is used by IP hosts and adjacent multicast routers to establish multicast group memberships. 5.3.2- Internet Control Message Protocol  The Internet Control Message Protocol (ICMP) is one of the core protocols of the Internet Protocol Suite.  It is chiefly used by networked computers' operating systems to send error messages—indicating, for instance, that a requested service is not available or that a host or router could not be reached. 5.4- Link Layer

   

ARP RARP NDP OSPF

Address Resolution Protocol Reverse Address Reservation protocol Neighbor Discovery Protocol Open Shortest Path First

5.4.1- Address Resolution Protocol  Address Resolution Protocol (ARP) is the method for finding a host's link layer (hardware) address when only its Internet Layer (IP) or some other Network Layer address is known. 5.4.2- Reverse Address Resolution Protocol  'Reverse Address Resolution Protocol' (RARP) is a Link layer networking protocol used by a host computer to obtain its IPv4 address given only its link-layer address (such as an Ethernet address).

6- Significance of TCP

TCP provides a communication service at an intermediate level between an application program and the Internet Protocol (IP). That is, when an application program desires to send a large chunk of data across the Internet using IP, instead of breaking the data into IP-sized pieces and issuing a series of IP requests, the software can issue a single request to TCP and let TCP handle the IP details. IP works by exchanging pieces of information called packets. A packet is a sequence of bytes and consists of a header followed by a body. The header describes the packet's destination and, optionally, the routers to use for forwarding— generally in the right direction—until it arrives at its final destination. The body contains the data which IP is transmitting. The header describes the packet's destination and, optionally, the routers to use for forwarding— generally in the right direction—until it arrives at its final destination. The body contains the data which IP is transmitting.

7- Applicability TCP is used extensively by many of the Internet's most popular application protocols and resulting applications, including the World Wide Web, E-mail, File Transfer Protocol, Secure Shell, and some streaming media applications. However, because TCP is optimized for accurate delivery rather than timely delivery, TCP sometimes incurs relatively long delays (in the order of seconds) while waiting for out-of-order messages or retransmissions of lost messages, and it is not particularly suitable for real-time applications such as Voice over IP. For such applications, protocols like the Real-time Transport Protocol (RTP) running over the User Datagram Protocol (UDP) are usually recommended instead. TCP (Transmission Control Protocol) consists of a set of rules: for the protocol, that are used with the Internet Protocol, and for the IP, to send data "in a form of message units" between computers over the Internet. At the same time that the IP takes care of handling the actual delivery of the data, the TCP takes care of keeping track of the individual units of data "packets" (or more accurately, "segments") that a message is divided into for efficient routing through the net.

8- Protocol operation Unlike TCP's traditional counterpart, User Datagram Protocol, which can immediately start sending packets, TCP provides connections that need to be established before sending data. TCP connections have three phases: 1. connection establishment 2. data transfer 3. connection termination Before describing these three phases, a note about the various states of a connection end-point, 1. LISTEN 2. SYN-SENT 3. SYN-RECEIVED

4. 5. 6. 7. 8. 9. 10. 11.

ESTABLISHED FIN-WAIT-1 FIN-WAIT-2 CLOSE-WAIT CLOSING LAST-ACK TIME-WAIT CLOSED

LISTEN represents waiting for a connection request from any remote TCP and port. (usually set by TCP servers) SYN-SENT represents waiting for the remote TCP to send back a TCP packet with the SYN and ACK flags set. (usually set by TCP clients) SYN-RECEIVED represents waiting for the remote TCP to send back an acknowledgment after having sent back a connection acknowledgment to the remote TCP. (usually set by TCP servers) ESTABLISHED represents that the port is ready to receive/send data from/to the remote TCP. (set by TCP clients and servers) TIME-WAIT represents waiting for enough time to pass to be sure the remote TCP received the acknowledgment of its connection termination request.a connection can stay in TIMEWAIT for a maximum of four minutes.

8.1- Connection establishment To establish a connection, TCP uses a three-way handshake. Before a client attempts to connect with a server, the server must first bind to a port to open it up for connections: this is called a passive open. Once the passive open is established, a client may initiate an active open. To establish a connection, the three-way (or 3-step) handshake occurs: 1. The active open is performed by the client sending a SYN to the server. 2. In response, the server replies with a SYN-ACK. 3. Finally the client sends an ACK back to the server.

8.2- Data transfer There are a few key features that set TCP apart from User Datagram Protocol: • • • •

Ordered data transfer - the destination host rearranges according to sequence number Retransmission of lost packets - any cumulative stream not acknowledged will be retransmitted Discarding duplicate packets Error-free data transfer





Flow control - limits the rate a sender transfers data to guarantee reliable delivery. When the receiving host's buffer fills, then next acknowledgement contains a 0 in the window size, to stop transfer and allow the data in the buffer to be processed. Congestion control - sliding window.

8.2.1 User Datagram Protocol The User Datagram Protocol (UDP) is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol (IP) network without requiring prior communications to set up special transmission channels or data paths. UDP is sometimes called the Universal Datagram Protocol. UDP uses a simple transmission model without implicit hand-shaking dialogues for guaranteeing reliability, ordering, or data integrity. Thus, UDP provides an unreliable service and datagrams may arrive out of order, appear duplicated, or go missing without notice. UDP assumes that error checking and correction is either not necessary or performed in the application, avoiding the overhead of such processing at the network interface level. Time-sensitive applications often use UDP because dropping packets is preferable to using delayed packets. If error correction facilities are needed at the network interface level, an application may use the Transmission Control Protocol (TCP) or Stream Control Transmission Protocol (SCTP) which are designed for this purpose.

8.2.1.1 Difference Between UDP and TCP TCP ("Transmission Control Protocol") is a connection-oriented protocol, which means that upon communication it requires handshaking to set up end-to-end connection. A connection can be made from client to server, and from then on any data can be sent along that connection. •



• •

Reliable – TCP manages message acknowledgment, retransmission and timeout. Many attempts to reliably deliver the message are made. If it gets lost along the way, the server will re-request the lost part. In TCP, there's either no missing data, or, in case of multiple timeouts, the connection is dropped. Ordered – if two messages are sent along a connection, one after the other, the first message will reach the receiving application first. When data packets arrive in the wrong order, the TCP layer holds the later data until the earlier data can be rearranged and delivered to the application. Heavyweight – TCP requires three packets just to set up a socket, before any actual data can be sent. It handles connections, reliability and congestion control. It is a large transport protocol designed on top of IP. Streaming – Data is read as a "stream," with nothing distinguishing where one packet ends and another begins. Packets may be split or merged into bigger or smaller data streams arbitrarily.

UDP is a simpler message-based connectionless protocol. In connectionless protocols, there is no effort made to set up a dedicated end-to-end connection. Communication is achieved by transmitting information in one direction, from source to destination without checking to see if the destination is still there, or if it is prepared to receive the information.

• • • •

Unreliable – When a message is sent, it cannot be known if it will reach its destination; it could get lost along the way. There is no concept of acknowledgment, retransmission and timeout. Not ordered – If two messages are sent to the same recipient, the order in which they arrive cannot be predicted. Lightweight – There is no ordering of messages, no tracking connections, etc. It is a small transport layer designed on top of IP. Datagrams – Packets are sent individually and are guaranteed to be whole if they arrive. Packets have definite bounds and no split or merge into data streams may exist.

8.3- Connection termination The connection termination phase uses, at most, a four-way handshake, with each side of the connection terminating independently. When an endpoint wishes to stop its half of the connection, it transmits a FIN packet, which the other end acknowledges with an ACK. Therefore, a typical tear-down requires a pair of FIN and ACK segments from each TCP endpoint.

9- TCP ports TCP uses the notion of port numbers to identify sending and receiving application end-points on a host, or Internet sockets. Each side of a TCP connection has an associated 16-bit unsigned port number (0-65535) reserved by the sending or receiving application. Arriving TCP data packets are identified as belonging to a specific TCP connection by its sockets, that is, the combination of source host address, source port, destination host address, and destination port. This means that a server computer can provide several clients with several services simultaneously, as long as a client takes care of initiating any simultaneous connections to one destination port from different source ports.

10- TCP over wireless TCP has been optimized for wired networks. Any packet loss is considered to be the result of congestion and the congestion window size is reduced dramatically as a precaution. However, wireless links are known to experience sporadic and usually temporary losses due to fading, shadowing, hand off, and other radio effects, that cannot be considered congestion. After the (erroneous) back-off of the congestion window size, due to wireless packet loss, there can be a congestion avoidance phase with a conservative decrease in window size. This causes the radio link to be underutilized.

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close