SlideShare a Scribd company logo
1 of 48
Implementation of Networking protocol
using Network Simulator 2
By:Nishant
Amresh
Naman
Kumar Gaurav
Vikash kumar)
INTRODUCTION
We perform the simulation of various
networking protocol on NS2 like :
 TCP
 UDP
Ad-Hoc routing protocols like :
 AODV
 DSR
 DSDV
Continue…


Implementation of VLAN

 And

for all its implementation we have
used Network Simulator 2 as a platform.
Reasons to choose NS2 as a
platform
 Object

Oriented
 Real time Implementation
 Discrete - Event Simulation
 Plumbing makes NS2 a powerful tool
 Event Scheduler
 Time Synchronization
 Cost effective
What is NS2
 Network

Simulator 2, widely known as
NS2, is simply an event-driven
simulation tool that has proved useful
in studying the dynamic nature of
communication networks.
 It is written using two language: Otcl (Object Oriented Tool Command
language)
 C++ language.

Why two languages?
 NS2

uses Otcl to create and
configure a network .



for configuration, setup, or one time
simulation,
to run simulation with existing NS2 modules.

 C++

defines the internal mechanism of
the simulation objects



Used when dealing with a packet
Used when need to modify existing NS2
modules.
Node used as a Router
NS2 ARCHITECTURE
How to write tcl script program
to create a program…
Five steps to create a tcl script
programming:
 Initialization and termination aspects of
network simulator
 Defining the network nodes ,links, queues
and topology
 Defining the agents and their application
 NAM
 Tracing
Example..
 To

create new simulation use this
command:Set ns [new Simulator]
 To create a new node :
Set n0 [ns node]
 To create trace file :
set tracefile1 [open out.tr w]
$ns trace-all $tracefile1
Example…. (cont.)




To create a NAM file
set namfile1 [open out.nam w]
$ns namfile1-all $namfile1
To terminate the program :
Proc finish {} {
global ns tracefile1 namfile1
$ns flush-trace
close $tracefile
close $namfile
exec nam out.nam
exit 0
TCP(Transmission Control
Protocol)
 Connection

Oriented Reliable Protocol
 Consisting of three phases of operation

Connection setup

Data setup

Connection termination
Objective of TCP








Adapt the transmission rate of packets to the
available bandwidth.
Avoid congestion at the network.
Create a reliable connection by
retransmitting lost packet

We measure the performance of TCP on noisy
links using Queue monitoring.
How the window size vary in network
congestion.
UDP(User Datagram Protocol)
 Connectionless

transport-layer protocol
 No connection setup is needed prior to
data transfer
 Offers minimal transport layer
functionalities

non-guaranteed data delivery

gives application a direct access to

network layer
SYSTEM DESIGN
Basic Agents




Two types of NS2 agent used for creating or
destroying a packet are :
Routing agent
A routing agent creates and receives routing
control packets, and commands routing protocols
to act accordingly .



Transport-layer agent
A transport-layer agent controls the congestion
and reliability of a data flow based on an
underlying transport layer protocol (e.g.,UDP or
TCP)
ADHOC
INTRODUCTION





Ad-hoc networks are infrastructure-less.
The interconnected nodes coordinate the
transmissions with other nodes and they may
have to relay messages among several other
nodes in order to reach a destination.
An ad-hoc network is a self-configuring
network of wireless links connecting mobile
nodes, where these nodes may be routers
and/or hosts.
Packet transmission using
multiple channel
Multiple Channels and Multiple
Interfaces







Due to the increasing throughput demand,
the idea of exploiting multiple channels is
appealing in ad-hoc wireless networks .
Having more than one interface on a node
allows two different nodes communicating in
parallel on different channels .
An interface has a capability to dynamically
switch to different channels over time.
Two adjacent nodes can communicate with
each other if they have at least one interface
on a common channel.
Problems occurred
In a wireless ad-hoc network consisting of
multiple hops, if each node only uses a
single interface, packets may be delayed
at some hops if their next hops are not on
the same channel.
 End-to-end delay increases.
 Degradation in channel capacity.

Solution






A multi-interface solution for exploiting
multiple channels that can be implemented
on existing IEEE 802.11 hardware.
An interface assignment strategy using the
technique of interface switching , that
simplifies coordination among nodes while
utilizing multiple available channels.
A routing protocol, namely the MultipleChannel Routing (MCR), that selects routes
with the highest throughput by accounting for
channel diversity and interface switching
cost.
Interface switching
 Fixed

Interface
 Switchable Interface
Routing protocols used in ADHOC network
 AODV

(Ad-Hoc On Demand
Distance Vector)
 DSR (Dynamic Source Routing)
 DSDV (Destination Sequenced
Distance Vector)
AODV
 Routing

protocol for wireless Ad-Hoc

network
 Reactive routing protocol, meaning that it
establishes a route to a destination only
on demand
 avoids the counting-to-infinity problem
using sequence numbers on route
updates
 Capable of unicast and multicast routing .
Working..
Features…
 Routes

established on demand and that
destination sequence numbers are
applied to find the latest route to the
destination
 Connection setup delay is lower
DSR (Dynamic Source Routing)
 DSR

is designed for MANETs
 DSR doesn’t need any network infrastructures



Loop free routing
No routing information in the intermediate nodes

 Nodes

may easily cache this routing information
for future use
DSR Mechanisms
 Route

discovery
 Route maintenance
 Mechanisms “on-demand”




No periodic routing advertisement
No link status sensing
No neighbor detection packets

 Routes

caching
Basic DSR Route Maintenance






Each node transmitting the packet is responsible for
confirming that the packet has been received by next hop.
Acknowledgement
 By lower layer protocol MAC
 By DSR-specific software ack
Route errore message
DSDV(Destination Sequenced
Distance Vector )


Each node maintains a routing table which stores





next hop, cost metric towards each destination
a sequence number that is created by the destination itself

Each node periodically forwards routing table to its neighbours


Each node increments and appends its sequence number when
sending its local routing table



Each route is tagged with a sequence number; routes with greater
sequence numbers are preferred



Each node advertises a monotonically increasing even sequence
number for itself
When a node finds that a route is broken, it increments the
sequence number of the route and advertises it with infinite metric
Destination advertises new sequence number



Advantages of DSDV
 DSDV

is an efficient protocol for route
discovery. Whenever a route to a new
destination is required, it already exists at
the source.

 Hence,

low.

 DSDV

latency for route discovery is very

also guarantees loop-free paths.
Virtual LAN( VLAN):
A

virtual LAN is a group of devices in the
same broadcast domain or subnet.
 VLANs are good at logically separating
traffic between different groups of users
 VLANs contain/isolate broadcast traffic,
where you need a router to move traffic
between VLANs.
VLAN overview
Configuration of VLAN in NS2:
1)

Create a Network Bridge:

Firstly we have to create a network bridge
using the add call.

We have to use net_vlanType as a data
type for the net_device element.
To attach an adapter to be a
bridge, we have to use
following parameter’s :
id: the name of a physical LAN or VLAN
adapter that you would like to plug into the
bridge (e.g. eth0, eth1.5).
 Network_id: a virtual network ID that you
would like to attach the network adapter to.
If an adapter is already connected to a bridge
and you pass a different network ID, the
adapter will be disconnected from the old
bridge and connected to the new bridge.
To detach an adapter from a bridge, leave the
network_id element empty.

cont.
 vlan_id

-- the VLAN adapter ID. When
attaching/detaching a physical network
adapter, leave the element empty.
 base_device_id -- the name of the
physical network adapter with which the
VLAN adapter is associated.
When attaching/detaching a physical
adapter, leave the element empty.
2) VLAN Setup:
eth1.1 bridged with eth0.1 and
eth2.2 bridged with eth0.2
 This

configuration implements a VLAN
switch with two access ports (port eth1 for
VLAN 1 and port eth2 for VLAN 2) and a
trunk port eth0 capable of carrying
frames with VLAN ID either 1 or 2 in its
802.1q tag. Now, consider another switch
with exactly the same configuration.
Then, the trunk ports of the switches are
connected.
Cont.
 Now

device connected to port eth1 of
switch 1 and that connected to port eth1
of switch 2 can interchange frames with
VLAN ID 1. The same is the case with eth2
on both the switches.
 Two VLANs span across 2 switches. There is
no bridging/routing 'between' these two
VLANs. So, this works like a perfect VLAN
switch.
What is actually happening is :
All the untagged frames from eth1 pass
through the bridge and goes out of eth0
as untagged frame.
 All the frames with VLAN ID 2 entering
eth2 gets untagged at eth2.2, gets
bridged to eth0.2, gets tagged with VLAN
ID 2 at eth0 and goes out of the trunk as
tagged frame.

How we can implement it in
NS2:










I have 3 Ethernet interfaces, eth0, eth1 and
eth2. I am planning to convert it into a VLAN
switch.
Let eth1 and eth2 are configured for VLAN 1
and 2 respectively. Let eth0 be a trunk
carrying both VLAN frames.
$vconfig add eth1 1
$vconfig add eth2 2
$vconfig add eth0 1
$vconfig add eth0 2
Cont.
 $brctl

addbr br1
 $brctl addif br1 eth0.1
 $brctl addif br1 eth1.1
 $brctl

addbr br2
 $brctl addif br2 eth0.2
 $brctl addif br2 eth1.2
Cont.
 The

basic idea of the above configuration
is based on the fact that each VLAN can
be simulated with individual bridges per
VLAN. The above configuration works fine
as expected. eth0 acts as trunk carrying
frames with both VLAN IDs(1 and 2). This
trunk can be connected to a similar
switch on the other end to span the VLAN
segmentation across switches.
Benefits of VLAN:






Higher performance - Dividing flat Layer 2
networks into multiple logical workgroups
(broadcast domains) reduces unnecessary traffic
on the network and increases performance.
Security - Groups that have sensitive data are
separated from the rest of the
network, decreasing the chances of confidential
information breaches.
Cost reduction - Cost savings result from less need
for expensive network upgrades and more
efficient use of existing bandwidth and uplinks.
THANK YOU……

More Related Content

What's hot

Location Aided Routing (LAR)
Location Aided Routing (LAR) Location Aided Routing (LAR)
Location Aided Routing (LAR) Pradeep Kumar TS
 
Wavelength division multiplexing
Wavelength division multiplexingWavelength division multiplexing
Wavelength division multiplexingNalin Dubey
 
Wireless routing protocols
Wireless routing protocolsWireless routing protocols
Wireless routing protocolsbarodia_1437
 
Destination Sequenced Distance Vector Routing (DSDV)
Destination Sequenced Distance Vector Routing (DSDV)Destination Sequenced Distance Vector Routing (DSDV)
Destination Sequenced Distance Vector Routing (DSDV)ArunChokkalingam
 
Sensor node hardware and network architecture
Sensor node hardware and network architectureSensor node hardware and network architecture
Sensor node hardware and network architectureVidhi603146
 
Wireless Local Area Networks
Wireless Local Area NetworksWireless Local Area Networks
Wireless Local Area NetworksDilum Bandara
 
Baud rate is the number of change in signal
Baud rate is the number of change in signalBaud rate is the number of change in signal
Baud rate is the number of change in signalAbhishek Pathak
 
WSN NETWORK -MAC PROTOCOLS - Low Duty Cycle Protocols And Wakeup Concepts – ...
WSN NETWORK -MAC PROTOCOLS - Low Duty Cycle Protocols And Wakeup Concepts –  ...WSN NETWORK -MAC PROTOCOLS - Low Duty Cycle Protocols And Wakeup Concepts –  ...
WSN NETWORK -MAC PROTOCOLS - Low Duty Cycle Protocols And Wakeup Concepts – ...ArunChokkalingam
 
Demand assigned and packet reservation multiple access
Demand assigned and packet reservation multiple accessDemand assigned and packet reservation multiple access
Demand assigned and packet reservation multiple accessGowriLatha1
 
WDM & Optical Amplifiers
WDM & Optical AmplifiersWDM & Optical Amplifiers
WDM & Optical AmplifiersEng_Ahmad
 
TDMA, FDMA, and CDMA
TDMA, FDMA, and CDMATDMA, FDMA, and CDMA
TDMA, FDMA, and CDMANajeeb Khan
 
Veille technologique wifi
Veille technologique wifiVeille technologique wifi
Veille technologique wifibensami77
 
Rayleigh Fading Channel In Mobile Digital Communication System
Rayleigh Fading Channel In Mobile Digital Communication SystemRayleigh Fading Channel In Mobile Digital Communication System
Rayleigh Fading Channel In Mobile Digital Communication SystemOUM SAOKOSAL
 
Power delay profile,delay spread and doppler spread
Power delay profile,delay spread and doppler spreadPower delay profile,delay spread and doppler spread
Power delay profile,delay spread and doppler spreadManish Srivastava
 
Signalling Techniques & Basics of CCS
Signalling Techniques & Basics of CCSSignalling Techniques & Basics of CCS
Signalling Techniques & Basics of CCSGec bharuch
 

What's hot (20)

Location Aided Routing (LAR)
Location Aided Routing (LAR) Location Aided Routing (LAR)
Location Aided Routing (LAR)
 
Propagation Models
Propagation ModelsPropagation Models
Propagation Models
 
Wavelength division multiplexing
Wavelength division multiplexingWavelength division multiplexing
Wavelength division multiplexing
 
E1 To Stm
E1 To Stm E1 To Stm
E1 To Stm
 
Wireless routing protocols
Wireless routing protocolsWireless routing protocols
Wireless routing protocols
 
Destination Sequenced Distance Vector Routing (DSDV)
Destination Sequenced Distance Vector Routing (DSDV)Destination Sequenced Distance Vector Routing (DSDV)
Destination Sequenced Distance Vector Routing (DSDV)
 
Sensor node hardware and network architecture
Sensor node hardware and network architectureSensor node hardware and network architecture
Sensor node hardware and network architecture
 
Wireless Local Area Networks
Wireless Local Area NetworksWireless Local Area Networks
Wireless Local Area Networks
 
Baud rate is the number of change in signal
Baud rate is the number of change in signalBaud rate is the number of change in signal
Baud rate is the number of change in signal
 
WSN NETWORK -MAC PROTOCOLS - Low Duty Cycle Protocols And Wakeup Concepts – ...
WSN NETWORK -MAC PROTOCOLS - Low Duty Cycle Protocols And Wakeup Concepts –  ...WSN NETWORK -MAC PROTOCOLS - Low Duty Cycle Protocols And Wakeup Concepts –  ...
WSN NETWORK -MAC PROTOCOLS - Low Duty Cycle Protocols And Wakeup Concepts – ...
 
Demand assigned and packet reservation multiple access
Demand assigned and packet reservation multiple accessDemand assigned and packet reservation multiple access
Demand assigned and packet reservation multiple access
 
Precoding
PrecodingPrecoding
Precoding
 
Wsn 08
Wsn 08Wsn 08
Wsn 08
 
WDM & Optical Amplifiers
WDM & Optical AmplifiersWDM & Optical Amplifiers
WDM & Optical Amplifiers
 
TDMA, FDMA, and CDMA
TDMA, FDMA, and CDMATDMA, FDMA, and CDMA
TDMA, FDMA, and CDMA
 
Veille technologique wifi
Veille technologique wifiVeille technologique wifi
Veille technologique wifi
 
Rayleigh Fading Channel In Mobile Digital Communication System
Rayleigh Fading Channel In Mobile Digital Communication SystemRayleigh Fading Channel In Mobile Digital Communication System
Rayleigh Fading Channel In Mobile Digital Communication System
 
Ad-Hoc Networks
Ad-Hoc NetworksAd-Hoc Networks
Ad-Hoc Networks
 
Power delay profile,delay spread and doppler spread
Power delay profile,delay spread and doppler spreadPower delay profile,delay spread and doppler spread
Power delay profile,delay spread and doppler spread
 
Signalling Techniques & Basics of CCS
Signalling Techniques & Basics of CCSSignalling Techniques & Basics of CCS
Signalling Techniques & Basics of CCS
 

Viewers also liked

Viewers also liked (20)

Simulation and Performance Analysis of AODV using NS-2.34
Simulation and Performance Analysis of AODV using NS-2.34Simulation and Performance Analysis of AODV using NS-2.34
Simulation and Performance Analysis of AODV using NS-2.34
 
Use of NS-2 to Simulate MANET Routing Algorithms
Use of NS-2 to Simulate MANET Routing AlgorithmsUse of NS-2 to Simulate MANET Routing Algorithms
Use of NS-2 to Simulate MANET Routing Algorithms
 
Ns2
Ns2Ns2
Ns2
 
NS-2 Tutorial
NS-2 TutorialNS-2 Tutorial
NS-2 Tutorial
 
Ns2programs
Ns2programsNs2programs
Ns2programs
 
Ns 2 Network Simulator An Introduction
Ns 2 Network Simulator An IntroductionNs 2 Network Simulator An Introduction
Ns 2 Network Simulator An Introduction
 
Working with NS2
Working with NS2Working with NS2
Working with NS2
 
NS2 Projects for Final Year Students, MANET, VANET, Ad-Hoc Networks...
NS2 Projects for Final Year Students, MANET, VANET, Ad-Hoc Networks...NS2 Projects for Final Year Students, MANET, VANET, Ad-Hoc Networks...
NS2 Projects for Final Year Students, MANET, VANET, Ad-Hoc Networks...
 
Simulation d'un réseau Ad-Hoc sous NS2
Simulation d'un réseau Ad-Hoc sous NS2Simulation d'un réseau Ad-Hoc sous NS2
Simulation d'un réseau Ad-Hoc sous NS2
 
Dynamic UID
Dynamic UIDDynamic UID
Dynamic UID
 
Cour simulation ns2
Cour simulation ns2Cour simulation ns2
Cour simulation ns2
 
Manet ns2
Manet ns2Manet ns2
Manet ns2
 
NS2: Events and Handlers
NS2: Events and HandlersNS2: Events and Handlers
NS2: Events and Handlers
 
MANET Routing Protocols , a case study
MANET Routing Protocols , a case studyMANET Routing Protocols , a case study
MANET Routing Protocols , a case study
 
NS2--Event Scheduler
NS2--Event SchedulerNS2--Event Scheduler
NS2--Event Scheduler
 
NS2: Binding C++ and OTcl variables
NS2: Binding C++ and OTcl variablesNS2: Binding C++ and OTcl variables
NS2: Binding C++ and OTcl variables
 
Ns2
Ns2Ns2
Ns2
 
AODV protocol
AODV protocolAODV protocol
AODV protocol
 
AODV Protocol
AODV ProtocolAODV Protocol
AODV Protocol
 
Tracing and awk in ns2
Tracing and awk in ns2Tracing and awk in ns2
Tracing and awk in ns2
 

Similar to Protocol implementation on NS2

Basic Networking
Basic NetworkingBasic Networking
Basic NetworkingCEC Landran
 
Introduction to Computer Networks and Network Security.pptx
Introduction to Computer Networks and Network Security.pptxIntroduction to Computer Networks and Network Security.pptx
Introduction to Computer Networks and Network Security.pptxShehanMarasinghe1
 
W-LAN (Wireless Local Area Network)
W-LAN (Wireless Local Area Network)W-LAN (Wireless Local Area Network)
W-LAN (Wireless Local Area Network)Parvesh Taneja
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Scienceresearchinventy
 
Networking issues for distributed systems
Networking issues for distributed systemsNetworking issues for distributed systems
Networking issues for distributed systemskingGovindi
 
Virtual Local Area Network
Virtual Local Area NetworkVirtual Local Area Network
Virtual Local Area NetworkAtakan ATAK
 
Network Topologies, L1-L2 Basics, Networking Devices
Network Topologies, L1-L2 Basics, Networking DevicesNetwork Topologies, L1-L2 Basics, Networking Devices
Network Topologies, L1-L2 Basics, Networking DevicesAalok Shah
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentIJERD Editor
 
Openstack Neutron Insights
Openstack Neutron InsightsOpenstack Neutron Insights
Openstack Neutron InsightsAtul Pandey
 
Experimental Analysis of an Energy-Efficient WSN
Experimental Analysis of an Energy-Efficient WSNExperimental Analysis of an Energy-Efficient WSN
Experimental Analysis of an Energy-Efficient WSNidescitation
 
chaptet 4 DC and CN.ppt
chaptet 4 DC and CN.pptchaptet 4 DC and CN.ppt
chaptet 4 DC and CN.pptEliasPetros
 
Performance Comparison of AODV and DSDV Routing Protocols for Ad-hoc Wireless...
Performance Comparison of AODV and DSDV Routing Protocols for Ad-hoc Wireless...Performance Comparison of AODV and DSDV Routing Protocols for Ad-hoc Wireless...
Performance Comparison of AODV and DSDV Routing Protocols for Ad-hoc Wireless...Narendra Singh Yadav
 

Similar to Protocol implementation on NS2 (20)

Basic Networking
Basic NetworkingBasic Networking
Basic Networking
 
CCNA 1
CCNA 1CCNA 1
CCNA 1
 
Wan
WanWan
Wan
 
Introduction to Computer Networks and Network Security.pptx
Introduction to Computer Networks and Network Security.pptxIntroduction to Computer Networks and Network Security.pptx
Introduction to Computer Networks and Network Security.pptx
 
W-LAN (Wireless Local Area Network)
W-LAN (Wireless Local Area Network)W-LAN (Wireless Local Area Network)
W-LAN (Wireless Local Area Network)
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Science
 
Networking devices
Networking devicesNetworking devices
Networking devices
 
Networking issues for distributed systems
Networking issues for distributed systemsNetworking issues for distributed systems
Networking issues for distributed systems
 
Virtual Local Area Network
Virtual Local Area NetworkVirtual Local Area Network
Virtual Local Area Network
 
Computer network_network devices
Computer network_network devicesComputer network_network devices
Computer network_network devices
 
Network Topologies, L1-L2 Basics, Networking Devices
Network Topologies, L1-L2 Basics, Networking DevicesNetwork Topologies, L1-L2 Basics, Networking Devices
Network Topologies, L1-L2 Basics, Networking Devices
 
PPT Backbone And Networks
PPT Backbone And NetworksPPT Backbone And Networks
PPT Backbone And Networks
 
IFD30104 Chapter 1
IFD30104 Chapter 1IFD30104 Chapter 1
IFD30104 Chapter 1
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
Openstack Neutron Insights
Openstack Neutron InsightsOpenstack Neutron Insights
Openstack Neutron Insights
 
Experimental Analysis of an Energy-Efficient WSN
Experimental Analysis of an Energy-Efficient WSNExperimental Analysis of an Energy-Efficient WSN
Experimental Analysis of an Energy-Efficient WSN
 
Frame Relay
Frame RelayFrame Relay
Frame Relay
 
chaptet 4 DC and CN.ppt
chaptet 4 DC and CN.pptchaptet 4 DC and CN.ppt
chaptet 4 DC and CN.ppt
 
Routers vs-switch
Routers vs-switchRouters vs-switch
Routers vs-switch
 
Performance Comparison of AODV and DSDV Routing Protocols for Ad-hoc Wireless...
Performance Comparison of AODV and DSDV Routing Protocols for Ad-hoc Wireless...Performance Comparison of AODV and DSDV Routing Protocols for Ad-hoc Wireless...
Performance Comparison of AODV and DSDV Routing Protocols for Ad-hoc Wireless...
 

Recently uploaded

HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 

Recently uploaded (20)

HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 

Protocol implementation on NS2

  • 1. Implementation of Networking protocol using Network Simulator 2 By:Nishant Amresh Naman Kumar Gaurav Vikash kumar)
  • 2. INTRODUCTION We perform the simulation of various networking protocol on NS2 like :  TCP  UDP Ad-Hoc routing protocols like :  AODV  DSR  DSDV
  • 3. Continue…  Implementation of VLAN  And for all its implementation we have used Network Simulator 2 as a platform.
  • 4. Reasons to choose NS2 as a platform  Object Oriented  Real time Implementation  Discrete - Event Simulation  Plumbing makes NS2 a powerful tool  Event Scheduler  Time Synchronization  Cost effective
  • 5. What is NS2  Network Simulator 2, widely known as NS2, is simply an event-driven simulation tool that has proved useful in studying the dynamic nature of communication networks.  It is written using two language: Otcl (Object Oriented Tool Command language)  C++ language. 
  • 6. Why two languages?  NS2 uses Otcl to create and configure a network .   for configuration, setup, or one time simulation, to run simulation with existing NS2 modules.  C++ defines the internal mechanism of the simulation objects   Used when dealing with a packet Used when need to modify existing NS2 modules.
  • 7. Node used as a Router
  • 9. How to write tcl script program to create a program… Five steps to create a tcl script programming:  Initialization and termination aspects of network simulator  Defining the network nodes ,links, queues and topology  Defining the agents and their application  NAM  Tracing
  • 10. Example..  To create new simulation use this command:Set ns [new Simulator]  To create a new node : Set n0 [ns node]  To create trace file : set tracefile1 [open out.tr w] $ns trace-all $tracefile1
  • 11. Example…. (cont.)   To create a NAM file set namfile1 [open out.nam w] $ns namfile1-all $namfile1 To terminate the program : Proc finish {} { global ns tracefile1 namfile1 $ns flush-trace close $tracefile close $namfile exec nam out.nam exit 0
  • 12. TCP(Transmission Control Protocol)  Connection Oriented Reliable Protocol  Consisting of three phases of operation  Connection setup  Data setup  Connection termination
  • 13. Objective of TCP      Adapt the transmission rate of packets to the available bandwidth. Avoid congestion at the network. Create a reliable connection by retransmitting lost packet We measure the performance of TCP on noisy links using Queue monitoring. How the window size vary in network congestion.
  • 14. UDP(User Datagram Protocol)  Connectionless transport-layer protocol  No connection setup is needed prior to data transfer  Offers minimal transport layer functionalities  non-guaranteed data delivery  gives application a direct access to  network layer
  • 16. Basic Agents   Two types of NS2 agent used for creating or destroying a packet are : Routing agent A routing agent creates and receives routing control packets, and commands routing protocols to act accordingly .  Transport-layer agent A transport-layer agent controls the congestion and reliability of a data flow based on an underlying transport layer protocol (e.g.,UDP or TCP)
  • 17. ADHOC
  • 18. INTRODUCTION    Ad-hoc networks are infrastructure-less. The interconnected nodes coordinate the transmissions with other nodes and they may have to relay messages among several other nodes in order to reach a destination. An ad-hoc network is a self-configuring network of wireless links connecting mobile nodes, where these nodes may be routers and/or hosts.
  • 20. Multiple Channels and Multiple Interfaces     Due to the increasing throughput demand, the idea of exploiting multiple channels is appealing in ad-hoc wireless networks . Having more than one interface on a node allows two different nodes communicating in parallel on different channels . An interface has a capability to dynamically switch to different channels over time. Two adjacent nodes can communicate with each other if they have at least one interface on a common channel.
  • 21. Problems occurred In a wireless ad-hoc network consisting of multiple hops, if each node only uses a single interface, packets may be delayed at some hops if their next hops are not on the same channel.  End-to-end delay increases.  Degradation in channel capacity. 
  • 22. Solution    A multi-interface solution for exploiting multiple channels that can be implemented on existing IEEE 802.11 hardware. An interface assignment strategy using the technique of interface switching , that simplifies coordination among nodes while utilizing multiple available channels. A routing protocol, namely the MultipleChannel Routing (MCR), that selects routes with the highest throughput by accounting for channel diversity and interface switching cost.
  • 24.
  • 25. Routing protocols used in ADHOC network  AODV (Ad-Hoc On Demand Distance Vector)  DSR (Dynamic Source Routing)  DSDV (Destination Sequenced Distance Vector)
  • 26. AODV  Routing protocol for wireless Ad-Hoc network  Reactive routing protocol, meaning that it establishes a route to a destination only on demand  avoids the counting-to-infinity problem using sequence numbers on route updates  Capable of unicast and multicast routing .
  • 28. Features…  Routes established on demand and that destination sequence numbers are applied to find the latest route to the destination  Connection setup delay is lower
  • 29. DSR (Dynamic Source Routing)  DSR is designed for MANETs  DSR doesn’t need any network infrastructures   Loop free routing No routing information in the intermediate nodes  Nodes may easily cache this routing information for future use
  • 30. DSR Mechanisms  Route discovery  Route maintenance  Mechanisms “on-demand”    No periodic routing advertisement No link status sensing No neighbor detection packets  Routes caching
  • 31. Basic DSR Route Maintenance    Each node transmitting the packet is responsible for confirming that the packet has been received by next hop. Acknowledgement  By lower layer protocol MAC  By DSR-specific software ack Route errore message
  • 32. DSDV(Destination Sequenced Distance Vector )  Each node maintains a routing table which stores    next hop, cost metric towards each destination a sequence number that is created by the destination itself Each node periodically forwards routing table to its neighbours  Each node increments and appends its sequence number when sending its local routing table  Each route is tagged with a sequence number; routes with greater sequence numbers are preferred  Each node advertises a monotonically increasing even sequence number for itself When a node finds that a route is broken, it increments the sequence number of the route and advertises it with infinite metric Destination advertises new sequence number  
  • 33. Advantages of DSDV  DSDV is an efficient protocol for route discovery. Whenever a route to a new destination is required, it already exists at the source.  Hence, low.  DSDV latency for route discovery is very also guarantees loop-free paths.
  • 34.
  • 35. Virtual LAN( VLAN): A virtual LAN is a group of devices in the same broadcast domain or subnet.  VLANs are good at logically separating traffic between different groups of users  VLANs contain/isolate broadcast traffic, where you need a router to move traffic between VLANs.
  • 37. Configuration of VLAN in NS2: 1) Create a Network Bridge: Firstly we have to create a network bridge using the add call. We have to use net_vlanType as a data type for the net_device element.
  • 38. To attach an adapter to be a bridge, we have to use following parameter’s : id: the name of a physical LAN or VLAN adapter that you would like to plug into the bridge (e.g. eth0, eth1.5).  Network_id: a virtual network ID that you would like to attach the network adapter to. If an adapter is already connected to a bridge and you pass a different network ID, the adapter will be disconnected from the old bridge and connected to the new bridge. To detach an adapter from a bridge, leave the network_id element empty. 
  • 39. cont.  vlan_id -- the VLAN adapter ID. When attaching/detaching a physical network adapter, leave the element empty.  base_device_id -- the name of the physical network adapter with which the VLAN adapter is associated. When attaching/detaching a physical adapter, leave the element empty.
  • 41. eth1.1 bridged with eth0.1 and eth2.2 bridged with eth0.2  This configuration implements a VLAN switch with two access ports (port eth1 for VLAN 1 and port eth2 for VLAN 2) and a trunk port eth0 capable of carrying frames with VLAN ID either 1 or 2 in its 802.1q tag. Now, consider another switch with exactly the same configuration. Then, the trunk ports of the switches are connected.
  • 42. Cont.  Now device connected to port eth1 of switch 1 and that connected to port eth1 of switch 2 can interchange frames with VLAN ID 1. The same is the case with eth2 on both the switches.  Two VLANs span across 2 switches. There is no bridging/routing 'between' these two VLANs. So, this works like a perfect VLAN switch.
  • 43. What is actually happening is : All the untagged frames from eth1 pass through the bridge and goes out of eth0 as untagged frame.  All the frames with VLAN ID 2 entering eth2 gets untagged at eth2.2, gets bridged to eth0.2, gets tagged with VLAN ID 2 at eth0 and goes out of the trunk as tagged frame. 
  • 44. How we can implement it in NS2:       I have 3 Ethernet interfaces, eth0, eth1 and eth2. I am planning to convert it into a VLAN switch. Let eth1 and eth2 are configured for VLAN 1 and 2 respectively. Let eth0 be a trunk carrying both VLAN frames. $vconfig add eth1 1 $vconfig add eth2 2 $vconfig add eth0 1 $vconfig add eth0 2
  • 45. Cont.  $brctl addbr br1  $brctl addif br1 eth0.1  $brctl addif br1 eth1.1  $brctl addbr br2  $brctl addif br2 eth0.2  $brctl addif br2 eth1.2
  • 46. Cont.  The basic idea of the above configuration is based on the fact that each VLAN can be simulated with individual bridges per VLAN. The above configuration works fine as expected. eth0 acts as trunk carrying frames with both VLAN IDs(1 and 2). This trunk can be connected to a similar switch on the other end to span the VLAN segmentation across switches.
  • 47. Benefits of VLAN:    Higher performance - Dividing flat Layer 2 networks into multiple logical workgroups (broadcast domains) reduces unnecessary traffic on the network and increases performance. Security - Groups that have sensitive data are separated from the rest of the network, decreasing the chances of confidential information breaches. Cost reduction - Cost savings result from less need for expensive network upgrades and more efficient use of existing bandwidth and uplinks.