Homework 6 (UDP and TCP) Solution

$35.00

Description

Concepts

Connectionless vs Connection-oriented communication

What is inside a UDP datagram?

What is TCP?

How TCP connection is set up and taken down?

UDP

Make a copy of your solution to the online solutions of User Datagram Client and Server the two files, udpclient.py and udpserver.py .

If you are running the Python code on your laptop using localhost , then start Wireshark with a capture filter host 127.0.0.1 . Just capture the packets via the loopback interface “lo0” Stop Wireshark when the Python scripts stop.

  1. Examine the first UDP packet, how many fields in the UDP datagram?

  1. How many bytes are in the UDP payload? Check it against your udpclient.py code.

  1. What is the protocol number of UDP?

  1. Examine two UDP packets, one from the client and one from the server. What are the port numbers used in the client and in the server packets?

TCP

Make a copy of your solution to TCP/IP Client and Server the two files, tcpclient.py and tcpserver.py .

If you are running the Python code on your laptop using localhost , then start Wireshark with a capture filter host 127.0.0.1 . Just capture the packets via the loopback interface “lo0” Stop Wireshark when the Python scripts stop.

  1. What are the packet numbers correspond to connect request?

  1. What are being exchanged after a TCP connection is established?

sequence number,

acknowledgement sequence number,

MSS,

window sizes

  1. What is the source port number of the client when the client is sending?

  1. What is the source port number of the server when the server is responding?

  1. How many non-empty data packets does the server send back to the client during communication, i.e., after connection is made and before it is closed? What are their packet numbers?

  2. What are the sequence and acknowledgement numbers of the client when the client finally closes the connection?