| Welcome to my blog!

Meet the Author

Roshan is an undergarduate student in Information and Communication Technologies from Vavuniya Campus of the University of Jaffna.He is very much interesting on IT related Topics and the technical stuffs.Roshan is also a creative mind with lots of ideas and potential writter..!

Subscribe to this blog!

Receive the latest posts by email. Just enter your email below if you want to subscribe!

Tuesday, December 9, 2014

Using NS






The post is based on a assement i was given in my campus and the Question is mentioned here
Q:Write a tcl script that forms a network as follows



Consisting one central router as 0 and two regional routers as 1 and 2.
-Set DV protocol
-Each regional router has four sub routers as given in the picture.
-Create
--Black links: 512Kbps bandwidth with 5ms delay.
--Brown links: 512Kbps Bandwidth with 5ms delay.
--Blue links: 512Kbps Bandwidth with 5ms delay.
--Create UDP packet transfer between blue nodes.


main simulation
-Start : 0sec
-Finish:4sec
-Size : 512bits

Create TCP packet transfer between green nodes.

-Start : 1sec
-Finish:3sec

Create UDP packet transfer between red nodes in opposite direction.

-Start : 3sec
-Finish:4sec
-Size : 512bits
-You should differentiate the colors of each packet.


Put the labels for nodes as
Central Router.
Regional Router.
Internal Routers.
Put label backbone to blue color links.


Place buffers in regional router’s brown links as well as to blue links with size 20.
Break down the brown link of node 2.
Suggest any way to transfer packets between blue nodes.
Create a TCP packet transfer inside any region in between green and blue nodes with default packet size 
  • Suggest a way to transfer packets between internal nodes without handling regional routers


Explain briefly about the obtained trace file.
Network engineer suggest that to create router 0 as the wireless router and all others as wireless nodes, give some pros and cons regarding this.
So the answer is as follows as all the comments are put correctly i hope you can understand it easily! :)







· So the discription about the scenario is this
 After the break down of the brown link of node 2, the packet transfer path between blue nodes is disconnected. To keep the packet transfer we can suggest, break down brown link after the end of packet transferring between blue nodes. Thus we can suggest to have link between central router and internal router.
·    We can use internal router to transfer the packets between internal nodes. It is good to have direct link between both internal routers. Then we can transfer packets between different internal nodes.
·    The central router should be the main point in the network so we can make the link between nodes to have a big band width and a better time delay. And the queue size should be high to reduce the number of drop packets.

·    Because of the breakdown of the link the only path will be removed then the packets will get lost so if we can make the structure more different which can have a another link to make another possible path the problem will be reduced

when you create the simulation and as we have coded to have a nam and tr files.those will be saved in the location original simulation code is.So lets see how this trace file is organized.The image was taken from internet i couldn't remember the link :(




So lets try to understand some of its statements.......hope this will useful for you...




·    + 0.00017 0 1 rtProtoDV 11 ------- 0 0.1 1.1 -1 1

Enqueue rtProtoDV packet at 0.00017 seconds with 11bits packet size between 0 and 1 nodes; flag is
0; src_address is 0.1; dst_address is 1.1; sequence number 1;packet id is 1

-     - 0.00017 0 1 rtProtoDV 11 ------- 0 0.1 1.1 -1 1

Dequeue above mention packet with same detail at 0.00017 second

·    r 0.005342 0 1 rtProtoDV 11 ------- 0 0.1 1.1 -1 1

Receive rtProtoDV packet node 0 to node 1 at 0. 005342 second, with 11bits size. Flag is 0;
src_address is 0.1; dst_address is 1.1; seq_num is 1;packet id is 11

·    + 0.1 9 3 cbr 512 ------- 1 9.0 6.0 1 75

Receive cbr packet node 5 to node 4 at 1.283857 second, with 512bits size. Flag is 3; src_address is
9.0; dst_address is 6.0; seq_num is 1; packet id is 75

·    r 1.039375 5 4 ack 40 ------- 2 5.0 10.0 0 98

Receive acknowledgement packet node 5 to node 4 at 1.039375 second, with 40bits size. Flag is 2;
src_address is 5.0; dst_address is 10.0; seq_num is 2; packet id is 98


·    + 1.0675 10 3 tcp 1040 ------- 2 10.0 5.0 1 99

Enqueue tcp packet at 1.0675 seconds with 1040bits packet size between 10 and 3 nodes; flag is 2;
src_address is 10.0; dst_address is 5.0; sequence number 1; packet id is 99

·    d 2.152429 4 1 cbr 512 3 5.0 9.0 234 389

Drop cbr packet at 2.152429 seconds with 512bits packet size between 4 and 1 nodes; flag is 3;
src_address is 5.0; dst_address is 9.0; sequence number 234; packet id is 389

·    v 3.5 link-down 4 2

Link down between node 4 and node 2 at 3.5 seconds.Because these links are duplex links. Then both directions of links must down.

Pros and Cons when create router 0 as the wireless router and all others as wireless nodes

Pros
·    Distance between two internal nodes are same
·    Each node have independent connections
·    It is less cost
·    Availability is high
·    It gives more security because it centralized

Cons
·    Data traffic is high on the node 0
·    Packet drop may happen
·    Packet transmission will slower because of the traffic
·    If central router down, whole the network will down
·    Transmission bandwidth is less than wired connections
·    Less security when the transmission
Roshan Karunarathna Web Developer,Programer

Roshan is an undergarduate student in Information and Communication Technologies from Vavuniya Campus of the University of Jaffna.He is very much interesting on IT related Topics and the technical stuffs.Roshan is also a creative mind with lots of ideas and potential writter..!