0% found this document useful (0 votes)
2 views34 pages

Unit 3

The document discusses the network layer's functions, including logical addressing, routing, and error detection. It explains the structure of IPv4 packets, including header fields and fragmentation, as well as the transition to IPv6 for improved address space and routing efficiency. Additionally, it covers protocols like ARP and ICMP that support address resolution and error reporting in network communications.

Uploaded by

chaturvediadivya
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
2 views34 pages

Unit 3

The document discusses the network layer's functions, including logical addressing, routing, and error detection. It explains the structure of IPv4 packets, including header fields and fragmentation, as well as the transition to IPv6 for improved address space and routing efficiency. Additionally, it covers protocols like ARP and ICMP that support address resolution and error reporting in network communications.

Uploaded by

chaturvediadivya
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
Network layer BoD com CoM PLEATED PLAN Ua PIN SLM Co eR COLO coc cole (Seal eS] 6) onl LT tare Logical Addressing: Uses logical addresses to identify the sender and receiver. Routing: Responsible for finding the best route to send packets using routing protocols. Pe Te Sd A ene SOIT a CNL Leee Teta Rol ce Me-1e (ol =e allel meant ee CT Rae Mee Ne Na a CS aC aisle en eco Error and Flow Cor Teo a eee |e eRe ev RU RL LeTrc aml anole detecting corruption (not covering the entire datagram), with limited direct involvement i flow control, and using ICMP for some error control activities. (eee AEE en el eee EOC TOE A Tan CLOT datagrams crowd a network segment and addressing capacity exceedance issues in Tia gece a Network layer * The net ay . e source-to-destination delivery of a packet, possibly Source to destination delivery t t tl freed et Network layer J If a packet passes the network boundary, we need another addressing mM to help distinguish the source and destination systems. The network layer adds a “header to the packet coming from the upper layer that, among other things, includes the logical addresses of the sender and receiver. Oo CF ay es | a [as Teas [12s 191] [asa [193229] [Notapphatic_[ 22410 299] [Net appinatie [24010 355] Network layer iting: When independent networks or links are connected to create internetworks k of networks) or a large network, the connecting devices (called routers or swi jute or switch the packets to their final destination. One of the functions of the network layer is to provide this mechanism. Interdomain Path vector IPv4 IPv4 operates as an unreliable connectionless datagram protocol, offering a best-effort CONN ae Reena Ue icuccir ts edema UMMM RU alae a lo en a neo Si sule Reet) eae ol Pilea eae Calne Mr ctel met ence echt catcam Cee rien ere ea ec ea a sae aun) eet uae ice OR aime Leela nue teal a Cee ket Rune eh eA ena I TCP/IP protocol stack for secured data delivery. [ VER] HLEN ie Total len, Abits | 4 bits 8 16 bit Tdentification Flag Fragment 16 bits 3 1 Timeto-live | Protocol 8 bits 8 bits Source IP addres: ‘Options + paddin: (0 to 40 by Datagram Format ae ae ee ee cere Se eur eu kes a te Cc eae eC BOC eet eee n EU a aCe at UC Ra 20-65.535 bytes 20-60 bytes Header 6 bits Protocol S bits Source IP address (32 bits) Destination IP address (32 bits) Version Number: The 4-bit version number (VER) field defines the version of the IPv4 protocol, which, has the value of 4. CEE a To make the value of the header length (number of bytes) fit in a 4-bit header length, the total length of the Peete eck The total length is divided by 4 and the value is inserted in the field The receiver needs to multiply the value of this field by 4 to find the total length. Example: If header length field contains decimal value 5 (represented as 0101), then Header length = 5x Poca Ae The length of IP header always lies in the range of [20 bytes, 60 bytes] Se nas an Cae RNa td Ro Riga! Prices ‘The size of Options field can go up to 40 bytes. So, maximum length of IP header = 20 bytes + 40 eels SC eg Ca uaa RCL ee ECOL SOc Ree mean yee VER] HLEN a Tength bis | 4 bite 6 bit LE Header checksum bit ei at ie ee ee nnn Ee ee ait mene Mite tae called service type, is now called differentiated services. Precedence is a 3-bit subfield ranging from 0 (000 in binary) to 7 (111 in binary). The precedence Ce as Rem ee neo age ee ce cc coe ted Gee ee ee eco rele nce eee ee eee kas VER | HLEN | _ Serio Source IP add Cer —E—— Ss See eae au Coen rasa Sean) eee aL that is used for Quality of Service (QoS) Descripiion Normal (default) Minimize cost Maximize reliability Maximize throughput Minimize delay TOS bits is a 4-bit subfield with each bit having a special meaning. Although a bit can be leither 0 or 1, one and only one of the bits can have the value of 1 in each datagram SNMP (| 0010 | Maximize reliability TELNET | _1000 mize delay FIP Gata) | 0100 | Maximize trouatpar FTP (controt) 1000 | ‘Ni iy a ~ Total Length: It defines the total length (header plus data) of the IP datagram in bytes. Th oC eee eck wea anced re ured Don acc eee CT a er CoC) DRC ce eT ae a ean esa rote Eee Eo F To find the length of the data coming from the upper layer, subtract the header length from| Muse See eu. etc Ee Destination IP addre Protocol MTU Hyperchannel 65,535 Token Ring (16Mbps) | 17,914 Token Ring (4 Mbps) 4,464 rane paylead se FDDI 4,352 MTC: Motwen te ti meme | _1.s00 K25 [376 | PpP 296 The value of the MIU aiffers from one physical network protocol to another. For example, the value for a LAN is Ce ae ee Cae ORES aca Un rae eg ec a enc has its own header with most ofthe fields repeated, but some have been changed such as flags, fregmentation offset, and total length and checksum is recalculated at each point. CC Ce ese Cu Coen a eee Cea UCL datagram may be fragmented several times before it reaches the final destination. 16-bit identification field identifies a datagram originating from the source host eee Cum a conten cme sku ces Ae Oo Rec Rn NT a eau a csc CU Ree se) oy PUR Re eee a renner Mu ae LL Se eRe ue UR MR CR ec en ee ce) RoE oem hme Caen ie eee une arn a etc identification number helps the destination in reassembling the datagram. VER] HLEN Tent fic) Fragmentation is a process of dividing the datagram into fragments during its transmission. De Un ice RnR eRe I Ce mee }, The reassembly of the datagram, is done only by the destination host, because each fragment Peele ela a ere MR cya elec Ree Rae Ne a uae oe | Flag Field: The 3-bit flags field defines three flags. * The leftmost bit is reserved (not used). * The second bit (D bit) is called the do not fragment bit. ROU AS CRU aia Cc * Ifits value is 0, the datagram can be fragmented if necessary. * The third bit (M bit) is called the more fragment bit. + If its value is 1, it means the datagram is not the last fragment; there are more Dem Seon PO Ue OSes Fragmentation Ufset: ine 15-bit fragmentation offset field shows the relative position ofthis fregment with respect to the whole datagram. Itis the offset of the data in the original datagram measured in units of 8 bytes. Da near entcC TLE Ce Diu SL RECOM Sake p) The second fragment carries bytes 1400 to 2799; the offset value => 1400/8 = 175. The third fragment carries bytes 2800 to 3999. The offset value => 2800/8 = 350. i :o-Live (TTL): field in a datagram dictates the maximum number of hops (via routers) it TRC Se haa ORM MT CUM TUT mol me ED NUE OO Lael Cm UN Lele ae Com col ane oe RR UTM Le) ol oem McLee le Tee li ae MMe eM eV eT a aioe Cel MAL Ue Ron ela Erolt aa -B le) cles Meee CMC Rec eon ones ne ee deliberately, like confining it to a local network by setting the TTL value to 1, causing its discard Eau R acid Total length IG bits Frage Destination IP addres BA aay eee rn earn her eae a ek nee amin Be COR Cc Uc Rea estou a ec eee foleel corse ET oe ele) ola ee MTR R UE Cua oC Re a nek CULL) Peo eee Rien elie ees) Header checksum: The IP header checksum field only verifies the header, not the payload, indicating that IP is not entirely reliable as it doesn't affirm the payload remains unaltered during transmission. SR Ee ALR eRe ea mm eR ea eee DU eC neue nen CoC UA rc cucu ike Roo CTC a Cec aera te each Reece The IPv4 packet's header, which changes at each visited router (but not the data), is the only section TOC Ro a om at aun ee ne eo tc ac © entire packet's checksum at every router. Petr nee re eetcerat he coceriniere itee fields define the IP address of the source and destination respectively. VER | HLEN Protocol Sits The variable part comprises the options that can be a maximum of 40 bytes. Options, as the name implies, are not required for a datagram. They can be used for network testing and Cesta TT ewe e unc dL lyre muon e Tee el NMS oR) Ai} TC eTicy Se Neil RUNS R OM eel ohare RUMI RU Ec ac aa can list up to nine router addresses. It can be used for debugging and management dsc Bette eee re Oh Ru een keh Cun eee ec Cac through the Internet. Dictation of a route by the source can be useful for several purposes. Ste rae ma UR eet tee eT ES UE oe SD throughput. BUEN eee Rua mela ee Rem us aed ee ec ae) See Rae en ena LCC Cat On ue T et aeLs {fa datagram specifies a strict source route, all the routers defined in the option must be visited by the datagram. A router must not be visited if its IPv4 address is not listed in the datagram. If the datagram visits a router that is not on the list, the datagram is discarded and an error message is issued. if the datagram arrives at the destination and some of the entries were not visited, it will also be discarded EI EMC I Pee aan Se eee enue ace ded at ems ena ru aoa be visited, but the datagram can visit other routers as well. eset) * Atimestamp option is used to record the time of datagram processing by a router. The UAL SMM ALO eee UU Om ou en * Knowing the time, a datagram is processed can help users and managers track the behaviour of the routers in the Internet. We can estimate the time it takes for a datagram to go from one router to another. We say estimate because, although all routers may use Universal time, their local clocks may not be synchronized, ia) Each packet can be divided into two parts : See eeee eg Sao , The payload is made up of two parts : Mates eu encuc alice aac) 4 otisy oem eae | Next Header (726-008) DatarPayiond Version: This is 4-bit field which defines the SR UNM | veec0|Pscrty/ Tato coss aces oo priority of the packet with respect to traffic a abarad et Neo | eat) The flow label is a 3-byte field eee eco ae Source IP Address (12843) eee merce ental PS = Pierce eee ea Sree eren eee iene Extonsion Headers (1...-n) eae etc a (204s) Next header: The next header is an 8-bit ee rea Ur Cea Pee OanRUC ccc Pee et ese ee ee eee vil. Source address: The source address field is a 16-bytes internet address that identifies the original source of Cer Seen ne eee oe ECC enter ae eaeer ee Ce eee ce ix. Extension header: Extension header field help in processing of data packets by appending different extensior header. Each extension header has a length equal to multiple of 64-bits. es Seed Ga ae) Be Seer ett) 1. IPv4: 32-bit (4 bytes) 2. IPv6: 128-bit (16 bytes) [Link] Notation 1. IPv4: Decimal (e.g., [Link]) > 2. IPv6: Hexadecimal (e.g., 2001:0db8:85a3:0000) Oa ome eee ee ere ei Toa Pa ernie er On ar lay Cre Teel) 1. 1Pv4: Manual or DHCP PP ae ee eee ent te tun Ve Reta sea) Seer PR NaC ce once Pe aes gs eee ee ae ee eee oe ‘ah ree ao * Larger Address Space: Can accommodate a virtually unlimited number of unique addresses, Aclelicla aur ec ume mera Clans * Simplified Header: IPv6 has a simpler header structure, which improves the speed of routing by allowing routers to process packets more efficiently. > Tice UT eo sa AC ee eee ge Ot cbr Teck Ru q CES OU CUMS Mm Reon ec urea eeola) set pce aa & No NAT Required: IPv6 was designed to eliminate the need for NAT, making end-to-end ce eee ela EU Coe earn AU Rea) 1 © Mobility and Security: IPv6 was built considering modern requirements, offering better eT amu ene Ur am eer PY EN Tenet Lee Me kL uct ie Me Une he Uc will see that a protocol called ARP, the Address Resolution Protocol. Nee LCS RUE TE SEP cet erNe lee asm ee eee reer Utes h om Lack of flow and error control in the Internet Protocol has resulted in another protocol, ICMP, that provides alerts. It reports congestion and some types of errors in the network or destination host IP was originally designed for unicast delivery, one source to one destination. As the Internet has evolved, the need for multicast delivery, one source to many destinations, has increased tremendously. IGMP gives IP a Oeste i 6 OW SEO Address Resolution Protocol (ARP) BUT eee RUS caters ei nea iu Ru ete ea) the link-layer address of the next node. OTT Se UM ae Cees ORR Ce Cel Co ae eee To ee oe , Protocol, maps the address to the corresponding link-layer address, and passes it to the data- Giang Sree Com aed nace Re Un RR ct ay EOI ae le BT Sel a Uo ase aaa i i eae eR aT Lo) DUS Cur Coote na cael oe CT Cee ec eG ae ee ere aL ROC one eat A ees ea oe Taos SU ee kom ae ae ce a Rn ara GEC N eae) ermine at een eee et rata) : Sysem 8 network, it sends an ARP request packet. es oe ee eT os >So ee ee eed nd Because the sender does not know the link: ee ect as Cees Cee ea eee teen eee ey etet reat Seen eee a cy Se Oey te een : pos =) =” 6o eee ete ee ea ; and link-layer addresses. The packet /s unicast ; TSE ede anny Eee rernee rere asain © these: eens a 1, _SaeaB NT * Reverse Address Resolution Protocol (RARP) finds the logical address for a machine that knows only its physical address, Each host or router is assigned one or more logical (IP) addresses, which are unique and independent of the physical (hardware) address of the machine. To create an IP datagram, a host mL cau Ren ae od © The IP address of a machine is usually read from its configuration file stored on a disk file. However, a ot eee alc RO ees aetna ume Ase eRe eu eee eee ee ee eet ee GE i RUC ee ted t The machine can get its physical address (by reading its NIC, for example), which is unique locally It can then use the physical address to get the logical address by using the RARP protocol. eee Se Ua kar Tis) EUR cer tele cae ee elec] network. Another machine Rt ee acs PIC Ra a ae got © will respond with a RARP eae C Pe O Csr sure ® must be running a RARP ens ec eeu nurtures Pe ys ae nt iret} CSR eke Sie ala cea teed kre OKI ACen Ce The IP protocol has no error-reporting or error-correcting mechanism. ary ute ecied eek ten) ta What happens if a router must discard a datagram because it cannot find a Rota R UCR ceca e eae Clg ee radi oR Pek 1 te What happens if the final destination host must discard all fragments of a datagram because it has not received all fragments within a predetermined ST * These are examples of situations where an error has occurred and the IP protocol has no built-in mechanism to notify the original host. The IP protocol also lacks a mechanism for host and management queries. A host sometimes needs to Ge TR el mena aCe Ute oes alelid administrator needs information from another host or router. @ The Internet Control Message Protocol (ICMP) has been designed to compensate ® for the above two deficiencies. It is a companion to the IP protocol. O PTS VESTA eMC COR Me Rn Cd dee Reco eer et oe oe query(request & reply) messages. Ulead NOC a oon ere eet ee COGaas which occur in pairs, help Dee ators heey Pst ttad (destination) may encounter Dae ee eae cits Pea sete eg ene era Preis Cua aoe Paatedmil edad -4 Ve Cu ce Cad eee Ne ene cae ee on A protocols. Error messages are always sent to the original source because the only information ECE UR te eRe en ae ae eet eat Reet eal aL gee uses the source IP address to send the error message to the source (originator) of the COST CT | i oe) Ee) ee) ee) ee Type:3 Type:4 Type: 11 Type: 12 Type:5) Time exceeded message eC Se Ceca a tele a oC CO Ce el ee oa Lego) eT RR RNR Te SRO cM NES aR cee eo Parameter problem Rae cicelt mt eta ne al ne os een cn) Re Me oeeuo ne age cee eect une c Se eu ea eer Cha cir tae a ee ee en Eee nee Were een eT cc ee Destination Un-reachable Destination unreachable is generated by the host or its inbound gateway to inform the client Be Sua COE eu eee Re el} There is no necessary condition that only router give the ICMP error message some time Cea ceo eeu Nay ecco Me aCe Ce Cr un nen PTW eer 9 Redirect requests data packets be sent on an alternate route. The message informs to a host to update its routing information (to send packets on an alternate route). Redirect Error reporting Destination Source Time 5 o unreachable | quench | excooded hee Type: tt Type 5 e following are important points about ICMP error messages: ° No ICMP error message will be generated in response to a datagram carrying an | ICMP error message. 1D No ICMP error message will be generated for a fragmented datagram that is not the first fragment. D No IeMP error message will be generated for a datagram having a multicast address. No ICMP error message will be generated for a datagram having a special addr such as [Link] or [Link]. Query TOS CU eg AeA aed eee ad through the query messages, a group of four different pairs of messages. eR eR eM Re ee) ee cee Cee See ee aca ere ed en Ce eee ee data link layer frame. Types: 13and 14 Types: 17 and 18 Types: 10and9 Echo Request and Reply LoS Cooma er et tel rete eect cyte eC alte Cea ait Ce eae ee eee a Sold DeSoto Rea nnn ald gece ete tcc tee ec a Modern systems offer an advanced version of the ping command, capable of Fe dee ao eee ee el eer Rela este sae eu eiataeta PRC ie eat Rte oie As we discussed in the redirection message section, a host that wants to send data to a host on See ese eeu a en en eee ee eee eae ed must know if the routers are alive and functioning. The router-solicitation and router-advertisement eRe ae ete ae A host can broadcast (or multicast) a router-solicitation message. The router or routers that receive the See ee eke eS ane eee ue ace ra eat een Ree ea ae ee eer eet that when a router sends out an advertisement, it announces not only its own presence but also the Perea etek ore an eee EIS en ace ene eg aA Ce a ad en a EL oe ee eee ed aa rd Re kent ea ae To obtain its mask, a host sends an address-mask-request message to a router on the LAN. If the host knows the address of the router, it sends the request directly to the router. If it does not know, it Dect nen eae oe SM ee eer ee le EG coe a message, providing the necessary mask for the host. This can be applied to its full IP address to get its eee ee? Timestamp Request and Reply a esto KMS MSc meet ce I Rue a Lal sla ee AC MMC eee uC ase eM ae leu Oe LAr them. It can also be used to synchronize the clocks in two machines. IGMP Ae RoU nn ee a Se ae a RS ae eee a ee te eee cee ee ee Cee hee Oud ue Re ae a ROU u eed TN UI eel RM eo tara eoeRnecma I ecu De SOC ec a ere cee cr informed of changes in a stock price, or travel agents can be informed of a plane cancellation. = = = = fosl eT i IPV4 ADDRESSES Se Ce ke One i oe oe ae Cee cake ae Geo ce Me CR ie a Ue ok Cae Lae Rees Cet ete Cu a eee eee kn oe ae coe) ecm Do Cun net ace CR mn Uk n mRe R estimated to have exceeded 8.0 billion as of Sept 2023 eR eee) Cee RO ee hte ea Uae ad ee ee ees coe Cees ee ee ee ete ie erg eer Oar eee Ce ee ue ee a he ee eure ABOUT TECHNOLOGY IPvG Unique and Universal Se Co oe Oo Cn eae ee ee een irae’ ee ee ee eee ea aC ee ne Ga eee eee ° Oe ane ee ee eS eee ee Oe sot een eet nes PROS eee naa ee ee a eee cee cd ee ae ee ea ee) ere hited aky IPv4 address in dotted-decimal notation Se nace ee Une Brod LC Mee tis aCe 172. 16 . 254 1 + + + + MMA EE NAIeReteeRE 10107100 00010000 .11171110.00000002 ea eerie an ees eater Cee eo eee ee le Sc Ee ere FS a eae ee ec 32 DIG Prretrretrttet rrr et st) eee ee ac eae pee ea era Te Mee ees Pere Men ce ic Ree cn point (dot) separating the bytes. The following is the Cee eee un ee ce [Link] Classful Addressing IPv4 addressing, at its inception, used the concept of classes. This architecture is called classful eee A 32-bit IPv4 address is hierarchical and divided only into two parts: The first part of the address, called the prefix, defines the network (NetworkiD). Me Re CR Pan Ruch A eu aU Ren eedu ye Pee een ceri ie cae kek ee ee ean In classful addressing, the address space is divided into five classes: A, B, C, D, and E. Each Etec eeu eae econ To accommodate both small and large networks, three fixed-length prefixes were designed Ea es Ar Pee Reserved for future use Address space 4.294,967,296 addresses S bits — 8 bits 8 bits | om 8 bits CCC ee ESL Mon Eee Ee CUS el Soe NTs (ogi Class A Sod ia ea en RON Tae aac) + Range of 1* octet is [0, 127] in dotted decimal notation 8 bits 8 bits 8 bits |_| Class Prefixes First byte TT CA [=8bs [O07 107 Prefix B [n=l6bits | 128t0 191) 0 Prefix C |n=24 bits 192 to 223 110 Multicast addresses D_ |Notapplicable | 224 to 239 [li Reservedforfutureuse +) «| « Class D is not divided into Network ID and Host ID. Wao alsa ecm isle Lecce + First four bits are reserved to 1110 in binary notation * Range of 1% octet is [224, 239] in dotted decimal notation Muli Reserved for future use] Total number of IP Addresses available in class D = 27 (26,84,35,456) Class D is reserved for multicasting, in multicasting, there is no need to extract host address from the IP Address, this is because data is not Sai ole wor Tatra Tao Class E ° Class E is not divided into Network ID and Host ID. 2 How to identify class E address * First four bits are reserved to 1111 in binary notation * Range of 1* octet is [240, 255] in dotted decimal notation Ssh aT Tas (O_ Prix fase C | a Nass D Mulieastaddresses tass & [FETT feserved for Future ue =I Total number of IP Addresses available in class E = 27% (26,84,35,456) ol Pee gotta t oR comet al le Moles Yoel aa total 1 lela torte Gino aly Cen ie ron ee re ee aa ee ee SC ta et ea oa epee Meee a Ce cee oa EL ea] repeaters does not have any IP Address. eee ety Cee Se Pee] TO ee he Ue Bin Tetec tae Casting Mulitcast Direct Broadcast Limited Broadcast

You might also like