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 5.Describe four different scenarios when an IP router would drop packets that arrive on one of its interfaces. 1) ACL (Access Control List) policy instructs the router to drop it. This is a "rule" configured intentionally by the router's administrator to control traffic. 2) The packed fails an RPF (Reverse Path Forwarding) check. This is when a packet arrives with a source address that doesn't make sense, and it appears like an attempt at malicious activity. 3) The input queue is full. This is basically a symptom of the router being overloaded. 4) The packet fails a basic sanity check, such as TTL (Time to Live) expiring, or failing a CRC (Cyclic Redundancy Check), although that is actually a Layer 2 function, not IP. 5) The packet has a requirement that the router is unable to accomodate. Examples of this would be a non-UDP encapsulated IPSec packet whos destination address requires translation, or a multicast packet arriving at a router that is not configured for multicast routing. 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: Virtual circuit networks most certainly need this capability in order to route connection setup packets from an arbitrary source to an arbitrary destination. 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? If ‘N’ TCP connections uses a bottleneck link with transmission rate R bps, then each TCP connection gets equal share(R/N) of available bandwidth(R). That is, each TCP connection sends their files at the rate of R/N bps. Always TCP aims at the fair share in the connection. That is approximately half in the available transmission rate to each of the connections. Here, two TCP connections are passing through a bottleneck link. TCP shares R/2 bps transmission rate to each TCP connection. Therefore, the transmission rate will be 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 106 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 9. “A datagram cannot be larger than the MTU of a network over which it is sent.” Is the statement true or false? Explain with the help of a suitable example. 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. 13. A large number of consecutive IP address are available starting at 192.16.0.0. Suppose that four organizations, A, B, C, and D, request 4000, 2000, 500, 1000 and 7000 addresses, respectively, and in that order. For each of these, give the first IP address assigned, the last IP address assigned, and the mask in the w.x.y.z/s notation. IP addresses will be allocated in blocks of power of 2. So the four organizations will be allocated IPs as A-4096, B-2048, C-4096 and D-8192. Remaining unused IPs are wasted. IPs will be allocated to the organizations contiguously A has 212212 hosts. So lower order 12 bits will denote host ID and higher order 3212=20 bits denotes network ID A's first IP=198.16.0.0 (Host IP part contains all 0s) A's last IP=11000110.00010000.00001111.11111111 (Host ID part contains all 1s =198.16.15.255 B's Mask=198.16.15.255 _____________________________________________________________________ B has 211211 hosts. So lower order 11 bits will denote host ID and higher order 3211=21 bits denotes network ID B's first IP=198.16.16.0 B's last IP=11000110.00010000.00010111.11111111=198.16.23.255 B's Mask=198.16.16.0/21 _____________________________________________________________________ C has 212212 hosts. So lower order 12 bits will denote host ID and higher order 3212=20 bits denotes network ID C's first IP=198.16.24.0 C's last IP=11000110.00010000.00011111.11111111=198.16.31.255 C's Mask=198.16.24.0/20 _____________________________________________________________________ D has 213213 hosts. So lower order 13 bits will denote host ID and higher order 3213=19 bits denotes network ID D's first IP=198.16.32.0 D's last IP=11000110.00010000.00111111.11111111=198.16.63.255 D's Mask=198.16.32.0/19 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? It is known that the boundary between the router and its link is called as interface. Also, the boundary between the host and the physical link is also called an interface. Consider that there are three routers between source host and destination host as shown below: • The numbers in the above diagram represents the interfaces. • Since the fragmentation functionality is ignored, there is no need to split the IP datagram into fragments. • Source forwards the IP datagram to link interface 1. • First router(R1) receives the datagram from interface 2 and outputs the datagram to interface 3. • Second router(R2) receives the datagram from interface 4 and outputs the datagram to interface 5. • Third router(R3) receives the datagram from interface 6 and outputs the datagram to interface 7. • Destination host receives the IP datagram from the link interface 8. Thus, the original IP datagram that is sent from source to destination will travel over the all eight interfaces that are exist between source and destination. If you found this answer helpful, please upvote and share with other students in your network. 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? Yes they can be aggregated. 57.6.96.0/21=57.6.01100000.057.6.96.0/21=57.6.01100000.0 57.6.104.0/21=57.6.01101000.057.6.104.0/21=57.6.01101000.0 57.6.112.0/21=57.6.01110000.057.6.112.0/21=57.6.01110000.0 57.6.120.0/21=57.6.01111000.057.6.120.0/21=57.6.01111000.0 We can see that 57.6.01157.6.011 part is common in all the IP addresses. Thus we can do a supernetting here and keep a supernet address as :- 57.6.96.0/19 17. 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. 18. The Protocol field used in the IPv4 header is not present in the fixed IPv6 header. Why not? The Protocol field tells the destination host which protocol handler to give the IP packet to. Intermediate routers do not need this information, so it is not needed in the main header. Actually, it is there, but disguised. The Next header field of the last (extension) header is used for this purpose. 19. 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. 20. 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. 21. 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 23. 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? Source port number y and destination port number x. 24. Describe why an application developer might choose to run an application over UDP rather than TCP. The TCP’(transmission control protocol) sending rate at times of bottleneck. can choke the application’s 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): 25. Why is it that voice and video traffic is often sent over TCP rather than UDP in today’s Internet? (Hint: The answer we are looking for has nothing to do with TCP’s congestioncontrol mechanism.) 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. 26. Is it possible for an application to enjoy reliable data transfer even when the application runs over UDP? If so, how? Yes, it is possible for an application to have reliable data transfer when the application runs over UDP. • It can be done if reliability is built into applications itself. • It requires some groundwork and debugging to be done. • Adding acknowledgment and retransmission mechanisms is a way for having reliable data transfer. By doing so, the application processes can communicate reliably without being subjected to the transmission rate constraints imposed by TCP’s congestion control mechanisms. • Designers of IP telephony and IP (internet protocol) video conference applications run their applications over UDP. 27. Suppose a process in Host C has a UDP socket with port number 6789. Suppose both Host A and Host B each send a UDP segment to Host C with destination 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, both the segments that are sent by Host A and Host B will be directed to the same socket at Host C because: • Host C has a UDP socket with port number 6789. • Host A as well as Host B will sent UDP segment to Host C with destination port number as 6789. • Both the hosts A and B use the same destination port number. The process at Host C can know the origins of the UDP segment. This is because: • For each received segment, at the socket interface, the IP addresses are provided by the operating system. • These IP addresses provided by the operating system determine the origins of the individual segments. • Host C can identify the sockets which contains values non-identical source addresses. • Host C checks its datagram for its fields , it contains the four fields which gives the data and finds which socket is send those data. 28. 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. 29. Host A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 126. Suppose Host A then sends two segments to Host B back-to-back. The first and second segments contain 80 and 40 bytes of data, respectively. In the first segment, the sequence number is 127, the source port number is 302, and the destination port number is 80. Host B sends an acknowledgment whenever it receives a segment from Host A. a. In the second segment sent from Host A to B, what are the sequence number, source port number, and destination port number? b. If the first segment arrives before the second segment, in the acknowledgment of the first arriving segment, what is the acknowledgment number, the source port number, and the destination port number? c. If the second segment arrives before the first segment, in the acknowledgment of the first arriving segment, what is the acknowledgment number? d. Suppose the two segments sent by A arrive in order at B. The first acknowledgment is lost and the second acknowledgment arrives after the first timeout interval. Draw a timing diagram, showing these segments and all other segments and acknowledgments sent. (Assume there is no additional packet loss.) For each segment in your figure, provide the sequence number and the number of bytes of data; for each acknowledgment that you add, provide the acknowledgment number. Given data: Host A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 126. The first and second segments contain 80 and 40 bytes of data, respectively. The first segment of sequence number is 127. The source port number is 302. The destination port number is 80 a) Sequence number = first segment of sequence number+ destination port number =127+80 =207 So, sequence number=207 Source port number = 302 Destination port number= 80 b) Acknowledgement number= 207 Source port number = 80 Destination port number= 302 c) Acknowledgement number=127 30. Host A and B are directly connected with a 100 Mbps link. There is one TCP connection between the two hosts, and Host A is sending to Host B an enormous file over this connection. Host A can send its application data into its TCP socket at a rate as high as 120 Mbps but Host B can read out of its TCP receive buffer at a maximum rate of 50 Mbps. Describe the effect of TCP flow control. The effect of TCP flow control: If host A faster tahn host B sending data then buffer fill up is start. If the buffer filled completely then send data from host B to host A untile the remove buffer data and intimate to continue sending data or not. Then filled again buffer then repeat the process from host A to host B. 31. Compare GBN, SR, and TCP (no delayed ACK). Assume that the timeout values for all three protocols are sufficiently long such that 5 consecutive data segments and their corresponding ACKs can be received (if not lost in the channel) by the receiving host (Host B) and the sending host (Host A) respectively. Suppose Host A sends 5 data segments to Host B, and the 2nd segment (sent from A) is lost. In the end, all 5 data segments have been correctly received by Host B. a. How many segments has Host A sent in total and how many ACKs has Host B sent in total? What are their sequence numbers? Answer this question for all three protocols. b. If the timeout values for all three protocol are much longer than 5 RTT, then which protocol successfully delivers all five data segments in shortest time interval? a) b) If the timeout values for all three protocol are much longer than 5 RTT, then TCP protocol successfully delivers all five data segments in shortest time interval. The reason is that TCP uses fast retransmit without waiting time. 32. We have said that an application may choose UDP for a transport protocol because UDP offers finer application control (than TCP) of what data is sent in a segment and when. a. Why does an application have more control of what data is sent in a segment? b. Why does an application have more control on when the segment is sent? a) In TCP protocols: If the send the segment application then data is not assigned directly. Then data store in buffer then decide to connect the segement. So,the application does not have more control to sent data in the TCP protocol. For UDP protocols: If the send the segment application then data is assigned directly Then the data in the segment is then sent. So, the application has more control to sent data in the UDP protocol. In TCP protocol cannot expect the time between sent data and arrived data. So, an application does not have more control on when the segment is sent in TCP. n TCP protocol can expect the time between sent data and arrived data. So, an application have more control on when the segment is sent in TCP. b) 33. Consider transferring an enormous file of L bytes from Host A to Host B. Assume an MSS of 936 bytes. a. What is the maximum value of L such that TCP sequence numbers are not exhausted? Recall that the TCP sequence number field has 4 bytes. b. For the L you obtain in (a), find how long it takes to transmit the file. Assume that a total of 66 bytes of transport, network, and data-link header are added to each segment before the resulting packet is sent out over a 155 Mbps link. Ignore flow control and congestion control so A can pump out the segments back to back and continuously. a) The size of TCP sequence number field = 4 bytes =4*8 bits =32 bits. So, the sequence numbers of bits are 232 The maximum file size sent from Host A to Host B representable by 232 34. Suppose a process in Host C has a UDP socket with port number 6789. Suppose both Host A and Host B each send a UDP segment to Host C with destination 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? 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.