0% found this document useful (0 votes)
60 views5 pages

Week 1 GS Correct

The document contains graded questions and solutions related to web protocols, HTTP requests, and web architecture. It includes multiple-choice questions on identifying components of URLs, calculating round trip time, and understanding web browser functions. Additionally, it covers topics such as bandwidth requirements, Internet Protocol, and valid IPv4 addresses.

Uploaded by

shiva1507004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views5 pages

Week 1 GS Correct

The document contains graded questions and solutions related to web protocols, HTTP requests, and web architecture. It includes multiple-choice questions on identifying components of URLs, calculating round trip time, and understanding web browser functions. Additionally, it covers topics such as bandwidth requirements, Internet Protocol, and valid IPv4 addresses.

Uploaded by

shiva1507004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

BSCCS2003: Graded Questions with Solutions

Week 1

1. Consider the statement given below:


curl http://127.0.0.1:8080
Select the appropriate option that correctly identifies different components of the given
statement. [MCQ : 2 points]
Protocol: http, port: 127.0.0.1,
host-name: 8080, command: curl
Protocol: http, host-name: 127.0.0.1,
port: 8080, command: curl
Protocol: curl, host-ip: 8080,
host-name: 127.0.0.1, port: http

Protocol: http, port: 8080,
host-ip: 127.0.0.1, command: curl

Solution: Here, “curl” is a command used to send a request.


“http” is the protocol.
“127.0.0.1” is the host-ip address.
“8080” is the port number.

2. Suppose a client machine C is communicating with a data center D located 12,500 km


away from C. Assume that the TCP connection has been established and is kept alive.
Calculate the RTT (Round trip time) in ms for an HTTP request. (Assume speed of
light in cable is 2e8 m/s). [NAT : 3 points]

125

Solution: Recall that,


Distance (in m)
Speed =
T ime (in s)

Distance (in m)
=⇒ T ime =
Speed (in m/s)

So,
1.25 × 107 m
time =
2 × 108 m/s
=⇒ time = 62.5 ms

The round trip time = 62.5 × 2 = 125 ms.

Therefore, the answer is 125 ms.

3. Consider the given URL below:


http://myserver.com/index.html?uid=10&sid=4032013
Select the appropriate option that correctly identifies different components of the given
URL. [MCQ : 2 points]

Protocol: http, query-string: uid=10&sid=4032013,
host-name: myserver.com, file-path: index.html
Protocol: myserver.com, query-string: index.html?uid=10&sid=4032013,
host-name: http, file-path: myserver.com/index.html
Protocol: http, query-string: index.html?uid=10&sid=4032013,
host-name: http://myserver.com, file-path: index.html
Protocol: myserver.com, query-string: index.html?uid=10&sid=4032013,
host-name: http://myserver.com, file-path: myserver.com/index.html

Solution: Here, HTTP is the protocol.


The query string is: “uid=10&sid=4032013”.
The host-name is: “myserver.com”.
The file path is: “index.html”.

4. Which of the following is/are true for a web browser? [MSQ : 1 point]

A web browser is an application program to display web documents.

A web browser sends an HTTP request and receives an HTTP response.
A web browser is installed in a web server machine and hosts websites.
A web browser is a web app.

Solution:
Option 1 : A web browser acts as a web client to send a request to the web server
to fetch web pages.
Option 2 : Both the server and the client communicate with each other using HTTP
protocol.

Page 2
Option 3 : A web browser is an application installed in the client’s system that is
used to send HTTP requests.
Option 4 : A web browser is an application software used to access web applications.

5. Identify the correct order of the tasks that takes place when we request for
http://myserver.com/index.html. [MCQ : 3 points]

1. The web browser sends an HTTP request to the server, requesting a copy of in-
dex.html.
2. The web browser assembles the response and displays it.
3. The server responds either with the requested resource or an error code.
4. The web browser connects to the DNS server to get the server IP address for
myserver.com
1-4-3-2
1-3-4-2

4-1-3-2
4-3-1-2

Solution:
As the first step, the web browser connects to a DNS server to get the IP address
which is hosting “myserver.com”.
Then, the web browser sends an HTTP request, requesting a base html file (in-
dex.html) to the server.
Then, the server processes the request and returns the requested resource if found,
else sends an error code.
Then, the web browser displays the response sent by the server.

6. The view in MVC architecture is responsible for . [MSQ : 1 point]



Displaying the data.
Storing and retrieving the data.
Executing the the business logic.

Receiving the data from the user.

Solution: View in the “MVC” is part of application to which user interacts directly.
So, it can be used to display data and user can submit data using form which is an
example of a view.

Page 3
7. Let A be a website that receives 10,000 requests in a second. If each request has to be
sent a response of size 150kB, what should be the minimum bandwidth (approximately)
of the server serving A? [MCQ : 3 points]
4 Gbps
6 Gbps

12 Gbps
20 Gbps

Solution: Number of requests per second = 10,000


Amount of data to be sent back for each request = 150 kB
So, total amount of data to be sent back per second is 15 × 105 kB ≈ 12 Gb.
Note: In practice, there will be some overhead that could result in even more
bandwidth requirement.

8. Which of the following statements is/are true? [MSQ : 2 points]



Internet Protocol (IP) is a set of rules that specifies one way to deliver data
over the network.

Domain Names are used in place of IP addresses.

Hypertext is the text which contains links to other documents or websites.
TCP stands for Traffic Control Protocol.

Solution:

• Internet Protocol (IP) is a set of rules that specifies one way to deliver data
over the network.

• Domain Names are used instead of IP addresses.

• Hypertext is the text which contains links to other documents or websites.

• TCP is the Transmission Control Protocol.


Please refer to lecture 1.5 for more details

9. Consider the webpage link shown below:


https://onlinedegree.iitm.ac.in/academics.html [MSQ : 1 point]
Which among the following is/are true?

HTTPS is a protocol.
onlinedegree.iitm.ac.in/academics.html is a domain name.

Page 4

https://onlinedegree.iitm.ac.in/academics.html is a url.
https://onlinedegree is a root domain.

Solution: https://onlinedegree.iitm.ac.in/academics.html

• HTTPS is a protocol.

• onlinedegree.iitm.ac.in is a domain name.

• https://onlinedegree.iitm.ac.in/academics.html is a url.

• iitm.ac.in is a root domain.

• onlinedegree is a subdomain.

10. Which of the following is/are valid IPv4 address(es)? [MSQ : 2 points]

192.168.64.34
192.168.256.1

34.39.43.202
34.239.314.206

Solution: An IPv4 address has the format x.x.x.x, where x is called an octet and
must be a decimal value between 0 and 255. Octets are separated by periods. An
IPv4 address must contain three periods and four octets.
192.168.64.34 and 34.39.43.202 are valid IPv4 addresses.
192.168.256.1 and 34.239.314.206 are invalid IPv4 addresses.

Page 5

You might also like