1. Briefly define the following terms:(24%) (a) TCP Socket: P117 說明 p187 實作 A process send messages into, and receives messages from, the network through a software interface called a socket. Let’s consider an analogy to help us understand processes and sockets. A process is analogous to a house ad its socket is analogous to its door. When a process wants to send a message to another process on another host, it shoves the message out its door (socketed). This sending process assumes that there is a transportation infrastructure on the other side of its door that will transport the message to the door of the destination process. Once the message arrives at the destination host, the message passes through the receiving process’s door (socket), and the receiving process then acts on the message. (b) Congestion window p308 The congestion window, dented cwnd, imposes a constraint on the rate at which a TCP sender can send traffic into the network. Specifically, the amount of unacknowledged data at a sender may not exceed the minimum of cwnd and rwnd, that is: LastByteSent – LastByteAcked <= min {cwnd, rwnd} (c) ICMP P389 ICMP is used by hosts and routers to communicate network-layer information to each other. The most typical use of ICMP is for error reporting. For example, when running a Telnet, FTP, or HTTP session, you may have encountered an error message such as “Destination network unreachable.” This message had its origins in ICMP. At some point, an IP router was unable to find a path to the host specified in your Telnet, FTP, or HTTP application. That router created and sent a type-3 ICMP message to your host indicating the error. (d) Routing vs. forwarding P344 Forwarding. When a packet arrives at a router’s input link, the router must move the packet to the appropriate output link. For example, a packet arriving from Host H1 to Router R1 must be forwarded to the next router on a path to H2. In Section 4.3, we’ll look inside a router and examine how a packet is actually forwarded from an input link at a router to an output link. Routing. The network layer must determine the route or path taken by packets as they flow from a sender to a receiver. The algorithms that calculate these paths are referred to as routing algorithms. A routing algorithm would determine, for example, the path along which packets flow from H1 to H2 (e) Exponential backoff P508 When transmitting a given frame, after experiencing the nth collision in a row for this frame, the adapter chooses a value for K at random from {0,1,2,…,2m-1} where m=min(n,10). (f) CSMA/CD p507 CSMA/CD does the following: 1. An adapter may begin to transmit at any time; that is, there is no notion of time slots. 2. An adapter never transmits a frame when it senses that some other adapter is transmitting; that is, it uses carrier sensing. 3. A transmitting adapter aborts its transmission as soon as it detects that another adapter is also transmitting; that is, it uses collision detection. 4. Before attempting a retransmission, an adapter waits a random time that is typically small compared with the time to transmit a frame. 2. TCP congestion control algorithm has three major components. Briefly describe the functionality of each component.(9%) p310 (1) Slow start: When a TCP connection begins, the value of cwnd is typically initialized to a small value of 1 MSS, resulting in an initial sending rate of roughly MSS/RTT. For example, if MSS=500bytes and RTT=200msec, the resulting initial sending rate is only about 20 kbps, since the available bandwidth to the TCP sender may be much larger than MSS/RTT, the TCP sender would like to find the amount of available bandwidth quickly. Thus, in the slow-start state, the value cwnd begins at 1 MSS and increase by 1 MSS every time a transmitted segment is first acknowledged. (2) Congestion avoidance: On entry to the congestion-avoidance state, the value of cwnd is approximately half its value when congestion was last encountered—congestion could be just around the corner! Thus, rather than doubling the value of cwnd every RTT, TCP adopts a more conservative approach and increases the value of cwnd by just a single MSS every RTT. (3) fast recovery: In fast recovery, the value of cwnd is increased by 1 MSS for every duplicate ACK received for the missing segment that caused TCP to enter the fast-recovery state. Eventually, when an ACK arrives for the missing segment, TCP enters the congestion-avoidance state after deflating cwnd. If a timeout event occurs, fast recovery transitions to the slow-start state after performing the same actions as in slow start and congestion avoidance: The value of cwnd is set to 1 MSS, and the value of ssthresh is set to half the value of cwnd when the loss event occurred.