Skip to main content

Link State Routing Protocol

Link state routing is a method in which each router shares its neighborhood’s knowledge with every other router on the internetwork. In this algorithm, each router in the network understands the network topology and then makes a routing table depending on this topology.

Each router will share data about its connection to its neighbor, who will, consecutively, reproduce the data to its neighbors, etc. This appears just before all routers have constructed a topology of the network.

In LSP, each node transmits its IP address and the MAC to its neighbor with its signature. Neighbors determine the signature and maintain a record of the combining IP address and the MAC. The Neighbor Lookup Protocol (NLP) of LSP derives and maintains the MAC and IP address of every network frame accepted by a node. The extracted data can support the mapping of MACs and IP addresses.

The link-state flooding algorithm prevents the general issues of broadcast in the existence of loops by having every node maintain a database of all LSP messages. The creator of each LSP contains its identity, data about the connection that has changed status, and also a sequence number.


The three keys to learning the Link State Routing algorithm are as follows −

Knowledge about the neighbourhood

Rather than transmitting its whole routing table, a router only shares data about its neighbourhood.

To all routers

Each router shares this data router on the network, not only its neighbours. This phase is known as flooding. Each router that receives the packet shares copies to all of its neighbours. Finally, every router (without exception) gets a copy of the comparable data. Information giving when there is a changeEach router assigns out data about the neighbours when there is a change. A route’s value is used to every packet as it leaves a router and introduces a network in deciding a route.

Information giving when there is a change

This price is an outbound price, defining that it is used with a packet that leaves the router. Two factors govern how the price is used to packets in deciding a route. The price is used only by routers and not by some different stations on a network. The connection from one router to the next is a network, not a point-to-point cable. There are some topologies, including ring and bus, each station on the network determines each packet’s header that passes.
Suppose the price was inserted by each station rather than the router alone. In that case, it could assemble unpredictably (the multiple stations in a network can transform for various circumstances, some of them unpredictable). A price is used as a packet that leaves the router instead of it being introduced. Some networks are transmitted. When a packet is in the network, each station containing the router can select it up. Therefore, we cannot create any price for the packet when it passes from a network to a router.


NS2 simulation using Link State routing protocol


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 LS

$ns at 0.0 "$ftp start"
$ns at 0.0 "$cbr start"

$ns at 5.0 "finish"

$ns run

Comments

Popular posts from this blog

NS2 INSTALLATION IN UBUNTU 21.04

  Hello, this post explains how to install ns2 in Ubuntu 21.04.  1) First you have to download ns2 all-in-one package from following link;    http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz/download 2) Extract the downloaded zip file 'ns-allinone-2.35.tar.gz file' to home folder. 3)  Now you need to download some essential packages for ns2,these packages can be downloaded by using the following commands :  applications>accessories>terminal or dashhome>terminal   and   then type the below lines one by one on the terminal window sudo apt-get update sudo apt-get dist-upgrade sudo apt-get update 4) Install the basic libraries; sudo apt install build-essential autoconf automake libxmu-dev 5) Install gcc and g++ and for that please do following; open the file using sudo mode sudo nano /etc/apt/sources.list Include the following line in list;  deb http://in.archive.ubuntu.com/ubuntu bionic main universe then open terminal and exec

HP NETWORK SIMULATOR: A COMWARE OS LEARNING TOOL

  Comware v7 is a network operating system that runs on HP high-end network devices. The HP Network Simulator is an ideal Comware v7 learning tool, which allows users to create, configure, and connect simulated networks. Benefits Beginners  – The HP Network Simulator tool is helpful for users who are new to networking and want to learn how to configure network devices (switches, routers), various topologies, or different routing and switching protocols and features. Experienced users  – The HP Network Simulator learning tool is helpful for users who have experience with non-HP networking devices and want to learn the Comware CLI and features. Extra devices  – Users can create devices using the HP Network Simulator and use them with their physical devices to configure and test topologies that aren’t configurable with just the physical devices they have. For example – A user wants to configure OSPF using 3 or more devices but has only 1 physical router. User can create 2 or more routers