{"id":20392125,"url":"https://github.com/abhinav9444/cn-lab","last_synced_at":"2025-08-16T15:04:57.546Z","repository":{"id":261479978,"uuid":"884432684","full_name":"abhinav9444/CN-Lab","owner":"abhinav9444","description":"This repository contains the laboratory exercises and assignments for the Computer Networks course (CS39003). It includes practical implementations, network simulations, and various network protocol experiments conducted during the lab sessions.","archived":false,"fork":false,"pushed_at":"2024-11-10T07:02:36.000Z","size":501,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T00:18:22.853Z","etag":null,"topics":["c","cisco-packet-tracer","client-server","computer-networking-lab","computer-networks","computer-science","networking","socket-programming"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abhinav9444.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-06T18:34:57.000Z","updated_at":"2024-11-12T01:49:03.000Z","dependencies_parsed_at":"2024-11-06T19:45:33.425Z","dependency_job_id":"8eb4f977-68c2-4e3e-84b7-32f6f19e254a","html_url":"https://github.com/abhinav9444/CN-Lab","commit_stats":null,"previous_names":["abhinav9444/cn-lab"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhinav9444%2FCN-Lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhinav9444%2FCN-Lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhinav9444%2FCN-Lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhinav9444%2FCN-Lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhinav9444","download_url":"https://codeload.github.com/abhinav9444/CN-Lab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhinav9444%2FCN-Lab/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259056054,"owners_count":22798867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","cisco-packet-tracer","client-server","computer-networking-lab","computer-networks","computer-science","networking","socket-programming"],"created_at":"2024-11-15T03:39:33.354Z","updated_at":"2025-06-10T10:33:04.558Z","avatar_url":"https://github.com/abhinav9444.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌐 Computer Networks Laboratory (CS39003) 🌐\n\nWelcome to the **Computer Networks Laboratory** repository! This repository houses all the practical exercises, assignments, and projects completed as part of the Computer Networks course (**CS30003**).\n\n## 🌟 Introduction\n\nThis repository contains the code and documentation for the laboratory sessions of the **Computer Networks** course. Each lab session focuses on different aspects of computer networking, including network protocols, simulations, and hands-on experiments.\n\n## 💻 Lab Sessions\n\nThe lab sessions are organized into separate folders. Each folder contains:\n- **Lab Instructions**: Detailed instructions for the lab session.\n- **Source Code**: The code written during the lab session.\n- **Documentation**: Additional documentation and notes.\n\n\u003c!--\n## 📂 Problems Index\n\nThis section lists the problems covered in the **Computer Networks Laboratory**:\n\n| **S.No.** | **Problem Statement**                                      | **Solution File**                      |\n|-----------|-------------------------------------------------------------|----------------------------------------|\n| **1**     | Understanding the OSI Model                                 | [Solution](./Lab1/problem1.md)         |\n| **2**     | Basic Network Configuration                                 | [Solution](./Lab1/problem2.md)         |\n| **3**     | Analyzing TCP/IP Layers                                     | [Solution](./Lab2/problem1.md)         |\n| **4**     | Implementing a Simple Socket Program                        | [Solution](./Lab2/problem2.md)         |\n| **5**     | Configuring Static Routing                                  | [Solution](./Lab3/problem1.md)         |\n| **6**     | Exploring Dynamic Routing Protocols                         | [Solution](./Lab3/problem2.md)         |\n| **7**     | Simulating Network Topology with Packet Tracer              | [Solution](./Lab4/problem1.md)         |\n| **8**     | Performance Analysis of Network Links                       | [Solution](./Lab4/problem2.md)         |\n\n\u003e **Note**: Each problem folder contains the respective code, documentation, and detailed explanations.\n\n---\n--\u003e\nFeel free to explore the repository and get hands-on experience with computer networks. **Happy Networking!**\n\n# Network Lab Sessions Index\n\n## Week 1 : Lab Session 1 : Networking Tools\n\n| **S.No.** | **Problem Statement**            | **Solution File**             |\n|-----------|----------------------------------|-------------------------------|\n| **1.1**     | Discuss what is networking and its significance in computer network. Discuss the components (i.e., h/w and s/w) required for data communication in a Computer Network. (Show the h/w components like Network Interface Card (NIC), Network Cable, RG-45 Connector, Hub, Switch, Router etc.) | [Read](./Lab-Codes/1.1.md)|\n| **1.2**     | Network Diagnostic Tools                                                                              | [Read](./Lab-Codes/1.2.md)|\n| **1.3**     | Finding IP Addresses                                                                                  | [Read](./Lab-Codes/1.3.md)|\n| **1.4**     | Sending packets of fixed size to a website.                                                           | [Read](./Lab-Codes/1.4.md)|\n| **1.5**     | Running Traceroute via 2 or more service provider.                                                    | [Read](./Lab-Codes/1.5.md)|\n| **1.6**     | Limiting number of hops using Traceroute.                                                             | [Read](./Lab-Codes/1.6.md)|\n| **1.7**     | Netstat Statistics.                                                                                   | [Read](./Lab-Codes/1.7.md)|\n| **1.8**     | Finding IP Address using nslookup.                                                                    | [Read](./Lab-Codes/1.8.md)|\n| **1.9**     | Reverse DNS Lookup.                                                                                   | [Read](./Lab-Codes/1.9.md)|\n\n## Week 1 : Lab Session 1 : Overview of C Programming\n\n| **S.No.** | **Problem Statement**            | **Solution File**             |\n|-----------|----------------------------------|-------------------------------|\n| **1.1**     | WAP to swap 2 numbers both by call by value and call by address.                                      | [Solution](./Lab-Codes/1.1.c)|\n| **1.2**     | WAP to declare a structure having data members \u0026 display its content.                                 | [Solution](./Lab-Codes/1.2.c)|\n| **1.3**     | WAP to accept array of employee in structure \u0026 print them in sorted way.                              | [Solution](./Lab-Codes/1.3.c)|\n| **1.4**     | WAP to accept 10 numbers using dynamic array \u0026 find sum \u0026 average of numbers.                         | [Solution](./Lab-Codes/1.4.c)|\n| **1.5**     | WAP to enter a statement from console and write it to a file and read its content from the same file. | [Solution](./Lab-Codes/1.5.c)|\n\n## Lab Session 2 : Basics of Socket Programming\n\n| **S.No.** | **Problem Statement**            | **Solution File**             |\n|-----------|----------------------------------|-------------------------------|\n| **2.1**     | Write a simple datagram program to establish client server communication.        | [server](./Lab-Codes/2.1s.c) [client](./Lab-Codes/2.1c.c)|\n| **2.2**     | Write a sender and receiver program in C by passing the IP address and the port number of each other through the command line arguments using connection less socket. Both of them will exchange messages with each other continuously. If any one of them will receive the “exit” message from the other end then both of them will close the connection. (Assume both the client and server are running with in the same host) ~ given in Lesson Plan           | [Receiver](./Lab-Codes/2.2r.c) \u003cbr\u003e\u003cbr\u003e [Sender](./Lab-Codes/2.2s.c)|\n\n## Lab Session 3 : Connection Oriented Socket Programming\n\n| **S.No.** | **Problem Statement**            | **Solution File**             |\n|-----------|----------------------------------|-------------------------------|\n| **3.1**   | WAP to add two numbers \u0026 show their sum in client server model.  | [server](./Lab-Codes/3.1s.c) [client](./Lab-Codes/3.1c.c)|\n| **3.2**   | WAP to swap two numbers in TCP | [server](./Lab-Codes/3.2s.c) [client](./Lab-Codes/3.2c.c)|\n| **3.3**   | WAP in TCP for a number sent by the client to the server and check whether it is an Armstrong number or not. | [server](./Lab-Codes/3.3s.c) [client](./Lab-Codes/3.3c.c)|\n| **3.4**   | WAP in TCP for an array of integer sent by the client to the server and return maximum, minimum, sum and average of all the numbers. | [server](./Lab-Codes/3.4s.c) [client](./Lab-Codes/3.4c.c)|\n| **3.5**   | WAP in TCP to send a student structure having data members (roll,name,marks of subjets) to the server by the client and return sum of marks from the server and display on the client side. | [server](./Lab-Codes/3.5s.c) [client](./Lab-Codes/3.5c.c)|\n\n## Lab Session 4 : Socket Programming with Multiple clients\n\n| **S.No.** | **Problem Statement**            | **Solution File**             |\n|-----------|----------------------------------|-------------------------------|\n| **4.1**     | WAP in TCP for multiple clients. when one client connects to server, it will send clients their serial number. | \u003c!--[server](./Lab-Codes/4.1s.c) [client](./Lab-Codes/4.1c.c)--\u003e|\n| **4.2**     | WAP in TCP to create a chat server between client and server. | \u003c!--[server](./Lab-Codes/4.1s.c) [client](./Lab-Codes/4.1c.c)--\u003e|\n| **4.3**     | WAP in TCP to create a chat server between client and server. | \u003c!--[server](./Lab-Codes/4.1s.c) [client](./Lab-Codes/4.1c.c)--\u003e|\n| **4.4**     | WAP in TCP to create a chat server between client and server. | \u003c!--[server](./Lab-Codes/4.1s.c) [client](./Lab-Codes/4.1c.c)--\u003e|\n\n## Lab Session 5 : \n\n| **S.No.** | **Problem Statement**            | **Solution File**             |\n|-----------|----------------------------------|-------------------------------|\n| **5.1**     | . | \u003c!--[server](./Lab-Codes/4.1s.c) [client](./Lab-Codes/4.1c.c)--\u003e|\n| **5.2**     | . | \u003c!--[server](./Lab-Codes/4.1s.c) [client](./Lab-Codes/4.1c.c)--\u003e|\n| **5.3**     | . | \u003c!--[server](./Lab-Codes/4.1s.c) [client](./Lab-Codes/4.1c.c)--\u003e|\n\n## Lab Session 6 : Introduction to Network Simulators (Cisco Packet Tracer)\n\n| **S.No.** | **Problem Statement**            | **Packet Tracer File**             | **Illustration Images** |\n|-----------|----------------------------------|-------------------------------| ----------------------- |\n| **6.1**     | Simulating Direct (point to point) connection between 2 PCs through wire (Using Copper Cross Over) | [Download Simulation](simulations/lab6.pkt?raw=true)|[See image Illustrations](./Cisco-Packet-Tracer-Illustrations/exp6.1_images.md)|\n| **6.2**     | . | \u003c!--[server](./Lab-Codes/4.1s.c) [client](./Lab-Codes/4.1c.c)--\u003e||\n| **6.3**     | . | [Download Lab 6 Simulation](Lab-Codes/6.1.pkt?raw=true)||\n\n## ⚙️ Installation\n\nTo set up the environment for the lab exercises, follow these steps:\n\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/abhinav9444/CN-Lab.git\n\n2. Navigate to the Lab-Codes directory:\n\n   Copy code from different Laboratory session and execute them on your local machine for implementation.\n   ```sh\n   cd .\\CN-Lab\\Lab-Codes\\ \n   ```\n3. Compile the sender and receiver programs using gcc:\n   ```sh\n   gcc sender.c -o sender\n   gcc receiver.c -o receiver\n   ```\n4. First, run the receiver program:\n   ```\n   .\\receiver.exe\n   ```\n5. Open another command prompt (cmd) or PowerShell and run the sender program:\n   ```\n   .\\sender.exe\n   ```\n   \n## 🤝 Contributing\nContributions are welcome! If you have any improvements or suggestions, please fork the repository, make your changes, and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.\n\n-    Fork the Repository\n-    Create your sub Branch (git checkout -b NewBranch/SubBranch)\n-   Commit your Changes (git commit -m 'Add some SubBranch')\n-   Push to the Branch (git push origin NewBranch/SubBranch)\n-   Open a Pull Request\n\n## 📄 License\nDistributed under the MIT License. See [LICENSE](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhinav9444%2Fcn-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhinav9444%2Fcn-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhinav9444%2Fcn-lab/lists"}