1. Give three examples of protocol parameters that might be negotiated when a connection is set up The negotiation can be on setting the window size, maximum packet size (MTU or MSS), and timer values. 3.A computer on a 6-Mbps network is regulated by a token bucket. The token bucket is filled at a rate of 1 Mbps. It is initially filled to capacity with 8 megabits. How long can the computer, transmit at the full 6 Mbps? let T be the taken to transmit full 6Mbps then maximum number of capacity of bucket in Tsec is c+rT. then in 1sec=c+rT/T=maximum capacity(M) therefore,T=c/M-r =8Mbps/6Mbps-1Mbps =1.6sec,Ans 4. Is TCP checksum necessary or could TCP allow IP to checksum the data TCP checksums are identical to UDP checksums, with the exception that checksums are mandatory with TCP (instead of being optional, as they are with UDP). Furthermore, their usage is mandatory for both the sending and receiving systems. 6. Datagram subnets route each packet as a separate unit, independent of all others. Virtualcircuit subnets do not have to do this, since each data packet follows a predetermined route. Does this observation mean that virtual-circuit subnets do not need the capability to route isolated packets from an arbitrary source to an arbitrary destination? Explain your answer Answer: No, it does not. In virtual-circuit subnets, routers have to route packets based on the following pieces of information: - Virtual-Circuit number - Incoming line Each packet contains a Virtual-Circuit number and the incoming line identification is, of course, known by the router. Finally, to re-estate the observation, virtual-circuit subnets do need the capability to route isolated packets from an arbitrary incoming line (which is well know by the router) and with an arbitrary circuit number (information carried in the packet). That means, knowing the original source and the final destination is not required. 7. Suppose two TCP connections are present over some bottleneck link of rate R bps. Both connections have a huge file to send (in the same direction over the bottleneck link). The transmissions of the files start at the same time. What is the transmission rate that the TCP would like to give to each of the connections? Consider data, Two TCP connections are present over some bottleneck link of rate R bps. Both connections have a huge file to send. transmissions of the files start at the same time. Transmission rate would TCP like to give to each of the connections= R/2. 8. Consider the following design problem concerning implementation of virtual-circuit service. If virtual circuits are used internally to the subnet, each data packet must have a 3-byte header and each router must tie up 8 bytes of storage for circuit identification. If datagrams are used internally, 15-byte headers are needed, but no router table space is required. Transmission capacity costs 1 cent per 10 6 bytes, per hop. Very fast router memory can be purchased for 1 cent per byte and is depreciated over two years, assuming a 40-hour business week. The statistically average session runs for 1000 sec, in which time 200 packets are transmitted. The mean packet requires four hops. Which implementation is cheaper, and by how much? mean packet requires 4 hops means 3 router in between the source and destination. header size =3 bytes for each packet so overhead for 200 packets=200*3=600 bytes routers have 8 bytes for circuit identification means total=8*3=24 bytes so total overhead=600+24=624 bytes let the data size=D,so packet size=(D+3) bytes transmission cost =1 cent per 10^6 bytes per hop=>transmission cost for 1 Byte,per hop=10^-6 cent transmission cost for 1 packet=(D+3)*number of hops*transmission cost of 1 hop =>(D+3)*4*10^-6 cents so total costs=200*(D+3)*4*10^-6 cents=>8*(D+3)*10^-4 cents in the second case header size is 15 bytes for each packet so total header overhead=200*15=3000 bytes no router table space is required means space=0 byte so total overhead=3000 bytes cost for 1 packet=(D+15)*4*10^-6 cents =>for 200 packets=>200*(D+15)*4*10^-6 cents=8*(D+15)*10^-4 cents so from above discussion we can say first one implementation is cheaper 12. Suppose nodes A, B, and C each attach to the same broadcast LAN (through their adapters). If A sends thousands of frames to B with each frame addressed to the LAN address of B, will C's adapter process these frames? If so, will C's adapter pass the IP datagram’s in these frames to C (i.e., the adapter's parent node)? How will your answers change if A sends frames with the LAN broadcast address? C’s adapter will process the frames, but the adapter will not pass the datagrams up the protocol stack. If the LAN broadcast address is used, then C’s adapter will both process the frames and pass the datagrams up the protocol stack.. 14. Suppose there are three routers between a source host and destination host. Ignore fragmentation. An IP datagram sent from the source host to the destination host will travel over how many interfaces? How many forwarding table will be indexed to move the datagram from the source to destination? An IP datagram sent from the source host to the destination host will travel over 8 interfaces. 3 forwarding tables will be indexed to move the datagram from the source to the destination 15. A router has just received the following new IP addresses: 57.6.96.0/21, 57.6.104.0/21, 57.6.112.0/21, and 57.6.120.0/21. If all of them use the same outgoing line, can they be aggregated? If so, to what? If not, why not? They can be aggregated into 57.6.96.0/19. 17. Consider sending a 2400-byte datagram into a link that has an MTU of 700 bytes. Suppose the original datagram is stamped with the identification number 422. How many fragments are generated? What are the values in the various fields in the IP datagram(s) generated related to fragmentation? datagram size is 2400 bytes including ip header size.so only payload size is 2380bytes. MTU 700B also includes ip header.allowable size 700-20=680B. 1)first fragment is of size 680B.offset is (0-84) 2)second fragment is also size 680B.it again fragmented because it is greater than MTU size.MTU ip header,allowable datasize is 380B. i)first fragment size in second one is 376B.offset is (85-131) ii)second fragment size in second one is 304B.offset is(132-169) 3)third fragment is also size 680B. offset is (170-254) 4)fourth fragment is of size 344B.offset is (255-297).it includes 4 padding bits. so total 5 fragments . 18. Most IP datagram reassembly algorithms have a timer to avoid having a lost fragment tie up reassembly buffers forever. Suppose that a datagram is fragmented into four fragments. The first three fragments arrive, but the last one is delayed. Eventually, the timer goes off and the three fragments in the receiver's memory are discarded. A little later, the last fragment stumbles in. What should be done with it? As far as the receiver is concerned, this is a part of new datagram, since no other parts of it are known. It will therefore be queued until the rest show up. If they do not, this one will time out too. 19. What is the fastest line speed at which a host can blast out 1500-byte TCP payloads with a 120-sec maximum packet lifetime without having the sequence numbers wrap around? Take TCP, IP, and Ethernet overhead into consideration. Assume that Ethernet frames may be sent continuously. Case 1: Assume that there is no segmentation needed. IP header = 20 bytes TCP header = 20 bytes TCP payload can be 1500 bytes. Ethernet header = 8 + 6 + 6 + 2 bytes Ethernet checksum = 4 bytes Therefore, the size of first frame is 1566 bytes. The time to live = 120 sec. The length of sequence number = 32 bits. Therefore, the maximum number of bytes that a host can send out without wrapping around the sequence number is 2 ^32/ 1500. Since Ethernet frames may be sent continuously, the maximum line speed, V can be: V <= 1566 * 8 * (2^32 / 1500) (bits)/120 (sec) = 298929723.8016 bits/sec = 298.9 Mbps The maximum line speed is 298.9 Mbps. Case 2: Since the maximum size of Ethernet payload is 1500 bytes, the TCP payload needs to be segmented as followings. Frame 1: IP header = 20 bytes TCP header = 20 bytes Since the maximum Ethernet Payload is 1500 bytes including IP header and TCP header, TCP payload can be 1460 bytes. Ethernet header = 8 + 6 + 6 + 2 bytes Ethernet checksum = 4 bytes Therefore, the size of first frame is 1526 bytes Frame 2: IP header = 20 bytes TCP header = 20 bytes TCP payload remained after segmentation = 40 bytes (= 1500 – 1460 bytes) Ethernet header = 8 + 6 + 6 + 2 bytes Ethernet checksum = 4 bytes Therefore, the size of second frame is 106 bytes The time to live = 120 sec. The length of sequence number = 32 bits. Therefore, the maximum number of bytes that a host can send out without wrapping around the sequence number is 2 ^32/ 1500. Since Ethernet frames may be sent continuously, the maximum line speed, V can be: V <= (1526 + 106) * 8 * (2^32 / 1500) (bits)/120 (sec) = 1632 * 8 * (2^32 /1500) (bits)/ 120 (sec) = 311528294.5365 bits/sec = 311.5 Mbps The maximum line speed is 311.5 Mbps. 20. When the IPv6 protocol is introduced, does the ARP protocol have to be changed? If so, are the changes conceptual or technical? There are no changes conceptually. Technically, the IP addresses requested are now bigger, so bigger fields are needed. 21. Suppose Host A sends two TCP segments back to back to Host B over a TCP connection. The first segment has sequence 200; the second segment has sequence number 2024. a. How much data is there in the first segment? b. Suppose that the first segment is lost but the second segment arrives at B. In the acknowledgement that Host B send to Host A, what will be the acknowledgement 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. 22. Consider the effect of using slow start on a line with a 10-msec round-trip time and no congestion. The receive window is 24 KB and the maximum segment size is 2 KB. How long does it take before the first full window can be sent? SolutionGiven Receiver window size = 24 KB Maximum Segment Size = 2 KB RTT = 10 msec Receiver Window SizeReceiver window size in terms of MSS = Receiver window size / Size of 1 MSS = 24 KB / 2 KB = 12 MSS Slow Start ThresholdSlow start Threshold = Receiver window size / 2 = 12 MSS / 2 = 6 MSS Slow Start Phase- Window size at the start of 1st transmission = 1 MSS Window size at the start of 2nd transmission = 2 MSS Window size at the start of 3rd transmission = 4 MSS Window size at the start of 4th transmission = 6 MSS Since the threshold is reached, so it marks the end of slow start phase. Now, congestion avoidance phase begins. Congestion Avoidance Phase Window size at the start of 5th transmission = 7 MSS Window size at the start of 6th transmission = 8 MSS Window size at the start of 7th transmission = 9 MSS Window size at the start of 8th transmission = 10 MSS Window size at the start of 9th transmission = 11 MSS Window size at the start of 10th transmission = 12 MSS From here, Window size at the end of 9th transmission or at the start of 10th transmission is 12 MSS. Thus, 9 RTT’s will be taken before the first full window can be sent. So, Time taken before the first full window is sent = 9 RTT’s = 9 x 10 msec = 90 msec 24. Consider a TCP connection between Host A and Host B. Suppose that the TCP segments traveling from Host A to Host B have source port number x and destination port number y. What are the source and destination port numbers for the segments traveling from Host B to Host A? The source and destination port numbers for the segments travelling from Host B to Host A: Source port number y and destination port number x. 25. Describe why an application developer might choose to run an application over UDP rather than TCP. Transmission Control Protocol (TCP): Transmission Control Protocol is a connection oriented protocol that establishes the connections between the computers before sending the data. User Datagram Protocol (UDP): User Datagram Protocol is a connectionless protocol in which data is sent to destination computer without checking whether the system is ready to receives the data or not. The reasons why an application developer chooses to run an application over UDP rather than TCP are as follows: • At the time of congestion, the TCP’s congestion control suffocates the application’s sending rate. Thus, many application developers don’t want their applications to use TCP’s congestion control. • When application runs over UDP, many more active clients can be supported by the server which is devoted to a particular application. • Even though data transfer by TCP is reliable, some applications do not need reliable TCP data transfer. Therefore, application developers prefer UDP. • Generally, designers of IP (internet protocol) video conference applications and IP telephony run their applications over UDP to avoid TCP congestion control. 26. Ten thousand airline reservation stations are competing for the use of a single slotted ALOHA channel. The average station makes 18 requests/hour. A slot is 125 µsec. What is the approximate total channel load Total No. of stations=10,000 Average requset/station=18 req/hr (1req/200sec) Total No of requests=18*1000=18000 req/hr Or 50 requests/sec Each terminal makes one request every 200 sec, for a total load of 50 requests/sec. Hence G = 50/8000 = 1/160.