Mohamed G Gouda CS 326E Spring 2013 Homework 2 ------------------------------------------------------------------------------- 1. A non-profit organization, named Gouda,Inc, has the following Authoratative DNS server and Web server: Alias name of the Authoratative DNS server = gouda.org Canonical name of the Authoratative DNS server = dns.texas.gouda.org IP address of the Authoratative DNS server = 128.83.115.27 Canonical name of the Web server = www.gouda.org IP address of the Web server = 128.83.126.39 Describe how to register the web page of this organization in the DNS. Sol: First, publish the following two Resource Records (RRs) in every .org DNS server in the world. (gouda.org, dns.texas.gouda.org, NS, TTL) (dns.texas.gouda.org, 128.83.115.27, A, TTL) Second, publish the following RR in the Authoratative DNS server of the organization. (www.gouda.org, 128.83.126.39, A, TTL) ------------------------------------------------------------------------------- 2. Assume that the UDP socket table in the client host ch, whose IP address is 128.83.117.205, has the following entry: (dst port = 10345, socket = 4519) 1) Describe a scenario where the host ch is required to read this entry. 2) Describe a scenario where the host ch removes this entry from the UDP socket table. Sol: 1) When host ch receives a UDP segment, whose dst port is 10345, then host ch adds this segment at the tail of the in-buffer of socket 4519. 2) That this entry is in the UDP socket table indicates that an application client apc has allocated both UDP port 10345 and UDP socket 4519 and has linked them. When apc de-allocates both port 10345 adn socket 4519, it also removes the corresponding entry from the UDP socket table. ------------------------------------------------------------------------------- 3. Assume that the TCP socket table in the server host sh, whose IP address is 128.83.110.34, has only two entries, namely : (src = (128.83.202.55, 2005), dst = (128.83.110.34, 80), socket = 1867) (src = (any,any), dst = (128.83.110.34, 80), socket = 1572) (Hint : Note that the second entry belongs to the Welcome Socket for port 80 in sh) 1) Describe a scenario where the host sh is required to read the first entry. 2) Describe a scenario where the host sh is required to read both entries. Sol : 1) When host sh receives a TCP segment whose src = (128.83.202.55, 2005) and whose dst = (128.83.110.34, 80), then host sh adds this segment at the tail of the in-buffer of socket 1867. 2) When host sh receives a TCP segment whose src != (128.83.202.55, 2005) and whose dst = (128.83.110.34, 80), then host sh adds this segment at the tail of the in-buffer of socket 1572. ------------------------------------------------------------------------------- 4. A client apc communicates with a server aps over a TCP connection as follows. 1) Client apc sends a SYN segment whose seq# = 315 and whose ack# = "don't care" 2) Server aps replies by sending a SYN-ACK segment whose seq# = 1009 and whose ack# = 316. 3) Client apc replies by sending an ACK segment that has 512 data bytes 4) Server aps replies by sending two segments. The first has no data bytes and the second has 512 data bytes. 5) Client apc replies by sending a FIN segment. 6) Server aps replies by sending an ACK segment with 32 data bytes followed by FIN segment. 7) Client apc replies by sending an ACK segment with no data bytes. Assuming that none of the segments is lost, corrpted or re-ordered with other segments, compute the seq# and ack# for each sent segment in this connection. Sol: SYN segment: seq# = 315 ack# = "don't care" SYN-ACK segment: seq# = 1009 ack# = 316 ACK segment from apc: seq# = 316 ack# = 1010 First data segment from aps: seq# = "don't care" ack# = 828 Second data segment from aps: seq# = 1010 ack# = 828 FIN segment from apc: seq# = 828 ack# = 1522 ACK segment from aps: seq# = 1522 ack# = 829 FIN segment from aps: seq# = 1554 ack# = 829 Final ACK segment from apc: seq# = "don't care" ack# = 1555 -------------------------------------------------------------------------------