Submit Search
Upload
Wired and Wireless Examples in ns2
•
1 like
•
4,768 views
Pradeep Kumar TS
Follow
This shows the example of a wired and wireless example in ns2 (Network simulator 2)
Read less
Read more
Software
Report
Share
Report
Share
1 of 11
Download now
Download to read offline
Recommended
Routing Algorithm
Routing Algorithm
Kamal Acharya
Introduction to TCP/IP
Introduction to TCP/IP
Michael Lamont
Transport layer
Transport layer
Mukesh Chinta
IPv4 Addressing
IPv4 Addressing
TheGodfather HA
Computer networks network layer,routing
Computer networks network layer,routing
Deepak John
User datagram protocol (udp)
User datagram protocol (udp)
Ramola Dhande
Network layer - design Issues
Network layer - design Issues
قصي نسور
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
Kruti Niranjan
Recommended
Routing Algorithm
Routing Algorithm
Kamal Acharya
Introduction to TCP/IP
Introduction to TCP/IP
Michael Lamont
Transport layer
Transport layer
Mukesh Chinta
IPv4 Addressing
IPv4 Addressing
TheGodfather HA
Computer networks network layer,routing
Computer networks network layer,routing
Deepak John
User datagram protocol (udp)
User datagram protocol (udp)
Ramola Dhande
Network layer - design Issues
Network layer - design Issues
قصي نسور
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
Kruti Niranjan
EC8702 adhoc and wireless sensor networks iv ece
EC8702 adhoc and wireless sensor networks iv ece
GOWTHAMMS6
Parallel Programming
Parallel Programming
Uday Sharma
Overlay network
Overlay network
iQra Rafaqat
User Datagram protocol For Msc CS
User Datagram protocol For Msc CS
Thanveen
Network Layer design Issues.pptx
Network Layer design Issues.pptx
Acad
Tcp ip
Tcp ip
Principal,Guru Nanak Institute of Technology, Nagpur
Mobile computing notes and material
Mobile computing notes and material
SDMCET DHARWAD
Cuda Architecture
Cuda Architecture
Piyush Mittal
Ch 18 intro to network layer - section 1
Ch 18 intro to network layer - section 1
Hossam El-Deen Osama
Routing algorithm
Routing algorithm
TechStudent1
OSI layers
OSI layers
Ahmed Elnaggar
Ethernet - Networking presentation
Ethernet - Networking presentation
Viet Nguyen
Socket Programming
Socket Programming
CEC Landran
Cisco CCNA- DHCP Server
Cisco CCNA- DHCP Server
Hamed Moghaddam
Congestion control in TCP
Congestion control in TCP
selvakumar_b1985
Computer Network Fundamentals
Computer Network Fundamentals
N.Jagadish Kumar
4. system models
4. system models
AbDul ThaYyal
Data link layer
Data link layer
Mukesh Chinta
Building Topology in NS3
Building Topology in NS3
Rahul Hada
Introduction to computer network 4th edition
Introduction to computer network 4th edition
Ensign Handoko
Network Simulator Tutorial
Network Simulator Tutorial
cscarcas
Working with NS2
Working with NS2
chanchal214
More Related Content
What's hot
EC8702 adhoc and wireless sensor networks iv ece
EC8702 adhoc and wireless sensor networks iv ece
GOWTHAMMS6
Parallel Programming
Parallel Programming
Uday Sharma
Overlay network
Overlay network
iQra Rafaqat
User Datagram protocol For Msc CS
User Datagram protocol For Msc CS
Thanveen
Network Layer design Issues.pptx
Network Layer design Issues.pptx
Acad
Tcp ip
Tcp ip
Principal,Guru Nanak Institute of Technology, Nagpur
Mobile computing notes and material
Mobile computing notes and material
SDMCET DHARWAD
Cuda Architecture
Cuda Architecture
Piyush Mittal
Ch 18 intro to network layer - section 1
Ch 18 intro to network layer - section 1
Hossam El-Deen Osama
Routing algorithm
Routing algorithm
TechStudent1
OSI layers
OSI layers
Ahmed Elnaggar
Ethernet - Networking presentation
Ethernet - Networking presentation
Viet Nguyen
Socket Programming
Socket Programming
CEC Landran
Cisco CCNA- DHCP Server
Cisco CCNA- DHCP Server
Hamed Moghaddam
Congestion control in TCP
Congestion control in TCP
selvakumar_b1985
Computer Network Fundamentals
Computer Network Fundamentals
N.Jagadish Kumar
4. system models
4. system models
AbDul ThaYyal
Data link layer
Data link layer
Mukesh Chinta
Building Topology in NS3
Building Topology in NS3
Rahul Hada
Introduction to computer network 4th edition
Introduction to computer network 4th edition
Ensign Handoko
What's hot
(20)
EC8702 adhoc and wireless sensor networks iv ece
EC8702 adhoc and wireless sensor networks iv ece
Parallel Programming
Parallel Programming
Overlay network
Overlay network
User Datagram protocol For Msc CS
User Datagram protocol For Msc CS
Network Layer design Issues.pptx
Network Layer design Issues.pptx
Tcp ip
Tcp ip
Mobile computing notes and material
Mobile computing notes and material
Cuda Architecture
Cuda Architecture
Ch 18 intro to network layer - section 1
Ch 18 intro to network layer - section 1
Routing algorithm
Routing algorithm
OSI layers
OSI layers
Ethernet - Networking presentation
Ethernet - Networking presentation
Socket Programming
Socket Programming
Cisco CCNA- DHCP Server
Cisco CCNA- DHCP Server
Congestion control in TCP
Congestion control in TCP
Computer Network Fundamentals
Computer Network Fundamentals
4. system models
4. system models
Data link layer
Data link layer
Building Topology in NS3
Building Topology in NS3
Introduction to computer network 4th edition
Introduction to computer network 4th edition
Similar to Wired and Wireless Examples in ns2
Network Simulator Tutorial
Network Simulator Tutorial
cscarcas
Working with NS2
Working with NS2
chanchal214
Introduction to ns2
Introduction to ns2
ProfDrSharadSharma
Cs757 ns2-tutorial-exercise
Cs757 ns2-tutorial-exercise
Pratik Joshi
Ns 2 Network Simulator An Introduction
Ns 2 Network Simulator An Introduction
Jaipur National University, Jaipur, Rajasthan, India
Ns2
Ns2
varsha mohite
NS2 (1).docx
NS2 (1).docx
SanjayDharmaraj
NS2-tutorial.ppt
NS2-tutorial.ppt
Wajath
18CSL51 - Network Lab Manual.pdf
18CSL51 - Network Lab Manual.pdf
Selvaraj Seerangan
NS2-tutorial.pdf
NS2-tutorial.pdf
srinivasa gowda
cscn1819.pdf
cscn1819.pdf
Anil Sagar
Ns2pre
Ns2pre
Pratik Joshi
link-state-routing-3.pdf
link-state-routing-3.pdf
Jayaprasanna4
Virtual lab - Routing in Mobile Adhoc Networks
Virtual lab - Routing in Mobile Adhoc Networks
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
Ns2
Ns2
namitay
Study of aloha protocol using ns2 network java proram
Study of aloha protocol using ns2 network java proram
Meenakshi Devi
Tut hemant ns2
Tut hemant ns2
crescent000
Session 1 introduction to ns2
Session 1 introduction to ns2
thenmozhi ravichandran
study-of-network-simulator.pdf
study-of-network-simulator.pdf
Jayaprasanna4
A genetic algorithm for constructing broadcast trees with cost and delay cons...
A genetic algorithm for constructing broadcast trees with cost and delay cons...
IJCNCJournal
Similar to Wired and Wireless Examples in ns2
(20)
Network Simulator Tutorial
Network Simulator Tutorial
Working with NS2
Working with NS2
Introduction to ns2
Introduction to ns2
Cs757 ns2-tutorial-exercise
Cs757 ns2-tutorial-exercise
Ns 2 Network Simulator An Introduction
Ns 2 Network Simulator An Introduction
Ns2
Ns2
NS2 (1).docx
NS2 (1).docx
NS2-tutorial.ppt
NS2-tutorial.ppt
18CSL51 - Network Lab Manual.pdf
18CSL51 - Network Lab Manual.pdf
NS2-tutorial.pdf
NS2-tutorial.pdf
cscn1819.pdf
cscn1819.pdf
Ns2pre
Ns2pre
link-state-routing-3.pdf
link-state-routing-3.pdf
Virtual lab - Routing in Mobile Adhoc Networks
Virtual lab - Routing in Mobile Adhoc Networks
Ns2
Ns2
Study of aloha protocol using ns2 network java proram
Study of aloha protocol using ns2 network java proram
Tut hemant ns2
Tut hemant ns2
Session 1 introduction to ns2
Session 1 introduction to ns2
study-of-network-simulator.pdf
study-of-network-simulator.pdf
A genetic algorithm for constructing broadcast trees with cost and delay cons...
A genetic algorithm for constructing broadcast trees with cost and delay cons...
More from Pradeep Kumar TS
Digital Portfolio and Footprint
Digital Portfolio and Footprint
Pradeep Kumar TS
Open book Examination
Open book Examination
Pradeep Kumar TS
Software Define Networking (SDN)
Software Define Networking (SDN)
Pradeep Kumar TS
What next - Career Enhancement of Graduates
What next - Career Enhancement of Graduates
Pradeep Kumar TS
Protothreads
Protothreads
Pradeep Kumar TS
6LoWPAN
6LoWPAN
Pradeep Kumar TS
Software Defined Networks
Software Defined Networks
Pradeep Kumar TS
Higher Order Thinking - Question paper setting
Higher Order Thinking - Question paper setting
Pradeep Kumar TS
IoT Communication Protocols
IoT Communication Protocols
Pradeep Kumar TS
IoT Applications
IoT Applications
Pradeep Kumar TS
RPL - Routing Protocol for Low Power and Lossy Networks
RPL - Routing Protocol for Low Power and Lossy Networks
Pradeep Kumar TS
Mannasim for NS2
Mannasim for NS2
Pradeep Kumar TS
Recompiling network simulator 2
Recompiling network simulator 2
Pradeep Kumar TS
OTcl and C++ linkages in NS2
OTcl and C++ linkages in NS2
Pradeep Kumar TS
Installation of ns2
Installation of ns2
Pradeep Kumar TS
Introduction to ns2
Introduction to ns2
Pradeep Kumar TS
Software Defined Networking - 1
Software Defined Networking - 1
Pradeep Kumar TS
Software Defined Networking - 2
Software Defined Networking - 2
Pradeep Kumar TS
Software Defined Networking - 3
Software Defined Networking - 3
Pradeep Kumar TS
Tracing and awk in ns2
Tracing and awk in ns2
Pradeep Kumar TS
More from Pradeep Kumar TS
(20)
Digital Portfolio and Footprint
Digital Portfolio and Footprint
Open book Examination
Open book Examination
Software Define Networking (SDN)
Software Define Networking (SDN)
What next - Career Enhancement of Graduates
What next - Career Enhancement of Graduates
Protothreads
Protothreads
6LoWPAN
6LoWPAN
Software Defined Networks
Software Defined Networks
Higher Order Thinking - Question paper setting
Higher Order Thinking - Question paper setting
IoT Communication Protocols
IoT Communication Protocols
IoT Applications
IoT Applications
RPL - Routing Protocol for Low Power and Lossy Networks
RPL - Routing Protocol for Low Power and Lossy Networks
Mannasim for NS2
Mannasim for NS2
Recompiling network simulator 2
Recompiling network simulator 2
OTcl and C++ linkages in NS2
OTcl and C++ linkages in NS2
Installation of ns2
Installation of ns2
Introduction to ns2
Introduction to ns2
Software Defined Networking - 1
Software Defined Networking - 1
Software Defined Networking - 2
Software Defined Networking - 2
Software Defined Networking - 3
Software Defined Networking - 3
Tracing and awk in ns2
Tracing and awk in ns2
Recently uploaded
Software Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
Arshad QA
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
shikhaohhpro
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
harshavardhanraghave
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
OnePlan Solutions
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
Evangelist Apps https://twitter.com/EvangelistSW/
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
panagenda
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
kalichargn70th171
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
gurkirankumar98700
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
ICS
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
Willy Marroquin (WillyDevNET)
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
bodapatigopi8531
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
Arshad QA
Clustering techniques data mining book ....
Clustering techniques data mining book ....
ShaimaaMohamedGalal
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
SolGuruz
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
MyIntelliSource, Inc.
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
Cionsystems
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
MyIntelliSource, Inc.
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Steffen Staab
DNT_Corporate presentation know about us
DNT_Corporate presentation know about us
Dynamic Netsoft
Recently uploaded
(20)
Software Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
Clustering techniques data mining book ....
Clustering techniques data mining book ....
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
DNT_Corporate presentation know about us
DNT_Corporate presentation know about us
Wired and Wireless Examples in ns2
1.
Wired and wireless example T S PRADEEP KUMAR VIT University – Chennai Campus http://www.pradeepkumar.org tspembedded@gmail.com www.facebook.com/tspradeep 1
2.
Wired Example 2
3.
Wired Example…. • This network consists of 4 nodes (n0, n1, n2, n3) as shown in above figure. • The duplex links between n0 and n2, and n1 and n2 have 2 Mbps of bandwidth and 10ms of delay. •
The duplex link between n2 and n3 has 1.7 Mbps of bandwidth and 20 ms of delay. • Each node uses a DropTail queue, of which the maximum size is 10. 3
4.
Wired Example…. #Create a simulator object set ns [new Simulator] #Open the NAM trace file set nf [open out.nam w] $ns namtrace-all $nf #color for data flow $ns color 1 red $ns color 2 blue #Create four nodes set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] 4
5.
Wired Example…. #Define a 'finish' procedure proc finish {} { global ns nf $ns flush-trace #Close the NAM trace file close $nf #Execute NAM on the trace file exec nam out.nam & exit 0 } 5
6.
Wired Example…. #Create links between the nodes $ns duplex-link $n0 $n2 2Mb 10ms DropTail $ns duplex-link $n1 $n2 2Mb 10ms DropTail $ns duplex-link $n2 $n3 1.7Mb 20ms DropTail #Set Queue Size of link (n2-n3) to 10 $ns queue-limit $n2 $n3 10 #Give node position (for NAM) $ns duplex-link-op $n0 $n2 orient right-down $ns duplex-link-op $n1 $n2 orient right-up $ns duplex-link-op $n2 $n3 orient right #Monitor the queue for link (n2-n3). (for NAM) $ns duplex-link-op $n2 $n3 queuePos 0.5 6
7.
Wired Example…. #Setup a TCP connection set tcp [new Agent/TCP] $tcp set class_ 2 $ns attach-agent $n0 $tcp set sink [new Agent/TCPSink] $ns attach-agent $n3 $sink $ns connect $tcp $sink $tcp set fid_ 1 7
8.
Wired Example…. #Setup a FTP over TCP connection set ftp [new Application/FTP] $ftp attach-agent $tcp $ftp set type_ FTP #Setup a UDP connection set udp [new Agent/UDP] $ns attach-agent $n1 $udp set null [new Agent/Null] $ns attach-agent $n3 $null $ns connect $udp $null $udp set fid_ 2 8
9.
Wired Example…. #Setup a CBR over UDP connection set cbr [new Application/Traffic/CBR] $cbr attach-agent $udp $cbr set type_ CBR $cbr set packet_size_ 1000 $cbr set rate_ 1mb $cbr set random_ false 9
10.
Wired Example…. #Schedule events for the CBR and FTP agents $ns at 0.1 "$cbr start" $ns at 1.0 "$ftp start" $ns at 4.0 "$ftp stop" $ns at 4.5 "$cbr stop" #Detach tcp and sink agents (not really necessary) $ns at 4.5 "$ns detach-agent $n0 $tcp ; $ns detach-agent $n3 $sink" #Call the finish procedure after 5 seconds of simulation time $ns at 5.0 "finish" #Print CBR packet size and interval puts "CBR packet size = [$cbr set packet_size_]" puts "CBR interval = [$cbr set interval_]" #Run the simulation $ns run 10
11.
Output 11
Download now