chapter1 ,2

42

Upload: tbijle

Post on 01-Oct-2015

235 views

Category:

Documents


0 download

DESCRIPTION

xzz

TRANSCRIPT

Basics of InternetChapter :1Basics of internetI.IWHAT IS INTERNET?L2PROTOCOLS AND STANDARDS1.3 INTERNET ADDRESSING1.4 UNSCASTSNG, MULTICASTING AND BROADCASTING1.5 CONNECTING DEVICES1.6 OS8 MODELL7 TCP/IP SUITE AND POSITION OF OTHER PROTOCOLS

1.1WHAT IS INTERNET?Internet is being used in many aspects of our daily life. It has affected and influenced whole world in terms of business, communication/entertainment, education searches etc. Internet is a well structured and organized system. The roots of today's internet are in the ARPANET (Advanced Research Projects Agencies Network) which was started by America's Department of Defense in 1960's. In 1969, the four nodes i.e. (1) University of California, Los Angeles (2) University of California Santa Barbra, (3) Sanford Research Institute and (4) University of Utah were connected together to from a network and the software was provided for communication called as NCP (Network Communication Protocol). It was the starting of internet.A network is a group of connected computers and / or other devices such as printers for communication and an Internet is a group of networks communicating with each other. The protocols used for communication over the internet are TCP and IP. These are combined together to form TCP/IP protocol suite, where TCP stands for TCP stands for Transmission Control Protocol and IP - Internet Protocol.The following is the list of some important events.1960: Four node ARPANET was established.1970: NCP was implemented on ARPA.1973: TCP/IP development begins.1977: Internet was tested using TCP/IP protocol suite.1978: UNIX distributed to academic / research sites1981: CSNET (A network supported by national science foundation) established.1983: TCP/IP becomes official protocol for ARPANET.1983: MILNET was born1986: NSFNET established' 1990: ARPANET replaced by NSFNET1995: NSFNET goes back to being a research network1995: Companies known as ISP (Internet service providers) started.1.2PROTOCOLS AND STANDARDS:Protocol is a set of rules used for communication between devices / computers over the network. A protocol defines what is to be communicated, how and when to communicate. The protocol is identified by syntax semantics, and timing.

Basics of Internet3Syntax:It defines the structure or format or data. Semantic refers to meaning of each section of bits defined in the syntax, how the pattern is interpreted and what action is to be taken. Timing refers to things (1) When data is to be sent (2) How fast the data is sent.Standards:Provide guidelines for manufacturers, vendors, government agencies and other service providers. They are essential for creating and maintaining an open and competitive market for manufacturers. They quadrate the international interoperability of data. They fall into two categories.(1) De facto: Standards that have not been approved by an organized body but have been adopted as standards through widespread use.(2) De jure (by law): Standards that have been legislated by an officially recognized body.Following are some organizations/committees who took part in developing the standards.(1) ISO: International Standards Organization(2) ITU-T: International Telecommunication Union-Telecommunication Standards Sector.(3) ANSI: American National Standards Institute.(4) IEEE: Institute of Electrical and Electronics Engineer.(5) EIA: Electronic Indtistri.es Association1.3 INTERNET ADDRESSING:"The host or routers connected over the internet are uniquely and universally identified by a 32 bit binary address called as IP address."IP Address:These are 32 bit addresses and one address defines only one, connection to the internet. The IP addresses are unique and universal. If a device is connected to internet via two networks it has two IP addresses.If a protocol uses N bits its address space is 2N i.e. it can have 2N addresses / connections available with it. IP protocol has two versions IPV4 and IPV6 currently being used is IPV4 which uses 32 bits. Therefore its address space is232 = 4,294,96/^96

> IP address uses two notations.(1)Binary Notation: It has four sections, each containing 8 bits.e.g. 01110100 10010101 00011011 11101010(2)Dotted Decimal Notation:

Class full Addressing:IP addresses are divided into different classes therefore it is called as class full addressing. In this address space of IP is divided into five classes A, B, C, D and E. Following is the distribution of address spaces among the classes.

If the address is written in binary notation, the first few bits of address can tell theclass of address.J.

In dotted decimal notation also we can identity the class of particular address.NetIQs and Hassids in IP Address:Class A, B, and C contains both netted and hosted where netted indicates the network id and hosted is the id of the machine/device class D and E are not divided into netted hosted class D addresses are used for multicasting there is only one block or address. Class E is reserved for special purposes.1.4UNICASTING MULTICASTING AND BROADCASTING:Communication on the internet is achieved through uncast, multicast, broadcast addresses.Uncast:Uncast means one to one communication i.e. a packet is sent from one source to one destination Uncast addresses belong to classes A, B, and C.Multicast:Multicast means one to many communication i.e. a packet is sent from one source to many destinations multicast address is a D class address.Broadcast:Broadcast means one to all. Internet allows broadcasting only at local level not at global level, i.e. a system cannot send message to all hosts or routers in the world. Because of this restriction network traffic is avoided.1.5CONNECTING DEVICES:(1) Repeater: It is a device which operates on physical layer of OSI model. Its function is to receive the signal and retransmit it.

6Internet Technologies (B.Sc. IT)Since the signal has to travel long distances it may become weak after traveled some distance, due to this the receiver may receive weak signal. Repeaters are the devices which retransmits the signal with original strength. Repeater extends the physical length, of network. Repeater doesn't have any filtering capacity. It can connect two segments of a LAN.

Fig. 1.1(2) Bridges: Bridge operates at physical and data link layer. It connects two segments LANS.As a physical layer device it regenerates the signal and as a data link layer device it checks the physical address.A Bridge itself has no physical address. It acts only as a filter. A bridge has a table which is used in filtering decisions.

Fig. 1.2(3) HUBS: It is also called as multiport Repeater. It is normally used to create connected between stations in physical star topology.

(4) Router: It is a three layer device which operates on physical, data link and network layers. As a physical layer device it regenerates the signal. As a data link layer device it checks the physical addresses. As a network layer device it checks the network layer addresses. A router connects independent LAN's or WANs to create an internet work.

Fig. 1.4 Switches:We can have two layer or three layer switchTwo Layer Switch:It is a bridge with having many interfaces and a design that allows faster performance.Three Layer Switch:It is a router with an improved design to allow better performance. A three layer switch can receive, process and dispatch a packet much faster than a traditional router even though the functionality is same.1.6 THE OSI MODEL:It is a layered framework for the design of network systems for communication between all types of computer systems. It consist of seven layers. The model was introduced in 1970's. It consist of set of protocols used in communication over the internet. Following are the different layers.Physical Layer:At the physical layer the data is represented as bit stream. It contains the physical mediums and devices used in communication and deals with electrical and mechanical specifications of the interface. Physical layer deals with following,(1) Physical characteristics of transmission media. \(2) Representation of bits as a stream of bits.(3) The transmission rate i.e. The number of bits sent per second.

,(4) Synchronization of bits.(5) The physical topology used for connection.(6) The mode of transmission, the modes can be simplex, duplex (half duplex and full duplex).

Fig. 1.5: OSI Layers Data Link Layer:It makes the physical layer to appear error free to upper layers. It does the flow control and error control Following are some responsibilities of data link layers.(1) Dividing the stream of bits into data units called as frames.(2) Adding headers to frames to define the sender and / or receivers.(3) Controlling the flow of data.(4) (4) Error control - Data link layer gives the reliability to physical layer by adding mechanisms to control the errors like damaged frames, duplicated frames.Network Layer:The N/W layer is responsible for source to destination delivery of packets traveling through multiple links.The network layer adds the header to the packets coming from upper layer, includes the logical .address of sender and receiver. Network layer ensures that each packet gets from its origin to its final destination.As Routers operate on N/W layer they route the packet to the final destination. One of the important function of network layers is the Routing.Transport Layer:Is responsible for end to end delivery of the entire message? The network layer does not recognize any relationship between the packets those reached at destination. It treats each packet independently whether or not they belong to same message. Transport layer ensures that whole message arrives intact and in proper order, overseeing error control and flow control. The transport layer also does the segmentation i.e. the message is divided into segments having sequence number.Like data link layer transport layer is responsible for error control and flow control. One more function of transport layer is connection control. It can give both connection oriented as well as connectionless service. ,Session Layer:It is a dialog controller layer, it establishes, maintains and synchronizes the interaction between source and destinations. For the dialog control session layer allows the communication between two processes in half duplex and full duplex mode.Presentation Layer.It deals with the syntax and semantics of the information exchanged between sourceand destination.. .'..The responsibilities of presentation layer includes translation (encoding), Encryption and decryption, and compression of data.Application Layer:The application layer is responsible for the interaction of user (human or software) with internet. It provides uses interfaces and services like gmail, file transfers and sharing of information,'and directory services.

1.7 TCP/IP SUITE AND POSITION OF PROTOCOLS:

Fig. 1.6 Short forms used:

Chapter 2Internet Protocol (IP)2.1 IP INTRODUCTION2.2 IP DATAGRAM2.3 FRAGMENTATION IN IP2.4 CHECKSUM CALCULATION2.5 OPTIONS USED IN IP2.6 IP PACKAGE2.7 INTERNET PROTOCOL VERSION 6 (IPV 6)2.8 PROBLEMS2.9 2.1IP INTRODUCTION:IP is called as connection less unreliable protocol. It is one of the protocol of TCP/IP suite. It is combined with TCP to achieve more reliability while transmitting data. The data at IP is represented in the form of datagram. As IP is a connectionless protocol datagram can follow different routes to reach the destination. Therefore the problems of out of order arrival or corrupted datagram may pour during transmission. To avoid these problems IP relies heavily on higher level protocols like TCP:2.2IP DATAGRAM:

(1) VER: It is 4 bit field identifies version of IP protocol, i.e. IPV4 or IPV6. The current used version is IPV4.(2) HLEN: This field gives total length of header in a 4 byte words. When there are no options, header length is 20 bytes and when the option field is at its maximum size the value of this field is 60 bytes. Hence minimum length of Header is 20bytes.(3) DS (Differentiated Services):IETF (Internal Engineering Task Force) changed the interpretation and name of services field. Previously it was called as service Type and now it is called as Differentiated Services.

(a) Service Type:

D - Minimize delayT - Maximize throughoutR-Maximize reliabilityC - Minimize costThe first three bits are called as precedence bits next four bits are TOS bits & It bit is never used.The precedence defines the priority of the datagram in issues such as conges tic If a router is congested and needs to discard some datagrams, those datagrams we lowest precedence are discarded first. Some datagrams in the Internet are mc important than others. For example, a datagram used for network management much more urgent and important than a datagram containing optional information for a group.TOS bits is a 4-bit subfield with each bit having a special meaning. Although a 1 can be either 0 or 1. One and only one of the bit can have the value of 1 in ea diagram with only 1 bit set at a time, we can have five different types of services.

(b) Differentiated Services:In this interpretation, the first 6 bits make up the code point subfield, and the last 2 bits are not used. The code point subfield can be used in two different ways.(i) When the 3 right most bits are Os, the 3 leftmost bits are interpreted the sameas the precedence bits in the service type interpretation. In other words, it iscompatible with the old interpretation.(ii) When the 3 rightmost bits are not all Os, the 6 bits define 64 services based on the priority assignment by the Internet or local authorities. The first category contains 32 service types; the second and the third each contain 16. The first category (numbers, 2, 4, ..., 62) is. assigned by the Internet authorities (IETF). The second category (3, 7, 11, 15, ..., 63) can be used by local authorities (organizations). The third category (1, 5, 9, ..., 61) is temporary and can be used for experimental purposes. Note that the members are not contiguous. If they were, the first category would range from 0 to 31, the second from 32 to 47, and the third from 48 to 63. This would be incompatible with the TOS interpretation because XXX000 (which includes 0, 8,16, 24, 32, 40, 48 and 56) would fall into all three categories. Instead, in this assignment method all these services belong to category 1. Note that the assignments have not yet been finalized.

(4)Total Length: It is a 16 bit field that defines total length of IP datagram in bytes.Length of data = Total length - Header Length.The total length of IP address datagram is limited to (216 1) - 65535 bytes.(5) Identification, flags, Fragmentation offset are the fields used for fragmentation will be discussed later.,(6) Time to live: A datagram has a limited lifetime In its travel through internet. The TTL field limits lifetime for the datagram when a router processes a request. It decrements the TTL field by 1 and if the value is 0 (zero) it will drop the packet.(7) Protocol: This 8 bit field defines the higher level protocol that uses the services of IP layer. This field specifies the final destination protocol to which IP datagram should be delivered. IP datagram can encapsulate data from several higher level protocols such as ICMP, IGMP," UDP and TCP.(8)

(8) Header Checksum: The checksum concept is used for error control, will be discussed later.(9) Option: Only 6 options are currently being used, they are included in the variable part at the IP datagram. They are not required for every datagram. They are used for Network testing and debugging.Format for Option:

2.3 FRAGMENTATION IN IP:A datagram can travel through different networks. Each router decapsulates the IP datagram from the frame it receives processes it and then encapsulate it in another frame. The format and size of received frame and sent frame depend on physical network through which the frame has just travelled or the frame is going to travel respectively. Sometimes it is required to divide the datagram to make it possible to pass through different networks. This process is called as fragmentation. Sometimes a fragmented datagram may also be fragmented if it reaches to the network of even smaller MTU.MTU (Maximum Transfer Unit):When datagram is encapsulated in a frame the total size of datagram must be less than the maximum size which is defined by restriction imposed by underlying software and hardware used by Network.

Values of MTU for different protocols.Fields Related with Fragmentation:(1) Identification: This is 16 bit field identifies a datagram originating from source. The combination of identification and source IP address must uniquely define a datagram when it leaves the source. To guarantee the uniqueness IP protocol uses a counter. Counter is initialized to positive number. When IP protocol sends a datagram it copies Current Value of counter to all the fragments of datagram and increments the counter by one hence all the fragments have same identification number.(2) Flags: This is a 3 bit field, the first bit is reserved, 2nd bit is do not fragment and third bit is for more fragments.

D - Do not fragment M - More fragments

(3) Fragmentation Offset: This is a 13-bit field showing the relative position of the fragment with respect to whole datagram. It is the offset of the data in the original datagram measured in units of 8 bytes.Consider a datagram with a data size of 4t)00 bytes which is fragmented into 4 fragments._ Internet Protocol (IP)17The bytes in original datagram will be numbered from 0 to 3999. The offset of these fragments are calculated as:The first fragment contains bytes form 0 to 999therefore offset =0/8 = 0.The second fragment contains bytes numbered from 1000 to 1999.hence the offset =1000/8 = 125 'Similarly third fragments offset is 2000/8 = 250.Fourth fragments offset is 3000/8 = 375.

2.4 CHECKSUM CALCULATION:It is the error detection method used by IP. Checksum is additional information added to a packet which is used protection of the packet from corruption. Checksum is calculated at the sender side and the value obtained is sent with that packet. The receiver does same calculation on the whole packet. If the result is satisfactory the packet is accepted otherwise it is rejected.Checksum Calculation at Sender:Steps:(1) The packet is divided into k number of sections each having n number of bits.(2) All the sections are added using one's complement arithmetic,(3) The final result is complemented to make the checksum., t -

18Internet Technologies (B.Sc. IT)Checksum Calculation at Receiver:(1) Receiver also divides the packet into k number of sections each having n bits.(2) It then adds all sections.(3) Complement of result is taken.(4) If the final result is zero then packet is accepted otherwise not. For example: Consider following IP packet

Checksum Calculation at Sender:4,8,0->010010000000000064->00000000010000001-00000000000000010,0->00000000000000005,17-000001010001000104000000000000000010,1-00001010000000015,1-0000010100000001 ;.12,4->00001100000001007,9->0000011100001001Sum0110111101100001l's Complement1001000010011110ChecksumNow the packet will look like

Checksum Calculation at Receiver:4,8,0 -> 010010000000000064 -> 00000000010000001 - 00000000000000010,0. -> 0000000000000000. 5,17 - ; ooooo1o1ooo1ooo1Checksum -> 100100001001111010,1 -> 00001010000000015,1 -4 000001010000000112,4 -> 00001100000001007,9 -> 0000011100001001Sum 1111111111111111l's Complement Checksum 0000000000000000Complement is zero. Hence packet will be accepted.2.5 OPTIONS USED IN IP:IP header is divided into two parts fixed (20 bytes) and variable (40 bytes). Thevariable part contains the options and their maximumsize is 40 bytes. Options areoptional fields.Format for Options

Explanation: Code:Field is divided into three parts(1) Copy: To indicate whether options are to be copied into all fragments or only in the first fragment.(2) Class: Indicate the general purpose of the option.(3) Number: Defines the type of option currently only six types are used.Length:Defines the total length of options including code field and length field. This field is not presented in all option types.Data:The data field contains data that specific options require. This field is not present in all option types. Option Types:No operation: It is a 1 byte option used for filler between options:

No-op is used to align next option End of Option: It is also 1 byte option used for padding at the end of option. This can be vided only once in the option to indicate the end.

Internet Protocol (IP)

Record Route:It is used to record the routers that handle the datagram over internet. It can list upto nine IP addresses of router. Since maximum size of IP header is 60 bytes including 20 bytes for base header. Remaining 40 bytes left for option part which can be used to store maximum nine addresses.Strict Source Routing, Loose Source Routing:Strict source route and loose source route options are defined in options of IP datagram. If a datagram is specified with strict source route option, it must visit all the routers defined in option. The datagram can not visit any router whose address is not specified in the list, if it does so datagram is discarded and an error message is issued. Also if a datagram reaches destination without visiting some of the routers specified in the list, it will be discarded and an error message is issued. Strict source routing is not used by non-privileged users who are not aware of the physical topology of the internet.

Loose Source Route:In this option routers specified in the list must be visited as well as a datagram is free to visit other routers. It is similar to strict source route but relaxation is given to visit other routers.

2.6 IP PACKAGE:

IP supports several options and processing of options, but the important componentsof IP package are:(1) Header Adding Module.(2) Processing Module(3) Fragmentation Module(4) Reassembly Module(5) Routing Module(6) Routing table(7) MTU table and(8) Reassembly table.(1) Header Adding Module:It is responsible for adding header to the IP datagram while encapsulating the data, when it receives data from an upper layer protocol along with the destination IP address.

(2) Processing Module:It is called as heart of an IP package. It receives datagram from an interface or froman header-adding module. It processes and routes the datagram regardless of itssources.When datagram comes to processing module, it checks whether it is (a) lookback packet or (b) a packet which has reached its destination. In both the cases it sends the packet to reassembly module.If the Node to which datagram is being processed is router, it will decrement the TTL field by one, if the value is less than or equal to zero, the packet will be discarded and I CMP message is sent to sender (source). If the value of TTL (after decrementing) is greater or equal to 1, processing module sends the packet to routing module.Processing Module:(a) Take a datagram from one of the input queues.(b)If (destination address is 127. X. Y. Z (loopback packet) or (any one of the localaddress)(i) Send the datagram to reassembly module,(ii) Return.(c)If (machine is router)(i) Discard the datagram.(ii) Send an ICMP error message.(iii) Return.(d)If (Titlist< = 0)(i) Discard the datagram.(ii) Send an ICMP error message.(iii) Return.(e) Send the datagram to routing table.(f) Return.(3) Fragmentation Module:It receives an IP datagram from routing modules. The datagram contains address of either next station or final destination and interface number through which the datagram is sent out. The fragmentation module then checks the MTU table to find MTU for specific interface. Depending on the MTU Fragmentation module fragments, the datagram if required, adds the header to it and sends them to ARP package for address resolution.Fragmentation Module:Receive: IP packet from routing module.(1) Extract the size of datagram. :(2) Compare size with MTU.If (Size > MTU of corresponding network)2.1If (D bit is set C = 1)(a) Discard the datagram.(b) Send ICMP error message.(c) Return.2.2Else(a) Calculate maximum size.

(b) Divide datagram into fragments.(c) Add Header to fragments.(d) Add options if required.(e) Send the datagram.(f) Return.(3)Else.2.1 Send the datagram.(4)Stop.(4) Reassembly Module:It receives datagram fragments from processing module, which have arrived at their final destination. The module considers un-fragmented datagram as a single fragment.Since IP is a connectionless, unreliable protocol, it does not guarantee that fragments will arrive in order at the destination. Hence it uses reassembly table to handle intermixed fragments. For proper ordering of fragments. During the reassembly of fragments of a datagram if established time-out has expired or any fragment is missing then the fragments are discarded.Reassembly Module:Receive: An IP datagram/fragments from the processing module.(1)If (offset value is zero and M bit is 0)(a) Send the datagram to appropriate queue.(b) Return.

(2) Search the reassembly table for the corresponding entry.(3) If (not found)(a) Create a new entry(4)Insert the fragments at the appropriate place in the linked list.(a)If (all fragments have arrived)(i) Reassemble the fragments(ii) Deliver the datagram to the corresponding upper layer protocol, (iii) Return.(b)Else.(i) Check the time-out.

26Internet Technologies (B.Sc. IT)(ii) If (time out is expired) Discard the fragments. Send ICMP error message., (5) Stop(5)Routing Module:.It receives IP packet from processing module. If a packet is to be forwarded it is passed to this module. It finds the IP address of the next station along with interface number and sends the packet to fragmentation module.(6)Routing Table:It is used by the routing module to determine next hop address of the packet.(7)MTU Table:It is used by fragmentation module to find maximum transfer unit of a particular interface.(8)Queues:The package uses two types of queues: input queues and output queues.Input queue store datagrams coming from data link layer or the upper layerprotocols.'Output queue store datagrams going to data link layer or the upper layer protocols.Processing module is responsible for removing datagrams from input queues and,Fragmentation and reassembly module adds the datagrams into output queues.2.7 INTERNET PROTOCOL VERSION 6 (IPV6):It was proposed to overcome some deficiencies present in IPV4. Though IPV4 is a well designed data communication protocol it has some deficiencies like:(1) Address depletion is still a problem with IPV4.(2) IPV4 does not support some strategies and reservation of resources for real time audio and video transmission.(3) No encryption and authentication is available with IPV4. ,IPV6 is now a standard and soon it will replace IPV4 but its adoption is very slow. Itis because of three short term remedies - classless addressing, use of Dynamic HostConfiguration Protocol (DHCP) for dynamic address allocation, and Network AddressTranslation (NAT)..'

But fast spreading use of internet and new services such as mobile IP, IP telephony,may require 1PV6 rather than IPV4. , IPV6 has following advantages over IPV4:..... ,(T) It has large address space i.e. 128 bits long. (IPV4 = 32 bits therefore 232 - 1 addresses possible). Therefore there is huge increment in addresses available 232 + 2%. It has new format for header in which options are separated front base header and inserted when required, between base header and upper layer data which simplifies routing process,,] Additional functionalities are added with use; of new options.. , (2) It supports extension of the protocol to support new technologies. ;(3) The type of service field is removed and a mechanism called as flow label has been added to enable source to request special handling 'of the packet.(4) The encryption and authentication options are provided to support confidentiality and integrity of the packet.IPV6 Addresses:IPV6 addresses consists of 16 bytes since it is 128 bits long.To make it readable it uses hexadecimal colon notation, in which 128 bits are divided into eight sections of 2 bytes in length. Hence, the address consists of 32 hexadecimal digits, every four hexadecimal digits are separated by a colon. For e>..

If the address contains more zero digits, we can abbreviate it to make it more readable.For e.g.,0075 can be written as 75000E can be written as E

IPV6 defines three types of addresses - uncast, any cast and multicast.A packet sent to uncast address is delivered to specific computer.Any cast address defines a group of computers with addresses having some prefix (i.e. all computers connected to same physical network). Packet sent to any cast address will be delivered to exactly one of the member of this group, (generally the closest or most easily accessible).A packet sent to multicast address must be delivered to each member of the group.The designers of IPV6 divided the address space into two parts: (1) Type prefix -variable length defines the purpose of address. (2) Rest of addresses.The Prefixes for IPV6 addresses:

IPV6 Datagram:

'1) Version: This is a 4 bit field defining the version number of IP. Its value is 6 for IPV6.2) Priority: The 4-bit field defines the priority of packet with respect to traffic congestion.3) Flow Label: It is a 3 byte field provided for special handling for a particular flow of data.4) Payload Length: It defines the length of IP datagram excluding base header.5) Next Header: This 8-bit field defines the header that follows the base header indatagram. The next header is either one of the optional header used by IP or headerof encapsulated packet such as UDP or TCP.,6) Hop Limit: This 8-bit field defines number of hops the datagram can travel beforereaching the destination (same as TTL in IPV4).

"I Source Address: Source address is a 16 byte internet address that identifies the original source of datagram. Destination Address: It is a 16 byte field identifying the destination internet address. Some Reference Tables related with Datagram: (1) Next Header Codes:

(2) Priorities for Congestion-Controlled Traffic:

Flow Labels:When a sequence of packets sent from a particular, source to particular destination that needs special handling by routers is called as flow of packets. The combination of source address and value of flow label uniquely defines a flow of packets. There are. ihree rules defined to allow, effective vise of flow labels. -.;(1): Flow label is assigned to a packet by the source host. Label is random number between 224 - 1. Any source must not reuse flow label for new flow when existinglabel is still alive.(2)if a host does not support flow label, it sets this field to zero. If a router does notsupport flow label it simply discards it.(3)All packets belonging to same flow have the same source, destination, priority ancoptions.

Comparison between IPV6 and IPV4 Packet Header:2.8 PROBLEMS:Example 1:An IP packet has arrived with the first 8 bits' as shown 01.000010, the receiver discardracket. Why?Solution:

HLFN field is 0010,.'. the header length is 2 x 4 = 8 bytes. But the in immure header length is 20 bytes. Therefore packet is discarded.Example 2:'An IP packet has arrived with first few hexadecimal digits as shown below,45000028000100000102 is the packet discarded. How many hubs can this packet travel r-c-ore being dropped? The data being to what upper layer protocol?elution:The even packet is distributed as

The first digit indicates the version IPV4 similarly. The time to live field is 01 in hexadecimal i.e. 0000 0001 in binary, i.e. Value of TTL is 1. Therefore it can travel through only one router. Therefore packet is discarded when it travels through 1st hub and the protocol field is 02 i.e. the upper layer protocol used is IGMP.Example 3:An IP packet the value of header length is 1000 in binary. How many bytes of options being carried by this packet? Solution:The size of header is 8 x 4 = 32 bytes.Minimum size of header is 20 bytes.-. Options available with the given packet are of 32 - 20 = 12 bytes.Example 4:In an IP packet, value of header length is (10)i6 and the value of total length field is (0238)i6. How many bytes of data is being carried by this packet?Solution:Header length = (10)w = (10 10)2 HLEN =8x4+2x4= 32 + 8 = 40 bytes(0238)160000 00100011 1000512 + 32 + 16 + 8 = 568Packet length = Total length - H Length * 568 - 40 = 528 bytesExample 5:An IP datagram has arrived with the following information in the header (in hexadecimal)4500005400030000200600007C4E0302B40EOf02Then answer the following questions:(a) What is the size of data?(b) Which version of the protocol is used?(c) Are there any options?(d) Is checksum used?' (e) (f) How many more routers can the packet travel to?(g) Is the packet fragmented?(h) What is the identification, number? (h) What is the type of service?Solution:First draw the Datagram with appropriate values given:

(a)Version field is 4. Therefore version of the protocol is IPV4.(b)Haleness.5 x 4 = 20 bytes.Length of header is 20 bytes.Since header length is of minimum length/size.(c)Total length field is 0054 in Hex = 0000 0000 0101 0100 in binary..-. Total Length = 64 + 16 + 4 = 84 bytes..-. Length of data is 84 - 20 = 64 bytes. Data length = total length - HLEN.(d) The checksum field is 0000. Here no checksum is used.(e) Identification field is 0003.Hence identification number is 3.(g) Fragmentation is decided by flags and flags are 000.(f) The TTL field is 20 in Hex = 00100000 in binary. Hence the datagram can travel through 32 routers.

When D = 0 means datagram can be fragmented If required. ' :M = 0 means this is a last or only fragment.Therefore we can say that this is a last fragment but we can also conclude that since fragmentation is allowed the packet may he previously fragmented; , ;(h) The protocol field in- .06.; .,.Therefore the upper layer protocol in TCP

Example 6:In a datagram, the M bit is 0, the value of HLEN is 5, value of total length is 200 and offset value is 200. What is the first byte number and last byte number of datagram?Is this the first, last or middle fragment? "Solution:Since M bit is 0, it means there are no more fragments used. Hence this is the last fragment.Since HLEN - 5, Header length = 5 x 4 = 20 bytes, Total length = 200. 'Hence length of data = 200 - 20 = 180 bytes.Also offset is given = 200.200 x 8 = 1600 which is the first byte number.Since there are 180 bytes of data more 179 bytes are required for 180 bytes of data. .'.1600 + 179 = 1779.1779 is the last byte number. Example 7:A packet is arrived with M value 1 and offset 0. Is this the first, last or middle fragment?Solution:Since M bit is 1, it means that it is not last fragment and may be fragmented and since offset is 0, its starting byte number is 0, hence it is the first byte, ,

Example 8: The value of Header length is 7 and total length is 64 bytes how much size of options and data is carried by the datagram?. Solution: HLEN is 7..;. 7 x 4 = 28 bytes is the header length.Minimum length of Header = 20 bytes and remaining are the options. Hence, 28 - 20 = 8 bytes are for options. Also total length = 64 bytes. Size of data = total length - HLEN = 64-28 = 36 bytes.QUESTIONS(1)Draw an IP datagram header format, (May 11)(2)Explain Different Types of options used in IP.(3)Explain checksum calculation in IP.(4)Why fragmentation is used in IP? Explain the fields related with it.(5) Explain IP Package.(6) Explain differentiated services of the IP datagram? (Oct. 08, 5 marks)(7) Define checksum in IP. Explain checksum calculation at the receiver with the help of diagram? (Oct. 08, 7 marks)(8)Explain Fragmentation, Why it is required to fragment an IP datagram? Explain related tofragmentation?(i) Identification.(ii) Flags.(iii) Fragmentation offset. Explain with example. (Oct. 08, 8 marks)(9)Explain header description, total length, protocol and time to live fields of the IP datagram 'format? (May 08,8 marks)'(10) Explain option format of Internet Protocol. Explain strict source route and timestamp , option in detail? (May 08,8 marks)(11) Draw the IP packet format and explain each of its fields? (May 07,8 marks)(12) Draw the IP packet format and explain each of its field. Which field of the IP header change from router to router? (May 05, 8 marks)(13)What is fragmentation? Which are the fields of IP datagram related to fragmentation?How? (May 09, 5 marks)(14)Draw and explain the different fields in IP header. (May 09, 8 marks)