CS代考程序代写 dns Student Name: ______________________________________________

Student Name: ______________________________________________
UNIVERSITY OF TORONTO
FACULTY OF APPLIED SCIENCE AND ENGINEERING
MIDTERM TEST February 28, 2018
ECE361S – Computer Networks
Type A Exam: Non-programmable calculators allowed Closed-Book, No Aid sheets
Question
Mark
1
/20
2
/20
3
/20
4
/20
5
/20
TOTAL
/100
Page 1 of 10 pages

Student Name: ______________________________________________
Question 1: [20 Marks – 1 mark per question] Circle the correct answer. 1. IP Packets are routed based on Host ID.
True False
2. HTTP uses the reliable stream transfer service provided by UDP.
True False
3. In a TCP connection, the connection ID is uniquely identified by (send port #, send IP address, receive port
#, receiver IP address).
True False
4. RTP is designed to support real-time applications running over UDP.
True False
5. In HTTP, the client and server use port 80 to communicate.
True False
6. The transport layer is the highest layer implemented in routers.
True False
7. The TCP protocol involves the exchange of segments.
True False
8. Stop-and-Go has a send and receive window of size one.
True False
9. In the Internet, all packets from a source A to a destination B follow the same path.
True False
10. In a low pass communication system with 4 MHz bandwidth, 4 pulse levels are required to achieve 16
Mbps.
True False
11. Suppose the block 1001110 is received by a destination. If the CRC polynomial generator is g(x) = x3 + x
+ 1, the receiver detects no errors.
True False
12. Performing bit stuffing on (111011111011111111110) will result in (111011111001111101111100).
True False
13. Performing PPP byte destuffing on (0x7D 0x5E 0xFE 0x24 0x7D 0x5D 0x7D 0x5D 0x62 0x7D 0x5E) will
result in (0x7D 0xFE 0x24 0x7E 0x7E 0x62 0x7D).
True False
14. In Stop-and-Wait ARQ, the receiver sends an ACK if it receives a frame in which errors are detected.
True False
15. Go-Back-N ARQ retransmits only individual frames.
True False
16. GET is an HTTP Request Method to send information to a URL.
True False
17. TCP provides reliable stream service over the unreliable packet transfer of IP.
True False
18. A valid MAC Address contains 12 Hex numbers from which the first 6 denotes the manufacturer ID and
the second 6 denotes the device serial number.
True False
19. Each direction of a TCP connection selects a different initial sequence number to setup a connection.
True False
20. A single host can have more than one IP addresses associated with it.
True False
Page 2 of 10 pages

Student Name: ______________________________________________
Question 2: [20 Marks – 2 mark per question] Circle all correct answers.
1. The DNS protocol is used in the following queries:
a. Name-to-Address Translation
b. MAC Address-to-IP Address Translation
c. Mail Exchange
d. Name-to-MAC Address Translation
2. Which of the following is true about connectionless services:
a. No setup overhead and delay is incurred.
b. Connection release is required to finish the conversation.
c. Reliable and in-sequence delivery of packets.
d. Using best-effort communication
3. Which of the following SNRs attain 8 Mbps over a communication channel with bandwidth of 700 KHz.
a. 40dB b. 30dB c. 35dB d. 25dB
4. Transmission Control Protocol (TCP) uses acknowledgements (ACKs) for:
a. Timing Recovery
b. Error control
c. Flow control
d. Connection Establishment Request
5. Which of the following polynomials can be used to generate codeword for a CRC (7,4) code?
a. g(x) = x4 + x2 + 1
b. g(x)=x3+x+1 c. g(x) = x3 + x2 + 1 d. g(x)=x4+x+1
6. Suppose the global state of a Stop-and-Wait ARQ is (1,1). Which of the following are true:
a. ACK for frame 1 arrived at transmitter
b. Error-free frame 0 arrived at receiver
c. ACK for frame 0 arrived at transmitter
d. Error-free frame 1 arrived at receiver
7. The IP Header includes the following information:
a. Source & Destination port numbers
b. Transport protocol type
c. Network protocol type
d. Source & Destination IP addresses
8. Which of the following Wr and Ws are valid in Selective Repeat ARQ with 4-bit sequence numbering?
a. Wr = 16, Ws = 16
b. Wr = 15, Ws = 15
c. Wr = 8, Ws = 8
d. Wr = 7, Ws = 7
9. A single parity check code will declare an error in which of the following blocks?
a. 0xAAAA
b. 0x8808 c. 0xBBBB d. 0x7707
10. Which of the following are true:
a. In very noisy channels, Stop-and-Wait and Go-Back N ARQ have the same performance.
b. In error-free channels, Go-Back N and Selective Repeat ARQ have the same performance.
c. In error-free channels Stop-and-Wait and Selective Repeat ARQ have the same performance.
d. Selective Repeat ARQ can always deliver error-free data.
Page 3 of 10 pages

Student Name: ______________________________________________
Question 3: [20 Marks]
Three networks are interconnected using IP as shown in the figure below, with host IDs and net IDs as indicated.
Note: For all the communications in the network below we considered the network traversing between router interfaces alongside the route. For instance: H1H3 involves (Net1.H1Net1.R1, Net1.R1Net2.R1, Net2.R1Net2.H3). This because router interfaces have different network addresses.
Its professor choice to include them in marking or not but it does change the fact, especially for part D.
a. Suppose host H1 makes a web request to web server S7. Show all the layer 3 and 4 addresses, ports, and protocol types of the resulting packets along the path from H1 to S7.
H1
H3
H5
S7
Net1 R1 Net2 R2
Net3
H2
S8
H4
H6
Net1.H1→ Net1.R1
SrcIP: Net1.H1DestIP: Net3.S7Protocol: TCPSrcPort: Ephemeral#DestPort: 80
Net2.R1 → Net2.R2
SrcIP: Net1.H1DestIP: Net3.S7Protocol: TCPSrcPort: Ephemeral#DestPort: 80
Net3.R2 → Net3.S7
SrcIP: Net1.H1DestIP: Net3.S7Protocol: TCPSrcPort: Ephemeral#DestPort: 80
b. Suppose server S8 sends a DNS response to host H5. Show all the layer 3 and 4 addresses, ports, and protocol types of the resulting packets along the path from S8 to H5.
c. Suppose H2 and H3 have a Voice-over-IP call. Show all layer 3 and 4 addresses, ports, and protocol types of the resulting packets from H3 to H2.
Net2.S8 →Net2.R2
Src IP: Net2.S8 Dest IP: Net3.H5 Protocol: UDP Src Port: 53 Dest Port: Ephemeral #
Net3.R2 → Net3.H5
Src IP: Net2.S8 Dest IP: Net3.H5 Protocol: UDP Src Port: 53 Dest Port: Ephemeral #
Net2.H3 → Net2.R1
Src IP: Net2.H3 Dest IP: Net1.H2 Protocol: UDP Src Port: Ephemeral # Dest Port: Ephemeral #
Net1.R1 → Net1.H2
Src IP: Net2.H3 Dest IP: Net1.H2 Protocol: UDP Src Port: Ephemeral # Dest Port: Ephemeral #
Page 4 of 10 pages

Student Name: ______________________________________________
d. In part c, show all layer 2 addresses in the frames that transfer the packets from H3 to H2.
Net2.H3 → Net2.R1
Src MAC: Net2.H3(MAC) Dest MAC: Net2.R1(MAC) Protocol: IP
Net1.R1 → Net1.H2
Src MAC: Net1.R1(MAC) Dest MAC: Net1.H2(MAC) Protocol: IP
Page 5 of 10 pages

Student Name: ______________________________________________
Question 4: [20 Marks]
Use the following packet capture of communications between 2 parties to answer the corresponding questions.
1 0.000000
2 0.911310
3 0.911310
4 0.911310
5 1.472116
145.254.160.237 → 65.208.228.223 TCP 62 3372 → 80 [SYN] Seq=0 Win=8760 Len=0 MSS=1460 SACK_PERM=1 65.208.228.223 → 145.254.160.237 TCP 62 80 → 3372 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1380 SACK_PERM=1
145.254.160.237 → 65.208.228.223 TCP 54 3372 → 80 [ACK] Seq=1 Ack=1 Win=9660 Len=0 145.254.160.237 → 65.208.228.223 HTTP 533 GET /download.html HTTP/1.1
65.208.228.223 → 145.254.160.237 TCP 54 80 → 3372 [ACK] Seq=1 Ack=480 Win=6432 Len=0 145.254.160.237 → 145.253.2.203 DNS 89 Standard query 0x0023 A pagead2.googlesyndication.com
13 2.553672
17 2.914190 145.253.2.203 → 145.254.160.237 DNS 188 Standard query response 0x0023 A pagead2.googlesyndication.com CNAME pagead2.google.com
CNAME pagead.google.akadns.net A 216.239.59.104 A 216.239.59.99
1.What is the IP address of the host? ANS: 145.254.160.237 2. What is the IP address of the server? ANS: 65.208.228.223 3. What is the host’s ephemeral port number? ANS: 3372
4. What is the server’s well-known port number? ANS: 80
5. How long does the 3-way handshake take to complete? ANS: 0.911310 – 0.00000 = 0.911310 6. What’s the next sequence number for packet no. 4? Hint. Look at packet no. 5. ANS: 480
7. The following shows the details of packet no. 13. …
User Datagram Protocol, Src Port: 3009, Dst Port: 53
Source Port: 3009
Destination Port: 53
Length: 55
Checksum: 0x10af [unverified] [Checksum Status: Unverified] [Stream index: 0]
Domain Name System (query) Transaction ID: 0x0023 Flags: 0x0100 Standard query
0… …. …. …. = Response: Message is a query
.000 0… …. …. = Opcode: Standard query (0)
…. ..0. …. …. = Truncated: Message is not truncated
…. …1 …. …. = Recursion desired: Do query recursively …. …. .0.. …. = Z: reserved (0)
…. …. …0 …. = Non-authenticated data: Unacceptable
Questions: 1 Answer RRs: 0 Authority RRs: 0 Additional RRs: 0 Queries
pagead2.googlesyndication.com: type A, class IN Name: pagead2.googlesyndication.com
[Name Length: 29]
[Label Count: 3]
Type: A (Host Address) (1) Class: IN (0x0001)
Answer the following questions:
a. Which transport layer protocol is used by DNS? ANS: UDP
b. Which well-known port is used when contacting the DNS server? ANS: 53
c. Which ephemeral port does the host initiating the DNS query use? ANS: 3009
d. What is the DNS query? ANS: pagead2.googlesyndication.com
Page 6 of 10 pages

Student Name: ______________________________________________
8. The next questions focus on the following packet capture.
1 0.000000 192.168.0.2 → 192.168.0.1 TCP 74 1550 → 23 [SYN] Seq=0 Win=32120 Len=0 MSS=1460 SACK_PERM=1 TSval=10233636 TSecr=0 WS=1 2 0.002525 192.168.0.1 → 192.168.0.2 TCP 74 23 → 1550 [SYN, ACK] Seq=0 Ack=1 Win=17376 Len=0 MSS=1448 WS=1 TSval=2467372
TSecr=10233636
3 0.002572 192.168.0.2 → 192.168.0.1 TCP 66 1550 → 23 [ACK] Seq=1 Ack=1 Win=32120 Len=0 TSval=10233636 TSecr=2467372 4 0.004160 192.168.0.2 → 192.168.0.1 TELNET 93 Telnet Data …
5 0.150335 192.168.0.1 → 192.168.0.2 TELNET 69 Telnet Data …

89 39.569770 192.168.0.1 → 192.168.0.2 TCP 66 23 → 1550 [FIN, ACK] Seq=1372 Ack=264 Win=17376 Len=0 TSval=2467451 TSecr=10237591
90 39.569795 192.168.0.2 → 192.168.0.1 TCP 66 1550 → 23 [ACK] Seq=264 Ack=1373 Win=32120 Len=0 TSval=10237593 TSecr=2467451
91 39.569946 192.168.0.2 → 192.168.0.1 TCP 66 1550 → 23 [FIN, ACK] Seq=264 Ack=1373 Win=32120 Len=0 TSval=10237593 TSecr=2467451
92 39.571274 192.168.0.1 → 192.168.0.2 TCP 66 23 → 1550 [ACK] Seq=1373 Ack=xxx Win=17375 Len=0 TSval=2467451 TSecr=10237593
a. Which well-known port is used when contacting the Telnet server? ANS: 23
b. Which ephemeral port does the host initiating the Telnet connection? ANS: 1550
c. Who initiates closing of the connection? ANS: Server: 192.168.0.1
d. What is the Acknowledgement number for packet no. 92? ANS: 265
Page 7 of 10 pages

Student Name: ______________________________________________
Question 5: [20 Marks]
a. How long does it take to transmit a 1 MB file over an 8 Mbps transmission link? [5 Marks]
1×8×106
𝑡 = 8 × 106 = 1𝑠
b. Suppose that at t=0 a 1 MB file is transmitted over an error-free 8 Mbps transmission link that is 2000 kilometers long. When does the first bit and the last bit of the file arrive at the destination? [5 Marks]
2×106
𝑡0 =𝑡𝑝𝑟𝑜𝑝 =2×108 =0.01𝑠
8×106
𝑡𝑙𝑎𝑠𝑡 =𝑡𝑝𝑟𝑜𝑝 +8×106 =1.01𝑠
c. Now suppose that the bit error rate is p = 10-4 for the communication link in part b, and the frame size is 512 bytes plus 8 bytes of overhead. What is the probability that the frame has errors? [5 Marks]
𝑝𝑓 =1−(1−𝑝)𝑛 ≈1−𝑒−𝑛𝑓𝑝 =1−𝑒−512∗8∗10−4 =1−0.66=0.34
d. Suppose that we use Stop-and-Wait ARQ to transmit the frame over the transmission link in part c. How long does it take to deliver the frame to the receiver? [5 Marks]
𝑃[𝑋 𝑓𝑟𝑎𝑚𝑒 𝑡𝑟𝑎𝑛𝑠𝑚𝑖𝑠𝑠𝑖𝑜𝑛] = 𝑝𝑠(1 − 𝑝𝑠)𝑋−1
∞11
𝑌 = 𝐸[𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑡𝑟𝑎𝑛𝑠𝑚𝑖𝑠𝑠𝑖𝑜𝑛] = ∑ 𝑋 𝑝𝑠 (1 − 𝑝𝑠)𝑋−1 = 𝑝 = 0.66 = 1.515
𝑋=1 𝑆
𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝑡𝑖𝑚𝑒 = (𝑌 − 1)𝑡𝑜 + (𝑡𝑓 + 𝑡𝑝𝑟𝑜𝑝) = 0.515 × 0.02052 + (5.2 × 10−4 + 0.01) = 0.021
BER
10-4
nf = Frame size
512*8=4096 bit
Frame overhead
64 bit
R
8*106 bps
File size
8*106 or 230 bit
to = time-out
tf+2tprop = 520*8/(8*106) + 0.02 = 0.02052s
tack
0
Prob. Succ. = ps
0.66
Page 8 of 10 pages

Student Name: ______________________________________________
Shannon channel capacity:
CWC log2(1SNR) ARQ performance:
h = Reff R
L=2(tprop +tproc)R=W -1
S
h =(1-P)
nf 1- Pf n 2(t +t )R 1+L
nf
1- n0
SW
f
=t +P WStf f f 1-P
1+ a + prop nf
proc nf
t GBN
f
nf -n0
h=tGBN=(1-P) nf =1-Pf
1-n0
GBN R f 1+(W-1)P 1+LP
nf -n0
h =tf /(1-Pf)=(1-n0)(1-P) (1-P)
Sff
SR R n f f f
1-P =(1-p)nf f
E[ X ] = 1 1- Pf
e-nf p Geometric
Page 9 of 10 pages

Leave a Reply

Your email address will not be published. Required fields are marked *