SlideShare une entreprise Scribd logo
EX.No 8. Simulation of Distance Vector/Link State Routing.
.
a) Distance Vector routing protocol ROUTING
Aim:
To simulate and study the link state routing algorithm using simulation using NS2.
Distance Vector routing protocol
Routing is the process of selecting best paths in a network. In the past, the term
routing was also used to mean forwarding network traffic among networks. However this
latter function is muchbetter described as simply forwarding. Routing is performed for
many kinds of networks, including the telephone network (circuit switching), electronic
data networks (such as the Internet), and transportation networks. This article is concerned
primarily with routing in electronic data networks using packet switching technology
.In packet switching networks, routing directs packet forwarding (the transit of logically
addressed network packets from their source toward their ultimate destination) through
intermediate nodes. Intermediate nodes are typically network hardware devices such as
routers, bridges, gateways, firewalls, or switches. General-purpose computers can also
forward packets and perform routing, though they are not specialized hardware and may
suffer from limited performance. The routing process usually directs forwarding on the
basis of routing tables which maintain a record of the routes to various network destinations.
Thus, constructing routing tables, which are held in the router's memory, is very important
for efficient routing. Most routing algorithms use only one network path at a time.
Multipath routing techniques enable the use of multiple alternative paths. In case of
overlapping/equal routes, the following elements are considered in order to decide
which routes get installed into the routing table (sorted by priority):
1. Prefix-Length: where longer subnet masks are preferred (independent of whether it is
within a routing
protocol or over different routing protocol)
2. Metric: where a lower metric/cost is preferred (only valid within one and the same
routing protocol)
3. Administrative distance: where a lower distance is preferred (only valid between
different routing protocols) Routing, in a more narrow sense of the term, is often
contrasted with bridging in its assumption that network addresses are structured and that
similar addresses imply proximity within the network. Structured addresses allow a single
routing table entry to represent the route to a group of devices. In large networks,
structured addressing (routing, in the narrow sense) outperforms unstructured
addressing (bridging). Routing has become the dominant form of addressing on the
Internet. Bridging is still widely used within localized environments.
Algorithm
There are several variants of flooding algorithm. Most work roughly
as follows:
1. Each node acts as both a transmitter and a receiver.
2. Each node tries to forward every message to every one of its neighbours except the
source node. This results in every message eventually being delivered to all reachable
parts of the network. Algorithms may need to be more complex than this, since, in
some case, precautions have to be taken to avoid wasted duplicate deliveries and
infinite loops, and to allow messages to eventually expire from the system. A variant
of flooding called selective flooding partially addresses these issues by only sending
packets to routers in the same direction. In selective flooding the routers don't send
every incoming packet on every line but only on those lines which are going
approximately in the right direction.
Program:
set ns [new Simulator]
set nf [open out.nam w]
$ns namtrace-all $nf
set tr [open out.tr w]
$ns trace-all $tr
proc finish {} {
global nf ns tr
$ns flush-trace
close $tr
exec nam out.nam &
exit 0
}
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
$ns duplex-link $n0 $n1 10Mb 10ms DropTail
$ns duplex-link $n1 $n3 10Mb 10ms DropTail
$ns duplex-link $n2 $n1 10Mb 10ms DropTail
$ns duplex-link-op $n0 $n1 orient right-down
$ns duplex-link-op $n1 $n3 orient right
$ns duplex-link-op $n2 $n1 orient right-up
set tcp [new Agent/TCP]
$ns attach-agent $n0 $tcp
set ftp [new Application/FTP]
$ftp attach-agent $tcp
set sink [new Agent/TCPSink]
$ns attach-agent $n3 $sink
set udp [new Agent/UDP]
$ns attach-agent $n2 $udp
set cbr [new Application/Traffic/CBR]
$cbr attach-agent $udp
set null [new Agent/Null]
$ns attach-agent $n3 $null
$ns connect $tcp $sink
$ns connect $udp $null
$ns rtmodel-at 1.0 down $n1 $n3
$ns rtmodel-at 2.0 up $n1 $n3
$ns rtproto DV
$ns at 0.0 "$ftp start"
$ns at 0.0 "$cbr start"
$ns at 5.0 "finish"
$ns run
Result:
Thus the Distance Vector Routing Algorithm was Simulated and studied

Contenu connexe

Similaire à distance-vector-routing-3.pdf

Designing an opportunistic routing scheme for adaptive clustering in mobile a...
Designing an opportunistic routing scheme for adaptive clustering in mobile a...Designing an opportunistic routing scheme for adaptive clustering in mobile a...
Designing an opportunistic routing scheme for adaptive clustering in mobile a...
eSAT Journals
 
Network Layer
Network LayerNetwork Layer
Network Layer
reshmadayma
 
Study of Attacks and Routing Protocol in Wireless Network
Study of Attacks and Routing Protocol in Wireless NetworkStudy of Attacks and Routing Protocol in Wireless Network
Study of Attacks and Routing Protocol in Wireless Network
ijsrd.com
 
A review of current routing protocols for ad hoc mobile wireless networks
A review of current routing protocols for ad hoc mobile wireless networksA review of current routing protocols for ad hoc mobile wireless networks
A review of current routing protocols for ad hoc mobile wireless networks
Priyanka Gurnani
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
ijceronline
 
Experimental Analysis Of On Demand Routing Protocol
Experimental Analysis Of On Demand Routing ProtocolExperimental Analysis Of On Demand Routing Protocol
Experimental Analysis Of On Demand Routing Protocol
smita gupta
 
Performance Evaluation of a Layered WSN Using AODV and MCF Protocols in NS-2
Performance Evaluation of a Layered WSN Using AODV and MCF Protocols in NS-2Performance Evaluation of a Layered WSN Using AODV and MCF Protocols in NS-2
Performance Evaluation of a Layered WSN Using AODV and MCF Protocols in NS-2
csandit
 
BETTER SCALABLE ROUTING PROTOCOL FOR HYBRID WIRELESS MESH NETWORK
BETTER SCALABLE ROUTING PROTOCOL FOR HYBRID WIRELESS MESH NETWORKBETTER SCALABLE ROUTING PROTOCOL FOR HYBRID WIRELESS MESH NETWORK
BETTER SCALABLE ROUTING PROTOCOL FOR HYBRID WIRELESS MESH NETWORK
cscpconf
 
An Enhanced DSR Protocol for Improving QoS in MANET
An Enhanced DSR Protocol for Improving QoS in MANETAn Enhanced DSR Protocol for Improving QoS in MANET
An Enhanced DSR Protocol for Improving QoS in MANET
KhushbooGupta145
 
PERFORMANCE ANALYSIS OF BROADCASTING IN MOBILE AD HOC NETWORKS USING CLUSTER ...
PERFORMANCE ANALYSIS OF BROADCASTING IN MOBILE AD HOC NETWORKS USING CLUSTER ...PERFORMANCE ANALYSIS OF BROADCASTING IN MOBILE AD HOC NETWORKS USING CLUSTER ...
PERFORMANCE ANALYSIS OF BROADCASTING IN MOBILE AD HOC NETWORKS USING CLUSTER ...
ijasuc
 
UNIT-3 Adhoc.pptx
UNIT-3 Adhoc.pptxUNIT-3 Adhoc.pptx
UNIT-3 Adhoc.pptx
ShivamSolanki48
 
ICICCE0367
ICICCE0367ICICCE0367
ICICCE0367
IJTET Journal
 
Understanding Network Routing Problem and Study of Routing Algorithms and Heu...
Understanding Network Routing Problem and Study of Routing Algorithms and Heu...Understanding Network Routing Problem and Study of Routing Algorithms and Heu...
Understanding Network Routing Problem and Study of Routing Algorithms and Heu...
IRJET Journal
 
Be31390392
Be31390392Be31390392
Be31390392
IJERA Editor
 
Essay: Mobile Ad Hoc Networks - Overview Of Routing Protocols.
Essay: Mobile Ad Hoc Networks - Overview Of Routing Protocols.Essay: Mobile Ad Hoc Networks - Overview Of Routing Protocols.
Essay: Mobile Ad Hoc Networks - Overview Of Routing Protocols.
JohnWilson47710
 
Destination Aware APU Strategy for Geographic Routing in MANET
Destination Aware APU Strategy for Geographic Routing in MANETDestination Aware APU Strategy for Geographic Routing in MANET
Destination Aware APU Strategy for Geographic Routing in MANET
Editor IJCATR
 
Influence of Clustering on the Performance of MobileAd Hoc Networks (MANETs)
Influence of Clustering on the Performance of MobileAd Hoc Networks (MANETs)Influence of Clustering on the Performance of MobileAd Hoc Networks (MANETs)
Influence of Clustering on the Performance of MobileAd Hoc Networks (MANETs)
Narendra Singh Yadav
 
Ijtra130510
Ijtra130510Ijtra130510
Tree Based Proactive Source Routing Protocol for MANETs
Tree Based Proactive Source Routing Protocol for MANETsTree Based Proactive Source Routing Protocol for MANETs
Tree Based Proactive Source Routing Protocol for MANETs
paperpublications3
 
Md3421762181
Md3421762181Md3421762181
Md3421762181
IJERA Editor
 

Similaire à distance-vector-routing-3.pdf (20)

Designing an opportunistic routing scheme for adaptive clustering in mobile a...
Designing an opportunistic routing scheme for adaptive clustering in mobile a...Designing an opportunistic routing scheme for adaptive clustering in mobile a...
Designing an opportunistic routing scheme for adaptive clustering in mobile a...
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
Study of Attacks and Routing Protocol in Wireless Network
Study of Attacks and Routing Protocol in Wireless NetworkStudy of Attacks and Routing Protocol in Wireless Network
Study of Attacks and Routing Protocol in Wireless Network
 
A review of current routing protocols for ad hoc mobile wireless networks
A review of current routing protocols for ad hoc mobile wireless networksA review of current routing protocols for ad hoc mobile wireless networks
A review of current routing protocols for ad hoc mobile wireless networks
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
 
Experimental Analysis Of On Demand Routing Protocol
Experimental Analysis Of On Demand Routing ProtocolExperimental Analysis Of On Demand Routing Protocol
Experimental Analysis Of On Demand Routing Protocol
 
Performance Evaluation of a Layered WSN Using AODV and MCF Protocols in NS-2
Performance Evaluation of a Layered WSN Using AODV and MCF Protocols in NS-2Performance Evaluation of a Layered WSN Using AODV and MCF Protocols in NS-2
Performance Evaluation of a Layered WSN Using AODV and MCF Protocols in NS-2
 
BETTER SCALABLE ROUTING PROTOCOL FOR HYBRID WIRELESS MESH NETWORK
BETTER SCALABLE ROUTING PROTOCOL FOR HYBRID WIRELESS MESH NETWORKBETTER SCALABLE ROUTING PROTOCOL FOR HYBRID WIRELESS MESH NETWORK
BETTER SCALABLE ROUTING PROTOCOL FOR HYBRID WIRELESS MESH NETWORK
 
An Enhanced DSR Protocol for Improving QoS in MANET
An Enhanced DSR Protocol for Improving QoS in MANETAn Enhanced DSR Protocol for Improving QoS in MANET
An Enhanced DSR Protocol for Improving QoS in MANET
 
PERFORMANCE ANALYSIS OF BROADCASTING IN MOBILE AD HOC NETWORKS USING CLUSTER ...
PERFORMANCE ANALYSIS OF BROADCASTING IN MOBILE AD HOC NETWORKS USING CLUSTER ...PERFORMANCE ANALYSIS OF BROADCASTING IN MOBILE AD HOC NETWORKS USING CLUSTER ...
PERFORMANCE ANALYSIS OF BROADCASTING IN MOBILE AD HOC NETWORKS USING CLUSTER ...
 
UNIT-3 Adhoc.pptx
UNIT-3 Adhoc.pptxUNIT-3 Adhoc.pptx
UNIT-3 Adhoc.pptx
 
ICICCE0367
ICICCE0367ICICCE0367
ICICCE0367
 
Understanding Network Routing Problem and Study of Routing Algorithms and Heu...
Understanding Network Routing Problem and Study of Routing Algorithms and Heu...Understanding Network Routing Problem and Study of Routing Algorithms and Heu...
Understanding Network Routing Problem and Study of Routing Algorithms and Heu...
 
Be31390392
Be31390392Be31390392
Be31390392
 
Essay: Mobile Ad Hoc Networks - Overview Of Routing Protocols.
Essay: Mobile Ad Hoc Networks - Overview Of Routing Protocols.Essay: Mobile Ad Hoc Networks - Overview Of Routing Protocols.
Essay: Mobile Ad Hoc Networks - Overview Of Routing Protocols.
 
Destination Aware APU Strategy for Geographic Routing in MANET
Destination Aware APU Strategy for Geographic Routing in MANETDestination Aware APU Strategy for Geographic Routing in MANET
Destination Aware APU Strategy for Geographic Routing in MANET
 
Influence of Clustering on the Performance of MobileAd Hoc Networks (MANETs)
Influence of Clustering on the Performance of MobileAd Hoc Networks (MANETs)Influence of Clustering on the Performance of MobileAd Hoc Networks (MANETs)
Influence of Clustering on the Performance of MobileAd Hoc Networks (MANETs)
 
Ijtra130510
Ijtra130510Ijtra130510
Ijtra130510
 
Tree Based Proactive Source Routing Protocol for MANETs
Tree Based Proactive Source Routing Protocol for MANETsTree Based Proactive Source Routing Protocol for MANETs
Tree Based Proactive Source Routing Protocol for MANETs
 
Md3421762181
Md3421762181Md3421762181
Md3421762181
 

Plus de Jayaprasanna4

ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
Human computer Interaction ch1-the human.pdf
Human computer Interaction ch1-the human.pdfHuman computer Interaction ch1-the human.pdf
Human computer Interaction ch1-the human.pdf
Jayaprasanna4
 
computer Networks Error Detection and Correction.ppt
computer Networks Error Detection and Correction.pptcomputer Networks Error Detection and Correction.ppt
computer Networks Error Detection and Correction.ppt
Jayaprasanna4
 
HUman computer Interaction Socio-organizational Issues.ppt
HUman computer Interaction Socio-organizational Issues.pptHUman computer Interaction Socio-organizational Issues.ppt
HUman computer Interaction Socio-organizational Issues.ppt
Jayaprasanna4
 
human computer Interaction cognitive models.ppt
human computer Interaction cognitive models.ppthuman computer Interaction cognitive models.ppt
human computer Interaction cognitive models.ppt
Jayaprasanna4
 
World wide web and Hyper Text Markup Language
World wide web and Hyper Text Markup LanguageWorld wide web and Hyper Text Markup Language
World wide web and Hyper Text Markup Language
Jayaprasanna4
 
CI-Monte-Carlo.ppt
CI-Monte-Carlo.pptCI-Monte-Carlo.ppt
CI-Monte-Carlo.ppt
Jayaprasanna4
 
Activity planning.ppt
Activity planning.pptActivity planning.ppt
Activity planning.ppt
Jayaprasanna4
 
Cost effort.ppt
Cost effort.pptCost effort.ppt
Cost effort.ppt
Jayaprasanna4
 
Activity planning.ppt
Activity planning.pptActivity planning.ppt
Activity planning.ppt
Jayaprasanna4
 
unit-1.ppt
unit-1.pptunit-1.ppt
unit-1.ppt
Jayaprasanna4
 
BGP.ppt
BGP.pptBGP.ppt
BGP.ppt
Jayaprasanna4
 
Lecture 19- Multicasting.ppt
Lecture 19- Multicasting.pptLecture 19- Multicasting.ppt
Lecture 19- Multicasting.ppt
Jayaprasanna4
 
line coding.ppt
line coding.pptline coding.ppt
line coding.ppt
Jayaprasanna4
 
error detection.ppt
error detection.ppterror detection.ppt
error detection.ppt
Jayaprasanna4
 
connecting LANs.pptx
connecting LANs.pptxconnecting LANs.pptx
connecting LANs.pptx
Jayaprasanna4
 
CS1302 06NOV.pdf
CS1302 06NOV.pdfCS1302 06NOV.pdf
CS1302 06NOV.pdf
Jayaprasanna4
 
session and cookies.ppt
session and cookies.pptsession and cookies.ppt
session and cookies.ppt
Jayaprasanna4
 
JDBC.ppt
JDBC.pptJDBC.ppt
JDBC.ppt
Jayaprasanna4
 

Plus de Jayaprasanna4 (20)

ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
Human computer Interaction ch1-the human.pdf
Human computer Interaction ch1-the human.pdfHuman computer Interaction ch1-the human.pdf
Human computer Interaction ch1-the human.pdf
 
computer Networks Error Detection and Correction.ppt
computer Networks Error Detection and Correction.pptcomputer Networks Error Detection and Correction.ppt
computer Networks Error Detection and Correction.ppt
 
HUman computer Interaction Socio-organizational Issues.ppt
HUman computer Interaction Socio-organizational Issues.pptHUman computer Interaction Socio-organizational Issues.ppt
HUman computer Interaction Socio-organizational Issues.ppt
 
human computer Interaction cognitive models.ppt
human computer Interaction cognitive models.ppthuman computer Interaction cognitive models.ppt
human computer Interaction cognitive models.ppt
 
World wide web and Hyper Text Markup Language
World wide web and Hyper Text Markup LanguageWorld wide web and Hyper Text Markup Language
World wide web and Hyper Text Markup Language
 
CI-Monte-Carlo.ppt
CI-Monte-Carlo.pptCI-Monte-Carlo.ppt
CI-Monte-Carlo.ppt
 
Activity planning.ppt
Activity planning.pptActivity planning.ppt
Activity planning.ppt
 
Cost effort.ppt
Cost effort.pptCost effort.ppt
Cost effort.ppt
 
Activity planning.ppt
Activity planning.pptActivity planning.ppt
Activity planning.ppt
 
unit-1.ppt
unit-1.pptunit-1.ppt
unit-1.ppt
 
BGP.ppt
BGP.pptBGP.ppt
BGP.ppt
 
Lecture 19- Multicasting.ppt
Lecture 19- Multicasting.pptLecture 19- Multicasting.ppt
Lecture 19- Multicasting.ppt
 
line coding.ppt
line coding.pptline coding.ppt
line coding.ppt
 
error detection.ppt
error detection.ppterror detection.ppt
error detection.ppt
 
connecting LANs.pptx
connecting LANs.pptxconnecting LANs.pptx
connecting LANs.pptx
 
CS1302 06NOV.pdf
CS1302 06NOV.pdfCS1302 06NOV.pdf
CS1302 06NOV.pdf
 
session and cookies.ppt
session and cookies.pptsession and cookies.ppt
session and cookies.ppt
 
JDBC.ppt
JDBC.pptJDBC.ppt
JDBC.ppt
 

Dernier

Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt
PuktoonEngr
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
yokeleetan1
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
IJNSA Journal
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 

Dernier (20)

Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 

distance-vector-routing-3.pdf

  • 1. EX.No 8. Simulation of Distance Vector/Link State Routing. . a) Distance Vector routing protocol ROUTING Aim: To simulate and study the link state routing algorithm using simulation using NS2. Distance Vector routing protocol Routing is the process of selecting best paths in a network. In the past, the term routing was also used to mean forwarding network traffic among networks. However this latter function is muchbetter described as simply forwarding. Routing is performed for many kinds of networks, including the telephone network (circuit switching), electronic data networks (such as the Internet), and transportation networks. This article is concerned primarily with routing in electronic data networks using packet switching technology .In packet switching networks, routing directs packet forwarding (the transit of logically addressed network packets from their source toward their ultimate destination) through intermediate nodes. Intermediate nodes are typically network hardware devices such as routers, bridges, gateways, firewalls, or switches. General-purpose computers can also forward packets and perform routing, though they are not specialized hardware and may suffer from limited performance. The routing process usually directs forwarding on the basis of routing tables which maintain a record of the routes to various network destinations. Thus, constructing routing tables, which are held in the router's memory, is very important for efficient routing. Most routing algorithms use only one network path at a time. Multipath routing techniques enable the use of multiple alternative paths. In case of overlapping/equal routes, the following elements are considered in order to decide which routes get installed into the routing table (sorted by priority): 1. Prefix-Length: where longer subnet masks are preferred (independent of whether it is within a routing protocol or over different routing protocol) 2. Metric: where a lower metric/cost is preferred (only valid within one and the same routing protocol) 3. Administrative distance: where a lower distance is preferred (only valid between different routing protocols) Routing, in a more narrow sense of the term, is often contrasted with bridging in its assumption that network addresses are structured and that similar addresses imply proximity within the network. Structured addresses allow a single routing table entry to represent the route to a group of devices. In large networks,
  • 2. structured addressing (routing, in the narrow sense) outperforms unstructured addressing (bridging). Routing has become the dominant form of addressing on the Internet. Bridging is still widely used within localized environments. Algorithm There are several variants of flooding algorithm. Most work roughly as follows: 1. Each node acts as both a transmitter and a receiver. 2. Each node tries to forward every message to every one of its neighbours except the source node. This results in every message eventually being delivered to all reachable parts of the network. Algorithms may need to be more complex than this, since, in some case, precautions have to be taken to avoid wasted duplicate deliveries and infinite loops, and to allow messages to eventually expire from the system. A variant of flooding called selective flooding partially addresses these issues by only sending packets to routers in the same direction. In selective flooding the routers don't send every incoming packet on every line but only on those lines which are going approximately in the right direction. Program: set ns [new Simulator] set nf [open out.nam w] $ns namtrace-all $nf set tr [open out.tr w] $ns trace-all $tr proc finish {} { global nf ns tr $ns flush-trace close $tr exec nam out.nam & exit 0 } set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] $ns duplex-link $n0 $n1 10Mb 10ms DropTail $ns duplex-link $n1 $n3 10Mb 10ms DropTail $ns duplex-link $n2 $n1 10Mb 10ms DropTail $ns duplex-link-op $n0 $n1 orient right-down
  • 3. $ns duplex-link-op $n1 $n3 orient right $ns duplex-link-op $n2 $n1 orient right-up set tcp [new Agent/TCP] $ns attach-agent $n0 $tcp set ftp [new Application/FTP] $ftp attach-agent $tcp set sink [new Agent/TCPSink] $ns attach-agent $n3 $sink set udp [new Agent/UDP] $ns attach-agent $n2 $udp set cbr [new Application/Traffic/CBR] $cbr attach-agent $udp set null [new Agent/Null] $ns attach-agent $n3 $null $ns connect $tcp $sink $ns connect $udp $null $ns rtmodel-at 1.0 down $n1 $n3 $ns rtmodel-at 2.0 up $n1 $n3 $ns rtproto DV $ns at 0.0 "$ftp start" $ns at 0.0 "$cbr start" $ns at 5.0 "finish" $ns run Result: Thus the Distance Vector Routing Algorithm was Simulated and studied