- Operating System: Windows
- Machine Code: Python
- App_server.py: Server-side application handling SQL queries.
- Client.py: Client-side application interacting with various server functionalities.
- DHCP.py: Client module for Dynamic Host Configuration Protocol.
- DNS.py: Client module for Domain Name System.
- mydatabase.db: Database file.
-
Ensure that
mydatabase.db
is in the same directory as the.py
files. -
Run the Server:
- Open a terminal.
- Navigate to the directory containing the Python files.
- Execute:
cd files_directory python App_server.py
-
Run the Client:
- Open a new terminal.
- Navigate to the directory containing the Python files.
- Execute:
cd files_directory python Client.py
- Functionality:
- Utilizes DHCP to dynamically obtain an IP address from a DHCP server on the network.
- Functionality:
- Sends domain name queries to a DNS server and resolves them, either from cache or by forwarding to a Google DNS server.
- Functionality:
- Sends SQL queries to the server via TCP connection and receives responses.
- Functionality:
- Establishes a Reliable UDP (RUDP) connection with the server to send SQL queries and receive results.
-
Client – DHCP:
- Sends DHCP discover packet.
- Captures DHCP offer packet.
- Requests offered IP address and updates client.
-
Client – DNS:
- Sends domain name query to DNS server.
- Receives resolved IP address from server, either from cache or Google DNS.
-
Client – App Server (TCP):
- Sends SQL queries to server.
- Receives and prints responses from the server.
-
Client – App Server (RUDP):
- Establishes RUDP connection with server.
- Sends SQL queries using RUDP.
- Receives and validates responses using RUDP.
This program demonstrates various network communication functionalities including DHCP, DNS, and client-server interactions over both TCP and RUDP protocols. Each component handles specific tasks such as IP address allocation, domain name resolution, and SQL query execution with appropriate communication protocols ensuring reliability and efficiency.