[HW] HW#02 2022

313 views
Skip to first unread message

夏秋如

unread,
Nov 5, 2022, 2:35:30 AM11/5/22
to NCCU Networking@MIS
Q1. If you run a P2P application in your home network with ADSL or Cable service, why your home network may suffer from traffic congestion?

A1:
Since ADSL and Cable have asymmetric upstream and downstream bandwidth, the upstream rate is much smaller than downstream rate. When a P2P application is running in the home network, there will be some (relatively small) request packets coming to the homework from the Internet (using bigger downstream), and there will be lots of (relatively bigger) response packets sent from the home network to the Internet (via a smaller upstream). The response messages might be able to congest the upstream so that all the other packets (for example, an HTTP request from your home PC to the Internet server) may be dropped or encountered timeout. The retransmission of the requests in the upstream may even make the congestion worse.

In practical, you should not let P2P application eating all of your upstream bandwidth. Usually, there should be a setting in your P2P application that can limit the upload rate.

Q2. Consider the following HTTP messages. Note that [File Data] in the second message
represents 167 bytes of data.
Q2-1. What version of HTTP is the browser running? Point it out.
Q2-2. Does the browser request a non-persistent or a persistent connection? Why?
Q2-3. How many file formats can the browser read?
Q2-4. After receiving the response message, what is the actual URL shown in the
browser?
Q2-5. What is “q” value in the Accept-Language?

A2:
(a) It is HTTP version 1.1, which is in the request line (the 1st line) in the request message. Also in the status line (the 1st line) in the response message.
(b) The browser requests a persistent connection because it specifies "keep-alive" in the "Connection" header.
(c) 7 types(text/html,application/xhtml+xml, application/xml, image/avif,image/webp,image/apng,application/signed-exchange).However, it also specified */* which is any type but it has lower Quality values (q=0.8), which means lower priority.
(d) https://abc.com/
(e) quality factor

Q3. Consider the following DNS messages (already parsed by Wireshark).
Q3-1. To your best guess, why there are 4 answers respond by the DNS server?
Q3-2. The response message is replied by the local DNS server or the Authoritative DNS
server? Why?
Q3-3.Which IP will be used by the browser?

A3:
(a) 4 IP addresses are all the answers of abc.com's DNS query
(b) local DNS server, since the flags in DNS response message is 0x8180, turn it to binary is 1000000110000000, the sixth bit is called AA(Authoritative Server), if AA=1 means it is authoritative DNS server, otherwise it is local DNS server
(c) 4 IP addresses are possible

Q4. Consider the following DNS messages (already parsed by Wireshark).
Q4-1. To your best guess, why CNAME is used in the RR?
Q4-2. Try “traceroute” (Mac and Linux) or ”tracert” (Windows) the IPs. To your best
guess, are these 2 set of IPs (172.217.x.x and 142.251.x.x) located in the same geographic location? (Or you can NOT tell from the tracert?)
Q4-3. What is the difference between “using multiple A records” (as question 3) and
“using a CNAME with multiple A records” (as question 4)? The cons and pros of using these two different responses?

A4:
(a) Since you type www.youtube.com, it will turns to the real URL(youtube-ui.l.google.com)
(b) yes
(c)
multiple A records
pros:
1.load balancing
2.backup
cons:
1.If the IP addresses you can't control, there will have dangling A records problem
2.When the website has many sub-domains, every A records of each sub-domain need to change if the server's IP changed

CNAME with multiple A records
pros:
1.When the website has many sub-domains, you only need to change the A records of the website instead of all the sub-domain A records if the server's IP changed
2.You don't need to control the IP addresses
cons:
They might have some delay

Reply all
Reply to author
Forward
0 new messages