--------------------------------------------------------------------------- Mohamed G. Gouda CS 356 Spring 2019 Homework 2 --------------------------------------------------------------------------- (1) Draw the protocol hierarchy in a host and show the message exchanges between the different protocol layers in this hierarchy. --------------------------------------------------------------------------- (2) Recall that a RED queue is specified using three parameters: probability p, min Bytes, and max Bytes. Assume that the length of each packet is at most max Bytes. What is the maximum number of bytes that can be stored in this queue at any one time. Explain your answer. --------------------------------------------------------------------------- (3) Let R be a router that has four interfaces: First interface connects R to a host whose IP address is 250.71.4.0 Second interface connects R to a host whose IP address is 250.71.4.1 Third interface connects R to a host whose IP address is 250.71.4.2 Fourth interface connects R to the rest of the Internet The routing table of R is as follows: -------------------------------------------------| | If IP address of dst | then forward pkt to | | of a pkt is ... | interface ... of R | |------------------------------------------------| | | | | | | Complete this description of the routing table of R ---------------------------------------------------------------------------- Solutions: ---------------------------------------------------------------------------- (1) The required protocol hierarchy and message exchanges are shown in slide 9 entitled "Msg Encapsulation". ---------------------------------------------------------------------------- (2) This RED queue is empty at its initial state S1. At state S1, the queue can admit any packet of length max. After admitting a packet of length max, the queue becomes at state S2. At state S2, the queue can admit any packet of length max with probability P. After admitting a packet of legth max at state S2, the queue becomes at a state S3. At state S3, the queue can't admit any more packets. Thus, the maximum number of bytes that can be stored in this queue equals the number of bytes that are stored in the queue at state S3 which is (2*max) Bytes. --------------------------------------------------------------------------- (3) The complete routing table of R is as follows: -------------------------------------------------| | If IP address of dst | then forward pkt to | | of a pkt is ... | interface ... of R | |------------------------------------------------| | | | | 250.71.4.0 | 0 | | 250.71.4.1 | 1 | | 250.71.4.2 | 2 | | other | 3 | |------------------------------------------------| ----------------------------------------------------------------------------