CSEN 404 Introduction to Networks Amr El Mougy Lamia AlBadrawy
Revision 1-2
A Day in the Life of a Webpage Request Bob wishes to retrieve a page from Bob has just booted up the computer Bob 00:16:D3:23:63:8A GUC /24 00:22:6B:45:1F:1B ISP /13 DNS Server Google /
4 A Day in the Life of a Webpage Request GUC /24 00:22:6B:45:1F:1B ISP /13 DNS Server Google / :16:D3:23:63:8AFF:FF:FF:FF:FF:FF Yiaddr: :22:6B:45:1F:1BFF:FF:FF:FF:FF:FF DHCP ACK also includes IP of default gateway (router in this case) and DNS server Bob 00:16:D3:23:63:8A
5 A Day in the Life of a Webpage Request Bob 00:16:D3:23:63:8A GUC /24 00:22:6B:45:1F:1B ISP /13 DNS Server Google / ARP Query :16:D3:23:63:8AFF:FF:FF:FF:FF:FF ARP Reply :22:6B:45:1F:1B00:16:D3:23:63:8A Before sending a DNS query, Bob must first discover the MAC address of the router through ARP
6 A Day in the Life of a Webpage Request GUC /24 00:22:6B:45:1F:1B ISP /13 DNS Server Google / DNS query: :16:D3:23:63:8A00:22:6B:45:1F:1B To send HTTP request, Bob’s browser has to create a TCP socket. Thus, it needs the IP address of Bob 00:16:D3:23:63:8A DNS reply: MAC of DNSMAC of default R
7 A Day in the Life of a Webpage Request To establish TCP connection, TCP SYN packet is sent GUC /24 00:22:6B:45:1F:1B ISP /13 DNS Server Google / Bob 00:16:D3:23:63:8A :16:D3:23:63:8A00:22:6B:45:1F:1B MAC of web serverMAC of default R
8 A Day in the Life of a Webpage Request Finally HTTP request can be sent GUC /24 00:22:6B:45:1F:1B ISP /13 DNS Server Google / HTTP Request: google search :16:D3:23:63:8A00:22:6B:45:1F:1B Bob 00:16:D3:23:63:8A HTTP Reply: search results MAC of web serverMAC of default R
Solved Problems 1-9 Introduction I
Q1: Delays Host A wishes to send a file of size 4 Mbits to Host B. The path from Host A to Host B has three links of rates R 1 = 500 kbps, R 2 = 1 Mbps, R 3 = 2 Mbps. The propagation speed is 2×10 8 m/s over all links and the lengths of the links are D 1 = 2 km, D 2 = 3 km, D 3 = 2 km. The processing time for each intermediate router is 0.1 × Transmission time. Ignore delays due to queuing and TCP and assume the file is transmitted directly (HTTP is not used). What is the throughput of the path from Host A to Host B? What is the total delay of transmitting the file?
Q1: Solution Transport Layer 1-11
Q2: Transport layer protocols Transport Layer 1-12 A sender, A, and receiver, B, are using the pure selective repeat protocol at the Transport Layer. Both sender and receiver windows can hold a maximum of 4 packets. Initially the sender and receiver windows are synchronized at [0, 1, 2, 3]. Only A is sending data to B. Complete the diagram below by specifying the sender’s window, receiver’s window, the sequence number of the buffered packets and of the ACKs, and any packets that are delivered to the network layer for the following succession of events. Assume NAKs and cumulative ACKs are not used.
Transport Layer 1-13
1-14
Q3: TCP Transport Layer 1-15 Consider two hosts A and B that are communicating over a TCP connection. Assume that the initial sequence numbers for A and B are 44 and 70, respectively. The figure below shows the exchange of messages between A and B. Assuming that the system is able to buffer packets that are received out of order, fill in the blanks for sequence numbers and acknowledgment numbers.
Q3: TCP Transport Layer 1-16
Q3: Solution Transport Layer 1-17
Q4: Congestion Control 1-18 Consider a host that is sending data over a TCP connection with the following initial values: cwnd = 1 MSS, ssthresh = 50 MSS. Suppose that the receiver buffer size = 20 MSS, and the receiver processing speed is 2 MSS per RTT. Draw a table that shows the sender rate of sending versus RTT (How many MSS per RTT) for the first 15 RTT. Note that three duplicate ACKs are received in the 5th RTT. TCP Reno is used.
Q4: Solution 1-19
Q5: Routing 1-20 The figure represents a network of one client (A), one server (G), and a series of routers (B F). Use Dijkstra’s algorithm to determine the best paths from (A) to all other nodes in the network (warning: points will be given for the steps of the algorithm. Simply indicating the best paths without showing the steps will not be rewarded). Draw the forwarding table at (A).
Q5: Solution 1-21
Q6: IP Addresses 1-22 An organization has 7 LANs as shown in the figure. The organization has a network address x. Determine: The network address for each LAN. The IP addresses of the hosts (H1 H6) and the routers shown in the figure. Note that LAN 7 has no hosts but requires IP addresses. The maximum number of hosts that can be connected to each of the first 6 LANs (LAN1 LAN 6).
Q6: Solution Transport Layer networks 3 subnet bits and 5 host bits. Thus, max no. of hosts is 32 Network address LAN 1: LAN 2: LAN 3: LAN 4: LAN 5: LAN 6: LAN 7: Host address LAN 1: , LAN 2: , LAN 3: , LAN 4: , LAN 5: , LAN 6: , LAN 7: , Number of hosts 2^5 = = 30