Вы находитесь на странице: 1из 8

ASSIGNMENT 2 NETWORKING CISM 624 22404074 MATOJANE G

PROBLEM 4 P4. Consider the following string of ASCII characters that were captured by Wireshark when the browser sent an HTTP GET message (i.e., this is the actual content of an HTTP GET message). The characters <cr><lf> are carriage return and line-feed characters (that is, the italized character string <cr> in the text below represents the single carriage-return character that was contained at that point in the HTTP header). Answer the following questions, indicating where in the HTTP GET message below you find the answer. GET /cs453/index.html HTTP/1.1<cr><lf>Host: gaia.cs.umass.edu<cr><lf>User-Agent: Mozilla/5.0 ( Windows;U; Windows NT 5.1; en-US; rv:1.7.2) Gec ko/20040804 Netscape/7.2 (ax) <cr><lf>Accept:ex t/xml, application/xml, application/xhtml+xml, text /html;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 <cr><lf>Accept-Language: enus,en;q=0.5<cr><lf>AcceptEncoding: zip,deflate<cr><lf>Accept-Charset: ISO -8859-1,utf-8;q=0.7,*;q=0.7<cr><lf>Keep Alive: 300<cr><lf>Connection: keep-alive<cr><lf><cr><lf> a) b) c) d) e) What is the URL of the document requested by the browser? What version of HTTP is the browser running? Does the browser request a non-persistent or a persistent connection? What is the IP address of the host on which the browser is running? What type of browser initiates this message? Why is the browser type needed in an HTTP request message? SOLUTION a) The document request was http://gaia.cs.umass.edu/cs453/index.html. The Host: field indicates the server's name and /cs453/index.html indicates the file name. b) The browser is running HTTP version 1.1, as indicated just before the first <cr><lf> pair. c) The browser is requesting a persistent connection, as indicated by the Connection: keepalive. d) This is a trick question. This information is not contained in an HTTP message anywhere. So there is no way to tell this from looking at the exchange of HTTP messages alone. One would need information from the IP datagrams (that carried the TCP segment that carried the HTTP GET request) to answer this question. e) Mozilla/5.0. The browser type information is needed by the server to send different versions of the same object to different types of browsers

PROBLEM 5 P5. The text below shows the reply sent from the server in response to the HTTP GET message in the question above. Answer the following questions, indicating where in the message below you find the answer.

Chapter 2 Problem 5 HTTP/1.1 200 OK<cr><lf>Date: Tue, 07 Mar 2008 12:39:45GMT<cr><lf>Server: Apache/2.0.52 (Fedora) <cr><lf>Last-Modified: Sat, 10 Dec2005 18:27:46 GMT<cr><lf>ETag: 526c3-f22-a88a4c80<cr><lf>Accept- Ranges: bytes<cr><lf>Content-Length: 3874<cr><lf> Keep-Alive: timeout=max=100<cr><lf>Connection: Keep-Alive<cr><lf>Content-Type: text/html; charset= ISO-8859-1<cr><lf><cr><lf><!doctype html public - //w3c//dtd html 4.0 transitional//en><lf><html><lf> <head><lf> <meta http-equiv=Content-Type content=text/html; charset=iso-8859-1><lf> <meta name=GENERATOR content=Mozilla/4.79 [en] (Windows NT 5.0; U) Netscape]><lf> <title>CMPSCI 453 / 591 / NTU-ST550A Spring 2005 homepage</title><lf></head><lf> <much more document text following here (not shown)> a) Was the server able to successfully find the document or not? What time was the document reply provided? b) When the document was last modified? c) How many bytes are there in the document being returned? d) What are the first 5 bytes of the document being returned? Did the server agree to a persistent connection? SOLUTION a) The status code of 200 and the phrase OK indicate that the server was able to locate the document successfully. The reply was provided on Tuesday, 07 Mar 2008 12:39:45 Greenwich Mean Time. b) The document index.html was last modified on Saturday 10 Dec 2005 18:27:46 GMT. c) There are 3874 bytes in the document being returned. d) The first five bytes of the returned document are : <!doc. The server agreed to a persistent connection, as indicated by the Connection: Keep-Alive field

Chapter 3 PROBLEM 10 Here, we add a timer, whose value is greater than the known round-trip propagation delay. We add a timeout event to the Wait for ACK or NAK0 and Wait for ACK or NAK1 states. If the timeout event occurs, the most recently transmitted packet is retransmitted. Let us see why this protocol will still work with the rdt2.1 receiver. Suppose the timeout is caused by a lost data packet, i.e., a packet on the sender-to-receiver channel. In this case, the receiver never received the previous transmission and, from the

receiver's viewpoint, if the timeout retransmission is received, it look exactly the same as if the original transmission is being received. Suppose now that an ACK is lost. The receiver will eventually retransmit the packet on a timeout. But a retransmission is exactly the same action that is take if 1an ACK is garbled. Thus the sender's reaction is the same with a loss, as with a garbled ACK. The rdt 2.1 receiver can already handle the case of a garbled ACK.

CHAPTER 4 PROBLEM 27 P27. Consider the network shown in Problem P26. Using Dijkstras algorithm, and Showing your work using a table similar to Table 4.3, do the following: a. Compute the shortest path from t to all network nodes. Step 0 1 2 3 4 5 6 N D(x), p(x) D(y),p(y) t tu tuv 7,v tuvw 7,v tuvwx 7,v tuvwxy 7,v 15,x tuvwxyz7,v D(u),p(u) D(z),p(z) 2,t 4,t 2,t 4,t 2,t 4,t 2,t 4,t 2,t 4,t 2,t 2,t 4,t D(v),p(v) 5,u 5,u 5,u 5,u 4,t 5,u 5,u 7,t 7,t 7,t 7, 7,t 7,t 7,t 15,x D(w),p(w) t 15,x

b. Compute the shortest path from u to all network nodes. c. Compute the shortest path from v to all network nodes. d. Compute the shortest path from w to all network nodes. e. Compute the shortest path from y to all network nodes. f. Compute the shortest path from z to all network nodes. a) Step N D(x), p(x) D(u),p(u) D(v),p(v) D(w),p(w) D(y),p(y) D(z),p(z) 0 t 2,t 4,t 7,t 1 tu 2,t 4,t 5,u 7,t 2 tuv 7,v 2,t 4,t 5,u 7,t 3 tuvw 7,v 2,t 4,t 5,u 7,t 4 tuvwx 7,v 2,t 4,t 5,u 7,t 15,x 5 tuvwxy 7,v 2,t 4,t 5,u 7,t 15,x 6 tuvwxyz 7,v 2,t 4,t 5,u 7,t 15,x b)

Step N D(x), p(x) D(t),p(t) D(v),p(v) D(w),p(w ) D(y),p(y) D(z),p(z) u 2,u 3,u 3,u ut 2,u 3,u 3,u 9,t utv 6,v 2,u 3,u 3,u 9,t utvw 6,v 2,u 3,u 3,u 9,t utvwx 6,v 2,u 3,u 3,u 9,t 14,x utvwxy 6,v 2,u 3,u 3,u 9,t 14,x utvwxyz 6,v 2,u 3,u 3,u 9,t 14,x c) Step N D(x), p(x) D(u),p(u) D(t),pt) D(w),p(w ) D(y),p(y) D(z),p(z) v 3,v 3,v 4,v 4,v 8,v vx 3,v 3,v 4,v 4,v 8,v 11,x vxu 3,v 3,v 4,v 4,v 8,v 11,x vxut 3,v 3,v 4,v 4,v 8,v 11,x vxutw 3,v 3,v 4,v 4,v 8,v 11,x vxutwy 3,v 3,v 4,v 4,v 8,v 11,x vxutwyz 3,v 3,v 4,v 4,v 8,v 11,x d) Step N D(x), p(x) D(u),p(u) D(v),p(v) D(t),p(t) D(y),p(y) D(z),p(z) w 6,w 3,w 4,w wu 6,w 3,w 4,w 5,u wuv 6,w 3,w 4,w 5,u 12,v wuvt 6,w 3,w 4,w 5,u 12,v wuvtx 6,w 3,w 4,w 5,u 12,v 14,x wuvtxy 6,w 3,w 4,w 5,u 12,v 14,x wuvtxyz 6,w 3,w 4,w 5,u 12,v 14,x e) Step N D(x), p(x) D(u),p(u) D(v),p(v) D(w),p(w ) D(t),p(t) D(z),p(z) y 6,y 8,y 7,y 12,y yx 6,y 8,y 12,x 7,y 12,y yxt 6,y 9,t 8,y 12,x 7,y 12,y yxtv 6,y 9,t 8,y 12,x 7,y 12,y yxtvu 6,y 9,t 8,y 12,x 7,y 12,y yxtvuw 6,y 9,t 8,y 12,x 7,y 12,y yxtvuwz 6,y 9,t 8,y 12,x 7,y 12,y f) Step N D(x), p(x) D(u),p(u) D(v),p(v) D(w),p(w ) D(y),p(y) D(t),p(t) z 8,z 12,z

zx 8,z 11,x 14,x 12,z zxv 8,z 14,v 11,x 14,x 12,z 15,v zxvy 8,z 14,v 11,x 14,x 12,z 15,v zxvyu 8,z 14,v 11,x 14,x 12,z 15,v zxvyuw 8,z 14,v 11,x 14,x 12,z 15,v zxvyuwt 8,z 14,v 11,x 14,x 12,z 15,v chapter 5

problem 14

Consider 3 LANs interconnected by 2 routers:

1. Assign IP addresses to all of the interfaces. For Subnet 1 use addresses of the form 192.168.1.xxx; for Subnet 2 use addresses of the form 192.168.2.xxx; and for Subnet 3 use addresses of the form 192.168.3.xxx. A: See figure above.

2. Assign MAC addresses to all of the adapters.

A: See figure above. 3. Consider sending an IP datagram from Host E to Host B. Suppose all of the ARP tables are up to date. Enumerate or list all the steps. A: 1. Forwarding table in E determines that the datagram should be routed to interface 192.168.3.002. 2. The adapter in E creates and Ethernet packet with Ethernet destination address 8888-88-88-88-88. 3. Router 2 receives the packet and extracts the datagram. The forwarding table in this router indicates that the datagram is to be routed to 198.162.2.002. 4. Router 2 then sends the Ethernet packet with the destination address of 33-33-33-3333-33 and source address of 55-55-55-55-55-55 via its interface with IP address of 198.162.2.003. 5. The process continues until the packet has reached Host B. 4. Repeat (3), now assuming that the ARP table in the sending host is empty (and other tables are up to date) A: ARP in E must now determine the MAC address of 198.162.3.002. Host E sends out an ARP query packet within a broadcast Ethernet frame. Router 2 receives the query packet and sends to Host E an ARP response packet. This ARP response packet is carried by an Ethernet frame with Ethernet destination address 77-77-77-77-77-77.

problem 15 a) No. E can check the subnet prefix of Host Fs IP address, and then learn that F is on the same LAN. Thus, E will not send the packet to the default router R1. Ethernet frame from E to F: Source IP = Es IP address Destination IP = Fs IP address Source MAC = Es MAC address Destination MAC = Fs MAC address

b) No, because they are not on the same LAN. E can find this out by checking Bs IP address. Ethernet frame from E to R1: Source IP = Es IP address Destination IP = Bs IP address Source MAC = Es MAC address Destination MAC = The MAC address of R1s interface connecting to Subnet 3. c) Switch S1 will broadcast the Ethernet frame via both its interfaces as the received ARP frames destination address is a broadcast address. And it learns that A resides on Subnet 1 which is connected to S1 at the interface connecting to Subnet 1. And, S1 will update its forwarding table to include an entry for Host A. Yes, router R1 also receives this ARP request message, but R1 wont forward the message to Subnet 3. B wont send ARP query message asking for As MAC address, as this address can be obtained from As query message. Once switch S1 receives Bs response message, it will add an entry for host B in its forwarding table, and then drop the received frame as destination host A is on the same interface as host B (i.e., A and B are on the same LAN segment).

Вам также может понравиться