Computer Network Unit IV - Lecture Notes - Network Layer
Murugan146644
1,277 views
51 slides
Mar 09, 2025
Slide 1 of 51
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
About This Presentation
Title:
Lecture Notes - Unit IV - The Network Layer
Description:
Welcome to the comprehensive guide on Computer Network concepts, tailored for final year B.Sc. Computer Science students affiliated with Alagappa University. This document covers fundamental principles and advanced topics in Computer N...
Title:
Lecture Notes - Unit IV - The Network Layer
Description:
Welcome to the comprehensive guide on Computer Network concepts, tailored for final year B.Sc. Computer Science students affiliated with Alagappa University. This document covers fundamental principles and advanced topics in Computer Network. PDF content is prepared from the text book Computer Network by Andrew S. Tenanbaum
Key Topics Covered:
Main Topic : The Network Layer
Sub-Topic : Network Layer Design Issues (Store and forward packet switching , service provided to the transport layer, implementation of connection less service, implementation of connection oriented service, Comparision of virtual circuit and datagram subnet), Routing algorithms (Shortest path routing, Flooding , Distance Vector routing algorithm, Link state routing algorithm , hierarchical routing algorithm, broadcast routing, multicast routing algorithm)
Other Link :
1.Introduction to computer network - https://www.slideshare.net/slideshow/lecture-notes-introduction-to-computer-network/274183454
3. Data Link Layer Part 1 : https://www.slideshare.net/slideshow/lecture-notes-unit-iii-the-datalink-layer/275288798
Target Audience:
Final year B.Sc. Computer Science students at Alagappa University seeking a solid foundation in Computer Network principles for academic.
About the Author:
Dr. S. Murugan is Associate Professor at Alagappa Government Arts College, Karaikudi. With 23 years of teaching experience in the field of Computer Science, Dr. S. Murugan has a passion for simplifying complex concepts in Computer Network
Disclaimer:
This document is intended for educational purposes only. The content presented here reflects the author’s understanding in the field of Computer Network
Size: 1.02 MB
Language: en
Added: Mar 09, 2025
Slides: 51 pages
Slide Content
Unit IV -The Network Layer
Dr. S.Murugan
Associate Professor, Department of Computer Science.
AlagappaGovernment Arts College,
(Affiliated by AlagappaUniversity)
Karaikudi.
Email: [email protected]
This slides compiled from
Computer Network by
Andrew S. Tenenbaum4
th
Ed.
The Network Layer
➢Thenetworklayerisconcernedwithgettingpackets
fromthesourceallthewaytothedestination.
➢Toachieveitsgoals,thenetworklayermustknow
aboutthetopologyofthecommunicationsubnet(i.e.,
thesetofallrouters)andchooseappropriatepaths
throughit.
5.2.5 Link State Routing
➢The idea behind link state routing is simple and can be
stated as five parts. Each router must do the following:
1.Discoveritsneighborsandlearntheirnetworkaddresses.
2.Measurethedelayorcosttoeachofitsneighbors.
3.Constructapacket,tellingallithasjustlearned.
4.Sendthispackettoallotherrouters.
5.Computetheshortestpathtoeveryotherrouter.
5.2.5 Link State Routing
LearningabouttheNeighbors
➢Whenarouterisbooted,itsfirsttaskistolearnwhoits
neighborsare.Itaccomplishesthisgoalbysendinga
specialHELLOpacketoneachpoint-to-pointline.The
routerontheotherendisexpectedtosendbackareply
tellingwhoitis.
➢WhentwoormoreroutersareconnectedbyaLAN,the
situationisslightlymorecomplicated.Fig.5-11(a)
illustratesaLANtowhichthreerouters,A,C,andF,
aredirectlyconnected.Eachoftheseroutersis
connectedtooneormoreadditionalrouters,asshown.
5.2.5 Link State Routing
➢OnewaytomodeltheLANistoconsideritasanode
itself,asshowninFig.5-11(b).
➢Hereintroducedanew,artificialnode,N,towhichA,
C,andFareconnected.Thefactthatitispossibleto
gofromAtoContheLANisrepresentedbythepath
ANChere.
5.2.5 Link State Routing
MeasuringLineCost
➢Thelinkstateroutingalgorithmrequireseachrouterto
know,oratleasthaveareasonableestimateof,the
delaytoeachofitsneighbors.
➢Themostdirectwaytodeterminethisdelayistosend
overthelineaspecialECHOpacketthattheotherside
isrequiredtosendbackimmediately.
➢Unfortunately,thereisanargumentagainstincluding
theloadinthedelaycalculation.Considerthesubnetof
Fig.5-12,whichisdividedintotwoparts,Eastand
West,connectedbytwolines,CFandEI.
5.2.5 Link State Routing
➢SupposethatmostofthetrafficbetweenEastandWest
isusinglineCF,andasaresult,thislineisheavily
loadedwithlongdelays.Includingqueueingdelayin
theshortestpathcalculationwillmakeEImore
attractive.
➢Afterthenewroutingtableshavebeeninstalled,most
oftheEast-WesttrafficwillnowgooverEI,
overloadingthisline.Consequently,inthenextupdate,
CFwillappeartobetheshortestpath.Asaresult,the
routingtablesmayoscillatewildly,leadingtoerratic
routingandmanypotentialproblems.
5.2.5 Link State Routing
5.2.5 Link State Routing
Building Link State Packets
➢Oncetheinformationneededfortheexchangehasbeen
collected,thenextstepisforeachroutertobuilda
packetcontainingallthedata.Thepacketstartswiththe
identityofthesender,followedbyasequencenumber
andage(tobedescribedlater),andalistofneighbors.
➢Foreachneighbor,thedelaytothatneighborisgiven.
AnexamplesubnetisgiveninFig.5-13(a)withdelays
shownaslabelsonthelines.Thecorrespondinglink
statepacketsforallsixroutersareshowninFig.5-
13(b).
5.2.5 Link State Routing
Building Link State Packets
➢Oncetheinformationneededfortheexchangehasbeen
collected,thenextstepisforeachroutertobuilda
packetcontainingallthedata.Thepacketstartswiththe
identityofthesender,followedbyasequencenumber
andage(tobedescribedlater),andalistofneighbors.
➢Foreachneighbor,thedelaytothatneighborisgiven.
AnexamplesubnetisgiveninFig.5-13(a)withdelays
shownaslabelsonthelines.Thecorrespondinglink
statepacketsforallsixroutersareshowninFig.5-
13(b).
5.2.5 Link State Routing
5.2.5 Link State Routing
➢Thefundamentalideaistousefloodingtodistributethe
linkstatepackets.Tokeepthefloodincheck,each
packetcontainsasequencenumberthatisincremented
foreachnewpacketsent.Whenanewlinkstatepacket
comesin,itischeckedagainstthelistofpacketsalready
seen.Ifitisnew,itisforwardedonalllinesexceptthe
oneitarrivedon.Ifitisaduplicate,itisdiscarded.
➢Thesolutiontoroutercrashorsequencenumberlossis
toincludetheageofeachpacketafterthesequence
numberanddecrementitoncepersecond.Whentheage
hitszero,theinformationfromthatrouterisdiscarded.
5.2.5 Link State Routing
➢ThedatastructureusedbyrouterBforthesubnet
showninFig.5-13(a)isdepictedinFig.5-14.Eachrow
herecorrespondstoarecently-arrived,butasyetnot
fully-processed,linkstatepacket.
➢Thetablerecordswherethepacketoriginated,its
sequencenumberandage,andthedata.Inaddition,
therearesendandacknowledgementflagsforeachof
B'sthreelines(toA,C,andF,respectively).
➢Thesendflagsmeanthatthepacketmustbesentonthe
indicatedline.Theacknowledgementflagsmeanthatit
mustbeacknowledgedthere.
5.2.5 Link State Routing
5.2.5 Link State Routing
ComputingtheNewRoutes
Oncearouterhasaccumulatedafullsetoflinkstate
packets,itcanconstructtheentiresubnetgraphbecause
everylinkisrepresented.Everylinkis,infact,represented
twice,onceforeachdirection.Thetwovaluescanbe
averagedorusedseparately.