Configure a network in Cisco Packet Tracer with 5 PCs, including DNS, FTP, and DHCP services. Ensure each PC can access the FTP server using the DNS, and obtain IP addresses dynamically from the DHCP server
The network is designed using a star topology, where all the PCs are connected to a central switch. A second switch is used to connect the two web servers (YouTube and Google). The PCs are configured to access the web servers, ensuring proper communication across the network. The star topology allows efficient communication and management of devices, with minimal cable usage and centralized control
Write a client-server socket-based system that calculates the Internet checksum for a given set of data transmitted between the client and server. The system should allow clients to send data to the server, which will then compute and return the Internet checksum.
import socket
ip = "127.0.0.1"
port = 6789
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect((ip,port))
print(f"Connected to the Server!")
msg = "This is a not a test"
client.send(bytes(msg, "utf-8"))
print(f"Message : {msg}")
checkSum = client.recv(1024).decode("utf-8")
print(f"Response : {checkSum}")
import socket
def compute_checksum(data: bytes) -> int:
if len(data) % 2 != 0:
data += b'\x00'
checksum = 0
for i in range(0, len(data), 2):
high_byte = data[i] << 8
low_byte = data[i + 1]
word = high_byte + low_byte
checksum = checksum + word
checksum = (checksum & 0xFFFF) + (checksum >> 16)
checksum = ~checksum & 0xFFFF
return checksum
ip = "127.0.0.1"
port = 6789
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.bind((ip, port))
server.listen(5)
print(f"Server Started at {ip} on port {port}")
while True:
client, addr = server.accept()
print(f"Connected with client at {addr[0]} on {addr[1]}")
data = client.recv(1024).decode("utf-8")
checkSum = compute_checksum(bytes(data, "utf-8"))
print(f"Checksum for received data '{data}' is: {checkSum}")
client.send(str(checkSum).encode())
client.close()
Capture the network traffic in Wireshark for a client-server system where the client sends data to the server to calculate the Internet checksum. Analyze the captured packets to identify the checksum calculation process and observe how the data is transmitted between the client and server