Lab/Tutorial :
SEHH2238 : Computer Networking
Session 11 : Transport Protocols (Solution)
1. A client residing on a host with IP address 122.45.12.7 sends a message to the corresponding server residing on a host with IP address 200.112.45.90. If the well-known port is 161 an the temporary port is 51000, what are the pair of socket addresses used in the communication?
Copyright By PowCoder代写 加微信 powcoder
A client uses TCP to send data to a server. The data consist of 16 bytes. Calculate the efficiency of this transmission at the TCP level (ratio of useful bytes to total bytes).
The data section is only 16 bytes. The TCP header is 20 bytes. The efficiency is (16) / (16 + 20) = 0.444 → 44.4%
(a) What is the minimum size of a UDP user datagram?
(b) What is the maximum size of a UPD user datagram?
(c) What is the minimum size of the application-layer payload data that can be
encapsulated in a UDP user datagram?
(d) What is the maximum size of the application-layer payload data that can be
encapsulated in a UDP user datagram?
a. The minimum size is 8 bytes (header without payload).
b. Although the theoretical maximum size is 65,535 bytes, since a user datagram
needs to be encapsulated in a single IP datagram (UDP is a connectionless protocol) and the maximum payload of an IP datagram is 65,515 bytes (see Chapter 19),
we should say the maximum size of a UDP datagram is only 65,515 bytes.
c. The minimum size of the application-layer payload is zero bytes.
d. The maximum size of the application-layer payload is 65,507 bytes (65,515 − 8).
The following is a dump (contents) of a UDP header in hexadecimal format
0045 DF00 0058 0000
(a) What is the source port number?
(b) What is the destination port number?
(c) What is the total length of the user datagram?
(d) What is the length of the data?
(e) Is the packet directed from a client to a server or vice versa? (f) What is the application-layer protocol?
SEHH2238 Computer Networking Tutorial 11 Page 1
a. The source port number is the first 16 bits or (0045)16 = 69.
b. The destination port number is the second 16 bits (DF00)16 = 57,088.
c. The total length of the datagram is the third 16 bits (0058)16 = 88 bytes.
d. The length of the data is 88 − 8 = 80 bytes.
e. The message is from a server with a small (well-known) port number to a client with a
large (ephemeral) port number.
f. The well-known port number 69 belongs to TFTP.
The following is a dump (contents) of a TCP header in hexadecimal format
E293 0017 0000 0001 0000 0000 5002 07FF
(a) What is the source port number?
(b) What is the destination port number? (c) What is the sequence number?
(d) What is the acknowledgement number? (e) What is the length of the header?
(f) What is the window size?
a. The source port number is (E293)16 or 58,003 in decimal.
b. The destination port number is (0017)16 or 23 in decimal.
c. The sequence number is (00000001)16 or 1 in decimal.
d. The acknowledgment number is (00000000)16 or 0 in decimal. e. The HLEN = 5. The header is 5 × 4 = 20 bytes long.
f. The window size field is (07FF)16 or 2047 in decimal. The window size is 2047 bytes.
An HTTP client opens a TCP connection using an initial sequence number (ISN) of 14,534 and the ephemeral (temporary) port number of 59,100. The server opens the connection with an ISN of 21.732. Show the three TCP segments during the connection establishment if the client defines the rwnd of 4000 and server defines the rwnd of 5000.
SEHH2238 Computer Networking Tutorial 11 Page 2
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com