0% found this document useful (0 votes)
34 views8 pages

Homework 3 Solution

Uploaded by

Ayalneh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views8 pages

Homework 3 Solution

Uploaded by

Ayalneh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

ECE374:

 Homework  3                                                                                                                                                                                                                                          1  
 
Homework  3  assignment  for  ECE374  
Posted:  03/14/13  
Due:  03/26/14  
 
 
Note:  In all written assignments, please show as much of your work as you can. Even if
you get a wrong answer, you can get partial credit if you show your work. If you make a
mistake, it will also help the grader show you where you made a mistake.  
 
 
Problem  1  (20  Points):  
For  this  problem  it  is  your  task  to  create  a  network  that  consists  of  3  routers.  Each  
router  has  3  interfaces.  On  each  router,  2  of  these  interfaces  are  connected  to  
another  (distinct)  router  and  one  is  connect  to  a  host.    
a. Draw  the  resulting  topology  of  that  network.  
b. How  many  subnets  does  this  network  contain?  
c. Assign  an  IP  subnet  address  to  each  of  these  subnets  such  that  at  maximum  
of  30  hosts  can  be  connected  to  each  subnet.  
d. Your  overall  topology  contains  12  interfaces.  Assign  a  valid  IP  address  to  
each  of  these  interfaces.  
e. Complete  the  table  below  by  entering  the  routing  information  that  is  
required  in  router  A’s  forwarding  table  to  route  packets  to  the  host  
connected  to  from  host  1  to  hosts  2  and  3  on  the  respective  shortest  paths.  
(Use  the  ip  addresses  you  assigned  in  d.  to  identify  the  outgoing  interfaces.)  
 
 
Network  Address   Outgoing  Interface  
   
   
 
 
Solution:  
ECE374:  Homework  1                                                                                                                                                                                                                                          2  
 
192.168.1.130/27

Host B

192.168.1.129/27
192.168.1.128/27

192.168.1.34/27 192.168.1.66/27
192.168.1.32/27
C 192.168.1.64/27
192.168.1.162/27 192.168.1.33/27 192.168.1.65/27 192.168.1.98/27

Host A Host C
192.168.1.160/27 192.168.1.0/27 192.168.1.96/27
A B

192.168.1.2/27
192.168.1.1/27 192.168.1.97/27

a. 192.168.1.161/27  
b. 6  
c. See  figure  
d. See  figure  
e.  
Network  Address   Outgoing  Interface  
192.168.1.128/27   192.168.1.33/27  
192.168.1.96/27   192.168.1.1/27  
 
 
 
Problem  2  (25  Points):  
For  this  problem  you  should  familiarize  yourself  with  Figure  1  first.    Now  assume  
that  in  the  network  shown  in  Figure  1  two  parallel  TCP  transmissions  are  performed.  
TCP1  is  a  transmission  between  Source  A  and  Sink  A  that  uses  TCP  Tahoe.  TCP2  is  a  
transmission  between  Source  B  and  Sink  B  that  uses  TCP  Reno.  Initial  ssthresh  for  
both  TCP  transmissions  is  set  to  32.  In  this  specific  scenario  no  additional  delay  
through  forwarding  is  introduced.  Thus,  the  RTT  is  only  composed  of  the  sums  of  
the  delay  indicated  on  each  link,  times  two.  
 
a. For  the  TCP  1  transmission,  draw  the  resulting  congestion  window,  assuming  
that  a  packet  loss  (triple  duplicate  ACKs)  is  detected  at  time  t=900ms  in.  
b. For  the  TCP  2  transmission,  draw  the  resulting  congestion  window,  assuming  
that  a  packet  loss  (triple  duplicate  ACKs)  is  detected  at  time  t=650ms  in.  
c. Describe  the  benefit  of  TCP  Reno  over  TCP  Tahoe.  
d. In  general,  explain  the  purpose  of  the  receiver-­‐advertised  window  in  TCP.  
 
 
ECE374:  Homework  3                                                                                                                                                                                                                                          3  
 
 

 
 
 
Figure  1  Network  layout  for  problem  5.  
 
 
Solution:  
a. Figure  below  also  includes  solution  for  b.  
b. Figure  below  
c. Reno  recovers  faster  from  packet  loss  than  Tahoe  
d. It  allows  the  receiver  to  signal  the  sender  how  much  unacknowledged  data  
can  be  in  flight.  
 
ECE374:  Homework  1                                                                                                                                                                                                                                          4  
 

 
 
Problem  3  (20  Points):  
Consider  the  network  setup  shown  in  Figure  2.  Suppose  that  the  ISP  instead  of  
138.76.29.7  assigns  the  router  the  address  24.34.112.235  and  that  the  network  
address  of  the  home  network  is  192.168.96/27.  
a. Assign  addresses  to  all  interfaces  in  the  home  network.  
b. Suppose  each  host  has  two  ongoing  TCP  connections,  all  to  port  80  at  host  
128.119.40.86.  Provide  the  six  corresponding  entries  in  the  NAT  translation  
table.  
c. With  NAT,  hosts  on  the  outside  cannot  connect  to  a  server  running  locally  
behind  the  NAT  gateway,  since  the  only  are  aware  of  the  public  IP  of  the  NAT  
gateway  and  don’t  know  the  information  stored  in  the  NAT  translation  table.  
Based  on  the  Skype  example,  explain  how  this  limitation  can  be  
circumvented.  
 
ECE374:  Homework  3                                                                                                                                                                                                                                          5  
 

 
Figure  2  NAT  

Solution:  
e. Home  addresses:  192.168.96.1,  192.168.96.2,  192.168.96.3  with  the  router  
interface  being  192.168.96.4  
f. NAT Translation Table
WAN Side LAN Side
128.119.40.86, 4000 192.168.1.97, 3345
128.119.40.86, 4001 192.168.1.97, 3346
128.119.40.86, 4002 192.168.1.98, 3445
128.119.40.86, 4003 192.168.1.98, 3446
128.119.40.86, 4004 192.168.1.99, 3545
128.119.40.86, 4005 192.168.1.99, 3546
g. In  the  case  of  skype,  a  host  behind  a  NAT  always  opens  a  connection  to  a  so-­‐
called  super  nodes.  The  super  node  can  now  use  this  open  TCP  connection  to  
communicate  with  the  node  behind  the  NAT.  Any  other  node  can  now  use  the  
super  node  as  a  gateway  to  communicate  with  the  node  behind  the  NAT.  
 
Problem  4  (15  Points):  
Figure  3  shows  a  scenario  in  which  a  laptop  is  connected  to  a  network  and  the  
laptop  uses  DHCP  to  obtain  an  IP  address.  
a. What  transport  protocol  is  used  by  DHCP?  What  is  the  Ethernet  destination  
address  of  the  MAC  frame  that  is  sent  by  the  laptop?  What  is  the  Ethernet  
destination  address  of  the  DHCP  ACK  that’s  send  from  the  server  back  to  the  
client?  What  additional  information  besides  the  client’s  IP  address  can  the  
server  send  in  the  ACK?  
b. Assuming  DHCP  is  using  an  unreliable  transport  protocol,  what  mechanism  is  
used  in  this  case  to  make  client  and  server  aware  of  packet  losses?  
c. Does  the  DHCP  server  have  to  be  located  on  the  router  (as  shown  in  Figure  3)  
or  can  it  be  hosted  on  any  other  node  connected  to  the  switch?  Briefly  
explain  you  answer.  
ECE374:  Homework  1                                                                                                                                                                                                                                          6  
 
 
 

 
Figure  3  

Solution:  
a. UDP,  FF:FF:FF:FF:FF:FF,  FF:FF:FF:FF:FF:FF,  additional  information:  DNS  
server  IP,  gateway  IP  
b. When  the  client  sends  it's  initial  DHCP  request  it  includes  an  identifier  in  the  
request.  The  server  uses  this  identifier  for  the  response.  If  the  client  does  not  
get  a  response  from  the  server  after  a  certain  amount  of  time,  it  will  create  a  
new  request  with  a  new  identifier.  This  will  make  sure  that  the  client  and  
server  can  differentiate  between  requests  and  out  of  order  packets.  
From  RFC2131:  
The  'xid'  field  is  used  by  the  client  to  match  incoming  DHCP  messages        with  
pending  requests.    A  DHCP  client  MUST  choose  'xid's  in  such  a        way  as  to  
minimize  the  chance  of  using  an  'xid'  identical  to  one  used        by  another  client.  
For  example,  a  client  may  choose  a  different,        random  initial  'xid'  each  time  
the  client  is  rebooted,  and        subsequently  use  sequential  'xid's  until  the  next  
reboot.    Selecting        a  new  'xid'  for  each  retransmission  is  an  implementation  
decision.    A        client  may  choose  to  reuse  the  same  'xid'  or  select  a  new  'xid'  
for        each  retransmitted  message.  
c. It  can  be  located  on  any  other  host  that  connected  to  the  switch.  Since  the  
client  sends  a  broadcast  Ethernet    frame,  all  nodes  connected  to  the  switch  
will  receive  it,  but  only  the  host  on  which  the  DHCP  server  runs  will  reply  to  
the  client’s  request.    
The  following  is  optional  and  I  just  added  in  case  students  mention  it:  
There  is  also  a  way  to  connect  to  a  DHCP  server  in  a  different  subnet  if  a  
DHCP  Relay  agent  is  used)  
 
 
Problem  5  (20  Points):  
ECE374:  Homework  3                                                                                                                                                                                                                                          7  
 
a. Consider  the  networks  shown  in  Figure  XX.  With  the  indicated  link  costs,  use  
Dijkstra’s  shortest-­‐past  algorithm  to  compute  the  shortest  path  from  x  to  all  
network  nodes.  Show  how  the  algorithm  works  by  filling  out  the  table  below.  
 

 
 
Step     N’   D(t),  p(t)   D(u),  p(u)   D(v),  p(v)   D(w),  p(w)   D(y),  p(y)   D(z),  p(z)  
0   X              
1                
2                
3                
4                
5                
6                
 
b. Name  one  way  in  which  distance  vector  routing  is  better  than  link  state  routing,  and  name  
one  in  which  link  state  routing  is  better  than  distance  vector  routing.  
 
 
Solution:  
a. Solution  is  in  the  table  below:  
 
Step     N’   D(t),  p(t)   D(u),  p(u)   D(v),  p(v)   D(w),  p(w)   D(y),  p(y)   D(z),  p(z)  
0   X   ∞   ∞   3,  x   6,  x   6,  x   8,  x  
1   XV   7,  v   6,  v   3,  x   6,  x   6,  x   8,  x  
2   XVU   7,  v   6,  v   3,  x   6,  x   6,  x   8,  x  
3   XVUW   7,  v   6,  v   3,  x   6,  x   6,  x   8,  x  
4   XVUWY   7,  v   6,  v   3,  x   6,  x   6,  x   8,  x  
5   XVUWYT   7,v   6,  v   3,  x   6,  x   6,  x   8,  x  
ECE374:  Homework  1                                                                                                                                                                                                                                          8  
 
6   XVUWYTZ   7,v   6,  v   3,  x   6,  x   6,  x   8,  x  
 
b. Advantage  of  distance  vector  routing:  Unlike  link  state  routing,  which  must  
flood  link  state  update  packets  to  all  other  routers  in  the  network,  distance  
vectors  are  only  exchanged  between  adjacent  routers.  This  limits  the  number  of  
routing  packets  that  are  transmitted  in  the  network,  thereby  saving  bandwidth  
for  other  data  packets  in  the  network.  
 
Advantage  of  link  state  routing:  Because  they  rely  on  the  flooding  of  link  state  
update  packets,  link  state  routing  algorithms  propagate  routing  information  to  
routers  more  rapidly  than  distance  vector  algorithms.    Furthermore,  link  state  
routing  doesn’t  suffer  from  the  count-­to-­infinity  problem,  which  plagues  the  
distance  vector  algorithm.  
 
 
 

You might also like