Assignment 2

Submission Deadline: 20 July 2020, 12:00 noon

Instructions

1. This assignment accounts for 8% of the total marks of this course.

2. Email your assignment to Prof. Y. W. Leung at [email protected] before the submission deadline 20 July 2020, 12:00 noon.

3. You should NOT copy anything from any sources (e.g., lecture notes, books, online resources, etc.). Instead, you should write in your own words and draw your figures (if applicable) to show that you understand the concepts involved.

Questions

1. An organization has got the class B network ID 157.182, it has four networks with 100, 150, 200 and 250 computers respectively, and connects these networks to the Internet through a router. Subnet addressing is adopted for IP address assignment, where eight bits are used as the subnet ID and eight bits are used as the host ID. Fill in the following table to assign IP addresses to the computers of these four networks.

Computer IP address (in dotted decimal notation)
Network 1 Computer 1
Computer 2
• • • • • •
Computer 100
Network 2 Computer 1
Computer 2
• • • • • •
Computer 150
Network 3 Computer 1
Computer 2
• • • • • •
Computer 200

2
Network 4 Computer 1
Computer 2
• • • • • •
Computer 250
(10 marks)
2. Suppose you are the CTO (Chief Technology Officer) in an ISP (Internet Service Provider). You plan to use a class B network ID (
158.183) to provide the following two types of address blocks to your enterprise customers:
· First type for large enterprises: Each address block provides 1022 IP addresses.
· Second type for small enterprises: Each address block provides 30 IP addresses.
Design a suitable classless addressing scheme to realize the above plan. (15 marks)

3. Draw a diagram to show the steps by which a computer uses DHCP to obtain the four items (namely, IP address, IP address of a DNS server, subnet mask,and IP address of a gateway) from a DHCP server. (5 marks)

4. Suppose a web page is composed of one HTML file and three image files. For each of the following cases, draw a diagram to show the sequence that TCP connection(s) is (are) created/closed and HTTP messages are exchanged.

· Case 1: HTTP 1.0 is used.
· Case 2: HTTP 1.1 without pipelining is used.
· Case 3: HTTP 1.1 with pipelining is used.
(15 marks)
5. A browser uses HTTP 1.1 to request an HTML file (named
MScBaby.html) with 1000 bytes from a web server with domain name www.MSc.edu. Write down the contents of the HTTP request and reply messages involved. (10 marks)

6. Search engines adopt a two-stage design. With the help of suitable diagrams, describe the principle of each stage. (10 marks)

7. (a) With the help of suitable diagrams, describe the principle of web caching. (5 marks)

(b) What are the ideal proxy configurations for effective web caching? (5 marks)

8. A browser sends an HTTP request to a web server where this request carries the following information:

· The browser uses HTTP 1.1 to request a file with pathname
/Huawei_P40.html.
· The web server uses the domain name www.BestPhone.com.
· The browser supports HTTP compression and gzip.
The web server sends an HTTP reply to the browser where this reply carries the
following information:
· The server uses HTTP 1.1 to provide the requested file to the browser.
· The server uses gzip to compress the requested file.
· The compressed file consists of 1500 bytes.

Draw a diagram to show the sequence of HTTP message exchanges and the contents of these messages. (15 marks)

9. A web site adopts the HTTP redirect method. It has one main server and three web servers. Suppose two browsers access this web site one after the other, and the main

server selects the web servers in a round robin manner. Draw a diagram to show the sequences that HTTP messages are exchanged. (5 marks)

10. A web site adopts the round robin DNS method. It has one DNS server and three web servers. Suppose two browsers access this web site one after the other, they have to resolve the domain name into the corresponding IP address, and the DNS server selects the web servers in a round robin manner. Draw a diagram to show the sequence that DNS messages and HTTP messages are exchanged. (5 marks)