当前位置: 首页 > news >正文

计网C1C2C3答案自用

Chapter 1 Computer Network and the Internet

Review Questions Solution

R1. What is the difference between a host and end system? List several different types of end system. Is a Web server an end system?

There is no difference between a host and an end system. End systems include PCs, workstations, web servers, mail servers, game consoles. Web server is an end system for sure.

R2. Describe the protocol that might be used by two people having a telephonic conversation to initiate and end the conversation.

Two people may start the telephonic conversation by saying “hello” to each other first. To end the conversation, they have to say “bye” to each other.

R3. Why are standards important for protocols?

Standards are important for protocols so that people can create networking systems and products that interoperate.

R4. List six access technologies. Classify each one as home access, enterprise access, or wide-aree wireless access.

  • Dial-up modem over telephone line - home
  • DSL over telephone line - home
  • Cable to HFC - homne
  • 100 Mbps switched Ethernet - enterprise
  • Wifi (802.11) - home and enterprise
  • 4G and 5G - wide-are wireless

R5. Is HFC transmission rate dedicated or shared among users? Are collisions possible in a downstream HFC channel?Why or why not?

HFC bandwidth is shared among the users. On the downstream channel, all packets emanate from a single source, namely, the head end. Thus, there are no collisions in the downstream channel.

R6. What access network technologies would be most suitable for providing Internet access in rural areas?

4G and 5G will be most suitable in rural areas. In rural areas, it is hard to use Dial-up modem, DSL, or Cable to HFC. The biggest difference between city and rural is homes in rural areas are much more sparse than city. 4G and 5G does not require any cable to access to internet.

R7. Dial-up modems and DSL both use the telephone line (a twisted-pair copper cable) as their transmission medium. Why then is DSL much faster than dial-up access?

Like dialup, DSL uses the phone line to transfer data. However, unlike dialup, DSL operates at a much higher frequency, so the data doesn’t interfere with the voice data, meaning that you can use the phone and internet at the same time. So, in most of the time, DSL is much faster than dial-up.

R8. What are some of the physical media that Ethernet can run over?

Ethernet most commonly runs over twisted-pair copper wire. It also can run over fibers optic links.

R9. Dial-up modems, HFC, DSL and FTTH are all used for residential access.
For each of these access technologies, provide a range of transmission rates and comment on whether the transmission rate is shared or dedicated.

Dial up modems: up to 56 Kbps, bandwidth is dedicated; ADSL: up to 24 Mbps downstream and 2.5 Mbps upstream, bandwidth is dedicated; HFC, rates up to 42.8 Mbps and upstream rates of up to 30.7 Mbps, bandwidth is shared. FTTH: 2-10Mbps upload; 10-20 Mbps download; bandwidth is not shared.

R10. Describe the different wireless technologies you use during the day and their characteristics. If you have a choice between multiple technologies, why do you prefer one over another?

There are two popular wireless Internet access technologies today:

  • Wifi (802.11) In a wireless LAN, wireless users transmit/receive packets to/from an base station (i.e., wireless access point) within a radius of few tens of meters. The base station is typically connected to the wired Internet and thus serves to connect wireless users to the wired network.
  • 4G and 5G wide-area wireless access networks. In these systems, packets are transmitted over the same wireless infrastructure used for cellular telephony, with the base station thus being managed by a telecommunications provider. This provides wireless access to users within a radius of tens of kilometers of the base station.

R11. Suppose there is exactly one packet switch between a sending host and a
receiving host. The transmission rates between the sending host and the switch and between the switch and the receiving host are R1 and R2, respec- tively. Assuming that the switch uses store-and-forward packet switching, what is the total end-to-end delay to send a packet of length L? (Ignore queu- ing, propagation delay, and processing delay.)

At time t0 the sending host begins to transmit. At time t1 = L/R1, the sending host completes transmission and the entire packet is received at the router (no propagation delay). Because the router has the entire packet at time t1, it can begin to transmit the packet to the receiving host at time t1. At time t2 = t1 + L/R2, the router completes transmission and the entire packet is received at the receiving host (again, no propagation delay). Thus, the end-to-end delay is L/R1 + L/R2.

R12. What advantage does a circuit-switched network have over a packet-switched network? What advantages does TDM have over FDM in a circuit-switched network?

A circuit-switched network can guarantee a certain amount of end-to-end bandwidth for theduration of a call. Most packet-switched networks today (including the Internet) cannot make any end-to-end guarantees for bandwidth. FDM requires sophisticated analog hardware to shift signal into appropriate frequency bands.

R13. Suppose users share a 2 Mbps link. Also suppose each user transmits
continuously at 1 Mbps when transmitting, but each user transmits only 20 percent of the time. (See the discussion of statistical multiplexing in Section 1.3.)

a) When circuit switching is used, how many users can be supported?
b) For the remainder of this problem, suppose packet switching is used. Why
will there be essentially no queuing delay before the link if two or fewer
users transmit at the same time? Why will there be a queuing delay if three
users transmit at the same time?
c) Find the probability that a given user is transmitting.
d) Suppose now there are three users. Find the probability that at any given
time, all three users are transmitting simultaneously. Find the fraction of
time during which the queue grows.

  • 2 users can be supported because each user requires half of the link bandwidth.
  • Since each user requires 1Mbps when transmitting, if two or fewer users transmit simultaneously, a maximum of 2Mbps will be required. Since the available bandwidth of the shared link is 2Mbps, there will be no queuing delay before the link. Whereas, if three users transmit simultaneously, the bandwidth required will be 3Mbps which is more than the available bandwidth of the shared link. In this case, there will be queuing delay before the link.
  • Probability that a given user is transmitting = 0.2
  • Since the queue grows when all the users are transmitting, the fraction of time during which the queue grows (which is equal to the probability that all three users are transmitting simultaneously) is 0.008.

R14. Why will two ISPs at the same level of the hierarchy often peer with each other? How does an IXP earn money?

If the two ISPs do not peer with each other, then when they send traffic to each other they have to send the traffic through a provider ISP (intermediary), to which they have to pay for carrying the traffic. By peering with each other directly, the two ISPs can reduce their payments to their provider ISPs. An Internet Exchange Points (IXP) (typically in a standalone building with its own switches) is a meeting point where multiple ISPs can connect and/or peer together. An ISP earns its money by charging each of the the ISPs that connect to the IXP a relatively small fee, which may depend on the amount of traffic sent to or received from the IXP.

R15. Why is a content provider considered a different Internet entity today? How does a content provider connect to other ISPs? Why?

some content providers created their own network. For example, Google, Google’s private network connects together all its data centers, big and small. A content provider connect to other ISPs by using internet access provided by ISPs. For example, Google’s data center are close to lower tier ISPs. Therefore, when Google delivers content to a user, it often can bypass higher tier ISPs.

R16. Consider sending a packet from a source host to a destination host over a fixed route. List the delay components in the end-to-end delay. Which of these delays are constant and which are variable?

The delay components are processing delays, transmission delays, propagation delays, and queuing delays. All of these delays are fixed, except for the queuing delays, which are variable.

R17. Visit the Transmission Versus Propagation Delay applet at the companion
Web site. Among the rates, propagation delay, and packet sizes available, find a combination for which the sender finishes transmitting before the first bit of the packet reaches the receiver. Find another combination for which the first bit of the packet reaches the receiver before the sender finishes transmitting.

  1. Length 10 km, Rate 100 Mbps Packet size 100 bytes
  2. Length 10 km, Rate 1 Mbps Packet size 100 bytes

R18. A user can directly connect to a server through either long-range wireless or a twisted-pair cable for transmitting a 1500-bytes file. The transmission rates of the wireless and wired media are 2 and 100 Mbps, respectively. Assume that the propagation speed in air is 3 x 10^8 m/s, while the speed in the twisted pair is 2 x 10^8 m/s. If the user is located 1 km away from the server, what is the nodal delay when using each of the two technologies?

The nodal delay = process delay + transmission delay + queueing delay + proppagation delay. We assume that process delay and queueing delyis negligible here. Nodal delay for long-rang wireless is 1500/(2x125000) + 1000/(3x10^8) = 0.006 + 0.00000333 = 6.003 ms. Nodal delay for twisted-par cable is 1500/(100*125000) + 1000/(2x10^8) = 0.123 ms

R19. Suppose Host A wants to send a large file to Host B. The path from Host A to Host B has three links, of rates R1 = 500 kbps, R2 = 2 Mbps, and R3 = 1 Mbps.

a) Assuming no other traffic in the network, what is the throughput for the file transfer?
b) Suppose the file is 4 million bytes. Dividing the file size by the throughput,roughly how long will it take to transfer the file to Host B?
c) Repeat (a) and (b), but now with R2 reduced to 100 kbps.

  • (a) 500kbs
  • (b) 4x10^6 / (500*125) = 64 seconds
  • © 100kps 4*10^6 / (100x125) = 320 seconds

R20. Suppose end system A wants to send a large file to end system B. At a very high level, describe how end system A creates packets from the file. When one of these packets arrives to a packet switch, what information in the packet does the switch use to determine the link onto which the packet is forwarded? Why is packet switching in the Internet analogous to driving from one city to another and asking directions along the way?

End system A breaks the large file into chunks. It adds header to each chunk, thereby generating multiple packets from the file. The header in each packet includes the IP address of the destination (end system B). The packet switch uses the destination IP address in the packet to determine the outgoing link. Asking which road to take is analogous to a packet asking which outgoing link it should be forwarded on, given the packet’s destination address.

R21. Visit the Queuing and Loss applet at the companion Web site. What is the maximum emission rate and the minimum transmission rate? With those rates, what is the traffic intensity? Run the applet with these rates and determine how long it takes for packet loss to occur. Then repeat the experiment a second time and determine again how long it takes for packet loss to occur. Are the values different? Why or why not?

The maximum emission rate is 500 packets/sec and the maximum transmission rate is 350 packets/sec. The corresponding traffic intensity is 500/350 =1.43 > 1. Loss will eventually occur for each experiment; but the time when loss first occurs will be different from one experiment to the next due to the randomness in the emission process.

R22. If two end-systems are connected through multiple routers and the data-link level between them ensures reliable data delivery, is a transport protocol offer- ing reliable data delivery between these two end-systems necessary? Why?

Although the data-link level can ensures reliable data delivery, in some cases, transport protocl can provide error checking and correction recovery from erros.

R23. What are the five layers in the Internet protocol stack? What are the principal responsibilities of each of these layers?

The five layers in the Internet protocol stack are – from top to bottom – the application layer, the transport layer, the network layer, the link layer, and the physical layer.

R24. What do encapsulation and de-encapsulation mean? Why are they needed in
a layered protocol stack?

Data Encapsulation is the process in which some extra information is added to the data item to add some features to it. Data De-encapsulation is the reverse process of data encapsulation. The encapsulated information is removed from the received data to obtain the original data. The most important feature that it adds is the security and reliability of data transmission between two nodes in a network.

R25. Which layers in the Internet protocol stack does a router process? Which
layers does a link-layer switch process? Which layers does a host process?

Routers process network, link and physical layers (layers 1 through 3). (This is a little bit of a white lie, as modern routers sometimes act as firewalls or caching components, and process Transport layer as well.) Link layer switches process link and physical layers (layers 1 through2). Hosts process all five layers.

Chapter 2 Application Layer

Review Questions Solution

R1. List five nonproprietary Internet applications and the application-layer protocols that they use.

  1. The Web: HTTP
  2. Remote login: Telnet
  3. Network News: NNTP
  4. e-mail: SMTP.
  5. File transfer: FTP

R2. What is the difference between network architecture and application architecture?

Network architecture: The process of organizing the communication process into the layers is called network architecture. Or it can be considered as the design of the communication network.
Application Architecture: The architecture which is designed by the application developer is called Application Architecture. This type of architecture dictates the complete or broad structure of an application.

R3. For a communication session between a pair of processes, which process is the client and which is the server?

The process which initiates the communication is the client; the process that waits to be contacted is the server.

R4. Why are the terms client and server still used in peer-to-peer applications?

All communication sessions have a client side and a server side. In a P2P application, the peer that is receiving a file is typically the client and the peer that is sending the file is typically the server.

R5. What information is used by a process running on one host to identify a process running on another host?

The IP address of the destination host and the port number of the destination socket.

R6. What is the role of HTTP in a network application? What other components are needed to complete a Web application?

HTTP used to encode and transport information between client and the server in a network application. To complete a web application, we still need clients, servers and UI components.

R7. Referring to Figure 2.4, we see that none of the applications listed in Figure
2.4 requires both no data loss and timing. Can you conceive of an application that requires no data loss and that is also highly time-sensitive?

Network games, network multimedia applications

R8. List the four broad classes of services that a transport protocol can provide.
For each of the service classes, indicate if either UDP or TCP (or both) pro- vides such a service.

  1. Reliable data transfer:- TCP only
  2. A guarantee that a certain value for throughput will be maintained:-Neither TCP nor UDP.
  3. A guarantee that data will be delivered within a specified amount of time:- Neither TCP nor UDP.
  4. Security:- Neither TCP nor UDP.

R9. Recall that TCP can be enhanced with SSL to provide process-to-process
security services, including encryption. Does SSL operate at the transport layer or the application layer? If the application developer wants TCP to be enhanced with SSL, what does the developer have to do?

SSL operates at the application layer. The SSL socket takes unencrypted data from the application layer, encrypts it and then passes it to the TCP socket. If the application developer wants TCP to be enhanced with SSL, he/she has to include the SSL code in the application.

R10. What is meant by a handshaking protocol?

A protocol uses handshaking if the two communicating entities first exchange control packets before sending data to each other. SMTP uses handshaking at the application layer whereas HTTP does not.

R11. What does a stateless protocol mean? Is IMAP stateless? What about SMTP?

HTTP is a stateless protocl. This means a HTTP server needs not keep track of any state information. IMAP is a state protocl. SMTP is a stateless protocol.

R12. How can websites keep track of users? Do they always need to use cookies?

Websites can track what each user does on their site and what pages they visit by their IP address. When the user first visits the site, the site returns a cookie number. This cookie number is stored on the user’s host and is managed by the browser. During each subsequent visit (and purchase), the browser sends the cookie number back to the site. Thus the site knows when this user (more precisely, this browser) is visiting the site.

R13. Describe how Web caching can reduce the delay in receiving a requested
object. Will Web caching reduce the delay for all objects requested by a user or for only some of the objects? Why?

Web caching can bring the desired content “closer” to the user, perhaps to the same LAN to which the user’s host is connected. Web caching can reduce the delay for all objects, even objects that are not cached, since caching reduces the traffic on links.

R14. Telnet into a Web server and send a multiline request message. Include in
the request message the If-modified-since: header line to force a response message with the 304 Not Modified status code.

Skipped

R15. Telnet into a Web server and send a multiline request message. Include in
the request message the If-modified-since: header line to force a response message with the 304 Not Modified status code.

There is no constraint on the format of the HTTP body, it can be any format. The message body of SMTP must be in 7-bit ASCII. SMTP can transimit arbitrary data because all the data can be encoded to ASCII. After this, SMTP will send out this message.

R16. Suppose Alice, with a Web-based e-mail account (such as Hotmail or Gmail),
sends a message to Bob, who accesses his mail from his mail server using POP3. Discuss how the message gets from Alice’s host to Bob’s host. Be sure to list the series of application-layer protocols that are used to move the message between the two hosts.

Message is sent from Alice’s host to her mail server over HTTP. Alice’s mail server then sends the message to Bob’s mail server over SMTP. Bob then transfers the message from his mail server to his host over POP3.

R17. Print out the header of an e-mail message you have recently received. How
many Received: header lines are there? Analyze each of the header lines in the message.

Skipped

R18. Assume you have multiple devices, and you connect to your email provider
using POP3. You retrieve messages with the “download and keep” strategy from multiple devices. Can your email client tell if you have already read the message in this scenario?

My email client cannot tell if I have already read the message because we retrieve messages with the “download and keep” strategy. For each time we read the email from a new client, there is no way to know if the message has been download on other devices before.

R19. Why are MX records needed? Would it not be enough to use a CNAME record? (Assume the email client looks up email addresses through a Type A query and that the target host only runs an email server.)

Mail Exchange (MX) records are DNS records that are necessary for delivering email to your address. In simple DNS terms, an MX record is used to tell the world which mail servers accept incoming mail for your domain and where emails sent to your domain should be routed to. If your MX records are not pointed to the correct location, you will not receive email. CNAME cannot be used to delivery emails because it used to redirect from your domain’s subdomain to another domain/subdomain.

R20. What is the difference between recursive and iterative DNS queries?

Iterative DNS queries are ones in which a DNS server is queried and returns an answer without querying other DNS servers, even if it cannot provide a definitive answer. Iterative queries are also called non-recursive queries.
Recursive DNS queries occur when a DNS client requests information from a DNS server that is set to query subsequent DNS servers until a definitive answer is returned to the client. The queries made to subsequent DNS servers from the first DNS server are iterative queries.

R21. Under what circumstances is file downloading through P2P much faster than through a centralized client-server approach? Justify your answer using Equation 2.2.

When there are peers that near to the host and have the files that the host want to download.

R22. Consider a new peer Alice that joins BitTorrent without possessing any chunks. Without any chunks, she cannot become a top-four uploader for any of the other peers, since she has nothing to upload. How then will Alice get her first chunk?

Alice will get her first chunk as a result of she being selected by one of her neighbors as a result of an “optimistic unchoke,” for sending out chunks to her.

R23. Assume a BitTorrent tracker suddenly becomes unavailable. What are its consequences? Can files still be downloaded?

If the tracker fails or is unreachable, the system becomes unavailable to new peers, so they can not obtain the file or contribute resources to the system. Fiels still can be downloaded for old peers.

R24. CDNs typically adopt one of two different server placement philosophies. Name and briefly describe them.

  1. Enter deep:
    it is pioneered by Akamai. It deploys server clusters in access ISPs (ISPs direct accessing end users) all over the world.
    The goal of Enter deep is to get close to end users, thereby improving user-perceived delay and throughput by decreasing the number of links.
    Routers between the end user and then CDN cluster from which it receives content. Because of this highly distributed design, the task of maintaining and managing the clusters become challenging.
  2. Bring home:
    It can be taken by Limelight and other CDN companies; it brings the ISPs home by building large clusters at a smaller number of key locations and connecting these clusters using a private high-speed network.
    Instead of getting inside the access ISPs, these CDNs typically place each cluster at a location that is simultaneously near the point of presence of many tier-1 ISPs.
    Compared with the enter-deep design, the bring-home design typically results in lower maintenance and management overhead, possibly at the expense of higher delay and lower throughout to end users.

R25. Besides network-related considerations such as delay, loss, and bandwidth performance, there are other important factors that go into designing a CDN server selection strategy. What are they?

There are many important additional factors available, form those few will be going to considered while designing the cluster selection strategy.
ISP delivery cost
Load on the clusters
The description of the important factors is The clusters may be chosen based on different cost structures, so that the ISP delivery cost is minimized. In Load on the clusters, we should be bothered when a client is to be directed to a cluster, so that the client is not directed to an overloaded cluster.

R26. In Section 2.7, the UDP server described needed only one socket, whereas the TCP server needed two sockets. Why? If the TCP server were to support n simultaneous connections, each from a different client host, how many sockets would the TCP server need?

The reason is that TCP has two different kinds of state that you want to control, whereas UDP has only one. Still two sockets are needed. The number of sockets needed by TCP does not rely on the number of simulataneous connections.

R27. For the client-server application over TCP described in Section 2.7, why must the server program be executed before the client program? For the client-server application over UDP, why may the client program be executed before the server program?

In TCP, server program has to be executed because server needed to wait 3-way handshaking from the client. In UDP, there is not such 3-way handshaking, it does not matter either the server program or client program executed first.

Chapter 3 Computer Network and the Internet

Review Questions Solution

R1. Suppose the network layer provides the following service. The network layer in the source host accepts a segment of maximum size 1,200 bytes and a des- tination host address from the transport layer. The network layer then guaran- tees to deliver the segment to the transport layer at the destination host. Suppose many network application processes can be running at the destination host.
a. Design the simplest possible transport-layer protocol that will get applica- tion data to the desired process at the destination host. Assume the operat- ing system in the destination host has assigned a 4-byte port number to each running application process.

b. Modify this protocol so that it provides a “return address” to the destina- tion process.

c. In your protocols, does the transport layer “have to do anything” in the core of the computer network?**

a The Simple Transport Protocol takes data not exceeding 1196 bytes at the sender side. It accepts four byte of destination port number and host address.The Simple Transport Protocol gives the destination host address and the resulting segment to the network layer.The network layer sends the segment to Simple Transport Protocol at the destination host.The Simple Transport Protocol observes the port number.Abstracts the data from the segment in the Simple Transport Protocol.Finally, send the data to the process recognized by the port number.

b Consider the two header fields in the segment:
Source port field
Destination port field
The Simple Transport Protocol creates application data, source and destination port numbers in the segment. It sends the destination host address to the network layer. Then, The Simple Transport Protocol is receiving host address and provides the process the source port number and the application data.

c No, the transport layer does not have to do anything in the core.The reason is that, the transport layer “lives” in the end systems.

R2. Consider a planet where everyone belongs to a family of six, every family lives in its own house, each house has a unique address, and each person in a given house has a unique name. Suppose this planet has a mail service that delivers letters from source house to destination house. The mail service requires that (1) the letter be in an envelope, and that (2) the address of the destination house (and nothing more) be clearly written on the envelope. Suppose each family has a delegate family member who collects and distributes letters for the other family members. The letters do not necessarily provide any indication of the recipients of the letters.

a. Using the solution to Problem R1 above as inspiration, describe a protocol that the delegates can use to deliver letters from a sending family member to a receiving family member.

b. In your protocol, does the mail service ever have to open the envelope and examine the letter in order to provide its service?

a Sender has to provide the address of the destination name. It is written by the delegate to the planet’s mail service.After receive the destination address, the envelop the written on the top details.
b No. The mail service ever have not to open the envelope and examine the letter in order to provide its service.

**R3. How is a UDP socket fully identified? What about a TCP socket? What is the difference between full identification of both sockets?

An UDP socket is fully identified by a two-tuple consisting of a destination IP address and a destination port number and a TCP socket is identified by a four-tuple: source IP address, source port number, destination IP address, destination port number.

R4. Describe why an application developer might choose to run an application over UDP rather than TCP?

The TCP’(transmission control protocol) can choke the application’s sending rate at times of bottleneck. The UDP( user datagram protocol) does not keep joining state and does not track any of the limits. Even though data transfer by TCP is dependable, some applications do not need dependable TCP data transfer. So, UDP (user datagram protocol) rather than TCP (transmission control protocol)

R5. Why is that voice and video traffic is often sent over TCP rather than UDP in today’s Internet?

Most firewalls are configured to block UDP traffic, using TCP for video and voice traffic lets the traffic though the firewalls. So, that voice and video traffic is often sent over TCP rather than UDP in today’s Internet.

R6. Is it possible for an application to enjoy reliable datra transfer even when the application runs over UDP? If so, how?

Yes.The application developer can put consistent data transfer into the application layer protocol. It contains a significant amount of work and debugging.

R7. Suppose a process in Host C has a UDP socket with port number 6789. Sup- pose both Host A and Host B each send a UDP segment to Host C with desti- nation port number 6789. Will both of these segments be directed to the same socket at Host C? If so, how will the process at Host C know that these two segments originated from two different hosts?

Yes.For each received segment, at the socket interface, the operating system will provide the process with the IP addresses to determine the origins of the individual segments.

R8. Suppose that a Web server runs in Host C on port 80. Suppose this Web server uses persistent connections, and is currently receiving requests from two different Hosts, A and B. Are all of the requests being sent through the same socket at Host C? If they are being passed through different sockets, do both of the sockets have port 80? Discuss and explain.

For each persistent connection, the Web server creates a separate “connection socket”. Each connection socket is identified with a four-tuple: (source IP address, source port number, destination IP address, destination port number). When host C receives and IP datagram, it examines these four fields in the datagram/segment to determine to which socket it should pass the payload of the TCP segment. Thus, the requests from A and B pass through different sockets. The identifier for both of these sockets has 80 for the destination port; however, the identifiers for these sockets have different values for source IP addresses. Unlike UDP, when the transport layer passes a TCP segment’s payload to the application process, it does not specify the source IP address, as this is implicitly specified by the socket identifier

R9. In our rdt protocols, why did we need to introduce sequence numbers?

Sequence numbers are necessary for a receiver to find out whether an arriving packet contains new data or is a retransmission in our rdt protocols.

R10. In our rdt protocols, why did we need to introduce timers?

To handle losses in the channel. If the ACK for a transmitted packet is not received within the duration of the timer for the packet, the packet (or its ACK or NACK) is assumed to have been lost. Hence, the packet is retransmitted.

R11. Suppose that the roundtrip delay between sender and receiver is constant and known to the sender. Would a timer still be necessary in protocol rdt 3.0, assuming that packets can be lost? Explain.

Yes, a timer still is necessary in protocol rdt 3.0.Reason: Assume the packet is loss, the sender knows the round trip delay time. It is used for estimate the transfer packet time.

R12. Visit the Go-Back-N Java applet at the companion Web site.

a. Have the source send five packets, and then pause the animation before any of the five packets reach the destination. Then kill the first packet and resume the animation. Describe what happens.

b. Repeat the experiment, but now let the first packet reach the destination and kill the first acknowledgment. Describe again what happens.

c. Finally, try sending six packets. What happens?

A.Have the source send five packets, and then pause the animation before and of the fivepacket reach the destination. Then kill the first packet and resume the animation. Describe what happens.-The packets were received out of order and no packets were acknowledged. The packets werethen retransmitted. Once they were retransmitted and received and ACK was sent to the sender.

B.Repeat the experiment, but now let the first packet reach the destination and kill the firstACK. Describe what happens.-The first ACK was lost but the others made it to the sender and their timers were stopped.

C.Finally, try sending six packets. What happens?-It only lets you send 5 packets out at once. Before the sixth packet can be sent you must wait forthe first packet to finish the ACK.

R13. Repeat R12, but now with the Selective Repeat Java applet. How are Selective Repeat and Go-Back-N different?

Selective Repeat java applet protocol:If sender sent more than one packet, it reaches the destionation might be one packet is killed and other packets stored in buffer at end receiver.The receiver send acknowldgement to sender, but the sender does not receiver acknowldgement.
Go-Bank-N protocol:If sender sent more than one packet, it reaches the destionation might be one packet is killed and other packets reached destination without buffering. The receiver does not send acknowldgement to sender, but the sender receive acknowldgement.

R14. True or False?

  • a. Host A is sending Host B a large file over a TCP connection. Assume Host B has no data to send Host A. Host B will not send acknowledgments to Host A because Host B cannot piggyback the acknowledgments on data. False

  • b. The size of the TCP rwnd never changes throughout the duration of the connection. False

  • c. Suppose Host A is sending Host B a large file over a TCP connection. The number of unacknowledged bytes that A sends cannot exceed the size of the receive buffer. True

  • d.Suppose Host A is sending a large file to Host B over a TCP connection. If the sequence number for a segment of this connection is m, then the sequence number for the subsequent segment will necessarily be m + 1. False

  • e.The TCP segment has a field in its header for rwnd. True

  • f. Suppose that the last SampleRTT in a TCP connection is equal to 1 sec. The current value of TimeoutInterval for the connection will neces- sarily be ≥ 1 sec. False

  • g. Suppose Host A sends one segment with sequence number 38 and 4 bytes of data over a TCP connection to Host B. In this same segment the acknowledgment number is necessarily 42. False

R15. Suppose Host A sends two TCP segments back to back to Host B over a TCP connection. The first segment has sequence number 90; the second has sequence number 110.
a. How much data is in the first segment?
b. Suppose that the first segment is lost but the second segment arrives at B. In the acknowledgment that Host B sends to Host A, what will be the acknowledgment number?

a. Consider sequence numbers, First segment = 90,Second segment = 110, data in the first segment = 110 - 90 = 20
b. Consider the first segment is lost but the second segment arrives at B. In the acknowledgment that Host B sends to Host A, then the acknowledgment number will be first segment of sequence number, that is 90.

R16. Consider the Telnet example discussed in Section 3.5. A few seconds after the user types the letter ‘C,’ the user types the letter ‘R.’ After typing the letter ‘R,’ how many segments are sent, and what is put in the sequence number and acknowledgment fields of the segments?

SegmentSequence numberAcknowledgment field
First segmentseq=43ack=80
Second segmentseq=80ack=44
Third segmentseq=44ack=81

R17. Consider two hosts, Host A and Host

R18. True or false? Consider congestion control in TCP. When the timer expires at the sender, the value of ssthresh is set to one half of its previous value.

False. The slow start threshold(ssthresh) is set to one half of its previous value in the congestion window.

相关文章:

计网C1C2C3答案自用

Chapter 1 Computer Network and the Internet Review Questions Solution R1. What is the difference between a host and end system? List several different types of end system. Is a Web server an end system? There is no difference between a host and an end …...

为什么要分为大端和小端

1.大端序 0x12345678 地址: 0x00 0x01 0x02 0x03 数据: 0x12 0x34 0x56 0x78 高位字节存储在低地址,常用语网络协议,便于人阅读、书写类似。 2.小端序 0x12345678 地址: 0x00 0x01 0x02 0x03 …...

通过可穿戴外骨骼,以更灵活的方式操作你的机器人。

今天,我们将介绍一款专为控制 Mercury X1 和 Mercury B1 机械臂而设计的创新外骨骼。这种外骨骼以人类手臂的结构为蓝本,可实现直观和精确的控制。 开发这种外骨骼的动机源于人们对深度学习和机器学习等领域日益增长的兴趣。这些技术使机器人能够自主学习…...

【大数据基础】大数据概述

【作者主页】Francek Chen 【专栏介绍】 ⌈ ⌈ ⌈大数据技术原理与应用 ⌋ ⌋ ⌋专栏系统介绍大数据的相关知识,分为大数据基础篇、大数据存储与管理篇、大数据处理与分析篇、大数据应用篇。内容包含大数据概述、大数据处理架构Hadoop、分布式文件系统HDFS、分布式数…...

使用双向链表优化数组操作的性能

🎬 江城开朗的豌豆:个人主页 🔥 个人专栏 :《 VUE 》 《 javaScript 》 📝 个人网站 :《 江城开朗的豌豆🫛 》 ⛺️ 生活的理想,就是为了理想的生活 ! 目录 背景 双向链表的优势 实现方案 性能优化 …...

Lua语言的语法

Lua语言的探索与应用 引言 Lua是一种轻量级、高性能的脚本语言,广泛应用于游戏开发、嵌入式系统和很多应用程序中。它的灵活性和高效性使得Lua成为软件开发中不可或缺的一部分。本文将从Lua的历史、语法、特色、使用案例及其在实际开发中的应用进行深入探讨。 Lu…...

Linux随记(十四)

一、处理vsftpd漏洞 【vsftpd安全漏洞(CVE-2021-30047)】 #操作系统1:bclinux euler 21.10#操作系统2:kylin v10二、处理ntp漏洞 【NTPMode6检测漏洞【原理扫描】】 #操作系统1:bclinux euler 21.10 cp /etc/ntp.conf /etc/ntp.conf.bak202…...

【Linux网络编程】第二十二弹---深入理解 I/O 多路转接之 epoll:系统调用、工作原理、代码演示及应用场景

✨个人主页: 熬夜学编程的小林 💗系列专栏: 【C语言详解】 【数据结构详解】【C详解】【Linux系统编程】【Linux网络编程】 目录 1、I/O 多路转接之 epoll 1.1、epoll 初识 1.2、epoll 的相关系统调用 1.2.1、epoll_create 1.2.2、epol…...

AI赋能服装零售:商品计划智能化,化危机为转机

在服装零售这片竞争激烈的战场上,每一个细微的决策都可能成为品牌兴衰的关键。当市场波动、消费者口味变化、供应链挑战接踵而至时,许多品牌往往将危机归咎于外部环境。然而,真相往往更为深刻——“危机不是外部的,而是你的商品计…...

课程预告|卓翼飞思多旋翼无人机集群实验课程即将上线,互动赢好礼

《多旋翼无人飞行器控制系统开发》实验课程自推出以来,吸引了众多高校的关注。目前,该课程已在多所学校成功实施,并广受好评。 点击链接查看飞控课程详情:课程上新| 卓翼飞思《多旋翼无人飞行器控制系统开发》实验课程正式发布 …...

AWS Glue从GCP的bigquery导入数据到AWS Redshift数据仓库

准备工作 创建账号与服务账号:拥有Google Cloud账号,创建有BigQuery权限的服务账号;拥有AWS账号,创建有相关权限的IAM用户。创建资源:创建Amazon Redshift集群或Redshift Serverless工作区,创建用于存储数…...

zookeeper shell操作和zookeeper 典型应用(配置中心、集群选举服务、分布式锁)

文章目录 引言I zookeeper客户端命令查看子节点 ls创建子节点 create获取节点信息 get更新节点数据 set删除节点 delete\ rmrII 监听机制node1:设置监听node3:修改监听节点node1:得到监听反馈III zookeeper 典型应用分布式锁集群选举服务数据发布/订阅(配置中心)引言 zk 的…...

如何解决HTML和CSS相关的问题,什么情况下会导致元素被遮挡?

在开发过程中,HTML 和 CSS 中的元素遮挡问题通常是由于布局、定位、层级等因素导致的。在使用 Vue.js 时,这些问题依然常见,尤其是涉及到动态渲染、条件渲染和组件嵌套的场景。以下是一些常见的导致元素被遮挡的原因,并通过 Vue.j…...

Java(3)封装、继承、多态

1.封装 封装可以被认为是一个保护屏障,防止该类的代码和数据被外部类定义的代码随机访问。 要访问该类的代码和数据,必须通过严格的接口控制。 封装最主要的功能在于我们能修改自己的实现代码,而不用修改那些调用我们代码的程序片段。 pu…...

【深度学习】多目标融合算法(二):底部共享多任务模型(Shared-Bottom Multi-task Model)

目录 一、引言 1.1 往期回顾 1.2 本期概要 二、Shared-Bottom Multi-task Model(SBMM) 2.1 技术原理 2.2 技术优缺点 2.3 业务代码实践 三、总结 一、引言 在朴素的深度学习ctr预估模型中(如DNN),通常以一个行…...

后端:Spring(IOC、AOP)

文章目录 1. Spring2. IOC 控制反转2-1. 通过配置文件定义Bean2-1-1. 通过set方法来注入Bean2-1-2. 通过构造方法来注入Bean2-1-3. 自动装配2-1-4. 集合注入2-1-5. 数据源对象管理(第三方Bean)2-1-6. 在xml配置文件中加载properties文件的数据(context命名空间)2-1-7. 加载容器…...

基于SpringBoot的诊所管理系统

作者:计算机学姐 开发技术:SpringBoot、SSM、Vue、MySQL、JSP、ElementUI、Python、小程序等,“文末源码”。 专栏推荐:前后端分离项目源码、SpringBoot项目源码、Vue项目源码、SSM项目源码、微信小程序源码 精品专栏:…...

基于GA遗传优化的最优阈值计算认知异构网络(CHN)能量检测算法matlab仿真

目录 1.算法运行效果图预览 2.算法运行软件版本 3.部分核心程序 4.算法理论概述 5.算法完整程序工程 1.算法运行效果图预览 (完整程序运行后无水印) 2.算法运行软件版本 matlab2022a 3.部分核心程序 (完整版代码包含详细中文注释和操作步骤视频&#xff09…...

【技术分享】如何利用rdesktop实现Linux远程Windows桌面高效办公

文章目录 前言1. Windows 开启远程桌面2. Linux安装rdesktop工具3. Win安装Cpolar工具4. 配置远程桌面地址5. 远程桌面连接测试6. 设置固定远程地址7. 固定地址连接测试 前言 随着技术的飞速发展,我们有了越来越多的方法来实现远程办公。今天我要给大家介绍一个特别…...

PDFelement 特别版

Wondershare PDFelement Pro 是一款非常强大的PDF编辑软件,它允许用户轻松地编辑、转换、创建和管理PDF文件。这个中文特别版的软件具有许多令人印象深刻的功能,PDFelement Pro 提供了丰富的编辑功能,可以帮助用户直接在PDF文件中添加、删除、…...

【江协STM32】10-2/3 MPU6050简介、软件I2C读写MPU6050

1. MPU6050简介 MPU6050是一个6轴姿态传感器,可以测量芯片自身X、Y、Z轴的加速度、角速度参数,通过数据融合,可进一步得到姿态角,常应用于平衡车、飞行器等需要检测自身姿态的场景3轴加速度计(Accelerometer&#xff…...

【首发 1day】WordPress Crypto 插件存在前台任意用户登录漏洞(CVE-2024-9989)

漏洞描述 WordPress 的 Crypto 插件在 2.15 及以下版本(包括 2.15)中容易受到身份验证绕过攻击。这是由于对 ‘crypto_connect_ajax_process’ 函数中 ‘crypto_connect_ajax_process::log_in’ 函数的任意方法调用有限。这使得未经身份验证的攻击者可以以站点上的任何现有…...

c语言-----常识问题

1.VS的C4996错误 由于微软在VS2013中不建议再使用C的传统库函数scanf,strcpy,sprintf等,所以直接使用这些库函数会提示C4996错误: VS建议采用带_s的函数,如scanf_s、strcpy_s,但这些并不是标准C函数。 要想继续使用此函数&…...

MIUI显示/隐藏5G开关的方法,信号弱时开启手机Wifi通话方法

5G网速虽快,手机功耗也大。 1.取消MIUI强制的5G,手动设置4G的方法! 【小米澎湃OS, Xiaomi HyperOS显示/隐藏5G开关的方法】 1.1.小米MIUI系统升级后,被强制连5G,手动设置开关被隐藏,如下图: 1…...

超简单,使用Kube-Vip实现K8s高可用VIP详细教程

具体步骤如下: 以下步骤在其中一个 master 上操作即可, 1、参数配置 export VIP192.168.0.110 export INTERFACEens33 export KVVERSIONv0.8.7VIP 是虚拟IP地址,和主机同一个网段,且未被占用。INTERFACE 是你当前主机的网络接口…...

中国数字化发展的问题与机会

橙蜂智能公司致力于提供先进的人工智能和物联网解决方案,帮助企业优化运营并实现技术潜能。公司主要服务包括AI数字人、AI翻译、埃域知识库、大模型服务等。其核心价值观为创新、客户至上、质量、合作和可持续发展。 橙蜂智农的智慧农业产品涵盖了多方面的功能,如智能化推荐、…...

为什么ip属地一会河南一会江苏

在使用互联网的过程中,许多用户可能会遇到这样一个问题:自己的IP属地一会儿显示为河南,一会儿又变成了江苏。这种现象可能会让人感到困惑,甚至产生疑虑,担心自己的网络活动是否受到了某种影响。为了解答这一疑问&#…...

【机器学习】神经网络(BP算法)含具体计算过程

目录 神经元的“激活函数” 多层前馈网络结构​编辑 BP(BackPropagation:误差逆传播算法) BP算法推导 手动计算BP神经网络的权值来实现学习 前向传播(正向运算)的过程 隐藏层输入: 隐藏层输出: 输出层输入: 输出层输出: …...

【HarmonyOS NEXT】鸿蒙应用点9图的处理(draw9patch)

【HarmonyOS NEXT】鸿蒙应用点9图的处理(draw9patch) 一、前言: 首先在鸿蒙中是不支持安卓 .9图的图片直接使用。只有类似拉伸的处理方案,鸿蒙提供的Image组件有与点九图相同功能的API设置。 可以通过设置resizable属性来设置R…...

Swift语言的网络编程

Swift语言的网络编程探秘 随着移动互联网的迅猛发展,网络编程已经成为开发者必备的核心技能之一。尤其在iOS开发领域,Swift语言作为Apple官方推荐的编程语言,以其简洁的语法和强大的功能受到了广泛的关注。本文将深入探讨Swift语言的网络编程…...

江科大STM32入门——UART通信笔记总结

wx:嵌入式工程师成长日记 1、简介 简单双向串口通信有两根通信线(发送端TX和接收端RX)TX与RX要交叉连接当只需单向的数据传输时,可以只接一根通信线当电平标准不一致时,需要加电平转换芯片 传输模式:全双工;时钟&…...

2. 使用springboot做一个音乐播放器软件项目【框架搭建与配置文件】

上一章文章 我们做了 音乐播放器这个项目的 前期规划 项目需求, 环境安装 和 springboot框架的 搭建与配置。如果有小伙伴没看过 第一章文章 可以去看一下 https://blog.csdn.net/Drug_/article/details/144994317 今天这篇文章 我们来 主要分享一些 我们在开发中…...

历代iPhone运行内存大小和电池容量信息

系列设备名称充电端口标配充电线PD快充无线充电 (W)标配充电器电池容量 (mAh)发布时间RAM运存iPhone 16iPhone 16 Pro MaxUSB Type-CUSB-C to USB-C支持25无47472024/9/108GB LPDDR5XiPhone 16 ProUSB Type-CUSB-C to USB-C支持25无35772024/9/108GB LPDDR5XiPhone 16 PlusUSB …...

(STM32笔记)十二、DMA的基础知识与用法 第三部分

我用的是正点的STM32F103来进行学习,板子和教程是野火的指南者。 之后的这个系列笔记开头未标明的话,用的也是这个板子和教程。 DMA的基础知识与用法 三、DMA程序验证1、DMA 存储器到存储器模式实验(1)DMA结构体解释(2…...

ThinkPHP 8高效构建Web应用-获取请求对象

【图书介绍】《ThinkPHP 8高效构建Web应用》-CSDN博客 《2025新书 ThinkPHP 8高效构建Web应用 编程与应用开发丛书 夏磊 清华大学出版社教材书籍 9787302678236 ThinkPHP 8高效构建Web应用》【摘要 书评 试读】- 京东图书 使用VS Code开发ThinkPHP项目-CSDN博客 编程与应用开…...

深入解析 Python 2 与 Python 3 的差异与演进

Python 2 和 Python 3 是 Python 编程语言的两个主要版本。Python 3 于 2008 年发布,旨在解决 Python 2 中的一些设计缺陷,并引入了许多新特性。虽然 Python 2 在很长一段时间内仍然被广泛使用,但自 2020 年 1 月 1 日起,Python 2…...

57. Three.js案例-创建一个带有聚光灯和旋转立方体的3D场景

57. Three.js案例-创建一个带有聚光灯和旋转立方体的3D场景 实现效果 该案例实现了使用Three.js创建一个带有聚光灯和旋转立方体的3D场景。 知识点 WebGLRenderer(WebGL渲染器) THREE.WebGLRenderer 是 Three.js 中用于将场景渲染为 WebGL 内容的核…...

移动端可互动轮播图

首先通过事件监听获得到初始滑动位置,并关闭掉轮播图的自动轮播定时器 //设置事件代理 $(".slider").on("touchstart", function (e) {// 当滑动触发的时候关闭定时器clearInterval(time);// 开始时的pxstartX e.touches[0].clientX; }); 然…...

深入讲解 Docker 及实践

Docker 是现代化应用开发、测试和生产环境部署中不可或缺的工具。它能够为开发人员提供与生产环境一致的开发环境,同时支持高效的容器化部署、资源隔离、容器编排等高级功能。尤其在微服务架构和云原生应用中,Docker 更是提供了简化的流程和高效的可扩展…...

科大讯飞前端面试题及参考答案( 上)

前端有用到哪些数据结构? 在前端开发中,会运用到多种数据结构,以下是一些常见的类型及其应用场景。 数组(Array) 数组是一种有序的元素集合,可以存放不同类型的数据(在 JavaScript 等前端常用语言中)。比如在构建一个网页的列表展示时,像新闻列表、商品列表等,我们可…...

本地导入封装的模块 在docker内报错ImportError

本地封装了一个login方法 在写testcase的时候去复用这个方法 但是进入docker运行的时候一直报上面的错误 目录 出现的原因: 解决方法: 1. 根据docker的路径写绝对路径 2. 用sys 加入path到code 作用: 好处: 出现的原因…...

Java-日志技术大全

一:目录 1.jul的使用 2.log4j的使用 3.logback的使用 4.log4j2的使用 二:jul使用 jul是JDK自带的日志技术,不需要导入其他依赖,默认的级别为info 1.关键组件: (1).Logger:记录器 (2).Handler&…...

ARP-Batch-Retargeting 部署实战

git 地址: https://github.com/Shimingyi/ARP-Batch-Retargeting bpy安装: pypi上搜索 bpy bpy 4.3.0,4.2.0版本报错: Traceback (most recent call last):File "E:\project\jijia_4d\retarget\ARP-Batch-Retargeting-…...

二分查找题目:寻找峰值 II

文章目录 题目标题和出处难度题目描述要求示例数据范围 解法思路和算法证明代码复杂度分析 题目 标题和出处 标题:寻找峰值 II 出处:1901. 寻找峰值 II 难度 7 级 题目描述 要求 一个二维网格中的峰值元素是指其值严格大于相邻值(左、…...

调和级数不为整数的证明

文章目录 1. 问题引入2. 证明2.1 引理12.2 引理22.3 引理3:2.4 核心证明: 3. 参考 1. 问题引入 s ( n ) 1 1 2 1 3 ⋯ 1 n , n ∈ N ∗ , n ≥ 2 s(n) 1\frac{1}{2}\frac{1}{3}\cdots\frac{1}{n}, \quad \\n \in N^*, n \ge2 s(n)121​31​⋯n1​,…...

Redis 源码分析-内部数据结构 dict

Redis 源码分析-内部数据结构 dict 在上一篇 Redis 数据库源码分析 提到了 Redis 其实用了全局的 hash 表来存储所有的键值对,即下方图示的 dict,dict 中有两个数组,其中 ht[1] 只在 rehash 时候才真正用到,平时都是指向 null&am…...

git相关操作笔记

git相关操作笔记 1. git init git init 是一个 Git 命令,用于初始化一个新的 Git 仓库。执行该命令后,Git 会在当前目录创建一个 .git 子目录,这是 Git 用来存储所有版本控制信息的地方。 使用方法如下: (1&#xff…...

STM32小实验2

定时器实验 TIM介绍 TIM(Timer)定时器 定时器可以对输入的时钟进行计数,并在计数值达到设定值时触发中断 16位计数器、预分频器、自动重装寄存器的时基单元,在72MHz计数时钟下可以实现最大59.65s的定时 不仅具备基本的定时中断…...

Oracle Dataguard(主库为双节点集群)配置详解(2):备库安装 Oracle 软件

Oracle Dataguard(主库为双节点集群)配置详解(2):备库安装 Oracle 软件 目录 Oracle Dataguard(主库为双节点集群)配置详解(2):备库安装 Oracle 软件一、Orac…...

基于 Pod 和 Service 注解的服务发现

基于 Pod 和 Service 注解的服务发现 背景 很多应用会为 Pod 或 Service 打上一些注解用于 Prometheus 的服务发现,如 prometheus.io/scrape: "true",这种注解并不是 Prometheus 官方支持的,而是社区的习惯性用法,要使…...