Communication Protocols
There are literally thousands of different protocols that exist. Each protocol is designed to specify a particular set of rules and accomplish particular tasks. For example Ethernet is the most widespread Transmission Level protocol for the transfer of data between nodes on local area networks, however Ethernet is not suitable for communication over wide area networks (WANs) carrying enormous amounts of data over long distances. Commonly such networks use protocols such as ATM (Asynchronous Transfer Mode)or SONET (Synchronous Optical Network) – ATM is used on most ADSL connections and SONET for connections between network access points (NAPs) that connect different cities and even continents. Ethernet, ATM and SONET all operate at the Transmission Level (OSI layer 1 and 2).Before two devices can communicate they must first agree on the protocol or series of protocols they will utilise. This process is known as ‘handshaking’. Handshaking commences when one device asks to communicate with another; the devices then exchange messages until they have agreed upon the rules that will be used. Depending on the protocol being used hand shaking may occur just after the devices are powered up or it may occur prior to each communication session occurring. In IPT we study three common examples of Application Level protocols, namely http, smtp and SSL – we examine HTTP in this section, smtp later as we discuss email and SSL during our discussion on electronic banking. Two Communication Control and Adressing protocols are required, namely TCP and IP. We describe each of these inthis section and as they are common to most of today’s networks we expand on this discussion throughout the text. At the Transmission Level we need to cover Ethernet and also the token ring protocol. We deal with Ethernet in this section and token ring later in the chapter as we discuss the operation of ring topologies. HTTP, TCP, IP and usually Ethernet all contribute during the transfer of web pages – these four protocols are described in this section.Hypertext Transfer Protocol (HTTP)
HTTP Protocol ( Hypertext transfer protocol)
HTTP operates within the IPT Application Level and within layer 6 of the OSI model. HTTP is the primary protocol used by web browsers to communicate and retrieve web pages from web servers. A client-server connection is used where the browser is the client and the web server is the server. There are three primary HTTP commands (or methods) used by browsers – GET, HEAD and POST. The HTTP GET method retrieves entire documents – the documents retrieved could be HTML files, image files, video files or any other type of file. The browser requests a document from a particular web server using a GET command together with the URL (Universal Resource Locator) of the document. The web server responds by transmitting the document to the browser. The header, which precedes the file data, indicates the nature of the data in the file – the browser reads this header data to determine how it should display the data in the file that follows. For example if it is an HTML file then the browser will interpret and display the file based on its HTML tags. The HTTP HEAD method retrieves just the header information for the file. This is commonly used to check if the file has been updated since the browser last retrieved the file. If the file has not been updated then there is no need to retrieve the entire file, rather the existing version held in the browser’s cache can be displayed. The HTTP POST method is used to send data from the browser to a web server. Commonly the POST method is used to send all the data input by users within web- based forms. For example many web sites require users to create an account. The users details are sent back to the web server using the HTTP POST method.
Transmission Control Protocol (TCP)
TCP operates within the Communication Control and Addressing Level (Transport layer 4 of the OSI model). TCP, together with IP, are the protocols responsible for the transmission of most data across the Internet. The primary responsibility of transport layer protocols such as TCP is ensuring messages are actually delivered correctly. Unlike most protocols that operate completely independently of their neighbouring protocols, TCP requires IP to be operating. TCP considers elements of the IP header – the reverse is not true, IP can operate without TCP, however for almost all implementations both TCP and IP are operating. This is why both TCP and IP are commonly referred to as TCP/IP. In TCP terminology each packet is called a segment, where a segment includes a string of bytes forming part of the data to be sent. TCP includes checks for errors within each segment and also uses a system known as “sliding windows” to control the flow of data and ensure every byte of data is acknowledged once it has been successfully received. TCP is often called a “connection oriented” and “byte oriented” protocol as it maintains information about individual bytes transferred within a particular communication session. Each TCP segment includes a header that includes the sequence of bytes contained within the segment and a checksum – we discuss the detail of checksums later in this section. The checksum is produced prior to the segment being sent. Upon arrival of each segment the checksum is recalculated to ensure it matches the checksum within the header. If it matches then the bytes received within the segment are acknowledged. By default TCP segments contain a total of 576 bytes. This total includes 20 bytes for the TCP header and 20 bytes for the IP header, leaving 536 bytes for data. The sender in a TCP session continues sending segments of data up to the limit (window size) specified within acknowledgements from the receiver. Conceptually as subsequent segments are sent and received the window slides progressively along the length of the total message data, hence the name “sliding window”. This flow control mechanism allows the receiver to adjust the rate of data it receives.
Internet Protocol (IP)
IP is the workhorse of the Internet. It is the protocol that causes data packets (called datagrams) to move from sender to receiver. The Internet Protocol operates at the OSI Network layer 3, which is called the Internet layer in references that specifically discuss TCP/IP. IP has been designed so it will operate with all types of networks and hardware. It was originally created so the different network systems used by the United States Army, Air Force and Navy could exchange and share data. IP does not guarantee datagrams will reach their destination and it makes no attempt to acknowledge datagrams that have been received. Rather IP simply fires off each datagram one after the other. For these reasons IP is known as a connectionless protocol – as far as IP is concerned each datagram has no connection or relationship to any other datagram (unless fragmentation of a single datagram occurs). In essence IP cannot be relied upon to successfully transmit datagrams. At first this may seem to be a significant shortcoming of IP, however in reality it makes sense. For some data, such as streamed video, the speed of delivery is more important than its accuracy. Losing a single frame in a video sequence is unlikely to be even noticed; hence the significant overhead required for error checking is not needed. The only error check within an IP datagram is a checksum of the bytes within the header – no error checking is performed on the data. Note that TCP provides error checking in layer 4and is used for data that must be delivered accurately. On the other hand the User Datagram Protocol (UDP) can be used in OSI layer 4 when speed is a higher priority than accuracy. Furthermore layer 2 data link protocols generally include robust error checks. Where IP excels is in its ability to reroute messages over the most efficient path to their destination – using routers, which in turn utilise yet another protocol in the TCP/IP suite, ARP (Address Resolution Protocol), to determine the next hop for each datagram. Should a portion of the network fail then messages are automatically rerouted around the problem area. This was a requirement for the original designers of IP who needed to ensure communication between US defence sites would not be disrupted should individual sites be damaged during conflict. We discuss the operation of routers in more detail later in this chapter; at this stage we introduce IP addresses together with their underlying structure.
There are literally thousands of different protocols that exist. Each protocol is designed to specify a particular set of rules and accomplish particular tasks. For example Ethernet is the most widespread Transmission Level protocol for the transfer of data between nodes on local area networks, however Ethernet is not suitable for communication over wide area networks (WANs) carrying enormous amounts of data over long distances. Commonly such networks use protocols such as ATM (Asynchronous Transfer Mode)or SONET (Synchronous Optical Network) – ATM is used on most ADSL connections and SONET for connections between network access points (NAPs) that connect different cities and even continents. Ethernet, ATM and SONET all operate at the Transmission Level (OSI layer 1 and 2).Before two devices can communicate they must first agree on the protocol or series of protocols they will utilise. This process is known as ‘handshaking’. Handshaking commences when one device asks to communicate with another; the devices then exchange messages until they have agreed upon the rules that will be used. Depending on the protocol being used hand shaking may occur just after the devices are powered up or it may occur prior to each communication session occurring. In IPT we study three common examples of Application Level protocols, namely http, smtp and SSL – we examine HTTP in this section, smtp later as we discuss email and SSL during our discussion on electronic banking. Two Communication Control and Adressing protocols are required, namely TCP and IP. We describe each of these inthis section and as they are common to most of today’s networks we expand on this discussion throughout the text. At the Transmission Level we need to cover Ethernet and also the token ring protocol. We deal with Ethernet in this section and token ring later in the chapter as we discuss the operation of ring topologies. HTTP, TCP, IP and usually Ethernet all contribute during the transfer of web pages – these four protocols are described in this section.Hypertext Transfer Protocol (HTTP)
HTTP Protocol ( Hypertext transfer protocol)
HTTP operates within the IPT Application Level and within layer 6 of the OSI model. HTTP is the primary protocol used by web browsers to communicate and retrieve web pages from web servers. A client-server connection is used where the browser is the client and the web server is the server. There are three primary HTTP commands (or methods) used by browsers – GET, HEAD and POST. The HTTP GET method retrieves entire documents – the documents retrieved could be HTML files, image files, video files or any other type of file. The browser requests a document from a particular web server using a GET command together with the URL (Universal Resource Locator) of the document. The web server responds by transmitting the document to the browser. The header, which precedes the file data, indicates the nature of the data in the file – the browser reads this header data to determine how it should display the data in the file that follows. For example if it is an HTML file then the browser will interpret and display the file based on its HTML tags. The HTTP HEAD method retrieves just the header information for the file. This is commonly used to check if the file has been updated since the browser last retrieved the file. If the file has not been updated then there is no need to retrieve the entire file, rather the existing version held in the browser’s cache can be displayed. The HTTP POST method is used to send data from the browser to a web server. Commonly the POST method is used to send all the data input by users within web- based forms. For example many web sites require users to create an account. The users details are sent back to the web server using the HTTP POST method.
Transmission Control Protocol (TCP)
TCP operates within the Communication Control and Addressing Level (Transport layer 4 of the OSI model). TCP, together with IP, are the protocols responsible for the transmission of most data across the Internet. The primary responsibility of transport layer protocols such as TCP is ensuring messages are actually delivered correctly. Unlike most protocols that operate completely independently of their neighbouring protocols, TCP requires IP to be operating. TCP considers elements of the IP header – the reverse is not true, IP can operate without TCP, however for almost all implementations both TCP and IP are operating. This is why both TCP and IP are commonly referred to as TCP/IP. In TCP terminology each packet is called a segment, where a segment includes a string of bytes forming part of the data to be sent. TCP includes checks for errors within each segment and also uses a system known as “sliding windows” to control the flow of data and ensure every byte of data is acknowledged once it has been successfully received. TCP is often called a “connection oriented” and “byte oriented” protocol as it maintains information about individual bytes transferred within a particular communication session. Each TCP segment includes a header that includes the sequence of bytes contained within the segment and a checksum – we discuss the detail of checksums later in this section. The checksum is produced prior to the segment being sent. Upon arrival of each segment the checksum is recalculated to ensure it matches the checksum within the header. If it matches then the bytes received within the segment are acknowledged. By default TCP segments contain a total of 576 bytes. This total includes 20 bytes for the TCP header and 20 bytes for the IP header, leaving 536 bytes for data. The sender in a TCP session continues sending segments of data up to the limit (window size) specified within acknowledgements from the receiver. Conceptually as subsequent segments are sent and received the window slides progressively along the length of the total message data, hence the name “sliding window”. This flow control mechanism allows the receiver to adjust the rate of data it receives.
Internet Protocol (IP)
IP is the workhorse of the Internet. It is the protocol that causes data packets (called datagrams) to move from sender to receiver. The Internet Protocol operates at the OSI Network layer 3, which is called the Internet layer in references that specifically discuss TCP/IP. IP has been designed so it will operate with all types of networks and hardware. It was originally created so the different network systems used by the United States Army, Air Force and Navy could exchange and share data. IP does not guarantee datagrams will reach their destination and it makes no attempt to acknowledge datagrams that have been received. Rather IP simply fires off each datagram one after the other. For these reasons IP is known as a connectionless protocol – as far as IP is concerned each datagram has no connection or relationship to any other datagram (unless fragmentation of a single datagram occurs). In essence IP cannot be relied upon to successfully transmit datagrams. At first this may seem to be a significant shortcoming of IP, however in reality it makes sense. For some data, such as streamed video, the speed of delivery is more important than its accuracy. Losing a single frame in a video sequence is unlikely to be even noticed; hence the significant overhead required for error checking is not needed. The only error check within an IP datagram is a checksum of the bytes within the header – no error checking is performed on the data. Note that TCP provides error checking in layer 4and is used for data that must be delivered accurately. On the other hand the User Datagram Protocol (UDP) can be used in OSI layer 4 when speed is a higher priority than accuracy. Furthermore layer 2 data link protocols generally include robust error checks. Where IP excels is in its ability to reroute messages over the most efficient path to their destination – using routers, which in turn utilise yet another protocol in the TCP/IP suite, ARP (Address Resolution Protocol), to determine the next hop for each datagram. Should a portion of the network fail then messages are automatically rerouted around the problem area. This was a requirement for the original designers of IP who needed to ensure communication between US defence sites would not be disrupted should individual sites be damaged during conflict. We discuss the operation of routers in more detail later in this chapter; at this stage we introduce IP addresses together with their underlying structure.