This repository provides working code and complete description for Ring, Star and Hybrid Network Topologies. The scripts are written in Tcl for NS which is used to simulate the behavior of networks and NAM is used as a visual aid showing how packets flow along the network.
Write a Tcl script that forms a network consisting of 7 nodes, numbered from 0 to 6, forming a ring topology. The links have a 512Kbps bandwidth with 5ms delay and droptail queue. Set the routing protocol to DV (Distance vector). Send UDP packets from node 0 to node 3 with the rate of 100 packets/sec with each packet having a size of 1 Kilo Bytes.
Scheduling Events:
- Start transmission at 0.02.
- Bring down the link between node 2 and node 3 at 0.4.
- Bring the dropped link back up at 1.0. Finish the transmission at 1.500.
- End the simulation at 2.0.
You will have to create a star topolgy using ns2 to implement the Distance vector routing protocol. Assume all the devices in the following star topology as nodes and all the wires as duplex links having a capacity of 512Kb and a propagation delay of 10ms with a stochastic fair queue scheduling algorithm. You will have to send TCP data from H1 to H4 having red color. Also you will have to send UDP data with a rate of 256Kbps from H2 to H5 having blue color.
Scheduling Events:
- TCP Data starts at 0.1 and stops at 1.5
- UDP Data starts at 0.2 and stops at 1.3
- Bring the link between SW1 and H5 down at 0.5 and bring it back up at 0.9
- Bring the link between SW1 and H4 down at 0.7 and bring it back up at 1.2
- Stop the simulation at 2.0
You will have to create a hybrid topology in correct format from ns2 to implement the Distance vector routing protocol. Assume all the devices in the toplogy as nodes and all the wires as duplex links having a capacity of 1.5Mb and a propagation delay of 10ms with a stochastic fair queue scheduling algorithm. You will have to send TCP data from p3 to p9 and from p5 to p12. You will have to send UDP data with a rate of 2200 packets/44 seconds with a single packet having a size of 1.5 Kilo Bytes from p13 to p6. Also send udp traffic from p1 to p8 such that 14800 packets are generated after each 37 seconds with each packet having a size of 5.5 Kilo Bytes.
Scheduling Events:
- TCP Data: From p3 to p9 (Start: 0.2, Stop: 1.8), From p5 to p12 (Start: 0.3, Stop: 1.4)
- UDP Data: From p13 to p6 (Start: 0.4, Stop: 1.6), From p1 to p8 (Start: 0.7, Stop: 1.7)
- Bring the link between r1 and r2 down at 0.7 and bring it back up at 1.0
- Bring the link between r4 and r3 down at 0.9 and bring it back up at 1.3
- Stop the simulation at 2.0
Just compile the topology file you want to run e.g star.tcl using the following command on Linux terminal. Make sure you have already installed NAM and ns2 on your Linux machine.
ns star.tcl
Hey there, I'm Haris - Maker of Things
Creator of Ultimate Facebook Scraper (one of the best software to collect Facebook data for research & analysis)
Stuck with some problem? Need help in solution development, guidance, training or capacity building? I am a Full Stack Engineer turned Project Manager with years of technical and leadership experience in a diverse range of technologies and domains. Let me know what problem you are facing at haris.muneer5@gmail.com and we can schedule a consultation meeting to help you get through it.
- Development of Web Applications, Mobile Applications, and Desktop Applications
- Development of Machine Learning/Deep Learning models, and deployment
- Web Scraping, Browser Automation, Python Scripting
If you or your company use any of my projects, like what Iβm doing or have benefited from my projects in any way then kindly consider backing my efforts.
For donations, you can follow these simple steps:
1) Free signup at TransferWise using this link: https://transferwise.com/invite/u/harism95. (Signing up through this link will save you from any transcation fee on the donation)
2) Select the amount e.g (15$) and choose the receiving/recipient's currency to be PKR. It supports multiple payment options (credit card, debit card, wire transfer etc)
3) Then it will show my info as the recipient, select it. If my name isn't shown, then type my email haris.muneer5@gmail.com in recipients.
4) Choose the reason for transfer to the one that suits you the most (in this case it could be 'General expenses') and in the reference section, you can mention 'Support'
If you face any issue in sending donation then feel free to get in touch with me at haris.muneer5@gmail.com
Thank you for your contribution!
You can get in touch with me on my LinkedIn Profile:
You can also follow my GitHub Profile to stay updated about my latest projects:
If you liked the repo then kindly support it by giving it a star β and share in your circles so more people can benefit from the effort.
If you find any bug in the code or have any improvements in mind then feel free to generate a pull request.
If you face any issue, you can create a new issue in the Issues Tab and I will be glad to help you out.
Copyright (c) 2018-present, harismuneer