+ All Categories
Home > Documents > Internet And Internet Protocol Suite

Internet And Internet Protocol Suite

Date post: 03-Feb-2022
Category:
Upload: others
View: 5 times
Download: 0 times
Share this document with a friend
32
Module Internet And Internet Protocol Suite
Transcript
Page 1: Internet And Internet Protocol Suite

Module

Internet And Internet

Protocol Suite

Page 2: Internet And Internet Protocol Suite

Internet and IPv4

Page 3: Internet And Internet Protocol Suite

LESSON OBJECTIVE General The lesson will discuss a popular network layer protocol, i.e. the Internet Protocol Specific

The focus areas of this lesson are: 1. Definition of IPv4. 2. Structure of IPv4 header. 3. Idea of VoIP. 4. Various classes of service and types of networks.

7.1.1 INTRODUCTION: At the X.25 level each fundamental entity is known as a packet. In IP terminology we call it as a datagram. Datagram will have a source and destination address. This address is known as IP address. All devices connected to the internetwork have an IP address. The IP datagram format is as shown in the diagram below

7.1.2 IPV4 IPv4 Header 0 8 16 314

Version Header Length

Type of Service Total Length

Time to live Protocol Header Check Sum

Source Address

Identifier Flag Fragment Offset

Destination Address

User Data

Options + Padding

Page 4: Internet And Internet Protocol Suite

The various fields in the header may be explained as follows Version: This field specifies the IP version being used IHL Internet Header Length specifies the total length of

the header in 32- bit words. The minimum value is 5. Type of service It specifies the type of service being provided. The

parameters are Parameter Level 1 Precedence 8 2 Reliability 2 3 Delay 2 4 Throughput 2

Total length It specifies the total length (including the header and the data)

Identifier It is used, along with the source and destination address, to uniquely identify the data unit

Flag The Flag field has 3 bits, two are for More and Don’t fragment indicator, the 3rd is not used currently.

Fragment offset Indicates where in the original datagram this fragment exists

Time-to-live Specifies, in number of hops, how long a datagram is allowed to remain in the network

Protocol Specifies the upper level protocol used in the destination.

Header checksum: One’s complement of modulo-16 addition of all 16 bit words in the header.

Source address 32 bits Destination Address 32 bits Options and padding

Depending on ISP some options may be available. Padding is used to ensure the datagram header is a multiple of 32 bits.

Though TCP and IP were developed together by DOD USA they are not really dependent, the protocol field in IP header specifies the transport protocol being used.

Page 5: Internet And Internet Protocol Suite

IS VOIP REALLY INEXPENSIVE? Voice and video are real-time. So if telephone line QoS is to be guaranteed then can VoIP be really cheap? Real time protocol (RTP) along with some reservation (RSVP) is required. But first voice is to be digitized. 64 kbps PCM requires quite large BW. So compression is required for lower bit rate transmission. We also require signaling. The overall process is referred to as IP telephony. In VoIP speaker takes sounds, digitizes, packetizes and then transmit through Internet. VoIP is IP telephony without the signaling

Let us not bother about the cost first. Transmit voice over internet. If VoIP grows then more number of users might help the cost to come down. Beginning with voice gradually any real-time as well as non-real time entity may be sent over IP. This is called Anything-over-IP. Mobile IP may be referred to in this context. Thus unification can be achieved. For unification global forum has decided that any future network, irrespective of its design, will have an IP backbone.

HOW QUALITY OF SERVICE MAY BE IMPROVED UPON?

Quality of service may be improved by 1. Making the network very reliable (cost of network increases) 2. Making the user components more reliable (component cost

increases).

It is feasible to implement the second option. Thus we persist with a noisy channel but try to make the customer equipment more reliable. As a result the lower three layers remain cheap. The upper three layers, as well as transport layer, are to be made reliable and to be implemented at each user according to his (her) choice. The user component cost thus goes up. The unreliability and inadequacies of the network have to be compensated by the transport layer. Basically the transport keeps the underlying network transparent to the users. Now-a-days we have networks that are much more reliable than the unreliable networks for which the TCP was originally designed; however people still persist with TCP, as their transport level protocol.

Page 6: Internet And Internet Protocol Suite

Now depending on the error correction facility provided we can define 4 classes of service for the transport layer

Type of Network A B C

Characteristics Virtually no errors

Errors take place and they are

notified

Errors occur but no notification

Class of Service Types of Connection

0 Simple Connection establishment and data transfer (Type A)

1 Basic error recovery. The cost of software at user is high (Type B)

2 Multiple transport connection multiplexed on a single network connection. Data flow with no error. (Type A )

3 Multiplexing with error recovery in case of errors. (Type B )

4 No error notification, worst quality, cheapest. (Type C ).

Transport layers (TL) tasks are reliability, flow control, sequencing. The TL may be CO (reliable) or CL (very cheap). TCP is connection oriented, but IP is connection less. Thus the end-to-end protocol is Connection Oriented but the network is Connectionless. VoIP uses a CL transport layer to offer service at low costs. This is made possible because voice has a lot of redundancy. Trivial file transfer (TFTP) uses CL Transport Layer. Any multimedia service should use CL service at TL. Using a combination of CO & CL services we can provide the best effort services.

Page 7: Internet And Internet Protocol Suite

UDP USES CL SERVICE.

BEST EFFORT SERVICE: The network will take best effort without any

reservation of resources to transfer the user data packet. IP has no quality of service, hence it is the cheapest

Objective Questions 21.01 The minimum length of the Internet header is _____ bits. 21.02 IP header has ____ Flag bits. 21.03 Type ___ network is most reliable. 21.04 There are ___ classes of service for specifying the type of

connection.

Subjective Questions 21.11 Give a brief description of the IP header. 21.12 How can we improve Quality-of-Service? 21.13 Enlist the different types of networks in IP. 21.14 Describe the various class of service in IP.

Version 1 ECE , IIT Kharagpur

Page 8: Internet And Internet Protocol Suite

Module

7 Internet And Internet Protocol Suite

Version 1 ECE , IIT Kharagpur

Page 9: Internet And Internet Protocol Suite

IP addressing. ICMP

Page 10: Internet And Internet Protocol Suite

LESSON OBJECTIVE General

The lesson will continue the discussion on IPv4 along with the idea of ICMP.

Specific

The focus areas of this lesson are: 1. Addressing scheme in IPv4. 2. Importance of ICMP 3. Message types in ICMP 4. ICMP header. 5. ARP & RARP

7.2.1. IP ADDRESSING Every host and router on the internet has an IP address, which encodes its network number and host number. The combination is unique: no two machines have the same IP address. All IP addresses are 32 bits long and are used in the source and destination address fields of the IP packets. This machines connected to multiple networks have a different IP address on each network. The class A, B, C and D formats allow for up to 126 networks with 16 million hosts each, 16,382 networks with up to 60k hosts, 2 million networks with up to 254 hosts each and multicast in which the datagram is directed to multiple hosts. Class E addresses beginning with 11110 are reserved for future use. Tens of thousands of networks are connected to the internet, and these networks are assigned a number by the Network Information Center (NIC), to avoid conflicts. 32 bit network addresses are usually written in dotted decimal notation. In this format each of the four bytes is written in decimal from 0 to 255. The lowest address is 0.0.0.0 and the highest address is 255.255.255.255.The values 0 and -1 have special meanings. The value 0 means this network or this host. The value -1 is used as a broadcast address to mean all hosts on the indicated network.

Fig 5.47 page number 416 Tannenbaum

7.2.2 INTERNET CONTROL MESSAGE PROTOCOL IP provides unreliable connectionless datagram service, original aim being efficient use of network resources. IP being a best effort delivery service lacks error control and assistance mechanisms.

Page 11: Internet And Internet Protocol Suite

What happens if something goes wrong? What happens if a router must discard a datagram because it cannot find a router to the final destination or because the time-to-live field has a zero value? These are examples where IP has no built-in mechanism to notify the original host. There are may other situation where IP is found lacking. The internet control message protocol (ICMP) has been designed to take care of the above deficiencies. It is a companion to IP. ICMP in spite of being a network layer protocol does not pass messages directly to the datalink layer. Instead the messages are first encapsulated inside IP datagrams whose protocol field is set to 1.

Types of messages ICMP messages are divided into two broad categories:

1. Error reporting Messages. 2. Query Messages.

1. Error reporting:

ICMP was designed to compensate the shortcoming of unreliability in IP. However ICMP does not correct errors, but only reports them. Error reporting messages are always sent to the original source. Five types of errors are handled: Destination unreachable—In situations where a router cannot route a datagram or a host cannot deliver a datagram, the datagram is discarded and the router or host sends a destination unreachable message back to the source. Source Quench—IP being a connectionless protocol, there is no communication between the source host, the router and the destination host. The resulting lack of flow control is a major hazard in the operation of source-destination delivery. And the lack of congestion control causes major problems n the routers. The source quench message in ICMP adds some flow control and congestion control to IP by notifying the source of a datagram being discarded and forcing it to slow down its transmission. Time Exceeded—It is generated in two cases

a. A router receives a datagram with a zero value in the TTL field b. All fragments that make up a message do not arrive at the

destination host within a certain time limit

Page 12: Internet And Internet Protocol Suite

Parameter Problem—If a router or a destination host discovers an ambiguous or missing value in a any field of the datagram, it discards the datagram and sends a parameter problem message back to the source.

Redirection—When a host comes up, its routing table has a limited number of entries. It usually knows the IP address of a single default router. For this reason the host may send a datagram to the wrong router. The router that receives the datagram will forward it to the correct router and will send a redirection message back to the host for routing table updating.

2. Query Messages: Query messages are used to diagnose some network problems. There are four different pairs of messages. Echo Request/Reply messages—are designed for diagnostic purposes. Their combination determines whether two systems can communicate with each other. Time stamp Request/Reply messages—can be used to determine the round trip time for an IP datagram to travel between two machines and also to synchronize the clocks in them. Address mask Request/Reply message—are used between the host and the router to indicate which part of the address defines the network and the sub-network address and which part corresponds to the host identifier. Router Solicitation and Advertisement—are useful to inform a host that wants to send data to a host on another network, the address of routers connected to its own network and also their status and functioning.

IPHDR

Type Code Ch Sum

Information (Variable size)

Parameters

Page 13: Internet And Internet Protocol Suite

Type Specifies the types of errors, generally 256 types of errors may occur

: Code Parameters that can be coded in a few bits.

Checksum Checksum of entire IP message Parameters Specifies more lengthy parameters. Address resolution protocol Although every machine on the Internet has its IP address, these cannot be actually used for sending packets because the data link layer hardware does not understand IP addresses. Thus it is very important to understand the mapping of IP addresses onto datalink layer addresses, such as Ethernet. Assuming the sender knows the name of the intended receiver, the first step is to find the IP address for it, which is done by the Domain Name System. The upper layer software in the sender now builds a packet with the receiver’s address in the destination field and gives it to IP software to transmit. The IP software needs a way to find the destination’s Ethernet address even if the destination is on its own network. To do this, it can have a configuration file somewhere in the system that maps IP addresses onto Ethernet addresses. Otherwise, the sender outputs a broadcast packet onto the Ethernet asking about the owner of that particular IP address. On receiving that packet, each machine will check its IP address and only the correct user will respond. The protocol for asking the question and getting the reply is called ARP (Address Resolution Protocol). Almost every machine on the Internet runs it. Its advantage over the configuration files is simplicity. The system manager does not do much except assign each machine an IP address and decide subnet masks. ARP does the rest.

Reverse Address resolution protocol RARP does the reverse of ARP, i.e. it helps to find a corresponding IP address given an Ethernet address. This protocol allows a newly-booted workstation to broadcast its Ethernet address enquiring about its IP address. The RARP server sees this request, looks up the Ethernet address in its configuration files, and sends back the corresponding IP address. It is better than embedding an IP address in the memory image because it allows the same image to be used an all machines. And its disadvantage is that it uses a destination address of all 1s (limited broadcasting) to reach the RARP server.

Page 14: Internet And Internet Protocol Suite

Objective Questions 22.01 All IP addresses are ____ bits long. 22.02 __________________ assigns a number to networks connected to

Internet to avoid conflict. 22.03 Error reporting messages are always sent to the source.

(True/False) 22.04 There are _____ types of error reporting messages and ____

different pairs of query messages. 22.05 The protocol for asking the question and getting the reply is called

___________.

Subjective Questions 22.11 Discuss the addressing scheme in IP. 22.12 Why was ICMP needed? 22.13 Enlist the error reporting messages. 22.14 Describe the query messages. 22.15 Discuss ARP and RARP protocols.

Page 15: Internet And Internet Protocol Suite

IPv6

Page 16: Internet And Internet Protocol Suite

LESSON OBJECTIVE General

The lesson will explain a more advanced network layer protocol, i.e. the Internet Protocol version 6

Specific

The focus areas of this lesson are: 1. the next generation IP 2. addressing in IPv6 3. packet formats of IPv6

7.3.0 INTRODUCTION The network layer protocol in the Internet is currently IPv4. IPv4 provides the host-host communication systems in the Internet. Although IPv4 is well designed, data communications has evolved a lot since it was introduced in the 1970s. IPv4 has some deficiencies that make it unsuitable for the fast growing Internet. IPv4 has a two level address structure (netid and hostid) categorized into five classes which is an inefficient use of the address space. The modern internet must accommodate real-time audio and video transmission. This type of transmission requires minimum delay strategies and reservation of resources not provided in the IPv4 design. The internet must accommodate encryption and authentication of data. IPv4 does not provide any security measure. Internet Protocol version 6 (IPv6) or Internetworking Protocol, next generation (IPng) was proposed and is now a standard. The next generation IP or IPv6 has some advantages over IPv4 as follows: Larger Address space is provided in IPv6. An IPv6 address is 128 bits long. Compared with the 32-bit address of IPv4 this amounts to a huge (296) increase in the address space. This was done so that in the future when household appliances also become a part of the Internet they can have sufficient number of addresses. Better header format. Ipv6 uses a new header format in which options are separated from the base header and inserted as required. This simplifies the routing process. Support for more security. The encryption and authentication options in IPv6 provide confidentiality and integrity of the packet.

Page 17: Internet And Internet Protocol Suite

New Options. Ipv6 has new options for additional functionalities. Allowance for extension. Ipv6 is designed so that the protocol may be extended if required by new technologies.

7.3.1 IPV6 ADDRESSES: An IPv6 address consists of 16 bytes. To make the address more readable, IPv6 specifies hexadecimal colon notation the use of which can be explained with the help of figure below

128 bits of address

2 bytes 2 bytes

FDEC BA98 7654 3210 ADBF BBFF 2922 FFFF

2 bytes

: : : : : : :

Abbreviation: Although the IP address even in hexadecimal format is very long, many of the digits are zeros, hence we can abbreviate the address by omitting only the leading zeros of a section (four digits between two colons) as shown in the diagram. Further abbreviation is possible if there are consecutive sections consisting of zeros only. They can be removed altogether and replaced with a double semicolon.

CIDR notation IPv6 allows classless addressing and CIDR notation. The diagram shows how to define a prefix of 60 bits using CIDR.

Categories of Addresses: Unicast—defines a single computer Anycast—defines a group of computer with addresses that have the same prefix Multicast—defines a group of computers that may or may not share the same prefix and may or may not be connected to the same physical network.

Page 18: Internet And Internet Protocol Suite

FDEC : BA98 : 0074 : 3210 : 0000 : 0000 : 0000 : FFFF

FDEC : BA98 : 74 : 3210 : 0 : 0 : 0 : FFFF

FDEC : BA98 : 74 : 3210 : : FFFF

Unabbreviated

Abbreviated

More abbreviated

7.3.2 IPV6 PACKET FORMAT Each packet consists of a packet header followed by the payload. The payload has two parts: optional extension header and data from upper layer. The base header is of 40 bytes and the payload may be up to 65536 bytes.

Base Header: Version (4 bits) It indicates the IP version number. Priority (4 bits) It specifies the priority of the packet with respect to traffic congestion. Flow label (24 bits) It is designed to provide special handling for a particular flow of data. Payload length (16 bits) It specifies total length of IP datagram excluding base header. Next header (8 bits) It specifies the header that follows the base header. It may be one of the optional extension headers or an upper layer protocol header. Hop limit (8 bits) Similar to the TTL field in the IPv4 Source address (128 bits) Destination address (128 bits) It generally specifies the final destination of datagram. However if source routing is used, this field contains the address of the next router

Page 19: Internet And Internet Protocol Suite

Extension headers: The following extension headers have been defined in the IPv6 standard. Hop-by-hop options header: defines special options that require hop-by-hop processing Routing header: provides extended routing Fragment header: contains fragmentation and reassembling information Authentication header: provides packet integrity and authentication Encapsulation security payload header: provides privacy Destination options header: contains optional information to be examined by the destination node

Extension Headers: Extension headers are supplied to provide extra information, but encoded in an efficient way. Six kinds of extension headers are defined at present. Each one is optional. But in case of more than one header is present, they must appear directly after the fixed base header, and preferably in the order listed. Headers can have either a fixed format a variable number of variable-length fields. For these, each item is encoded as tuple (Type, Length, and Value). The Type is a 1-byte field telling which option this is. The choices are: skip the option, discard the packet, discard the packet and send back an ICMP packet, and the same as the previous one, except do not send ICMP packets for multicast addresses. The Length is also a 1-byte field informing about the length of the value (0 to 255 bytes). The Value is any information required, up to 255 bytes. The hop-by-hop header is used to send information that all routers along the path must examine. Datagrams using this header are called Jumbograms. The routing header enlists one or more routers that have to be visited on the way to the destination. Both strict routing (full path specified) and loose routing (selected routers are supplied) are available. The fragment header deals with fragmentation in a way similar to IPv4. it holds the datagram identifier, fragment number, and a bit telling whether more fragments are coming. Unlike IPv4, only source host, and not the routers along the way, can fragment a packet. If an intermediate

Page 20: Internet And Internet Protocol Suite

router receives a packet that is too long, it simply discards it and sends an ICMP message back. Authentication header provides a mechanism to the receiver of a packet to be sure of the sender. The encrypted security payload makes it possible to encrypt the contents of a packet so that only the intended recipient can read it. The destination option header is intended for fields that need only be interpreted at the destination host.

Objective Questions 23.01 IPv6 has a ____ bit address field. 23.02 The base header in IPv6 is of ____ bytes. 23.03 The payload length is specified in ____ bits.

Subjective Questions 23.11 Compare IPv6 with IPv4. 23.12 What are the different categories of addresses in IPv6? 23.13 Describe the base header format in IPv6. 23.14 Discuss the extension headers in IPv6.

Page 21: Internet And Internet Protocol Suite

TCP

Page 22: Internet And Internet Protocol Suite

LESSON OBJECTIVE General

The lesson will discuss in depth a very popular transport layer protocol, i.e. the TC Protocol Specific

The focus areas of this lesson are: 1. idea of TCP 2. the TCP header 3. the scope of TCP

7.4.1 INTRODUCTION The sending and receiving TCP entities exchange data in the form of segments. A segment consists of a fixed 20 byte header plus an optional part followed by 0 or more data bytes. The TCP software decides how big segments should be. To limits restrict the segment size. First, two segments, including the TCP header, must fit in the 65536 byte IP payload. Segment each network has a maximum transfer unit or MTU and each segment must fit into the MTU. A segment that is too large for the network can be broken into multiple segments by a router. Each new segment gets its own IP header, so fragmentation by routers increases the total overhead. The basic protocol used by TCP entities is the sliding window protocol.

7.4.2 TCP HEADER Presented below is the TCP header. TCP normally works in full duplex mode. The various fields in the TCP header may be explained as follows

Version 1 ECE , IIT Kharagpur

SOURCE # (16) DESTINATION # (16)

SEGMENT # (32)

ACK # (32)

WINDOW (16) FINSYN

RST

PSH

ACK

URG

RESERVED (6)

DATA OFFSET

DATA (VARIABLE)

OPTIONS (VARIABLE) PADDING

URGENT POINTER (16) CHECKSUM (16)

Page 23: Internet And Internet Protocol Suite

Source port number and Destination port number

These correspond to different application layer services like email, file transfer, etc. The data will start at a particular port at the transmitter and go to a particular port at the receiver. It is at the machine level, which basically works at service access points. Port addresses are not movable. The IP addresses are also not movable. Though they are normally called user address but they are actually the address of the points to which the machines are connected.

Sequence number This is for connection-oriented service to check whether each segment is transmitted correctly.

Acknowledgement number

These are for piggybacking

Data offset This field specifies where in the PDU the user data resides,

Flags URG Is used to specify if the PDU contains any urgent

data ACK This flag indicates whether the segment has any

acknowledgement to be considered. PSH The PUSH flag is used to request the TCP to

transmit all segments up to the current one. RST It is used for resetting the connection SYN It is used for synchronization FIN It is used for indicating end of data.

Window This field is for flow control with credit allocation. It

specifies the number of data octets beginning with the one indicated in ACK field, which the sender is willing to receive

Check sum field This is the one’s complement of modulo 16 additions on all 16 bit words in the header.

Urgent pointer This points to the next segment after the urgent data. It indicates to the receiver the length of the urgent data coming in.

Options and Padding

Some options may be available which are specified in the options field

Page 24: Internet And Internet Protocol Suite

The pseudo header contains the 32 bit IP addresses of the source and destination machines, the protocol number for TCP and the byte count for the TCP segment including the header. Including the pseudo header in the TCP checksum computation helps detect undelivered packets, but doing so violates the protocol hierarchy, since the IP addresses in it belong to the IP layer and not to the TCP layer. PAGE NUMBER 528 FIGURE 6.25 TANNENBAUM.

7.4.3 FEATURES OF TCP

TCP Connection establishment and Release Connections are established in TCP is by means of a three-way handshake protocol. The servers passively wait for an incoming connection by executing the LISTEN and ACCEPT primitives. The other side say the client, executes a CONNECT primitive, specifying the IP address and the port to which it wants to connect, the maximum TCP segment size it is willing to accept, and some other user data. At the destination the TCP entity checks if there is any process that is doing a LISTEN on the specified port in the destination port of the incoming packet. If there is no such process the TCP entity rejects the connection request. In case there is any process that is listening, then it can either accept or reject the connection. Although TCP connections are full duplex, we can consider them to be a pair of simplex connections. Each simplex connection is released independently of the other. To release a connection, either party can send a disconnect request TCP segment. The connection will be finally closed when this TCP segment is acknowledged by the other end. However to avoid the two army problem the TCP protocol implements a timer. If a response to the disconnect request is not received within a specified interval the connection is dropped. The other side will eventually notice that nobody seems to be listening to it anymore and will time out as well.

TCP transmission policy Window management in TCP is not directly related to acknowledgement as in most data link protocols. For example, suppose that the receiver has a 4096-byte buffer. If the sender transmits a 2048-byte segment that is correctly received, the receiver will acknowledge the segment, however, since it has only 2048 bytes of buffer space (until the application removes some data from the buffer), it will advertise a window of 2048 starting at

Page 25: Internet And Internet Protocol Suite

the next byte expected. Now the sender transmits another 2048 bytes, which are acknowledged, but the advertised window is 0. The sender must stop transmitting, until the application process on the receiving host has removed some data from the buffer, at which TCP can advertise a larger window.

TCP congestion control TCP tries to avoid congestion by choosing a suitable window size. The receiver can specify a window based on its buffer size. However congestion can still occur in the network. Thus we have to solve two potential problems -network capacity and receiver capacity. To do so each user maintains two separate windows: the window the receiver has granted and a second window, the congestion window. The number of bytes that may be sent is the minimum of the two windows. Thus the effective window is the minimum of what the sender thinks is all right and what the receiver thinks is all right.

7.4.4 CAPABILITIES OF TCP Since segments can be fragmented, it is possible that a part of the transmitted segment arrives but the rest never arrives. Segments can also arrive out of order and they cannot be acknowledged because the previous have not turned up yet. Segments can also be so long in transit that the sender times out and retransmits. If a retransmitted takes a different route than the original, and is fragmented differently, bits and pieces of the original and the duplicate can arrive sporadically, requiring careful administration to achieve a reliable byte stream, and with so many networks making up the internet, it is possible that a segment may occasionally hit a congested or broken network, along its path. TCP has to deal with these problems and solve them in an efficient way.

Page 26: Internet And Internet Protocol Suite

Objective Questions 24.01 A segment consists of a fixed __ byte header plus an optional part

followed by ____ bytes. 24.02 The source and destination addresses are ____ bits long. 24.03 Segment number is for connection-oriented service to check whether

each segment is transmitted correctly. (True/ False) 24.04 There are ___ Flags in TCP header. 24.05 The servers passively wait for an incoming connection by executing

the ________ and ______ primitives. 24.06 TCP connections are full-duplex. (True/False)

Subjective Questions 24.11 Describe the TCP header. 24.12 Discuss TCP connection establishment and release. 24.13 Give and idea of the TCP transmission policy 24.14 How can TCP be used to deal with network or internet congestion?

Page 27: Internet And Internet Protocol Suite

UDP. protocol suite

Page 28: Internet And Internet Protocol Suite

LESSON OBJECTIVE General

The lesson will discuss the connectionless transport layer protocol, i.e. the User Datagram Protocol.

Specific

The focus areas of this lesson are: 1. idea of UDP 2. complete TCP/IP protocol suite

7.5.1 UDP In addition to TCP, there is one other transport-level protocol that is in common use as part of the TCP/IP protocol suite: the User datagram protocol (UDP). The User Datagram Protocol (UDP) supports network applications that need to transport data between computers. Applications that use UDP include client/server programs like video conferencing systems. Although UDP has been in use for many years -- and overshadowed by more glamorous alternatives -- it remains an interesting and viable technology. UDP -- like its cousin the Transmission Control Protocol (TCP) -- sits directly on top of the base Internet Protocol (IP). In general, UDP implements a fairly "lightweight" layer above the Internet Protocol. UDP's main purpose is to abstract network traffic in the form of datagrams. A datagram comprises one single "unit" of binary data; the first eight (8) bytes of a datagram contain the header information and the remaining bytes contain the data itself. UDP provides a way for applications to send encapsulated raw IP datagrams and send them without having to establish a connection. Many client-server applications that have one request and one res0ponse use UDP rather than go to the trouble of establishing and releasing a connection. UDP sits on top of IP. Because it is connectionless, UDP has very little to do. It adds a port addressing capability to IP UDP segment consists of the 8 byte header followed by the data. UDP Headers The UDP header consists of four (4) fields of two bytes each:

• source port number

Page 29: Internet And Internet Protocol Suite

• destination port number • datagram size (length) • checksum

UDP port numbers allow different applications to maintain their own "channels" for data; both UDP and TCP use this mechanism to support multiple applications sending and receiving data concurrently. The sending application (that could be a client or a server) sends UDP datagrams through the source port, and the recipient of the packet accepts this datagram through the destination port. Some applications use static port numbers that are reserved for or registered to the application. Other applications use dynamic (unregistered) port numbers. Because the UDP port headers are two bytes long, valid port numbers range from 0 to 65535; by convention, values above 49151 represent dynamic ports. The UDP datagram size is a simple count of the number of bytes contained in the header and data sections. Because the header length is a fixed size, this field essentially refers to the length of the variable-sized data portion (sometimes called the payload). The maximum size of a datagram varies depending on the operating environment. With a two-byte size field, the theoretical maximum size is 65535 bytes. However, some implementations of UDP restrict the datagram to a smaller number -- sometimes as low as 8192 bytes. UDP checksums work as a safety feature. The checksum value represents an encoding of the datagram data that is calculated first by the sender and later by the receiver. Should an individual datagram be tampered with (due to a hacker) or get corrupted during transmission (due to line noise, for example), the calculations of the sender and receiver will not match, and the UDP protocol will detect this error. The algorithm is not fool-proof, but it is effective in many cases. In UDP, checksumming is optional -- turning it off squeezes a little extra performance from the system -- as opposed to TCP where checksums are mandatory.

Page 30: Internet And Internet Protocol Suite

Figure 1 UDP header

The primary difference between UDP and TCP lies in their respective implementations of reliable messaging. TCP includes support for guaranteed delivery, meaning that the recipient automatically acknowledges the sender when a message is received, and the sender waits and retries in cases where the receiver does not respond in a timely way. UDP, on the other hand, does not implement guaranteed message delivery. A UDP datagram can get "lost" on the way from sender to receiver, and the protocol itself does nothing to detect or report this condition. UDP is sometimes called an unreliable transport for this reason. Another way in which UDP works unreliably is in the receipt of a burst of multiple datagrams. Unlike TCP, UDP provides no guarantees that the order of delivery is preserved. On the surface, an "unreliable" network protocol may not seem very worthwhile or desirable. But in fact, UDP can be very useful in certain situations, and it enjoys one key advantage over TCP -- speed. The reliability features built into TCP can be expensive in terms of overhead at execution time. Also note that UDP does not preclude reliable message delivery, it merely defers those details to a higher level of the network stack.

7.5.2 THE PROTOCOL SUITE Apart from TCP, the DOD also introduced a few other transport layer protocols such as

• TELNET: A terminal emulation program for TCP/IP networks such as the Internet. The Telnet program runs on a computer and connects it to a server on the network. Commands can then be entered through the Telnet program and they will be executed as if they were being

Source port

0 16 31

Destination port

Length Checksum

Page 31: Internet And Internet Protocol Suite

entered directly on the server console. This enables one to control the server and communicate with other servers on the network.

• FTP: used for exchanging files over the Internet. FTP works in the same way as HTTP for transferring Web pages from a server to a user's browser and SMTP for transferring electronic mail across the Internet in that, like these technologies, FTP uses the Internet's TCP/IP protocols to enable data transfer.

• SMTP: used for sending e-mail messages between servers. Most e-mail systems that send mail over the Internet use SMTP to send messages from one server to another; the messages can then be retrieved with an e-mail client using either POP or IMAP. In addition, SMTP is generally used to send messages from a mail client to a mail server.

• SFTP:

OTHERS

FT

P

S

M

TP

TE

L

N

ET

TCP

IP

NETWORK ACCESS

Page 32: Internet And Internet Protocol Suite

The Relation Of These Protocols To Each Other And To TCP/IP Is As Shown Below

NETWORK ACCESS

IP

ICMP ECP

TCP UDP

SNMPSMTP TELNET

FTP

ARP RARP


Recommended