In this week’s assignment, you’ll be working with the Link State Routing protocol (OSLR) in NS3. The
assignment will also introduce you to the animation program called NetAnim, which can be used for
network visualization.
As discussed in the theory classes, there are two varieties of protocols that deals with wired networks
namely distance vector routing and link state routing. In Distance-vector routing protocol, each node
shares its routing table information (containing the information that it knows about the entire network
topology) with its neighbors. On the other hand, in a link-state protocol the only information passed
between nodes is connectivity related (telling the world about its neighbors.)
In this assignment, we are going to use Link State (OSLR) as the routing protocol for the wired network
setup as shown in the figure below:
The link information <delay, data rate> of each link is provided in the figure. The link state routing
protocol (OSLR) uses this information to compute the routing path between source(client) and
destination(server). In our example, we will consider R1 and R2 as source and destination, respectively.
The source code (LinkStateRouting.cc) to implement this program in NS3 is provided to you. In addition,
a video tutorial link to help you understand the code is also provided below:
https://www.youtube.com/watch?v=dTfJQiEq73Y
As part of this week’s assignment, you are required to make following modification to
LinkStateRouting.cc
1) Make R0 as the source node(client) and R4 as the destination node(server) for the
“OnOffApplication” application. Also, modify the (x,y) coordinates of all the nodes by
incrementing their value by 10 units each.
2) Change the “PacketSize” and “DataRate” parameters of the “OnOffApplication” application to
500 bits and 1Mb/s, respectively.
3) Change the IP address of the server to 10.1.10.0, and make it listen on port No. 120.
4) Generate the animation file named “lsrmodified.xml” of the simulation and run it using the
“NetAnim” animation tool.
NOTE: Incase, if you face any problems with NetAnim, use the following link for troubleshooting.
https://www.youtube.com/watch?v=-gxNFkddsDw