Ex - No 9
Ex - No 9
Aim:
To simulate the behavior of Distance Vector Routing/ Link State Routing Algorithm.
Algorithm:
Step 3: Using the foresaid object write all the trace output into the file
Step 4: Using an object create a file to write all nam window output into it
Step 6: Create Duplex Links for each node of 10 mbps bandwidth and delay of 10 ms
Step 7: Set one node as Source and attach TCP agent and FTP traffic generator
Step 10: Make any two links down and up at different timings and see how the routing is
happening in NAM window
Step 14: Using the a foresaid object write all the trace output into the file
Step 15: Using an object create a file to write all nam window output into it
Step 16: Create 4 Nodes so that they are placed in a rectangular position
Step 17: Create Duplex Links for each node of 10 mbps bandwidth and delay of 10 ms
Step 18: Set one node as Source and attach TCP agent and FTP traffic generator
Step 19: Set one node as Destination and attach TCP sink
Step 21: Make any two links down and up at different timings and see how the routing is
happening in NAM window
Distance Vector:
proc finish {} {
global nf ns tr
$ns flush-trace
close $tr
exit 0
$ns rtproto DV
$ns run
proc finish {} {
global nf ns tr
$ns flush-trace
close $tr
exit 0
}
set n0 [$ns node]
$ns rtproto LS
$ns run
Output:
Thus the simulation of Distance Vector Routing/ Link State Routing Algorithm is
carried out using NS2.