联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp2

您当前位置:首页 >> Python编程Python编程

日期:2020-07-11 11:19

Solution Midterm 1 CMPT 371

For multiple choice no part points are given

1) Which of the following statements is true? (3 points)

A. When packet switching is used packets always arrive at the destination in the same order that

they were sent by the source.

B. When circuit switching is used if one switch along the path fails the path is automatically

changed to go around the failed switch

C. Using a packet switched network always guarantees that all packets sent will arrive at the

destination.

D. Packet switching uses store and forward nodes

E. The first bit of a packet that is arriving at a store and forward node can be forwarded by that

node before the last bit in the packet arrives.

2) Consider a packet switching network. Which of the following statements is true? (3 points)

A. All bits in a packet must arrive at a store and forward node before that node can begin checking if

the packet has been corrupted during transmission.

B. Queuing delay of a particular packet passing through a store and forward node is a property of

that packet.

C. Transmission delay is larger when the distance between the source and destination is larger.

D. Queuing delay is always longer then transmission delay

E. Transmission delay will increase if the bit rate sent from the store and forward node is decreased

3) Consider a packet switching network. Which of the following statements is true? (4 points)

If each of the following is true

o The bit rate of a network is 100Mbs

o The average bit rate being sent into the network is 15Mbs

o The packets being sent into the network have a header of 40 Bytes and contain 1000Bytes of

data

What is the average data rate passing through the network?

A. 15Mbs

B. 96.0 Mbs

C. 96.2 Mbs

D. none of the other answers are correct

E. 15.6 Mbs

F. 14.4 Mbs

4) Which of the following statements about DNS zones and domains is false? (4 points)

A. A domain is a subtree of the DNS tree.

B. A domain may be part of a zone

C. A zone may be part of a domain

D. A zone is an administrative region of the DNS tree

E. A zone a.b.ca. always includes all host and routers in the domain a.b.ca.

5) Which of the statements below about a socket (for socket programming) is false? (4 points)

A. A socket can be used as the endpoint of a connection to another host

B. A socket is associated with a single port on the host where it is created

C. A socket can be associated with a port automatically or by binding it to the port in your

socket program

D. Two sockets are needed to make a connection

E. Two sockets with the same IP address cannot exist simultaneously on one host

6) Consider the following statements about SMTP. Decide if one or more of the statements about SMTP

are true. (3 points)

o SMTP is a push protocol

o An SMPT server can deliver mail to another SMTP server

o A user's mail client can deliver mail to an SMTP server using SMTP

o A senders SMTP server can deliver the senders mail message directly to the SMTP server for the

recipient

o SMTP messages and mail are sent through TCP connections from the senders SMTP server to the

recipients SMTP server

? A. none of the statements about SMPT are true

? B. all of the statements about SMPT are true

? C. some of the statements about SMPT are true

7) Consider the TCP/IP protocol stack. Consider the transport, network and data link layers. In each of

these layers indicate the type of address used.

Solution:

Transport layer: addresses are ports (1.5 points).

Network layer: addresses are IP addresses (1.5 point)

Data Link Layer: addresses are Ethernet addresses (or addresses for other data link protocols other

than TCP/IP, general term MAC address) (1 point)

8) Version 1: SHORT ANSWER:

Explain what is meant by the phrase "push protocol". Do not spend more than 1 short sentence

defining what a protocol is. Then spend 1-2 sentences explaining what makes a protocol a "push"

protocol. Give one example of a push protocol

Solution:

A “push” protocol is based on sender “pushing” or sending information through a connection

initiated (opened) by the sender. The information is pushed when the sender has information to

send to the receiver. SMTP

1 point for example. 3 points for explaining

Version 2: SHORT ANSWER

Explain what is meant by the phrase "pull protocol". Do not spend more than 1 short sentence

defining what a protocol is. Then spend 1-2 sentences explaining what makes a protocol a "pull"

protocol. Give one example of a pull protocol.

Solution:.

A “pull” protocol is based on the sender sending a request to a server or peer that prompts the

server or peer to provide the sender with the requested information. This process is considered

“pulling” data from the server or peer. IMAP POP3 HTTP DNS

1 point for example. 3 points for explaining

9) Version 1: SHORT ANSWER

Consider a packet switched network. In your own words, give a short (maximum 2 sentence)

explanation of what propagation delay is.

Solution:

Propagation delay is the time taken for a given bit to travel from the sending host to the receiving

host through the propagation media.

Version 2: SHORT ANSWER:

Consider a packet switched network. Give a short (maximum 3 sentences) definition of what the

transmission delay is.

Solution:

Transmission delay is the time it takes to transmit a particular chunk of information into the

transmission medium.

10) Consider 700 packets being sent from host1 through router1 and router2 to host2. Each of the

packets has 9000 bits and includes a header 320 bits long. The propagation time is 0.00001 and the

processing time is 0.0000008. How long does it take the packets to travel from host1 to host2. The

data rate is 1Mbs.

Show your work

Solution:

Each packet 9000 bits, head 320 bits, data (9000-320) bits = 8680

Propagation delay is 0.00001, processing delay is 0.0000008

Transmission delay of one packet is

(dhead+ddata)/(data rate) = 9000 bits / 1Mbs = 9000/2^20

=0.0085831


dendtoend = (Npacket+Ntrans-1)(dproc+dhead+ddata) + dprop*Ntrans

= (700+3-1)*(0.0085831 + 0.0000008) +0.00001*3

= 6.0259 + .00003 = 6.02593

Because of recent correction on slide also accepted

dendtoend = (Npacket+Ntrans-1)(dhead+ddata) + (dprop+dproc )*Ntrans

= ( 700+3-1)*(0.0085831) +(0.0000008+0.00001)*3

= 0.60253 + .00003 = 6.02536

5 points 1 point for substituting the correct value of each of the following

variables into the equations. Dproc dprop Npacket Ntrans

2 points for selecting the equation

3 points for calculating ddata and dheader

11) .This problem has 3 versions. I will highlight differences in later version by making the

differences BLUE

Version 1

Consider a local network with one host connected to the internet. A proposal has been

made to add a HTTP proxy server to the host connected to the internet to reduce traffic

on the Internet connection.

? The local network supports a bit rate of 900 Mbs.

? The internet connection supports a bit rate of 200 Mbs

? The average internet traffic from the local network, excluding HTTP traffic is 40

Mbs.

? The average number of internet queries from the network is 80 queries per second

? Each query has an average size of 1.4 Mb.

? If a HTTP proxy server is added the number of queries satisfied by the cache will be

55%

Calculate the traffic intensity for HTTP traffic for the local net and for the internet

without the proxy server. Also calculate the total traffic intensity for the internet. Is a

proxy server needed? Why?

Calculate the total traffic intensity for the Internet with the HTTP proxy server. Will the

addition of the proxy server solve any problems with traffic intensity your identifed?

Why?

(traffic intensity = traffic(Mbits/sec)/data rate(Mbs)

SOLUTION

Local Network 900Mbs, Internet 200Mbs

Non HTTP internet traffic uses 40Mbs of internet bandwidth

80 queries / second average size 1.4MB, proxy server serves 55% of queries

For HTTP traffic without HTTP proxy server

Traffic intensity of internet = bps used / data rate

= 80 ps*1.4 Mb / 200Mbps =0.56 (56%)

1 point for and equation in words, 3 total (1 point each for substituting correct value),

1 point for the answer

Traffic intensity of local net = 80 ps*1.4 Mb / 900Mbps = 0.124 (12.4%)

For total traffic (add Non HTTP internet traffic) without proxy server

Total internet intensity= traffic intensity HTTP + traffic intensity for not HTTP

traffic

= 0.56 (HTTP traffic) + 40Mbs/200Mbps

= 0.56 + 0.20 = 0.76

1 point for and equation in words, 1 point each for substituting correct values, 1 point

for the answer

traffic intensity of internet with the proxy server

HTTP traffic intensity = 80 ps * 1.4Mb / 200Mbps * (1-0.55) = 0.252 (25.2%)

1 point equation, 1 point each value substituted (total 4), 1 point answer

total traffic intensity = 0.252 + 40Mbs/200Mbps = 0.452 (45.2%)

1 point equation, 1 point each value substituted (total 2), 1 point answer


A proxy server would likely improve user experience at peak times. Otherwise at

peak times users may experience poor turnaround and waits. If any growth in

usage was expected then it would become a needed investment. Adding the

proxy server will improve performance because the present traffic intensity would

be reduced be 25% lower and would unlikely to suffer service degradations even in

peak periods.

5 points ( 3 Ideas, give 3.5 for 2 ideas, 2 for 1 idea, otherwise 0

Version 2 (same as version 1 except for data)

? The local network supports a bit rate of 1800 Mbs.

? The internet connection supports a bit rate of 400 Mbs

? The average internet traffic from the local network, excluding HTTP traffic is 80 Mbs.

? The average number of internet queries from the network is 160 queries per second

? Each query has an average size of 1.4 Mb.

? If a HTTP proxy server is added the number of queries satisfied by the cache will be 55%

SOLUTION

Local Network 1800Mbs, Internet 400Mbs

Non HTTP internet traffic uses 80Mbs of internet bandwidth

160 queries / second average size 1.4MB, proxy server serves 55% of queries

For HTTP traffic without HTTP proxy server

Traffic intensity of internet = bps used / data rate

= 160 ps*1.4 Mb / 400Mbps =0.56 (56%)

Traffic intensity of local net = 160 ps*1.4 Mb / 1800Mbps = 0.124 (12.4%)

For total traffic (add Non HTTP internet traffic) without proxy server

Total internet intensity= 0.56 (HTTP traffic) + 80Mbs/400Mbps

= 0.56 + 0.20 = 0.76

traffic intensity of internet with the proxy server

HTTP traffic intensity = 160 ps * 1.4Mb / 400Mbps * (1-0.55) = 0.252 (25.2%)

total traffic intensity = 0.252 + 80Mbs/400Mbps = 0.452 (45.2%)

?

A proxy server would likely improve user experience at peak times. If any growth in usage

was expected then it would become a needed investment. Adding the proxy server will

improve performance because the present traffic intensity would be reduced be 25% lower

and would unlikely to suffer service degradations even in peak periods.


Version 3 (same as version 1 except for data)

? The local network supports a bit rate of 900 Mbs.

? The internet connection supports a bit rate of 200 Mbs

? The average internet traffic from the local network, excluding HTTP traffic is 40 Mbs.

? The average number of internet queries from the network is 160 queries per second

? Each query has an average size of 0.7 Mb.

? If a HTTP proxy server is added the number of queries satisfied by the cache will be 65%

SOLUTION

Local Network 900Mbs, Internet 200Mbs

Non HTTP internet traffic uses 40Mbs of internet bandwidth

160 queries / second average size 0.7MB, proxy server serves 65% of queries

For HTTP traffic without HTTP proxy server

Traffic intensity of internet = bps used / data rate

= 160 ps*0.7 Mb / 200Mbps =0.56 (56%)

Traffic intensity of local net = 160 ps*0.7 Mb / 900Mbps = 0.124 (12.4%)

For total traffic (add Non HTTP internet traffic) without proxy server

Total internet intensity= 0.56 (HTTP traffic) + 80Mbs/400Mbps

= 0.56 + 0.20 = 0.76

traffic intensity of internet with the proxy server

HTTP traffic intensity = 160 ps * 0.7Mb / 200Mbps * (1-0.65) = 0.196 (19.6%)

total traffic intensity = 0.196 + 40Mbs/200Mbps = 0.396 (39.6%)


A proxy server would likely improve user experience at peak times. If any growth in usage

was expected then it would become a needed investment. Adding the proxy server will

improve performance because the present traffic intensity would be reduced be 25% lower

and would unlikely to suffer service degradations even in peak periods.

19.6

12) Consider the DNS protocol. You are working on host using a resolver to determine the IP addresses

of several hosts in the internet. Your resolver will send a recursive query to your local DNS server.

Your local DNS server will make a series of iterative queries to resolve each DNS request you make

using your resolver. Your local DNS server has just rebooted and has only the DNS names and IP

addresses of the root servers available. You will make the following four queries in the sequence

given

o exam.midterm.library.gov.

o solution.midterm.library.gov.

o final.presentation.library.gov.

o ftp.nasa.gov.

Answer each of the following questions

a) For each of the four queries indicate what information is added to the cache of the local DNS

server.

Solution: (9 points one for each domain, for servers ? domain names, ? IP addresses and DNS

names)

After the query for exam.midterm.library.gov.

.gov. (DNS server names and IP addresses)

.library.gov. (DNS server names and IP addresses)

.midterm.library.gov. (DNS server names and IP addresses)

.exam.midterm.library.gov. (IP addresses)

After the query for .solution.midterm.library.gov.

.solution.midterm.library.gov. (IP addresses)

After the query for .final.presentation.library.gov.

.presentation.library.gov. (DNS server names and IP addresses)

.final.presentation.library.gov. (IP addresses)

After the query for ftp.nasa.gov.

.nasa.gov. (DNS server names and IP addresses)

.ftp.nasa.gov. (IP addresses)

b) For each of the queries indicate which TLD will be queried

Solution (3 points, 1 point for each line)

The TLD for all these queries the TLD is .gov.

The queries for exam.midterm.library.gov. , and ftp.nasa.gov query TLD .gov.

The other queries do not query any TLD

c) For each of the queries indicate the domain of the first DNS server queried

Solution (8 points, 2 for each first DNS server )

For the query for exam.midterm.library.gov. root server

For the query for .solution.midterm.library.gov. .midterm.library.gov.

After the query for .final.presentation.library.gov. .library.gov.

After the query for ftp.nasa.gov. .gov.

d) Draw a diagram showing all queries and responses made when the IP address of

final.presentation.library.gov. is queried by the resolver. Show

? Each DNS server queried (including the local DNS server)

? Each DNS query and each DNS response

? Label each DNS query with what the query is requesting

? Label each DNS response with the information being returned by that DNS

response


Local DNS server

(1 point)

Query for final.presentation.library.gov.

(1point for item queried) must be full FQDN)

Iterative query

Resolver

DNS server for library.gov.

(1 point for server domain)

DNS server for presentation.library.gov.

(1 point for server domain)

Names and addresses of DNS servers

for final.presentation.library.gov. ca

(referred to presentation.library.gov.)

(1 point for response,

? for addresses, ? for DNS names)

IP Address of

final.presentation.library.gov.

(1 point for response)

Recursive reply:

DNS names and addresses of library.gov. and presentation.library.gov. (1/2 point)

IPaddress ;of final.presentation.library.gov. (1/2 point)

Query for final.presentation.library.gov. (1 point for illustrating queries)

(1 point for illustrating responses)

Recursive request :

For final.presentation.library.gov. (1 point)


版权所有:编程辅导网 2018 All Rights Reserved 联系方式:QQ:99515681 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。