Skip to content

This repository constitutes the solutions for the weekly programming assignments as part of CSEN 233 Computer Networks taught by Professor Sin Yaw Wang at Santa Clara University.

Notifications You must be signed in to change notification settings

ChiragRadhakrishna43-7/CSEN-233-Computer_Networks_Projects

Repository files navigation

Socket-Programming

Computer Network Projects using Python Programming.

1. Numerical Assignment
The client establishes a connection with the server. The server receives two numbers and an operation ('+','-','*','/') from the client. The server performs the respective operation and returns the result. The result is displayed on the client side and the connection terminates. The socket library is used to facilitate socket creation and send the data to the respective address. The struct module is used for packing and unpacking the data to be sent.

2. HTTP Request
Implementation of HTTP Client that connects to the gaia.cs.umass.edu server to fetch an object. Used HTTP/1.1 for construction of the get request. Made use of the logging library for understanding the errors and debugging the code.

3. Auction Protocol Design & Implementation
Designed a protocol to implement an auction process. Client-Server model using TCP as transport layer and JSON as message format. Defined message types and payloads. Awarded the second best protocol design.
Implementation: Implemented the winning design using HTTP/1.1 response and request objects. Created JSON Objects for message exchange. Utilized multithreading concepts to faciliate multiple bidders to take part in the auction.

4. HTTP Server
Designed a simple HTTP Server that services any browser request. Introduced random errors at 50% probability. Libraries utilized include socket, logging and random. Logs at the server side keep track of the events occuring at the server end.

5. Diffie-Hellman Key Exchange
Designed and implemented a protocol to simulate Diffie-Hellman key exchange algorithm.

Screenshot 2024-02-20 085600

6. Wireshark DNS Lab v8.0
Carried out Wireshark packet capture to understand request-response messages. Analyzed response headers, answer records, additional records and authoritative servers involved. Extensively made use of nslookup command.

7. Distance between Routers
Implemented Dijkstra Algorithm to compute the path between two routers over a given network. To run the implementation, the topology file and the router names are provided. The relnit function in netemulate.py loads the topology file. The topology file comprises of the list of routers with its links with various other routers and the associated cost. After loading the file, relnit will build the network accordingly.

Minimum Spanning Tree
Kruskal Algorithm finds the minimum spanning tree (MST) for the given router network (configuration). To run the implementation, the topology file and the router network is provided. The relnit function in netemulate.py loads the topology file. The topology file comprises of the list of routers with its links with various other routers and the associated cost. After loading the file, relnit will build the network accordingly. After construction of the given network, a call to the Kruskal function will compute and output the MST for the given configuration.

About

This repository constitutes the solutions for the weekly programming assignments as part of CSEN 233 Computer Networks taught by Professor Sin Yaw Wang at Santa Clara University.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages