This project was created for studying CSMA/CD and 802.11 (CSMA/CD) Protocols
The project is organized into two main folders, each corresponding to a type of network:
This folder contains files related to wired LAN using CSMA/CD protocols.
-
Files:
wiredlan.tcl
: The original TCL script.wiredlanincreased7.tcl
andwiredlanincreased.tcl
: Scripts with additional network load.
-
AWK Scripts:
📄 packetdeliveryratiowired.awk
and📄 throughputwired.awk
: These scripts generate data outputs and formatted text for graphs.
-
Outputs:
📄 test.txt
: Output used for creating graphs.- 📊 Various
.png
files generated from the outputs usingmakegraph.sh
.
This folder contains files related to wireless LAN in Ad Hoc mode using 802.11 protocols.
-
Files:
wirelessLan.tcl
: The original NS2 script.wirelessLan5nodes.tcl
: Script showcasing additional load with 5 nodes.10node.tcl
: Script showcasing 10 nodes.
-
AWK Scripts:
📄 packetdeliveryratio.awk
,📄 throughput.awk
, and📄 throughputavg.awk
: These scripts output necessary information for wireless networks.
-
Outputs:
- 📊 Various
.txt
files created to be used bymakegraph.sh
to generate.png
graphs.
- 📊 Various
Each script is located in the appropriate folder for its specific network setting (wireless/wired).
I hope you find this project and the experiments conducted to observe network behavior informative and useful.
Thank you.
-
Create and run your .tcl script:
ns filename.tcl
-
Two files will be created:
- 📄
.nam
(GUI) - 📄
.tr
(trace)
- 📄
-
Run the .awk scripts on the .tr file:
gawk -f throughputavg.awk wirelessLan.tr
-
Create graphs:
- Edit
makegraph.sh
with the correct files, then run:
gnuplot makegraph.sh
- Edit
🔔 Note: Before running the .sh and gnuplot to create graphs, ensure the AWK scripts format the information into a .txt file.