basic&conceptscs168/fa14/lectures/lec2-public.pdf · basic&concepts&...

90
Basic Concepts CS168, Fall 2014 Sylvia Ratnasamy h<p:// inst.eecs.berkeley.edu /~cs168/fa14/

Upload: others

Post on 02-Jun-2020

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Basic  Concepts  

 

CS168,  Fall  2014  Sylvia  Ratnasamy  

h<p://inst.eecs.berkeley.edu/~cs168/fa14/  

 

 

Page 2: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Administrivia  

‣  Discussion  secIons  start  Wednesday,  Sep  10  

‣  Homework#1  out  this  week    

-­‐  we  will  be  using  PandaGrader  for  submissions;  stay  tuned  for  details  

2  

Page 3: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Today  

‣  What  is  a  network  made  of?  

‣  How  is  it  shared?  

‣  How  do  we  evaluate  a  network?  

3  

Page 4: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Today  

‣  What  is  a  network  made  of?  

‣  How  is  it  shared?  

‣  How  do  we  evaluate  a  network?  

4  

Page 5: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

5  

end-­‐system   switch  

link  

Internet  Service  Provider  

Page 6: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

6  

phone  company  

Page 7: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

7  

phone  company  

Page 8: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

8  

home  PC   switch  

Page 9: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

9  

home  PC   switch  

DSL  modem   DSLAM  central  office  

phone  line  

telephone   telephone  network  

...  

Page 10: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

AT&T  Central  Offices  in  the  Bay  Area  

Page 11: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

AT&T  Central  Office  in  Berkeley  

Page 12: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Digital  Subscriber  Line  (DSL)  

‣  Twisted  pair  copper  ‣  3  separate  channels  

-­‐  downstream  data  channel  -­‐  upstream  data  channel  

-­‐  2-­‐way  phone  channel  

‣  up  to  25  Mbps  downstream  

‣  up  to  2.5  Mbps  upstream  

12  

Page 13: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Why  phone  lines?  

Page 14: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

14  

cable  company  

Page 15: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

15  

cable  company  

Page 16: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

16  

home  PC   switch  

Page 17: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

17  

home  PC   switch  

cable  modem   CMTS  

cable  head  end  

copper   fiber   ...  

Page 18: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

18  

switch  

CMTS  cable  head  

end  fiber  

Page 19: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Cable  

‣  Coaxial  copper  &  fiber  ‣  up  to  42.8  Mbps  downstream  

‣  up  to  30.7  Mbps  upstream  

‣  shared  broadcast  medium  

19  

Page 20: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

20  

university  net  

Page 21: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

21  

university  net  

Page 22: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

22  

workstaCon   “aggregate”  switch  

Ethernet  cable  

“local”  switch  

...  

Page 23: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Ethernet  

‣  Twisted  pair  copper  ‣  100  Mbps,  1  Gbps,  10  Gbps  (each  direcIon)  

23  

Page 24: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

&  more  

‣  Cellular  (smart  phones)  

‣  Satellite  (remote  areas)  

‣  Fiber  to  the  Home  (home)  

‣  OpIcal  carrier  (Internet  backbone)  

24  

Page 25: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

25  

phone  company  

cable  company  university  net  

WiFi    

WiFi    WiFi    

Page 26: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

‣  What  physical  infrastructure  is  already  available?  

26  

Page 27: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Today  

‣  What  is  a  network  made  of?  

‣  How  is  it  shared?  

‣  How  do  we  evaluate  a  network?  

27  

Page 28: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

28  

shared  link  and    switch  resources  

Page 29: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

29  

O(n2)  links   per-­‐node  capacity  scales  as  1/n  

How  do  we  scale  a  network  to  many  end-­‐systems?  

Page 30: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

30  

Switched  networks  enable  efficient  scaling!  

How  do  we  scale  a  network  to  many  end-­‐systems?  

Page 31: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Two  approaches  to  sharing  

‣  ReservaIons  

‣  On  demand  

 

31  

Page 32: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

12Mbps  

IntuiIon:  Three  sources  of  “bursty”  traffic  

Time  

Link  capacity  =  30Mbps  

11Mbps  

13Mbps  

Page 33: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

12Mbps  

Intuition: reservations

Time  

11Mbps  

13Mbps  

Link  capacity  =  30Mbps  

Each  source  gets  10Mbps  

Frequent  overloading  

Page 34: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

No  overloading  

Time  

Intuition: on demand

Link  capacity  =  30Mbps  

Page 35: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Switching  on-­‐demand  exploits  sta7s7cal  mul7plexing  be<er  than  reservaIons  

‣  Sharing  using  the  staIsIcs  of  demand  

‣  Good  for  bursty  traffic  (average  <<  peak  demand)  

‣  Similar  to  insurance,  with  the  same  failure  mode  

Page 36: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

What  do  we  do  under  overload?  

Time  

Link  capacity  =  30Mbps  

Intuition: on demand

Page 37: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

StaIsIcal  mulIplexing  is  a    recurrent  theme  in  computer  science  

‣  Phone  network  rather  than  dedicated  lines  -­‐  ancient  history  

‣  Packet  switching  rather  than  circuits  -­‐  today’s  lecture  

‣  Cloud  compuIng  

-­‐  shared  vs.  dedicated  machines  

Page 38: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Two  approaches  to  sharing  

‣  ReservaIons  

‣  On  demand  

 

38  

How  are  these  implemented?  

Page 39: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Two  approaches  to  sharing  

‣  ReservaIons  à  circuit  switching  

‣  On  demand  à  packet  switching  

 

39  

How  are  these  implemented?  

Page 40: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Two  approaches  to  sharing  

‣  Packet  switching  -­‐  packets  treated  on  demand  -­‐  admission  control:  per  packet  

 

‣  Circuit  switching  -­‐  resources  reserved  per  acIve  "connecIon"  -­‐  admission  control:  per  connecIon  

 

‣  A  hybrid:  virtual  circuits    -­‐  emulaIng  “circuit”  switching  with  packets  (see  text)     40  

Page 41: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Circuit  Switching  

(1) src  sends  a  reservaIon  request  to  dst  (2)  Switches  “establish  a  circuit”  (3)  src  starts  sending  data  (4)  src  sends  a  “teardown  circuit”  message      

dst  10Mb/s?  

10Mb/s?  

10Mb/s?  

src  ✔

✔  

Page 42: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

42  

switch  

src  

dst  

ReservaIon  establishes  a  “circuit”  within  a  switch  

Circuit  Switching  

Page 43: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Many  kinds  of  “circuits”  

‣  Time  division  mulIplexing  -­‐  divide  Ime  in  Ime  slots  -­‐  separate  Ime  slot  per  circuit  

 ‣  Frequency  division  mulIplexing  

-­‐  divide  frequency  spectrum  in    frequency  bands  

-­‐  separate  frequency  band  per  circuit  

43  

time

time frequency

Page 44: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

time

Timing  in  Circuit  Switching    

Page 45: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

time

Timing  in  Circuit  Switching    

Page 46: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

time

Timing  in  Circuit  Switching    

Page 47: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

time

Timing  in  Circuit  Switching    

Page 48: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

time

Timing  in  Circuit  Switching    

Circuit    establishment  

Page 49: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Data

time

Timing  in  Circuit  Switching    

Circuit    establishment  

Data    transfer  

Page 50: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Data

time

Timing  in  Circuit  Switching    

Circuit    establishment  

Data    transfer  

Circuit    teardown  

Page 51: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

time

Timing  in  Circuit  Switching    

Circuit    establishment  

Data    transfer  

Circuit    teardown  

Page 52: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Data time

Timing  in  Circuit  Switching    

Page 53: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Information

time

Timing  in  Circuit  Switching    

Page 54: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

A

B

Circuit  switching  doesn’t  “route  around  trouble”    

Circuit  Switching  

Page 55: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Circuit  Switching  

‣  Pros  -­‐  predictable  performance    -­‐  simple/fast  switching  (once  circuit  established)  

‣  Cons  -­‐  complexity  of  circuit  setup/teardown  -­‐  inefficient  when  traffic  is  bursty  -­‐  circuit  setup  adds  delay  -­‐  switch  fails  à  its  circuit(s)  fails  

Page 56: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Packet  switching  

56  

switch  

dst  

Each  packet  contains  desInaIon  (dst)  Each  packet  treated  independently  

Page 57: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

57  With  buffers  to  absorb  transient  overloads  

Packet  switching  

switch  

dst  

Each  packet  contains  desInaIon  (dst)  Each  packet  treated  independently  

Page 58: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Packet  Switching  

‣  Pros  -­‐  efficient  use  of  network  resources  -­‐  simpler  to  implement  -­‐  robust:  can  “route  around  trouble”    

‣  Cons  -­‐  unpredictable  performance  -­‐  requires  buffer  management  and  conges7on  control  

Page 59: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Today  

‣  What  is  a  network  made  of?  

‣  How  is  it  shared?  -­‐  will  assume  packet  switching  from  here  on  

‣  How  do  we  evaluate  a  network?    

59  

Page 60: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Today  

‣  What  is  a  network  made  of?  

‣  How  is  it  shared?  

‣  How  do  we  evaluate  a  network?    

60  

Page 61: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Performance  Metrics  

‣  Delay  

‣  Loss    

‣  Throughput  

     

Page 62: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Delay  

‣  How  long  does  it  take  to  send  a  packet  from  its  source  to  des7na7on?  

   

Page 63: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Loss  

‣  What  frac7on  of  the  packets  sent  to  a  des7na7on  are  dropped?  

Page 64: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Throughput  

‣  At  what  rate  is  the  des7na7on  receiving  data  from  the  source  

Page 65: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Delay  

‣  Consists  of  four  components  

-­‐  transmission  delay  

-­‐  propaga7on  delay  

-­‐  queuing  delay  

-­‐  processing  delay  

due  to  link  proper7es  

due  to  traffic  mix  and    switch  internals  

Page 66: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

A  network  link  

l  Link  bandwidth      l  number  of  bits  sent/received  per  unit  Ime  (bits/sec  or  bps)  

l  PropagaIon  delay    l  Ime  for  one  bit  to  move  through  the  link  (seconds)  

l  Bandwidth-­‐Delay  Product  (BDP)    l  number  of  bits  “in  flight”  at  any  Ime  l  BDP  =  bandwidth  ×  propagaIon  delay  

bandwidth  

PropagaIon  delay  

delay  x  bandwidth  

Page 67: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Examples  

l  Same  city  over  a  slow  link:    l  bandwidth:  ~100Mbps  l  propagaIon  delay:  ~0.1msec  l  BDP:  10,000bits  (1.25KBytes)  

 l  Cross-­‐country  over  fast  link:  

l  bandwidth:  ~10Gbps  l  propagaIon  delay:  ~10msec  l  BDP:  108bits  (12.5MBytes)  

Page 68: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Computer  Networks,  Fall  2013  

1.  Transmission  delay  

‣  How  long  does  it  take  to  push  all  the  bits          of  a  packet  into  a  link?  

‣  Packet  size  /  Transmission  rate  of  the  link  

-­‐  e.g.  1000  bits  /  100  Mbits  per  sec  =  10  -­‐5  sec  

68  

Page 69: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Computer  Networks,  Fall  2013  

2.  PropagaIon  delay  

‣  How  long  does  it  take  to  move  one  bit                from  one  end  of  a  link  to  the  other?  

‣  Link  length  /  PropagaIon  speed  of  link    -­‐  E.g.  30  kilometers  /  3  108  meters  per  sec  =  10-­‐4  sec  

69  

Page 70: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

time=0

A B

100Byte packet

Time

1Mbps, 1ms

Time to transmit one bit = 1/106s

Time to transmit 800 bits=800x1/106s

Time when that bit reaches B

= 1/106+1/103s

The last bit reaches B at

(800x1/106)+1/103s = 1.8ms

Packet  Delay  Sending  100B  packets  from  A  to  B?  

Page 71: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Packet  Delay  Sending  100B  packets  from  A  to  B?  

A B

100Byte packet

Time

1Mbps, 1ms 1Gbps, 1ms?

The last bit reaches B at

(800x1/106)+1/103s = 1.8ms

1GB file in 100B packets

The last bit reaches B at

(800x1/109)+1/103s = 1.0008ms

The last bit in the file reaches B at

(107x800x1/109)+1/103s = 8001ms

107 x 100B packets

Page 72: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

A B

100Byte packet

Time

1Mbps, 10ms

100Byte packet

100Byte packet

time à BW à

pkt tx time

Packet  Delay:  The  “pipe”  view  Sending  100B  packets  from  A  to  B?  

Page 73: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Packet  Delay:  The  “pipe”  view  Sending  100B  packets  from  A  to  B?  

1Mbps, 10ms (BDP=10,000)

time à

BW à

10Mbps, 1ms (BDP=10,000)

time à

BW à

1Mbps, 5ms (BDP=5,000)

time à

BW à

Page 74: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Packet  Delay:  The  “pipe”  view  Sending  100B  packets  from  A  to  B?  

1Mbps, 10ms (BDP=10,000)

time à

BW à

200B?

1Mbps, 10ms (BDP=10,000)

time à

BW à

Page 75: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Computer  Networks,  Fall  2013  

3.  Queuing  delay  

‣  How  long  does  a  packet  have  to  sit  in  a  buffer  before  it  is  processed?  

75  

Page 76: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Queuing  delay:  “pipe”  view  

Page 77: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

No  overload!  

Queuing  delay:  “pipe”  view  

Page 78: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Transient  Overload  Not  a  rare  event!  

Queue

Queuing  delay:  “pipe”  view  

Page 79: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Queue

Queuing  delay:  “pipe”  view  

Transient  Overload  Not  a  rare  event!  

Page 80: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Queue

Queuing  delay:  “pipe”  view  

Transient  Overload  Not  a  rare  event!  

Page 81: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Queue

Queuing  delay:  “pipe”  view  

Transient  Overload  Not  a  rare  event!  

Page 82: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Queue

Queuing  delay:  “pipe”  view  

Transient  Overload  Not  a  rare  event!  

Page 83: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Queue

Queuing  delay:  “pipe”  view  

Transient  Overload  Not  a  rare  event!  

Queues  absorb  transient  bursts  but  introduce  queuing  delay  

Page 84: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

What  about  persistent  overload?  Will  eventually  drop  packets  (“loss”)  

Queuing  delay:  “pipe”  view  

Page 85: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Queuing  Delay  

l  How  long  does  a  packet  have  to  sit  in  a  buffer  before  it  is  processed?    

l  Depends  on  traffic  pa<ern  l  arrival  rate  at  the  queue  l  nature  of  arriving  traffic  (bursty  or  not?)  l  transmission  rate  of  outgoing  link  

Page 86: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Queuing  Delay  

l  How  long  does  a  packet  have  to  sit  in  a  buffer  before  it  is  processed?    

l  Characterized  with  staIsIcal  measures  l  average  queuing  delay  l  variance  of  queuing  delay  l  probability  delay  exceeds  a  threshold  value  

 

Page 87: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Basic  Queuing  Theory  Terminology  

l  Arrival  process:  how  packets  arrive  l  Average  rate  A  l  Peak  rate  P  

 l  W:  average  Ime  packets  wait  in  the  queue  

l  W  for  “waiIng  Ime”  

l  L:  average  number  of  packets  waiIng  in  the  queue  l  L  for  “length  of  queue”  

Page 88: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Li<le’s  Law  (1961)  

 L  =  A  x  W  

l  Compute  L:  count  packets  in  queue  every  second  l  How  osen  does  a  single  packet  get  counted?  W  Imes  

 

l  Why  do  you  care?  l  Easy  to  compute  L,  harder  to  compute  W  

Page 89: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Computer  Networks,  Fall  2013  

4.  Processing  Delay  

‣  How  long  does  the  switch  take  to  process  a    packet?  

89  

•  typically  assume  this  is  negligible    

Page 90: Basic&Conceptscs168/fa14/lectures/lec2-public.pdf · Basic&Concepts& CS168,&Fall&2014& SylviaRatnasamy& hp:// inst.eecs.berkeley.edu/~cs168/fa14/& & &

Computer  Networks,  Fall  2013  

Recap  

‣  What  is  a  network  made  of?  -­‐  What  physical  infrastructure  exists?  

‣  How  is  it  shared?  -­‐  On-­‐demand  or  reserve?  

‣  How  do  we  evaluate  a  network?    -­‐  to  be  contd.  

90