




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





PLEDGE: On my honor as a student I have neither given nor received aid on this exam/assignment. (Write out and
sign).
Instructions:
Problem 1. [2 points]
Fig. 1 shows a network of IP routers and hosts. The link rates, through , are all 1Gbps, while the link rate
. Two TCP connections are established: (i) between processes in Host 1 and Host 3, and (ii) between
processes in Host 2 and Host 3. The maximum segment size is the same, 1460 bytes, on both TCP connections. The RTT (Round Trip Time), to send a segment and receive an ACK, is the same, 50ms, on both communication paths
(between Host 1 and Host 3, and between Host 2 and Host3). This can happen if for example the link with rate is
the long-distance link. The packet loss rate however differs on the two paths. It is so low on the Host 2 to Host 3 path
that it can be approximated to 0, while due to heavy congestion on the link with rate , the packet loss rate on the
Host 1 to Host 3 path is 4% (i.e., 0.04). What is the throughput (bits/sec) for each TCP connection? Note which is
higher. [Hint: Recall that 1Gbps is b/s).
Answer:
r 1 r 5 r 6 = 100 Mbps
r 3
r 2
r 1 r 5
r 4 r 3 r 2 ..... ..... Other links
..... (^) .....
IP router IP router^ IP router IP router
Host 1
Host 2
Host 3
r 6
Fig. 1 An example IP network
Problem 2. [2 points]
Fig. 2 shows a TCP segment exchange. The term “Max-Data” denotes a maximum-sized segment carrying user
data. The MSS for this exchange is 1024 bytes. If a segment has no payload, and is simply used to carry an acknowl- edgment, it is represented with “ack number,” where “number” represents the value carried in the Acknowledgement number field of the TCP header. Assume that at time , the mean RTT value, A, is 3, the mean RTT deviation,
D, is 0.75, and the RTO is 6. At time t=4.2, an RTT measurement is initiated at the sender, mng. What is the RTO at
and? Fill in the table below.
Problem 3. [3 points]
Fig. 3 shows a TCP segment exchange in which MSS=1024 bytes. Assume that at time , the mean RTT, A, is 3, the mean RTT deviation, D, is 0.75, and the RTO is 6. The time values are shown on the line representing TCP at
Time M (measured) Err A D RTO
4.2 - - 3 0.75 6
6
mng (^) photon Time
Max-Data (seq 1025, ack 1)
Max-Data (seq 2049, ack 1)
ack 2049 ack 3073
Fig. 2 An example TCP data exchange
t =4.
t = 6 t =6.
t = 7
mng (^) photon
ack 4097
ack 4097
x
x +
Time
Fig. 3 Another example TCP data exchange
Max-Data (seq 3073, ack 1)
Max-Data (seq 3073, ack 1)
Problem 6. [7 points]
In this problem, we study how TCP, UDP, DNS and SMTP are all used in an email exchange. Assume that
dns.virginia.edu and dns.cisco.com are the DNS servers for the virginia.edu and cisco.com domains, respectively. The STMP servers, smtp.virginia.edu and smtp.cisco.com are set to be the incoming and outgoing servers by Frodo and Sam, respectively, in the mail clients running on their laptops. The IP addresses assigned to the interface cards of the two SMTP servers are shown in Fig. 4.
Frodo sends an email message from his account [email protected] to [email protected]. Using a protocol such as SMTP, this message is sent from Frodo’s laptop to the server, smtp.virginia.edu.
This problem focuses on the next step, which is the delivery of the email from smtp.virginia.edu to smtp.cisco.com. The steps listed below occur in sequence:
a. The server smtp.virginia.edu sends a DNS query to find the incoming SMTP server used by [email protected]. What type of resource record is requested in this DNS query?
b. In part (a), the server smtp.virginia.edu found the domain name of the incoming SMTP server for [email protected] as being smtp.cisco.com. The server smtp.virginia.edu now needs to find the IP address corresponding to smtp.cisco.com. It issues a DNS query for this purpose. The DNS query is car- ried within a UDP datagram. Fill in the specified fields of the DNS query shown in Table 1. The DNS response received by smtp.virginia.edu carries the IP address of smtp.cisco.com’s network interface card. Fill in the specified fields of the DNS response shown in Table 1.
Table 1: Parameters in the DNS query and DNS response
DNS query DNS response
Destination port number in the UDP header of the DNS query
Query name Query type
Type field in the resource record
Resource data in the resource record
IP router (^) IP routers IP router Internet SMTP server smtp.virginia.edu
SMTP server smtp.cisco.com
DNS server dns.cisco.com
DNS server dns.virginia.edu
.com DNS server
.edu DNS server
root DNS server
128.143.219.
Sam's laptop Frodo's laptop
198.133.219.
Fig. 4 Example of DNS and SMTP
c. The SMTP server, smtp.virginia.edu, is now ready to open a TCP connection to smtp.cisco.com. It sends a TCP SYN segment to open the connection with an MSS of 1460 bytes. Fill in Table 2.
d. After the three-way TCP handshake is completed to open the TCP connection, smtp.virginia.edu is ready to send Frodo’s email to smtp.cisco.com. Fig. 5 shows the SMTP message exchange. Each SMTP command will receive an SMTP response with an “OK” code. Assume that the TCP-layer ACKs are piggybacked with these SMTP-layer “OK” responses. In other words, the TCP segment carrying the SMTP OK response in its payload, from smtp.cisco.com to smtp.virginia.edu, carries the ACK in the TCP header for the SMTP command sent earlier from smtp.virginia.edu to smtp.cisco.com. For exam- ple, smtp.virginia.edu sends a HELO command in a TCP segment. The SMTP server process in smtp.cisco.com responds with an “OK.” This response is carried in a TCP segment to smtp.virginia.edu.
The TCP header carries the appropriate ACK number to indicate that at the TCP layer the TCP segment carrying the HELO SMTP command was received correctly. The TCP layer acknowledgement for the SMTP OK message is piggybacked with the next SMTP command sent from smtp.virginia.edu. The procedure continues as shown in Fig. 5. The SMTP DATA command results in an SMTP response
Table 2: Parameters in the TCP header and IP header of the TCP SYN segment
TCP header IP header
Destination port number
MSS in Option field
Destination IP address
Source IP address
smtp.cisco.com^ smtp.virginia.edu
HELO OK MAIL OK
RCPT OK
DATA
Last mail body carrying
ack
Fig. 5 An example SMTP exchange
No payload in this TCP segment TCP segment (seq x)
OK
Enter mail, end with.
piggybacked ACK
mail body (seq 1001)
Problem 8. [5 points]
Table 3 shows the IP addresses assigned to interfaces in the example shown in Fig. 7.
A security association, SA1, is created between IPsec devices I1 and I2 in Fig. 7. The security policy configured in IPsec device I1 specifies that all incoming IP datagrams with source IP address = 128.143.1.15 and destination IP address = 128.190.1.15 should be subject to the security operations of security association SA1 in tunnel mode. A corresponding security policy is configured into IPsec device I2 to subject datagrams with source IP address = 128.143.1.15 and destination IP address = 128.190.1.15 to the security operations of its security association SA1 with IPsec device I1. Assume that there are no other entries in the security policy databases in the two IPsec devices.
A process in Host A sends an IP datagram carrying a TCP segment to a process in Host B. a. When this datagram is received by IPsec device I1, it adds an outer (new) IP header after applying the security operations defined for SA1 before it forwards the datagram to IP router R1. Fill in Table 4.
Table 3: IP addresses of interfaces in the network of Fig. 7
Interfaces IP address
1 128.143.1.
2 128.143.1.
3 135.90.1.
4 135.90.1.
5 136.90.1.
6 136.90.1.
7 128.190.1.
8 128.190.1.
Table 4: Header fields in the datagram forwarded from IPsec device I1 to IP router R
Outer (New) IP header Inner (Old) IP header
Destination IP address Source IP address Destination IP address Source IP address
IPsec tunnel
IPsec device I
IPsec device I
1 2
3
4 5
(^6 7 )
Internet IP router R1 (^) IP router R
Host A (^) Host B
Fig. 7 Example of an IPsec tunnel
b. When the TCP layer at Host B sends an ACK in response to the received TCP segment from Host A, is the IP datagram carrying this TCP acknowledgment subject to security operations at either IPsec device?
Problem 9. (2 points)
In the authentication protocol shown below, why is A sent in plaintext along with the encrypted session key?