Reference answer
<>2.1 section
RI. list 5 A non dedicated Internet application and its application layer protocol .
* browser :HTTP((HyperText Transfer Protocol)
* peer-to-peer file transfers :FTP(File Transfer Protocol)
* Network security protocol :SSH(Secure Shell)
* E-mail :SMTP(Simple Mail Transfer Protocol),POP3(Post Office Protocol -
Version 3),IMAP(Internet Mail Access Protocol)
* Remote connection :Telnet
R2. What is the difference between network architecture and application architecture ?
Network architecture refers to the organizational form of network level , For example, our common five layer network structure ; Application architecture refers to the organizational form of each part of the application , Such as customer — Server architecture or P2P Architecture .
R3. For a communication session between two processes , Which process is the customer , Which process is the server ?
The process of initiating communication is the customer ; The process waiting to be contacted is the server
R4. Yes, one P2P File sharing application , You agree. “ There is no concept of client and server in a communication session ” What do you say ? Why? ?
disagree . about P2P For file sharing , The process of accepting files as customers , The server process that sent the file . A process can be either a client , It could also be a server .
R5. A process running on a host , What information is used to identify processes running on another host ?
Target host IP Address and port number of the destination socket
R6. Suppose you want to process transactions from remote clients to servers as soon as possible , You will use UDP still TCP? Why? ?
UDP. The analysis topic is known , Emphasize being fast , and UPD The sender can inject data into the network layer at any rate , Can be in a round trip time (RTT) Medium completion —— Client sends transaction request to UDP socket , The server sends the reply back to the client UDP socket . about TCP, At least two are required RTTs: One for building TCP connect , The other is for the client to send the request , And the server sends a reply .
R7. See figure 2-4, We see that none of the applications listed in the figure require both no data loss and timing . Can you imagine an application that requires no data loss and is highly time sensitive ?
Commodity time limited second kill , Time limited issuance of coupon , Rush purchase of 10 billion subsidy bonds . Time and order information are very sensitive
**R8. ** List what a transportation agreement can provide 4 A broad range of services . For each service type , Point out yes UDP still TCP ( Or both ) Provide such services ?
transportation services TCPUDP
Reliable data transmission √×
throughput ××
timing ××
Security ××
R9. As mentioned earlier TCP Can use SSL To strengthen , To provide process to process security services , Including encryption .SSL
Is it running at the transportation layer or the application layer ? If an application developer wants to use SSL To strengthen UDP, What should the developer do ?
application layer ; Developers need to insert in the client and server code of the application SSL code .
<>2.2~2.4 section
R10. What is the function of handshake protocol ?
Confirm identity , It refers to a kind of network protocol mainly used to let the client and server confirm each other's identity
RII. Why? HTTP,SMITP and POP3 All run in TCP, instead of UDP upper ?
TCP It has connection oriented service and reliable data transmission service , It also has congestion control mechanism , accord with HTTP,SMITP and POP3 Requirements for data transmission sensitivity
RI2. Consider an e-commerce website that needs to keep the purchase records of each customer . Describe how to use cokie To complete this function ?
cookie: User server interaction . When new customers visit the website , generate cookie And return to the customer , Keep it for the browser , At the same time, the server also records a copy cookie. When the customer visits or buys something again , Browser with this cookie Send request to server , The server is in the corresponding cookie Add product record on .( Storage data structure available
Map<Cookie, List<Order>> To simulate )
RI3. describe Web How does the buffer reduce the delay of receiving the cleared object .Web Will the buffer reduce the latency of all or just some of the objects requested by a user ? Why? ?
When a user accesses a resource , Its host will first web The buffer sends a request , If the resource requested by the user is in web On buffer , be web The buffer will return the resource directly to the user . without , Then request from the server and return to the user , And save the resource locally .
Web
The cache holds a copy of the most recently requested object , This reduces the latency of all objects . because web The buffer is generally closer to the user , stay web When the buffer has resources , It can reduce the delay . And in the absence of resources , When requesting from the server , because web Existence of buffer , It greatly reduces the pressure on the server and network core links , Therefore, this delay will also be reduced .
RI4. Telnet To one Web The server and sends a multi line request message . Include in the request message If - modifed -
sincec: Header line , Force in response message “304 Not Modifed" Status code .
yes .
RI5. List several popular instant messaging applications . They use the same protocol as SMS Do you ?
WeChat ,QQ, Nail nail ……
R16.
assume Alice Use one based on Web Your email account ( for example Hotmail or Gmail) towards Bob Send message , and Bob use POP3 Access your own mail from his mail server . Discuss how the message is sent from Alice Host to Bob Host . List various application layer protocols used when two hosts ask to move the message .
* Alice Use browser as user agent , be based on HTTP Protocol to send mail to Alice Mail server for
* Alice Mail server passed SMTP Protocol to send mail to Bob Mail server for
* Bob Host via POP3 Agreement obtained Bob Mail on mail server
R17. Print out the header of the message you recently received . How many of them Recived: Header line ? Analyze the first line of the message .
slightly
RI8. From the user's point of view ,POP3 What is the difference between the download and delete mode and the download and retain mode in the protocol ?
Download and delete mode : When users from POP After the server downloaded his mail , The information is deleted . Inconvenience to mobile users , Because users cannot access mail from different machines . That is, only the first machine accessing the server can store mail .
In download and hold mode : After the user retrieves the message , The message will not be deleted . Because every time a user retrieves a stored message on a new machine , All messages that have not been deleted will be transferred to the new machine ( Including very old mail ). for example QQ Mailbox is download and keep mode , For example, log in on other computers Steam When ,Steam Will send you a verification code , Mobile terminal at this time QQ Email will receive ,Web Terminal QQ Email will also receive .
RI9. Of an organization Web Server and mail server can have identical host name aliases ( for example :foo.com) Do you ? Contains the host name of the capable server RR What are the types ?
sure , Containing the mail host name RR have MX Type and A type ,MX Record the short full name mapping of the mail server ,A Record the full name and of the mail server IP Address mapping .
RR(Resource Record) It refers to joint realization DNS Distributed database all DNS Server storage resource record
R20.
Carefully check the email received , Find used by .edu The header of the message sent by the user of the e-mail address . From its head , It can determine the host sending the message IP Address ? For by Gmail Can messages sent by the account do the same thing ?
sure ; no way .
<>2.5 section
R21. stay BiToment in , assume Alice towards Baob Provide 30 File block throughput per second interval .Bob
Will have to pay back , In the same interval Alice Provide file blocks ? Why? ?
R22. Consider a new peer Alice Add people BiTorrent Without owning any file blocks . No blocks , So she has nothing to upload ,
She can't be the front of any other peer 4 Uploader . that Alice How will I get her first file block ?
stay BitTorrent in , Every time the peers 30 Second randomly selects another neighbor to send the block , When Alice When selected randomly , She will get the first piece .
R23. What is an overlay network ? Does it include a router ? What are edges in overlay networks ?
Overlay network is an application layer network ( Logical network of peers , Not a physical link ), stay P2P In the agreement , Overlay network routing is the logical connection between nodes in file sharing system
( Between two peers TCP connect ) constitute , This logical connection is “ edge ”, Excluding routers .
<>2.6 section
R24. CDN You typically use one of two different server placement methods . List and briefly describe them .
* thorough (Enter Deep)
In all over the world ISP Deploy server clusters to drill down into ISP In access network . The target is close to the end user , By reducing end-user to CDN Link length and number of routers between clusters , So as to improve the user request delay . But management , The cost of maintaining this cluster is high .
* Invite a guest (Bring Home)
This way is used by many people CDN Company adoption . Invite neighbors by building large clusters in a small number of key locations ISP visit . Instead of putting clusters in ISP in , Usually placed in IXP in ( Internet switching point ). This design has lower maintenance and management overhead , But it sacrifices the experience of some end users .
R25. Except for time delay , In addition to network related considerations such as packet loss and bandwidth performance , Design species CDN There are other important factors when selecting a server policy . What are they ?
And load balancing , Day and night problem , Hotspot traffic ,ISP charge , Server cluster management and maintenance overhead .
<>2.7 section
R26. 2.7 Described in section UDP The server requires only one socket ,
and TCP The server requires two sockets . Why? ? If TCP Server support n Parallel connections , Each connection comes from a different client host , that TCP How many sockets will the server need ?
about UDP The server , No welcome socket , All data from different clients enters the server through this socket . about TCP The server , There is a welcome socket , Whenever a client starts a connection to the server , A new connection socket is created . therefore , To support
n nn Simultaneous connections , Server needs n + 1 n + 1 n+1 socket .
R27. about 2.
7 The operation described in section TCP Customers above — Server application , Why does the server program have to run before the client program ? For running on UDP Customers above — Server application , Why can a client program run before a server program ?
about TCP application program , Once the client is executed , It will try to start the connection with the server TCP connect . If TCP The server is not running , Then the client will not be able to shake hands , Of course, the connection cannot be established . about UDP application program , The client does not start the connection immediately upon execution ( Or try and UDP Server communication )
Technology