Sunteți pe pagina 1din 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

S-ar putea să vă placă și