1 / 68

CSE524: Lecture 14

Network layer Specific protocols (IP), network devices. CSE524: Lecture 14. Administrative. Reading assignment Chapter 4.1-4.7 Homework #4 available See course web site. Where we’re at…. Internet architecture and history Internet protocols in practice Application layer Transport layer

alger
Download Presentation

CSE524: Lecture 14

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Network layer Specific protocols (IP), network devices CSE524: Lecture 14

  2. Administrative • Reading assignment • Chapter 4.1-4.7 • Homework #4 available • See course web site

  3. Where we’re at… • Internet architecture and history • Internet protocols in practice • Application layer • Transport layer • Network layer • Network-layer functions • Specific network layer protocols (IPv4) • IP demux, IP security, IP fragmentation, IP addressing, etc. • IP routing • Who provides functionality? (Source-routing, virtual circuits, routers) • IP route lookups, Internet area hierarchy, Specific IP routing protocols • IPv6 • Network-layer devices • Data-link layer • Physical layer

  4. IP routing • Who provides functionality? • Recall… • Source routes • Calculated by each host and attached to packet • Network devices stateless • Virtual circuits • Setup by edge devices • Network devices have simple lookup tables • Network routers with global addressing….

  5. NL: Network routers (Global IP addresses) • Most prevalent way to route on the Internet • Each packet has destination IP address • Each router has forwarding table of.. • destination IP  next hop IP address • Distributed routing algorithm for calculating forwarding tables

  6. R R Sender R1 R2 R  4 R  3 R R3 Receiver R R  3 NL: Global Address Example Packet 2 2 1 3 1 3 4 4 2 1 3 4

  7. NL: Issues in Router Table Size • One entry for every host on the Internet • 100M entries,doubling every year • One entry for every LAN • Every host on LAN shares prefix • Still too many, doubling every year • One entry for every organization • Every host in organization shares prefix • Requires careful address allocation • What constitutes an “organization”?

  8. NL: Global Addresses • Advantages • Simple error recovery • Disadvantages • Every router knows about every destination • Potentially large tables • All packets to destination take same route

  9. Source Routing Global Addresses Virtual Circuits Header Size Worst OK – Large address OK (larger than global if IP payload) Router Table Size None Number of hosts (prefixes) Number of circuits Forward Overhead Best Prefix matching Good (table index) Setup Overhead None None Connection Setup Error Recovery Tell all hosts Tell all routers Tell all routers, Tear down circuit and re-route NL: Comparison

  10. NL: IP route lookups • Original IP Route Lookup • In the early days, address classes made it easy • A: 0 | 7 bit network | 24 bit host (16M each) • B: 10 | 14 bit network | 16 bit host (64K) • C: 110 | 21 bit network | 8 bit host (255) • Address would specify prefix for forwarding table • Simple lookup

  11. NL: Original IP Route Lookup – Example • www.ogi.edu address 129.95.5.30 • Class B address – class + network is 129.95 • Lookup 129.95 in forwarding table • Prefix – part of address that really matters for routing • Forwarding table contains • List of prefix entries • A few fixed prefix lengths (8/16/24) • Large tables • 2 Million class C networks • Sites with multiple class C networks have multiple route entries at every router

  12. routing table in A Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 source IP addr misc fields dest IP addr data A 223.1.1.1 • datagram remains unchanged, as it travels source to destination • addr fields of interest here 223.1.2.1 223.1.1.2 223.1.2.9 223.1.1.4 B 223.1.2.2 E 223.1.3.27 223.1.1.3 223.1.3.2 223.1.3.1 NL: Getting a datagram from source to dest. Classful routing example IP datagram:

  13. Starting at A, given IP datagram addressed to B: look up net. address of B find B is on same net. as A link layer will send datagram directly to B inside link-layer frame B and A are directly connected 223.1.1.1 223.1.2.1 E B A 223.1.1.2 223.1.2.9 223.1.1.4 223.1.2.2 223.1.3.27 223.1.1.3 223.1.3.2 223.1.3.1 Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 NL: Getting a datagram from source to dest. misc fields data 223.1.1.1 223.1.1.3

  14. 223.1.1.1 223.1.2.1 E B A 223.1.1.2 223.1.2.9 223.1.1.4 223.1.2.2 223.1.3.27 223.1.1.3 223.1.3.2 223.1.3.1 Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 NL: Getting a datagram from source to dest. Starting at A, dest. E: • look up network address of E • E on different network • A, E not directly attached • routing table: next hop router to E is 223.1.1.4 • link layer sends datagram to router 223.1.1.4 inside link-layer frame • datagram arrives at 223.1.1.4 • continued….. misc fields data 223.1.1.1 223.1.2.3

  15. Arriving at 223.1.4, destined for 223.1.2.2 look up network address of E E on same network as router’s interface 223.1.2.9 router, E directly attached link layer sends datagram to 223.1.2.2 inside link-layer frame via interface 223.1.2.9 datagram arrives at 223.1.2.2!!! (hooray!) Dest. next 223.1.1.1 network router Nhops interface 223.1.2.1 E B A 223.1.1 - 1 223.1.1.4 223.1.1.2 223.1.2 - 1 223.1.2.9 223.1.2.9 223.1.1.4 223.1.3 - 1 223.1.3.27 223.1.2.2 223.1.3.27 223.1.1.3 223.1.3.2 223.1.3.1 NL: Getting a datagram from source to dest. misc fields data 223.1.1.1 223.1.2.3

  16. NL: IP route lookup and CIDR • Recall Classless routing (CIDR) • Advantages • Saves space in route tables • Makes more efficient use of address space • ISP allocated 8 class C chunks, 201.10.0.0 to 201.10.7.255 • Allocation uses 3 bits of class C space • Remaining 21 bits are network number, written as 201.10.0.0/21 • Replace 8 class C entries with 1 combined entry • Routing protocols carry prefix length with destination network address • But....Makes route lookup more complex • No longer separate class A/B/C route tables each with O(1) lookup • One table containing many prefix lengths • Must match against all routes simultaneously via longest prefix match

  17. ISP X Adjacent ISP router Large company 200.23.16.0/21 Medium company 200.23.24.0/22 Small company 200.23.28.0/23 Tiny company 200.23.30.0/24 NL: CIDR example ISP X given 16 class C networks 200.23.16.* to 200.23.31.* (or 200.23.16/20) Route Interface 200.23.16/21 2 200.23.24/22 3 200.23.28/23 4 200.23.30/24 5 1 1 2 5 Route Interface 200.23.16/20 1 3 4 200.23.16.0/24, 200.200.17.0/24 200.23.18.0/24, 200.200.19.0/24 200.23.20.0/24, 200.200.21.0/24 200.23.22.0/24, 200.200.23.0/24 200.23.24.0/24 200.23.25.0/24 200.23.26.0/24 200.23.27.0/24 200.23.28.0/24 200.23.29.0/24

  18. 200.23.16.0/23 200.23.18.0/23 . 200.23.20.0/23 . . . . . 200.23.30.0/23 NL: CIDR, hierarchical addressing, route aggregation Hierarchical addressing allows efficient advertisement of routing information: Organization 0 Organization 1 “Send me anything with addresses beginning 200.23.16.0/20” Organization 2 Fly-By-Night-ISP Internet Organization 7 “Send me anything with addresses beginning 199.31.0.0/16” ISPs-R-Us

  19. Routing to the network • Packet to 10.1.1.3 arrives • Path is R2 – R1 – H1 – H2 H1 H2 R1 H3 R2 Provider H4 NL: Another CIDR example 10.1.1.2/31 10.1.1.3 10.1.1.2 10.1.1.4 10.1.1/24 10.1.3.2 10.1.1.1 10.1.2.2 10.1.3.1 10.1.3/24 10.1.2/24 10.1.16/24 10.1.8/24 10.1.8.1 10.1.2.1 10.1.16.1 10.1.8.4

  20. Subnet Routing • Packet to 10.1.1.3 • Matches 10.1.0.0/22 H1 H2 R1 H3 Destination Next Hop Interface R2 127.0.0.1 127.0.0.1 lo0 Default or 0/0 provider 10.1.16.1 H4 10.1.8.0/24 10.1.8.1 10.1.8.1 10.1.2.0/24 10.1.2.1 10.1.2.1 10.1.0.0/22 10.1.2.2 10.1.2.1 NL: Another CIDR example 10.1.1.2/31 10.1.1.3 10.1.1.2 10.1.1.4 10.1.1/24 10.1.3.2 10.1.1.1 10.1.2.2 10.1.3.1 Routing table at R2 10.1.3/24 10.1.2/24 10.1.16/24 10.1.8/24 10.1.8.1 10.1.2.1 10.1.16.1 10.1.8.4

  21. Subnet Routing • Packet to 10.1.1.3 • Matches 10.1.1.2/31 • Longest prefix match H1 H2 R1 H3 Destination Next Hop Interface R2 127.0.0.1 127.0.0.1 lo0 Default or 0/0 10.1.2.1 10.1.2.2 H4 10.1.3.1 10.1.3.1 10.1.3.0/24 10.1.1.0/24 10.1.1.1 10.1.1.1 10.1.2.2 10.1.2.2 10.1.2.0/24 10.1.1.2/31 10.1.1.4 10.1.1.1 NL: Another CIDR example 10.1.1.2/31 10.1.1.3 10.1.1.2 10.1.1.4 10.1.1/24 10.1.3.2 10.1.1.1 10.1.2.2 10.1.3.1 Routing table at R1 10.1.3/24 10.1.2/24 10.1.16/24 10.1.8/24 10.1.8.1 10.1.2.1 10.1.16.1 10.1.8.4 10.1.1.3 matches both routes, use longest prefix match

  22. Subnet Routing • Packet to 10.1.1.3 • Direct route • Longest prefix match H1 H2 R1 H3 R2 Destination Next Hop Interface 127.0.0.1 127.0.0.1 lo0 H4 Default or 0/0 10.1.1.1 10.1.1.4 10.1.1.0/24 10.1.1.4 10.1.1.4 10.1.1.2/31 NL: Another CIDR example 10.1.1.2/31 10.1.1.3 10.1.1.2 10.1.1.4 10.1.1/24 10.1.3.2 10.1.1.1 10.1.2.2 10.1.3.1 10.1.3/24 Routing table at H1 10.1.2/24 10.1.16/24 10.1.8/24 10.1.8.1 10.1.2.1 10.1.16.1 10.1.8.4 10.1.1.2 10.1.1.2 10.1.1.3 matches both routes, use longest prefix match

  23. Provider 1 Provider 2 NL: CIDR Shortcomings • Customer selecting a new provider • Renumbering required 199.31.0.0/16 201.10.0.0/21 201.10.0.0/22 201.10.4.0/24 201.10.5.0/24 201.10.6.0/23

  24. 200.23.16.0/23 . 200.23.20.0/23 . . . . . 200.23.30.0/23 200.23.18.0/23 NL: CIDR Shortcomings • Multi-homing ISPs-R-Us has a more specific route to Organization 1 Organization 0 “Send me anything with addresses beginning 200.23.16.0/20” Organization 2 Fly-By-Night-ISP Internet Organization 7 “Send me anything with addresses beginning 199.31.0.0/16 or 200.23.18.0/23” ISPs-R-Us Organization 1

  25. NL: Longest-prefix matching • Algorithms and data structures for CIDR-based IP route lookups • Ruiz-Sanchez, Biersack, Dabbous, “Survey and Taxonomy of IP address Lookup Algorithms”, IEEE Network, Vol. 15, No. 2, March 2001 • Binary trie • Multi-bit trie • LC trie • Lulea trie • Full expansion/compression • Binary search on prefix lengths • Binary range search • Multiway range search • Multiway range trees • Binary search on hash tables (Waldvogel – SIGCOMM 97)

  26. A D C E F G H I B NL: Binary trie • Data structure to support longest-prefix match for forwarding • Bit-wise traversal from left-to-right Route Prefixes A 0* B 01000* C 011* D 1* E 100* F 1100* G 1101* H 1110* I 1111* 0 1 1 0 1 0 1 0 0 1 0 0 1 0 1 0

  27. A D B C E F G H I NL: Path-compressed binary trie • Eliminate single branch point nodes • Compare address against all prefixes along path to leaf • Take deepest match • Variants include PATRICIA and BSD tries Bit=1 Route Prefixes A 0* B 01000* C 011* D 1* E 100* F 1100* G 1101* H 1110* I 1111* 0 1 Bit=3 Bit=2 0 1 0 1 Bit=3 0 1 Bit=4 Bit=4 0 1 0 1

  28. NL: Multi-bit tries • Compare multiple bits at a time • Stride = number of bits being examined • Reduces memory accesses • Increase memory required • Forces table expansion for prefixes falling in between strides • Two types • Variable stride multi-bit tries • Fixed stride multi-bit tries • Most route entries are Class C • Optimize “stride” based on this

  29. A A D D C C E F G H I B NL: Variable stride multi-bit trie • Single level has variable stride lengths Route Prefixes A 0* B 01000* C 011* D 1* E 100* F 1100* G 1101* H 1110* I 1111* 00 01 10 11 0 1 00 01 10 11 00 01 10 11 0 1

  30. A A A C E D D D B F F G G H H I I NL: Fixed stride multi-bit trie • Single level has equal strides Route Prefixes A 0* B 01000* C 011* D 1* E 100* F 1100* G 1101* H 1110* I 1111* 000 001 010 011 100 101 110 111 00 01 10 11 00 01 10 11 00 01 10 11

  31. NL: Issues • Scaling • IPv6 • Stride choice • Tuning stride to route table • Bit shuffling

  32. special routers in AS run intra-AS routing protocol with all other routers in AS also responsible for routing to destinations outside AS run inter-AS routing protocol or exterior gateway protocol (EGP) with other gateway routers in other AS’s gateway routers NL: Hierarchical routing in the Internet • Area routing • aggregate routers into regions, “autonomous systems” (AS) • administrative autonomy • routers in same AS run same routing protocol • “intra-AS” routing protocol or interior gateway protocol (IGP) • routers in different AS can run different intra-AS routing protocol

  33. NL: Example #1 1 2 IGP 2.1 2.2 IGP EGP 1.1 2.2.1 1.2 EGP EGP EGP 3 4.2 4.1 IGP EGP 4 IGP 5 3.2 3.1 IGP 5.2 5.1

  34. C.b B.a A.a c A.c b a c b NL: Example #2 Gateways: • perform inter-AS routing amongst themselves • perform intra-AS routers with other routers in their AS b a a C B d A network layer inter-AS, intra-AS routing in gateway A.c link layer physical layer

  35. NL: Path Sub-optimality 1 2 2.1 2.2 1.1 2.2.1 1.2 1.2.1 start end 3.2.1 3 3 hop red path vs. 2 hop green path 3.2 3.1

  36. NL: AS Categories • Stub: an AS that has only a single connection to one other AS - carries only local traffic. • Multi-homed: an AS that has connections to more than one AS, but does not carry transit traffic • Transit: an AS that has connections to more than one AS, and carries both transit and local traffic (under certain policy restrictions)

  37. AS1 AS3 AS1 AS2 AS1 AS3 AS2 AS2 NL: AS categories example Transit Stub Multi-homed

  38. NL: Specific IP routing protocols • Intra-AS routing protocols (interior routing protocols) • GGP • RIP • IGRP • OSPF • Inter-AS routing protocols (exterior routing protocols) • EGP • BGP

  39. NL: Intra-AS Routing • Generate Intra-AS routing tables • Also known as Interior Gateway Protocols (IGP) • Most common IGPs • Distance vector protocols • GGP: Gateway-to-Gateway Protocol (1970s) • RIP: Routing Information Protocol (1982) • IGRP: Interior Gateway Routing Protocol (1988) • Cisco proprietary • Link state protocols • OSPF: Open Shortest Path First • Hierarchical OSPF

  40. NL: RIP (Routing Information Protocol) • Included in BSD-UNIX Distribution in 1982 • Distance metric: # of hops (max = 15 hops) • Vectors exchanged every 30 sec and when triggered • Static update period leads to synchronization problems • Split horizon with poisonous reverse • RIP-2 in 1993 adds prefix mask for CIDR

  41. NL: RIP: Link Failure and Recovery If no advertisement heard after 180 sec --> neighbor/link declared dead • routes via neighbor invalidated • new advertisements sent to neighbors • neighbors in turn send out new advertisements (if tables changed) • link failure info quickly propagates to entire net • poison reverse used to prevent count-to-infinity (infinite distance = 16 hops)

  42. NL: RIP Table processing • RIP routing tables managed by application-level process called route-d (daemon) • advertisements sent in UDP packets, periodically repeated

  43. NL: IGRP (Interior Gateway Routing Protocol) • CISCO proprietary; successor of RIP (mid 80s) • Distance Vector, like RIP • several cost metrics (delay, bandwidth, reliability, load etc) • 90 sec update with triggered updates • Split horizon • V1: path holddown • V2: route poisoning • multiple path support • uses TCP to exchange routing updates • EIGRP • Loop-free routing via DUAL (based on diffused computation) • CIDR support

  44. NL: Intra-AS Link State Protocols • OSPF • Uses Link State algorithm • LS packet dissemination • Topology map at each node • Route computation using Dijkstra’s algorithm • OSPF advertisement carries one entry per neighbor router • Advertisements disseminated to entire AS (via flooding)

  45. NL: OSPF “advanced” features (not in RIP) • Security: all OSPF messages authenticated (to prevent malicious intrusion); TCP connections used • Multiple same-cost paths allowed (only one path in RIP) • For each link, multiple cost metrics for different TOS (eg, satellite link cost set “low” for best effort; high for real time) • Integrated uni- and multicast support: • Multicast OSPF (MOSPF) uses same topology data base as OSPF • Hierarchical OSPF in large domains.

  46. NL: Hierarchical OSPF

  47. NL: Hierarchical OSPF • Two-level hierarchy: local area, backbone. • Link-state advertisements only in area • each nodes has detailed area topology; only know direction (shortest path) to nets in other areas. • Area border routers:“summarize” distances to nets in own area, advertise to other Area Border routers. • Backbone routers: run OSPF routing limited to backbone. • Boundary routers: connect to other ASs.

  48. NL: Inter-AS routing • EGP • BGP

  49. NL: Why different Intra- and Inter-AS routing ? Policy vs. Performance: • Inter-AS • ISPs want control over how its traffic routed, who routes through its net • policy and monetary factors dominate over performance • Intra-AS • single administrative policy • performance dominates

  50. NL: History • Mid-80s: EGP (Exterior Gateway Protocol) • Used in original ARPAnet • Reachability protocol (no shortest path) • Single bit for reachability information • Topology restricted to a tree (no cycles allowed) • ARPA-managed packet switches at top of tree • Unacceptable once Internet grew to multiple independent backbones • Result: BGP development

More Related