midterm review
play

Midterm review CSCI 466: Networks Keith Vertanen - PowerPoint PPT Presentation

Midterm review CSCI 466: Networks Keith Vertanen Network architecture 2 Encapsula8on High-level messages encapsulated in low-level messages


  1. Checksum ¡ • Internet ¡checksum ¡algorithm ¡ – Add ¡up ¡16-­‑bit ¡words ¡and ¡transmit ¡result ¡ – Not ¡used ¡in ¡link-­‑layer ¡ • Used ¡in ¡higher ¡layers ¡like ¡TCP ¡and ¡UDP ¡ – Advantages: ¡ • Small ¡number ¡of ¡redundant ¡bits ¡ • Easy ¡to ¡implement ¡ ¡ – Disadvantages: ¡ • Weak ¡protec8on ¡ 26 ¡

  2. Common ¡CRC ¡polynomials ¡ Name ¡ Used ¡in ¡ C(x) ¡ Generator ¡ CRC-­‑8 ¡ ATM ¡ x 8 ¡+ ¡x 2 ¡+ ¡x 1 ¡+ ¡1 ¡ ¡ 1 ¡0000 ¡0111 ¡ CRC-­‑10 ¡ ATM ¡ x 10 ¡+ ¡x 9 ¡+ ¡x 5 ¡ + ¡x 4 ¡ + ¡x 1 ¡+ ¡1 ¡ ¡ 110 ¡0011 ¡0011 ¡ CRC-­‑12 ¡ Telecom ¡systems ¡ x 12 ¡+ ¡x 11 ¡+ ¡x 3 ¡ + ¡x 2 ¡ + ¡x 1 ¡+ ¡1 ¡ ¡ 1 ¡1000 ¡0000 ¡1111 ¡ CRC-­‑16 ¡ USB, ¡Bisync ¡ x 16 ¡+ ¡x 15 ¡+ ¡x 2 ¡ + ¡1 ¡ ¡ 1 ¡1000 ¡0000 ¡0000 ¡0011 ¡ CRC-­‑CCITT ¡ Bluetooth, ¡X.25, ¡SD, ¡HDLC ¡ x 16 ¡+ ¡x 12 ¡+ ¡x 5 ¡ + ¡1 ¡ ¡ 1 ¡0001 ¡0000 ¡0010 ¡0001 ¡ CRC-­‑32 ¡ Ethernet, ¡SATA, ¡MPEG-­‑2, ¡ x 32 ¡ + ¡x 26 ¡ + ¡x 23 ¡ + ¡x 22 ¡ + ¡x 16 ¡ + ¡x 12 ¡ + ¡x 11 ¡ + ¡ 1 ¡0000 ¡0100 ¡1100 ¡0001 ¡ Gzip, ¡PKZIP, ¡PNG, ¡ATM ¡ x 10 ¡ + ¡x 8 ¡ + ¡x 7 ¡ + ¡x 5 ¡ + ¡x 4 ¡ + ¡x 2 ¡ + ¡x 1 ¡+ ¡1 ¡ 0001 ¡1101 ¡1011 ¡0111 ¡ ¡ • CRC ¡will ¡detect: ¡ – All ¡single-­‑bit ¡errors, ¡if ¡x k ¡and ¡x 0 ¡are ¡nonzero ¡ – All ¡double-­‑bit ¡errors, ¡if ¡C(x) ¡has ¡a ¡factor ¡with ¡3 ¡or ¡more ¡terms ¡ – Any ¡odd ¡number ¡of ¡errors, ¡if ¡C(x) ¡contains ¡the ¡factor ¡(x+1) ¡ – Any ¡burst ¡error, ¡if ¡burst ¡is ¡less ¡than ¡k ¡bits ¡ 27 ¡

  3. Reliable ¡transmission ¡ • Main ¡mechanisms ¡for ¡reliable ¡delivery: ¡ – Acknowledgements ¡(ACK) ¡ • Control ¡frame, ¡informs ¡peer ¡frame(s) ¡received ¡okay ¡ • Different ¡types ¡ – Selec8ve ¡acknowledgement, ¡specifies ¡received ¡frame ¡ – Cumula8ve ¡acknowledgement, ¡received ¡this ¡frame ¡and ¡all ¡ previous ¡ – Nega8ve ¡acknowledgement ¡(NACK), ¡frame ¡was ¡corrupt ¡or ¡out ¡ of ¡buffer ¡space ¡ – Timeouts ¡ • Only ¡wait ¡so ¡long ¡for ¡ACK ¡(frame ¡or ¡ACK ¡may ¡be ¡MIA) ¡ 28 ¡

  4. Stop-­‑and-­‑wait ¡ • Stop-­‑and-­‑wait ¡algorithm: ¡ 1. Send ¡a ¡frame, ¡start ¡a ¡8mer ¡ 2. Wait ¡for ¡an ¡ACK ¡ 3. If ¡8meout ¡before ¡ACK, ¡goto ¡1 ¡ 4. If ¡ACK, ¡get ¡next ¡frame, ¡goto ¡1 ¡ 29 ¡

  5. Stop-­‑and-­‑wait ¡ Problem ¡1: ¡ Receiver ¡thinks ¡the ¡ retransmission ¡is ¡a ¡ new ¡frame, ¡ corrup8ng ¡data ¡ passed ¡up ¡to ¡ network ¡layer. ¡ c) ¡ACK ¡is ¡lost ¡ a) ¡ACK ¡received ¡before ¡8meout ¡ d) ¡8meout ¡triggered ¡too ¡soon ¡ b) ¡original ¡frame ¡is ¡lost ¡ 30 ¡

  6. Stop-­‑and-­‑wait ¡ Solu6on ¡1: ¡ Use ¡1-­‑bit ¡sequence ¡ number. ¡ 0 ¡ 0 ¡ ¡ Receiver ¡can ¡now ¡ determine ¡if ¡received ¡ 0 ¡ frame ¡is ¡a ¡duplicate. ¡ 0 ¡ 1 ¡ 0 ¡ hUp://www.net-­‑seal.net/anima8ons.php?aid=37 ¡ 31 ¡

  7. Sliding ¡window ¡ • Sliding ¡window ¡protocol ¡ – BeUer ¡solu8on ¡to ¡bandwidth ¡u8liza8on ¡problem ¡ • Put ¡mul8ple ¡frames ¡in ¡flight ¡ • Best ¡known ¡algorithm ¡in ¡networking ¡ • Several ¡varia8ons ¡on ¡this ¡idea ¡ • Used ¡in ¡TCP ¡ 32 ¡

  8. Go-­‑back-­‑n ¡ • Problem: ¡ – Go-­‑back-­‑n ¡wastes ¡bandwidth ¡re-­‑sending ¡frames ¡ that ¡may ¡have ¡been ¡received ¡okay ¡ hUp://www.eecis.udel.edu/~amer/450/TransportApplets/GBN/GBNindex.html ¡ hUp://www.net-­‑seal.net/anima8ons.php?aid=38 ¡ 33 ¡

  9. Sliding ¡window: ¡Selec8ve ¡repeat ¡ • Selec8ve ¡repeat ¡ – Sender: ¡ • Tracks ¡which ¡frames ¡have ¡been ¡ACK'd ¡ • Unacknowledged ¡frames ¡must ¡remain ¡in ¡buffer ¡un8l ¡ acknowledged ¡ • Timer(s) ¡track ¡if ¡frame ¡needs ¡resending ¡ – Receiver: ¡ • Hold ¡out-­‑of-­‑order ¡frames ¡un8l ¡in ¡order ¡sec8on ¡can ¡be ¡ passed ¡up ¡to ¡network ¡layer ¡ hUp://www.eecis.udel.edu/~amer/450/TransportApplets/SR/SRindex.html ¡ hUp://www.net-­‑seal.net/anima8ons.php?aid=39 ¡ 34 ¡

  10. Mul8ple ¡access ¡networks ¡ 35 ¡

  11. Ethernet ¡addressing ¡ • Media ¡Access ¡Control ¡address ¡(MAC) ¡ – 48-­‑bit ¡globally ¡unique ¡address ¡ • 281,474,976,710,656 ¡possible ¡addresses ¡ • Should ¡last ¡8ll ¡2100 ¡ • e.g. ¡01:23:45:67:89:ab ¡ – Address ¡of ¡all ¡1's ¡is ¡broadcast ¡ • FF:FF:FF:FF:FF:FF ¡ 36 ¡

  12. Ethernet ¡frame ¡format ¡ • Frame ¡format ¡ – Manchester ¡encoded ¡ – Preamble ¡products ¡10-­‑Mhz ¡square ¡wave ¡ • Allows ¡clock ¡synch ¡between ¡sender ¡& ¡receiver ¡ – Pad ¡to ¡at ¡least ¡64-­‑bytes ¡(collision ¡detec8on) ¡ Ethernet ¡ 802.3 ¡ AlternaIng ¡0's ¡ 48-­‑bit ¡MAC ¡ and ¡1's ¡(except ¡ addresses ¡ SoF ¡of ¡11) ¡ 37 ¡

  13. Ethernet ¡receivers ¡ • Hosts ¡listens ¡to ¡medium ¡ – Deliver ¡to ¡host: ¡ • Any ¡frame ¡with ¡host's ¡MAC ¡address ¡ • All ¡broadcast ¡frames ¡(all ¡1's) ¡ • Mul8cast ¡frames ¡(if ¡subscribed ¡to) ¡ • Or ¡all ¡frames ¡if ¡in ¡promiscuous ¡mode ¡ 38 ¡

  14. MAC ¡sublayer ¡ • Media ¡Access ¡Control ¡(MAC) ¡sublayer ¡ – Who ¡goes ¡next ¡on ¡a ¡shared ¡medium ¡ – Ethernet ¡hosts ¡can ¡sense ¡if ¡medium ¡in ¡use ¡ – Algorithm ¡for ¡sending ¡data: ¡ 1. Is ¡medium ¡idle? ¡ ¡If ¡not, ¡wait. ¡ 2. Start ¡transmiwng ¡data, ¡listen ¡for ¡collision. ¡ 3. If ¡collision ¡detected, ¡transmit ¡32-­‑bit ¡jamming ¡ sequence. ¡ ¡Stop ¡transmiwng ¡and ¡go ¡to ¡backoff ¡ procedure. ¡ 39 ¡

  15. Backoff ¡procedure ¡ • Binary ¡exponen8al ¡backoff ¡ – First ¡collision ¡ • Wait ¡0-­‑1 ¡8meslots ¡(chosen ¡at ¡random) ¡ – Second ¡collision ¡ • Wait ¡0-­‑3 ¡8meslots ¡ – In ¡general, ¡i th ¡collision ¡ • Wait ¡a ¡random ¡number ¡of ¡8meslots ¡between ¡0 ¡and ¡2 i ¡-­‑ ¡ 1 ¡(max ¡of ¡1023 ¡slots) ¡ – Give ¡up ¡a]er ¡16 ¡or ¡so ¡retries ¡ – Timeslot ¡= ¡51.2 ¡µs ¡ ¡ 40 ¡

  16. Switched ¡Ethernet ¡ • Hubs ¡ – Made ¡network ¡easier ¡to ¡manage ¡ – But ¡did ¡not ¡address ¡capacity ¡problem ¡ • Switches ¡ – High-­‑speed ¡backplane ¡connec8ng ¡all ¡ports ¡ – Only ¡output ¡frame ¡to ¡des8na8on ¡port ¡ – Isolates ¡traffic, ¡no ¡collisions, ¡beUer ¡security ¡ 41 ¡

  17. Ethernet ¡retrospec8ve ¡ • Why ¡so ¡popular? ¡ – Easy ¡to ¡administer, ¡no ¡rou8ng ¡or ¡config ¡tables ¡ – Cheap ¡hardware ¡and ¡wiring ¡ – Plays ¡nice ¡with ¡TCP/IP ¡ • Ethernet ¡and ¡IP ¡are ¡connec8onless ¡protocols ¡ • Alternates ¡like ¡ATM ¡were ¡not ¡ – Speed ¡increased ¡by ¡order ¡of ¡magnitude ¡periodically ¡ without ¡throwing ¡away ¡exis8ng ¡infrastructure ¡ – Borrowed ¡good ¡ideas ¡from ¡other ¡(failed) ¡networking ¡ technologies ¡(FDDI, ¡Fiber ¡Channel) ¡ 42 ¡

  18. Wireless ¡ • Shared ¡medium ¡using ¡wireless ¡ – Bit ¡errors ¡more ¡prevalent ¡than ¡wired ¡ – Limits ¡on ¡transmit ¡power ¡ • BaUery ¡life, ¡government ¡regula8on ¡ – Difficult ¡to ¡transmit ¡and ¡listen ¡for ¡collisions ¡ – Undirected ¡signal ¡ • Interference ¡ ¡ • Security ¡ ¡ 43 ¡

  19. Wireless ¡topology ¡ • Base ¡sta8on ¡topology ¡ – Typically ¡all ¡clients ¡talk ¡to ¡base ¡sta8on ¡ – No ¡direct ¡communica8on ¡between ¡clients ¡ 44 ¡

  20. Wireless ¡topology ¡ • Ad ¡hoc ¡/ ¡mesh ¡topology ¡ – Nodes ¡are ¡peers ¡ – No ¡special ¡base ¡sta8on ¡ – Advantages: ¡ • More ¡fault ¡tolerant ¡ • Extends ¡range ¡ – Disadvantages: ¡ • Nodes ¡are ¡more ¡complex ¡ • Nodes ¡may ¡be ¡asked ¡to ¡expend ¡ limited ¡resources ¡(e.g. ¡power) ¡ One ¡Laptop ¡per ¡Child, ¡uses ¡ 802.11s ¡mesh ¡dra] ¡standard. ¡ 45 ¡

  21. 802.11 ¡collision ¡avoidance ¡ • Collision ¡avoidance ¡ – Can’t ¡transmit ¡and ¡listen ¡for ¡collision ¡ • Transmission ¡power ¡swamps ¡receiving ¡circuit ¡ • Collision ¡detec8on ¡(CD) ¡as ¡in ¡Ethernet ¡not ¡possible ¡ – Not ¡everyone ¡can ¡hear ¡everything ¡ • Hidden ¡node ¡problem: ¡ A ¡and ¡C ¡both ¡want ¡to ¡send ¡to ¡B. ¡ ¡ ¡ ¡ A ¡and ¡C ¡can’t ¡hear ¡each ¡other ¡ so ¡can’t ¡detect ¡their ¡ transmissions ¡collided. ¡ 46 ¡

  22. 802.11 ¡collision ¡avoidance ¡ • Collision ¡avoidance ¡ – Lack ¡of ¡global ¡informa8on ¡about ¡who ¡is ¡in ¡range ¡ of ¡who ¡ • Exposed ¡node ¡problem: ¡ C ¡wants ¡to ¡send ¡to ¡D. ¡ ¡ But ¡C ¡can ¡hear ¡B ¡transmiwng ¡to ¡A. ¡ But ¡D ¡cannot ¡hear ¡B, ¡ and ¡A ¡cannot ¡hear ¡C. ¡ ¡ So ¡C ¡could ¡safely ¡transmit ¡to ¡D. ¡ 47 ¡

  23. Carrier ¡Sense, ¡Mul8ple ¡Access ¡w/ ¡Collision ¡ Avoidance ¡ • CSMA/CA ¡ – Don’t ¡send ¡if ¡you ¡hear ¡transmission ¡ – If ¡you ¡sent ¡recently, ¡don’t ¡be ¡greedy ¡ • Use ¡random ¡backoff ¡ – Explicit ¡ACK ¡from ¡receiver ¡to ¡sender ¡ • Exponen8al ¡backoff ¡if ¡bad/missing ¡ACK ¡ 48 ¡

  24. 802.11 ¡frame ¡format ¡ • Source ¡and ¡des8na8on ¡addresses ¡ – Four ¡48-­‑bit ¡MAC ¡addresses: ¡ • Allows ¡for ¡frame ¡going ¡via ¡distribu8on ¡system: ¡ – Addr1 ¡– ¡ul8mate ¡des8na8on ¡ – Addr2 ¡– ¡immediate ¡sender, ¡AP ¡that ¡forwarded ¡to ¡ul8mate ¡ des8na8on ¡ – Addr3 ¡– ¡intermediate ¡des8na8on, ¡AP ¡that ¡accepted ¡frame ¡ from ¡sender ¡ – Addr4 ¡– ¡original ¡sender ¡ ¡ 49 ¡

  25. Node ¡communica8on ¡ • Node-­‑to-­‑node ¡communica8on ¡ – Simple ¡case: ¡ • A ¡wants ¡to ¡talk ¡to ¡C ¡ • Send ¡via ¡AP-­‑1 ¡ – Complex ¡case: ¡ • A ¡wants ¡to ¡talk ¡to ¡F ¡ • Send ¡to ¡AP-­‑1 ¡ ¡ • Goes ¡through ¡distribu8on ¡system ¡ • AP-­‑3 ¡sends ¡to ¡F ¡ 50 ¡

  26. Switching ¡ 51 ¡

  27. Hardware ¡terminology ¡ Understands ¡format ¡and ¡contents ¡of ¡data, ¡e.g. ¡ translate ¡Internet ¡message ¡to ¡SMS ¡message ¡ Connect ¡different ¡connec8on-­‑oriented ¡ protocols, ¡e.g. ¡TCP/IP ¡to ¡SCTP ¡ Operates ¡on ¡packets, ¡uses ¡IP ¡addresses ¡ Operates ¡on ¡frames, ¡looks ¡at ¡MAC ¡addresses ¡ Analog ¡devices, ¡clean ¡up ¡signal, ¡amplify, ¡put ¡out ¡ on ¡another ¡cable ¡ 52 ¡

  28. Connec8onless ¡approach ¡ • Datagram ¡model ¡ – Each ¡frame ¡has ¡enough ¡info ¡to ¡get ¡it ¡to ¡ des8na8on ¡(its ¡MAC ¡address) ¡ – To ¡forward, ¡switch ¡consults ¡a ¡forwarding ¡table ¡ Des8na8on ¡Port ¡ -­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑-­‑ ¡ A ¡ ¡ ¡3 ¡ B ¡ ¡ ¡0 ¡ C ¡ ¡ ¡3 ¡ D ¡ ¡ ¡3 ¡ E ¡ ¡ ¡2 ¡ F ¡ ¡ ¡1 ¡ G ¡ ¡ ¡0 ¡ H ¡ ¡ ¡0 ¡ Forwarding ¡Table ¡for ¡Switch ¡2 ¡ 53 ¡

  29. Connec8on-­‑oriented ¡approach ¡ • Virtual ¡circuit ¡switching ¡ – Establish ¡a ¡virtual ¡circuit ¡(VC) ¡ – Requires ¡ini8al ¡setup ¡from ¡host ¡to ¡des8na8on ¡ – e.g. ¡ATM, ¡Frame ¡relay ¡X.25 ¡ A ¡wants ¡to ¡send ¡data ¡to ¡B. ¡ ¡ Establish ¡a ¡connec8on ¡state ¡ (VC ¡table) ¡in ¡each ¡switch ¡ between ¡A ¡and ¡B. ¡ ¡ VC ¡table ¡entry ¡has ¡a ¡virtual ¡ circuit ¡iden8fier ¡(VCI) ¡that ¡ will ¡be ¡in ¡frames ¡belonging ¡to ¡ this ¡connec8on. ¡ ¡ 54 ¡ ¡

  30. Backward ¡learning ¡ • Switch ¡starts ¡knowing ¡nothing ¡ – Promiscuous ¡mode, ¡listens ¡to ¡all ¡traffic ¡on ¡all ¡ports ¡ – Hash ¡table, ¡des8na8on ¡→ ¡output ¡port ¡ • Frame ¡arrives ¡on ¡port, ¡add ¡entry ¡based ¡on ¡who ¡sent ¡it ¡ – Topology ¡can ¡change ¡as ¡machine/bridges ¡ powered ¡on ¡and ¡off ¡ • Table ¡entries ¡purged ¡a]er ¡a ¡few ¡minutes ¡ ¡ 55 ¡

  31. Rou8ng ¡procedure ¡ • Port ¡for ¡des8na8on ¡same ¡as ¡source ¡port ¡ ¡ → ¡do ¡nothing ¡ • Port ¡for ¡des8na8on ¡different ¡from ¡source ¡port ¡ ¡ → ¡forward ¡on ¡des8na8on ¡port ¡ • If ¡des8na8on ¡port ¡unknown ¡ ¡ → ¡flood ¡on ¡all ¡ports ¡except ¡source ¡port ¡ ¡ hUp://www.cisco.com/ image/gif/paws/10607/ lan-­‑switch-­‑transparent.swf ¡ ¡ 56 ¡

  32. Spanning ¡tree ¡algorithm ¡ • Algorithm: ¡ – Each ¡bridge ¡has ¡unique ¡iden8fier ¡ ¡ • Based ¡on ¡MAC ¡address ¡of ¡switch ¡ – Root ¡is ¡bridge ¡with ¡smallest ¡ID ¡ – Root ¡forwards ¡all ¡frames ¡over ¡all ¡ports ¡ – Each ¡bridge ¡computes ¡shortest ¡path ¡to ¡root ¡ • This ¡port ¡is ¡the ¡bridge's ¡root ¡port ¡ – Each ¡network ¡segment ¡(mul8-­‑drop/hub) ¡ • Bridge ¡closest ¡to ¡root ¡is ¡that ¡segment's ¡designated ¡port ¡ 57 ¡

  33. Spanning ¡tree, ¡no ¡shared ¡segments ¡ 1) B1 ¡has ¡the ¡lowest ¡ID, ¡news ¡spreads, ¡all ¡bridges ¡agree ¡B1 ¡is ¡root. ¡ 2) B2 ¡and ¡B3 ¡are ¡directly ¡connect ¡to ¡root, ¡added ¡to ¡tree ¡ 3) B4 ¡can ¡reach ¡B1 ¡in ¡two ¡hops ¡via ¡B3 ¡or ¡B2, ¡B2 ¡wins ¡(lower ¡ID) ¡ 4) B5 ¡can ¡reach ¡B1 ¡in ¡two ¡hops ¡via ¡B3 ¡(other ¡paths ¡are ¡three ¡hops) ¡ 5) Links ¡from ¡B3 ¡to ¡B4 ¡and ¡from ¡B4 ¡to ¡B5 ¡turned ¡off ¡ 58 ¡

  34. Example ¡VLAN ¡ • Sewng ¡up ¡a ¡VLAN ¡ – Switches ¡must ¡be ¡VLAN-­‑aware ¡ – Each ¡host ¡given ¡a ¡"color" ¡ – Configura8on ¡tables ¡in ¡the ¡bridges ¡ • What ¡colors ¡aUached ¡to ¡which ¡ports ¡ 59 ¡

  35. VLAN ¡details ¡ • Problem: ¡How ¡does ¡bridge ¡know ¡frame ¡color? ¡ – IEEE ¡802.1Q ¡ – Changed ¡Ethernet ¡header ¡to ¡add ¡VLAN ¡iden8fier ¡ 60 ¡

  36. Internet ¡Protocol ¡(IP) ¡and ¡ addressing ¡ 61 ¡

  37. Internet ¡Protocol ¡(IP) ¡ ¡ • Packet ¡delivery ¡model ¡ – Connec8onless ¡ – Best-­‑effort ¡(unreliable) ¡ • Packets ¡may ¡be ¡lost ¡ • Packets ¡may ¡arrive ¡out ¡of ¡order ¡ • Duplicate ¡packets ¡may ¡occur ¡ • Packet ¡may ¡get ¡delayed ¡ • Global ¡addressing ¡scheme ¡ – How ¡do ¡we ¡iden8fy ¡hosts ¡on ¡the ¡network? ¡ 62 ¡

  38. IP ¡packet ¡format ¡ • Version ¡ – "4" ¡IPv4 ¡ • HLen ¡ – # ¡of ¡32-­‑bit ¡words ¡in ¡header ¡ – "5" ¡for ¡typical ¡20-­‑byte ¡IPv4 ¡header ¡ • TOS ¡ – Type ¡of ¡service ¡ – Allows ¡for ¡quality ¡of ¡service ¡ ¡ • Length ¡ – Total ¡length, ¡max ¡size ¡65535 ¡bytes ¡ – Links ¡may ¡have ¡small ¡limits ¡ • Ident ¡/ ¡Flags ¡/ ¡Offset ¡ – Used ¡when ¡packets ¡are ¡split ¡up ¡ 63 ¡

  39. IP ¡packet ¡format ¡ • TTL ¡ – Time=to-­‑live ¡ – Iden8fy ¡packets ¡stuck ¡in ¡loop ¡ • Protocol ¡ – Used ¡to ¡demux ¡higher-­‑level ¡ protocol ¡ – e.g. ¡"6" ¡Transmission ¡Control ¡ Protocol ¡(TCP), ¡"17" ¡User ¡Datagram ¡ Protocol ¡(UDP) ¡ • Checksum ¡ – One's ¡complement ¡IP ¡checksum ¡ algorithm ¡ – Not ¡strong ¡protec8on, ¡but ¡cheap ¡to ¡ calculate ¡ 64 ¡

  40. Fragmenta8on ¡and ¡reassembly ¡ • Reassembly ¡can ¡be ¡done ¡independent ¡of ¡ order ¡of ¡arrival ¡ • Fragments ¡may ¡also ¡be ¡fragmented ¡ • No ¡aUempt ¡to ¡recover ¡if ¡fragment ¡missing ¡ • Hosts ¡can ¡do ¡MTU ¡discovery ¡ – Probe ¡message ¡to ¡determine ¡max ¡packet ¡size ¡ 65 ¡

  41. IPv4 ¡address ¡format ¡ • Classful ¡addressing ¡(before ¡1993): ¡ – Class ¡A: ¡128 ¡networks ¡with ¡16 ¡million ¡hosts ¡ – Class ¡B: ¡16,384 ¡networks ¡with ¡65,536 ¡hosts ¡ – Class ¡C: ¡2 ¡million ¡networks, ¡256 ¡hosts ¡ 66 ¡

  42. Subnewng ¡examples ¡ 67 ¡

  43. CIDR ¡examples ¡ 68 ¡

  44. Private ¡IP ¡addresses ¡ • Private ¡networks ¡(home ¡networks, ¡etc.) ¡ – Use ¡specified ¡part ¡of ¡IP ¡address ¡space ¡ – Not ¡globally ¡routable ¡ hUp://xkcd.com/742/ ¡ 69 ¡

  45. ARP ¡procedure ¡ • If ¡des8na8on ¡IP ¡in ¡sender's ¡ARP ¡table: ¡ – fire ¡off ¡link-­‑layer ¡packet ¡ – otherwise ¡send ¡ARP ¡query ¡using ¡broadcast ¡address ¡ • ARP ¡query: ¡ – IP ¡address ¡you're ¡looking ¡for ¡ – Your ¡own ¡IP ¡and ¡hardware ¡address ¡ – Des8na8on ¡responds ¡with ¡hardware ¡address ¡ – Other ¡hosts ¡can ¡ignore ¡or ¡refresh ¡their ¡ARP ¡tables ¡ 70 ¡

  46. DHCP ¡ • Dynamic ¡Host ¡Configura8on ¡Protocol ¡(DHCP) ¡ – DHCP ¡server ¡provides ¡config ¡info ¡ – Gives ¡out ¡IP ¡addresses ¡and ¡default ¡router ¡ • DHCP ¡server ¡has ¡pool ¡of ¡available ¡IP ¡addresses ¡ • Admin ¡can ¡set ¡DHCP ¡server ¡to ¡give ¡out ¡same ¡IP ¡to ¡given ¡ hardware ¡address ¡ • Addresses ¡leased ¡for ¡a ¡given ¡8me ¡period ¡ – How ¡do ¡hosts ¡discover ¡DHCP ¡server? ¡ • New ¡hosts ¡sends ¡out ¡broadcast ¡DHCPDISCOVER ¡ message ¡ 71 ¡

  47. Network ¡error ¡repor8ng ¡ • Internet ¡Control ¡Message ¡Protocol ¡(ICMP) ¡ – Rides ¡on ¡top ¡of ¡IP ¡(like ¡TCP/UDP) ¡ – Error ¡messages ¡sent ¡back ¡to ¡host ¡by ¡routers ¡ – ICMP ¡used ¡by ¡some ¡user ¡u8li8es: ¡ ¡ • traceroute ¡ • ping ¡ 72 ¡

  48. Path ¡MTU ¡discovery ¡ • Set ¡Don't ¡Fragment ¡(DF) ¡bit ¡in ¡IP ¡packet ¡flags ¡ • Any ¡router ¡with ¡< ¡MTU ¡ – Drop ¡packet ¡ – Send ¡back ¡ICMP ¡Fragmenta8on ¡ ¡ ¡ ¡ ¡Required ¡with ¡MTU ¡size ¡ – Host ¡can ¡then ¡reduce ¡its ¡packet ¡size ¡ • Problems: ¡ ¡ – Some ¡routers ¡don't ¡generate ¡ICMP ¡messages ¡ – Intermediate ¡firewalls ¡may ¡filter ¡ICMP ¡messages ¡ 73 ¡

  49. Intradomain ¡rou8ng ¡ 74 ¡

  50. Distance ¡vector ¡rou8ng ¡ • Each ¡node ¡maintains ¡state ¡ – Cost ¡of ¡direct ¡link ¡to ¡each ¡of ¡your ¡neighbors ¡ – Least ¡cost ¡route ¡known ¡to ¡all ¡des8na8ons ¡ • Routers ¡send ¡periodic ¡updates ¡ – Send ¡neighbor ¡your ¡array ¡ – When ¡you ¡receive ¡an ¡update ¡from ¡your ¡neighbor ¡ • Update ¡array ¡entries ¡if ¡new ¡info ¡provides ¡shorter ¡route ¡ – Converges ¡quickly ¡(if ¡no ¡topology ¡changes) ¡ 75 ¡

  51. Distance ¡vector ¡example: ¡step ¡1 ¡ Op6mum ¡1-­‑hop ¡paths ¡ E ¡ C ¡ Table for A Table for B 3 ¡ 1 ¡ Dst Cst Hop Dst Cst Hop 1 ¡ F ¡ 2 ¡ A 0 A A 4 A 6 ¡ B 4 B B 0 B 1 ¡ C – C – 3 ¡ ∞ ∞ D ¡ A ¡ 4 ¡ D – D 3 D ∞ B ¡ E 2 E E – ∞ F 6 F F 1 F Table for C Table for D Table for E Table for F Dst Cst Hop Dst Cst Hop Dst Cst Hop Dst Cst Hop A – A – A 2 A A 6 A ∞ ∞ B – B 3 B B – B 1 B ∞ ∞ C 0 C C 1 C C – C 1 C ∞ D 1 D D 0 D D – D – ∞ ∞ E – E – E 0 E E 3 E ∞ ∞ F 1 F F – F 3 F F 0 F ∞ 76 ¡

  52. Distance ¡vector ¡example: ¡step ¡2 ¡ Op6mum ¡2-­‑hop ¡paths ¡ E ¡ C ¡ Table for A Table for B 3 ¡ 1 ¡ Dst Cst Hop Dst Cst Hop 1 ¡ F ¡ 2 ¡ A 0 A A 4 A 6 ¡ B 4 B B 0 B 1 ¡ C 7 F C 2 F 3 ¡ D ¡ A ¡ 4 ¡ D 7 B D 3 D B ¡ E 2 E E 4 F F 5 E F 1 F Table for C Table for D Table for E Table for F Dst Cst Hop Dst Cst Hop Dst Cst Hop Dst Cst Hop A 7 F A 7 B A 2 A A 5 B B 2 F B 3 B B 4 F B 1 B C 0 C C 1 C C 4 F C 1 C D 1 D D 0 D D – D 2 C ∞ E 4 F E – E 0 E E 3 E ∞ F 1 F F 2 C F 3 F F 0 F 77 ¡

  53. Distance ¡vector ¡example: ¡step ¡3 ¡ Op6mum ¡3-­‑hop ¡paths ¡ E ¡ C ¡ Table for A Table for B 3 ¡ 1 ¡ Dst Cst Hop Dst Cst Hop 1 ¡ F ¡ 2 ¡ A 0 A A 4 A 6 ¡ B 4 B B 0 B 1 ¡ C 6 E C 2 F 3 ¡ D ¡ A ¡ 4 ¡ D 7 B D 3 D B ¡ E 2 E E 4 F F 5 E F 1 F Table for C Table for D Table for E Table for F Dst Cst Hop Dst Cst Hop Dst Cst Hop Dst Cst Hop A 6 F A 7 B A 2 A A 5 B B 2 F B 3 B B 4 F B 1 B C 0 C C 1 C C 4 F C 1 C D 1 D D 0 D D 5 F D 2 C E 4 F E 5 C E 0 E E 3 E F 1 F F 2 C F 3 F F 0 F 78 ¡

  54. Link ¡state ¡rou8ng ¡ • Link ¡state ¡rou8ng ¡ – Second ¡major ¡class ¡of ¡intradomain ¡rou8ng ¡ – Each ¡router ¡tracks ¡its ¡immediate ¡links ¡ • Whether ¡up ¡or ¡down ¡ • Cost ¡of ¡link ¡ – Each ¡router ¡broadcasts ¡link ¡state ¡ • Informa8on ¡disseminated ¡to ¡all ¡nodes ¡ • Routers ¡have ¡global ¡state ¡from ¡which ¡to ¡compute ¡path ¡ – e.g. ¡Open ¡Shortest ¡Path ¡First ¡(OSPF) ¡ 79 ¡

  55. 1. ¡Learning ¡about ¡your ¡neighbors ¡ • Beaconing ¡ – Find ¡out ¡about ¡your ¡neighbors ¡when ¡you ¡boot ¡ – Send ¡periodic ¡"hello" ¡messages ¡to ¡each ¡other ¡ – Detect ¡a ¡failure ¡a]er ¡several ¡missed ¡"hellos" ¡ "hello" ¡ "good ¡day ¡fine ¡sir" ¡ • Beacon ¡frequency ¡is ¡tradeoff: ¡ – Detec8on ¡speed ¡ – Bandwidth ¡and ¡CPU ¡overhead ¡ – Likelihood ¡of ¡false ¡detec8on ¡ 80 ¡

  56. 2. ¡Sewng ¡link ¡costs ¡ • Assign ¡a ¡link ¡cost ¡for ¡ each ¡outbound ¡link ¡ – Manual ¡configura8on ¡ – Automa8c ¡ • Inverse ¡of ¡link ¡bandwidth ¡ – 1-­‑Gbps ¡cost ¡1 ¡ – 100-­‑Mbps ¡cost ¡10 ¡ • Measure ¡latency ¡by ¡ sending ¡an ¡ECHO ¡packet ¡ hUp://xkcd.com/85/ ¡ 81 ¡

  57. 3. ¡Building ¡link ¡state ¡packets ¡ • Package ¡info ¡into ¡a ¡Link ¡State ¡Packet ¡(LSP) ¡ – Iden8ty ¡of ¡sender ¡ – List ¡of ¡neighbors ¡ – Sequence ¡number ¡of ¡packet ¡ – Age ¡of ¡packet ¡ 82 ¡

  58. 4. ¡Distribu8ng ¡link ¡state ¡ • Flooding ¡ – Send ¡your ¡LSP ¡out ¡on ¡all ¡links ¡ – Next ¡node ¡sends ¡LSP ¡onward ¡using ¡its ¡links ¡ • Except ¡for ¡link ¡it ¡arrived ¡on ¡ a) LSP ¡arrives ¡at ¡node ¡X ¡ b) X ¡floods ¡LSP ¡to ¡A ¡and ¡C ¡ c) A ¡and ¡C ¡flood ¡LSP ¡to ¡B ¡ (but ¡not ¡X) ¡ d) flooding ¡complete ¡ 83 ¡

  59. Shortest ¡path ¡rou8ng ¡ Building ¡rou8ng ¡table ¡for ¡node ¡D. ¡ 84 ¡

  60. Scaling ¡up ¡ • How ¡to ¡scale ¡a ¡single ¡company's ¡network? ¡ – Add ¡a ¡level ¡of ¡hierarchy ¡ • Within ¡a ¡single ¡organiza8on ¡(aka ¡autonomous ¡system) ¡ – Rou8ng ¡areas ¡ • Most ¡routers ¡in ¡a ¡single ¡area ¡ – Routers ¡only ¡send ¡informa8on ¡within ¡their ¡area ¡ – Detailed ¡topology ¡for ¡only ¡their ¡area ¡ – Traffic ¡going ¡outside ¡of ¡area, ¡send ¡to ¡backbone ¡ • Area ¡0 ¡= ¡backbone ¡ – Some ¡routers ¡in ¡both ¡backbone ¡and ¡other ¡area(s) ¡ – Area ¡Border ¡Router ¡(ABR) ¡ 85 ¡ ¡

  61. Rou8ng ¡areas ¡ R1, ¡R2, ¡and ¡R3 ¡are ¡in ¡the ¡ backbone ¡area. ¡ ¡ R1 ¡is ¡an ¡ABR ¡for ¡area ¡1 ¡and ¡2. ¡ R2 ¡is ¡an ¡ABR ¡for ¡area ¡2. ¡ R3 ¡is ¡an ¡ABR ¡for ¡area ¡3. ¡ 86 ¡

  62. Interdomain ¡rou8ng ¡ 87 ¡

  63. Path-­‑vector ¡rou8ng ¡ • Extension ¡of ¡distance-­‑vector ¡ – Support ¡flexible ¡rou8ng ¡policies ¡ – Avoid ¡count-­‑to-­‑infinity ¡problem ¡ • Key ¡idea: ¡adver8se ¡the ¡en8re ¡path ¡ – Distance ¡vector: ¡send ¡ distance ¡metric ¡ per ¡des8na8on ¡d ¡ – Path ¡vector: ¡send ¡the ¡ enIre ¡path ¡ per ¡des8na8on ¡d ¡ “ d: path (2,1) ” “ d: path (1) ” 3 ¡ 1 ¡ 2 ¡ data traffic data traffic d 88 ¡

  64. AS ¡stub ¡ Stub ¡AS ¡ – Single ¡connec8on ¡to ¡another ¡AS ¡ – AS ¡only ¡carries ¡local ¡traffic ¡ – e.g. ¡Small ¡corpora8on, ¡university ¡ 89 ¡

  65. AS ¡mul8homed ¡ Mul8homed ¡AS ¡ – Connected ¡to ¡mul8ple ¡ASes ¡ – Refuses ¡to ¡carry ¡transit ¡traffic ¡ – Improves ¡reliability ¡ ¡ 90 ¡

  66. AS ¡transit ¡ Transit ¡AS ¡ – Connected ¡to ¡mul8ple ¡ASes ¡ – Designed ¡to ¡carry ¡transit ¡and ¡local ¡ traffic ¡ ¡ 91 ¡

  67. Peering ¡point ¡ Peering ¡point ¡ – Allows ¡ASes ¡to ¡connect ¡directly, ¡ bypassing ¡a ¡transit ¡AS. ¡ 92 ¡

  68. Border ¡Gateway ¡Protocol ¡ • Interdomain ¡rou8ng ¡protocol ¡for ¡the ¡Internet ¡ – Prefix-­‑based ¡path-­‑vector ¡protocol ¡ – Policy-­‑based ¡rou8ng ¡using ¡AS ¡paths ¡ – Evolved ¡over ¡the ¡past ¡18 ¡years ¡ • 1989 : BGP-1 [RFC 1105], replacement for EGP • 1990 : BGP-2 [RFC 1163] • 1991 : BGP-3 [RFC 1267] • 1995 : BGP-4 [RFC 1771], support for CIDR • 2006 : BGP-4 [RFC 4271], update 93 ¡

  69. Incremental ¡Protocol ¡ • Routers ¡form ¡mesh ¡over ¡TCP ¡ • A ¡node ¡learns ¡mul8ple ¡paths ¡to ¡des8na8on ¡ – Stores ¡all ¡routes ¡in ¡rou8ng ¡table ¡ – Applies ¡policy ¡to ¡select ¡single ¡ac8ve ¡route ¡ – May ¡adver8se ¡route ¡to ¡neighbors ¡ • Incremental ¡updates ¡ – Announcement ¡ ¡ • Upon ¡selec8ng ¡new ¡ac8ve ¡route, ¡add ¡node ¡id ¡to ¡path ¡ • Op8onally ¡adver8se ¡to ¡each ¡neighbor ¡ – Withdrawal ¡ • If ¡ac8ve ¡route ¡is ¡no ¡longer ¡available, ¡send ¡message ¡to ¡ neighbors ¡ 94 ¡

  70. BGP ¡decision ¡process ¡ • Policy ¡decision ¡by ¡AS, ¡various ¡possibili8es: ¡ – Route ¡via ¡peered ¡network ¡instead ¡of ¡transit ¡ – Shorter ¡AS ¡path ¡beUer ¡ • Debatable ¡since ¡we ¡don't ¡know ¡how ¡many ¡hops ¡in ¡AS ¡ – Lowest ¡cost ¡for ¡your ¡AS ¡ • Get ¡it ¡off ¡your ¡network ¡sooner ¡ – Provide ¡best ¡quality ¡of ¡service ¡for ¡your ¡customer ¡ 95 ¡

  71. Rou8ng ¡packet ¡inside ¡your ¡AS ¡ • Hot-­‑potato ¡(early ¡exit) ¡rou8ng ¡ – Each ¡router ¡selects ¡closest ¡exit ¡point ¡from ¡AS ¡ – Minimize ¡your ¡costs ¡in ¡shipping ¡around ¡data ¡ – Based ¡on ¡intra-­‑domain ¡rou8ng ¡(e.g. ¡OSPF) ¡ • Cold-­‑potato ¡(late ¡exit) ¡rou8ng ¡ – Keep ¡packet ¡in ¡your ¡AS ¡as ¡long ¡as ¡possible ¡ – Maximize ¡control ¡and ¡quality ¡of ¡service ¡ 96 ¡

  72. Rou8ng ¡security ¡ • Prefix ¡hijacking ¡ – Adver8se ¡you ¡handle ¡a ¡prefix ¡of ¡another ¡AS ¡ – e.g. ¡Pakistan ¡Telecom ¡vs. ¡YouTube, ¡Feb ¡24 th ¡2008 ¡ • Government ¡didn't ¡like ¡video, ¡orders ¡ISPs ¡to ¡block: ¡ ¡ 97 ¡

  73. Address ¡scarcity ¡ 98 ¡

  74. NAT ¡ • Network ¡address ¡transla8on ¡(NAT) ¡ – Quick ¡fix ¡to ¡address ¡scarcity ¡ – Home/business ¡gets ¡one ¡public ¡IP ¡ • Private ¡IP ¡addresses ¡for ¡all ¡hosts ¡inside ¡network ¡ – NAT ¡box ¡translates ¡at ¡boundary ¡to ¡public ¡IP ¡ 99 ¡

  75. NAT ¡an ¡abomina8on? ¡ 1) Violates ¡the ¡IP ¡model ¡ – Every ¡host ¡should ¡have ¡unique ¡iden8fier ¡ 2) Breaks ¡end-­‑to-­‑end ¡connec8vity ¡model ¡ – Any ¡host ¡can ¡send ¡a ¡packet ¡to ¡any ¡other ¡host ¡at ¡ any ¡8me ¡ 3) Not ¡connec8onless ¡ – NAT ¡box ¡has ¡state, ¡effec8vely ¡circuit ¡switching ¡ – Single ¡point ¡of ¡failure ¡ 4) Network ¡layers ¡are ¡not ¡independent ¡ – NAT ¡looks ¡into ¡the ¡payload ¡ ¡ ¡ 100 ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend