Escolar Documentos
Profissional Documentos
Cultura Documentos
Assignment 05-Solution
Q#01
a) Consider the 7-bit generator, G=10011, and suppose that D has the
value1010101010. What is the value of R?
b) Recall that when there are N active nodes, the efficiency of slotted
ALOHAis N* p* (1 p)N1. Find the value of p that maximizes this
expression.
c) Using the value of p found in (b), find the efficiency of slotted ALOHA
byletting N approach infinity. Hint: (1 1/N)Napproaches 1/e as
Napproaches infinity.
Solution:
a)
b)
c)
Q#02
a) Consider three LANs interconnected by two routers, as shown in Figure
below.
I. Assign IP addresses to all of the interfaces. For Subnet 1 use
addresses ofthe form 192.168.1.xxx; for Subnet 2 uses addresses
of the form192.168.2.xxx; and for Subnet 3 use addresses of the
form 192.168.3.xxx.
II.
Assign MAC addresses to all of the adapters.
III. Consider sending an IP datagram from Host E to Host B. Suppose
all ofthe ARP tables are up to date. Enumerate all the steps, as
done for thesingle-router example in Section 5.4.1.
IV.
Repeat (III), now assuming that the ARP table in the sending host
is empty(and the other tables are up to date).
Solution:
I & II )
III)
1. Forwarding table in E determines that the datagram should be
routed to interface
192.168.3.002.
b) Consider the fig below. Now we replace the router between subnets 1 and
2with a switch S1, and label the router between subnets 2 and 3 as R1.
I.
II.
III.
Solution
I).
No. E can check the subnet prefix of Host Fs IP address, and then learn
that F is on the same LAN. Thus, E will not send the packet to the
default router R1.
Ethernet frame from E to F:
Source IP = Es IP address
Destination IP = Fs IP address
Source MAC = Es MAC address
Destination MAC = Fs MAC address
II).
No, because they are not on the same LAN. E can find this out by
checking Bs IP address.
Ethernet frame from E to R1:
Source IP = Es IP address
Destination IP = Bs IP address
Source MAC = Es MAC address
Destination MAC = The MAC address of R1s interface connecting to
Subnet 3.
III).
Switch S1 will broadcast the Ethernet frame via both its interfaces as
the received ARP frames destination address is a broadcast address.
And it learns that A resides on Subnet 1 which is connected to S1 at
the interface connecting to Subnet 1. And, S1 will update its forwarding
table to include an entry for Host A.
Yes, router R1 also receives this ARP request message, but R1 wont
forward the message to Subnet 3. B wont send ARP query message
asking for As MAC address, as this address can be obtained from As
query message.
Once switch S1 receives Bs response message, it will add an entry for
host B in its forwarding table, and then drop the received frame as
destination host A is on the same interface as host B (i.e., A and B are
on the same LAN segment).
c) Consider above Figure. Provide MAC addresses and IPaddresses for the
interfaces at Host A, both routers, and Host F. Suppose HostA sends a
datagram to Host F. Give the source and destination MAC addressesin the
frame encapsulating this IP datagram as the frame is transmitted (i) from
A to the left router, (ii) from the left router to the right router, (iii) from
theright router to F. Also give the source and destination IP addresses in
the IPdatagram encapsulated within the frame at each of these points in
time.
Solution
i)
From A to left router: Source MAC address: 00-00-00-00-00-00
Destination MAC address: 22-22-22-22-22-22
Source IP: 111.111.111.001
Destination IP: 133.333.333.003
ii)
From the left router to the right router: Source MAC address: 33-33-3333-33-33
Destination MAC address: 55-55-55-55-55-55
Source IP: 111.111.111.001
Destination IP: 133.333.333.003
iii)
From the right router to F: Source MAC address: 88-88-88-88-88-88
Destination MAC address: 99-99-99-99-99-99
Source IP: 111.111.111.001
Destination IP: 133.333.333.003
Q#03
a) Recall that with the CSMA/CD protocol, the adapter waits K * 512 bit times
aftera collision, where K is drawn randomly. For K = 100, how long does
the adapterwait until returning to Step 2 for a 10 Mbps broadcast
channel? For a 100 Mbpsbroadcast channel?
b) Suppose nodes Aand B are on the same 10 Mbps broadcast channel, and
thepropagation delay between the two nodes is 325 bit times. Suppose
CSMA/CDand Ethernet packets are used for this broadcast channel.
Suppose node Abeginstransmitting a frame and, before it finishes, node B
begins transmitting a frame.Can Afinish transmitting before it detects that
B has transmitted? Why or whynot? If the answer is yes, then Aincorrectly
believes that its frame was successfullytransmitted without a collision.
Hint: Suppose at time t = 0 bits, Abeginstransmitting a frame. In the worst
case, Atransmits a minimum-sized frame of512 + 64 bit times. So Awould
finish transmitting the frame at t = 512 + 64 bittimes. Thus, the answer is
no, if Bs signal reaches Abefore bit time t = 512 + 64bits. In the worst
case, when does Bs signal reach A?
Solution:
a)
b)
Q#04
a) Consider Figure 5.15. Suppose that all links are 100 Mbps. What is the
maximumtotal aggregate throughput that can be achieved among the 9
hosts and2 servers in this network? You can assume that any host or
server can sendto any other host or server. Why?
b) Suppose the three departmental switches in Figure 5.15 are replaced
byhubs. All links are 100 Mbps. Now answer the questions posed in part a.
c) Suppose that all the switches in Figure 5.15 are replaced by hubs. All
linksare 100 Mbps. Now answer the questions posed in part a.
Solution:
If all the 11=9+2 nodes send out data at the maximum possible rate of
100 Mbps, a total aggregate throughput of 11*100 = 1100 Mbps is
possible.
b) Each departmental hub is a single collision domain that can have a
maximum throughput of 100 Mbps. The links connecting the web
server and the mail server has a maximum throughput of 100 Mbps.
Hence, if the three collision domains and the web server and mail
server send out data at their maximum possible rates of 100 Mbps
each, a maximum total aggregate throughput of 500 Mbps can be
achieved among the 11 end systems.
c) All of the 11 end systems will lie in the same collision domain. In this
case, the maximum total aggregate throughput of 100 Mbps is possible
among the 11 end systems.
a)
Q#05
Consider the operation of a learning switch in the context of a networkin
which 6 nodes labeled A through F are star connected into an
Ethernetswitch. Suppose that (i) B sends a frame to E, (ii) E replies with
aframe to B, (iii) A sends a frame to B, (iv) B replies with a frame to A.
Theswitch table is initially empty. Show the state of the switch table
beforeand after each of these events. For each of these events, identify the
link(s)on which the transmitted frame will be forwarded, and briefly justify
youranswers.
Solution:
Q#06
Solution:
Q#07
a) Consider the MPLS network shown in Figure 5.29, and suppose that
routersR5 and R6 are now MPLS enabled. Suppose that we want to
perform trafficengineering so that packets from R6 destined for A are
switched to A viaR6-R4-R3-R1, and packets from R5 destined for A are
switched viaR5-R4-R2-R1. Show the MPLS tables in R5 and R6, as well
as the modifiedtable in R4, that would make this possible.
Solution:
Solution:
Q#08
Suppose you walk into a room, connect to Ethernet, andwant to download a
Web page. What are all the protocol steps that take place,starting from
powering on your PC to getting the Web page? Assume there isnothing in our
DNS or browser caches when you power on your PC. (Hint:the steps include
the use of Ethernet, DHCP, ARP, DNS, TCP, and HTTP protocols.)Explicitly
indicate in your steps how you obtain the IP and MACaddresses of a gateway
router.
Solution:
(The following description is short, but contains all major key steps and key
protocols involved.)
Your computer first uses DHCP to obtain an IP address. You computer first
creates a special IP datagram destined to 255.255.255.255 in the DHCP
server discovery step, and puts it in a Ethernet frame and broadcast it in the
Ethernet. Then following the steps in the DHCP protocol, you computer is
able to get an IP address with a given lease time.