0% found this document useful (1 vote)
3K views

Ns 2 Lab Programs - List

The document describes algorithms for implementing and comparing the performance of different networking protocols and concepts in ns-2 network simulator. Specifically, it includes algorithms for: 1. Implementing unicast routing protocol using Distance Vector routing. 2. Comparing performance of Distance Vector and Link State routing protocols by simulating a network with 6 nodes and measuring effects of link failures. 3. Comparing performance of Unslotted ALOHA and Slotted ALOHA MAC protocols by simulating a network with 4 nodes and measuring effects of queue size and different traffic types. 4. Studying performance of UDP and TCP protocols by simulating a simple network and measuring effects of different traffic types.

Uploaded by

arulnatrajan
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
3K views

Ns 2 Lab Programs - List

The document describes algorithms for implementing and comparing the performance of different networking protocols and concepts in ns-2 network simulator. Specifically, it includes algorithms for: 1. Implementing unicast routing protocol using Distance Vector routing. 2. Comparing performance of Distance Vector and Link State routing protocols by simulating a network with 6 nodes and measuring effects of link failures. 3. Comparing performance of Unslotted ALOHA and Slotted ALOHA MAC protocols by simulating a network with 4 nodes and measuring effects of queue size and different traffic types. 4. Studying performance of UDP and TCP protocols by simulating a simple network and measuring effects of different traffic types.

Uploaded by

arulnatrajan
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

NW LAB - NS2 PROGRAMS - ALGORITHM

AIM:

IMPLEMENTATION OF UNICAST ROUTING PROTOCOL


To implement Unicast Routing protocol using network simulator (ns-2). ALGORITHM 1. Dene new simulator 2. Dene dierent colors for data ows (for NAM) 3. Dene a new Trace le and open it 4. Dene a new NAM Trace le and open it 5. Dene a 'nish' procedure to ush trace record in the `trace and trace output les. 6. Dene the routing protocol as Distance Vector (DV) 7. Create six nodes n0,n1,..n5 8. Create links between the nodes with 0.3Mb and 10 ms Link with DropTail option 9. Give node position (for NAM) to place six nodes in the layout 10.Setup a TCP connection attach TCP Source Agent to node n0 and TCP sink agent to node n5 11.Setup a FTP over TCP connection 12.Dene conguration such that link between nodes n1 and n4 to be failed at 1.0 interval, and up again at 4.5 interval 13.Start the simulation

PERFORMANCE COMPARISION OF ROUTING PROTOCOLS


AIM: To implement two routing algorithms and compare their performance using network simulator (ns2) A) DISTANCE VECTOR ROUTING ALGORITHM ALGORITHM: 1. Dene new simulator 2. Dene dierent colors for data ows (for NAM) 3. Dene a new Trace le and open it 4. Dene a new NAM Trace le and open it 5. Dene a 'nish' procedure to ush trace record in the `trace and trace output les. 6. Dene the routing protocol as Distance Vector (DV)

7. Create six nodes n0,n1,..n5 8. Create links between the nodes with 0.3Mb and 10 ms Link with DropTail option 9. Give node position (for NAM) to place six nodes in the layout 10.Setup a TCP connection attach TCP Source Agent to node n0 and TCP sink agent to node n5 11.Setup a FTP over TCP connection 12.Dene conguration such that link between nodes n1 and n4 to be failed at 1.0 interval, and up again at 4.5 interval 13.Start the simulation B ) LINK STATE ROUTING ALGORITHM ALGORITHM: 1. Dene new simualtor 2. Dene dierent colors for data ows (for NAM) 3. Dene a new Trace le and open it 4. Dene a new NAM Trace le and open it 5. Dene a 'nish' procedure to ush trace record in the `trace and trace output les. 6. Dene the routing protocol as Link State (LS) 7. Create six nodes n0,n1,..n5 8. Create links between the nodes with 0.3Mb and 10 ms Link with DropTail option 9. Give node position (for NAM) to place six nodes in the layout 10.Setup a TCP connection attach TCP Source Agent to node n0 and TCP sink agent to node n5 11.Setup a FTP over TCP connection 12.Dene conguration such that link between nodes n1 and n4 to be failed at 1.0 interval, and up again at 4.5 interval 13.Start the simulation

PERFORMANCE COMPARISION OF MAC PROTOCOLS


AIM: To implement two MAC protocols and compare their performance using network simulator (ns2) ALGORITHM A ) UNSLOTTED ALOHA 1. Dene new simualtor

2. 3. 4. 5. 6. 7.

Dene dierent colors for data ows (for NAM) Dene a new Trace le and open it Dene a new NAM Trace le and open it Dene the MAC protocol as Unslotted ALOHA Create four nodes n0,n1,..n4 Create links between the nodes with 2Mb and 10 ms Link and 1.7Mb and 20 ms with DropTail option 8. Give node position (for NAM) to place six nodes in the layout 9. Set Queue Size of link between node n2 and n3 as 10 10.Setup a TCP connection attach TCP Source Agent to node n0 and TCP sink agent to node n3 11.Setup a FTP over TCP connection 12.Setup a UDP connection attach UDP Source Agent to node n0 and UDP sink agent to node n3 13.Setup CBR trac over TCP connection 14.Dene a 'nish' procedure to ush trace record in the `trace and trace output les. 15.Schedule events for simulation 16.Run the simulation B ) SLOTTED ALOHA 1. Dene new simualtor 2. Dene dierent colors for data ows (for NAM) 3. Dene a new Trace le and open it 4. Dene a new NAM Trace le and open it 5. Dene the MAC protocol as Slotted ALOHA 6. Create four nodes n0,n1,..n4 7. Create links between the nodes with 2Mb and 10 ms Link and 1.7Mb and 20 ms with DropTail option 8. Give node position (for NAM) to place six nodes in the layout 9. Set Queue Size of link between node n2 and n3 as 10 10.Setup a TCP connection attach TCP Source Agent to node n0 and TCP sink agent to node n3 11.Setup a FTP over TCP connection 12.Setup a UDP connection attach UDP Source Agent to node n0 and UDP sink agent to node n3 13.Setup CBR trac over TCP connection 14.Dene a 'nish' procedure to ush trace record in the `trace and trace output les. 15.Schedule events for simulation 16.Run the simulation

STUDY OF UDP & TCP PERFORMANCE


AIM: To implement UDP protocol and Study the performance using network simulator (ns2) ALGORITHM 1. Dene new simulator 2. Create n number of nodes 3. Set the link between each nodes 4. Create UDP & TCP agent 5. Attach the UDP & TCP agent 6. Trace the protocol using CBR & FTP 7. Dene a 'nish' procedure to ush trace record in the `trace and trace output les. 8. Schedule events for simulation 9. Run the simulation

You might also like