Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 ENTS689L: Packet Processing and Switching Introduction Introduction Vahid Tabatabaee Fall 2007.

Similar presentations


Presentation on theme: "1 ENTS689L: Packet Processing and Switching Introduction Introduction Vahid Tabatabaee Fall 2007."— Presentation transcript:

1 1 ENTS689L: Packet Processing and Switching Introduction Introduction Vahid Tabatabaee Fall 2007

2 2 ENTS689L: Packet Processing and Switching Introduction References  Communication Networks: Fundmantal Concepts and Key Architectures Author: A. Leon-Garcia, I. Widjaja Publisher: McGraw-Hill  Internetworking with TCP/IP vol. I Principles, Protocols, and Architecture Author: Douglas E. Comer Publisher: Prentice-Hall  Title: Network Processors Architectures, Protocols, and Platforms Author: Panos C. Lekkas Publisher: McGraw-Hill

3 3 ENTS689L: Packet Processing and Switching Introduction User view of the internet  It is a big network that every computer is attached to it Internet hosts

4 4 ENTS689L: Packet Processing and Switching Introduction Internet view in a networking course: hosts Physical net routers

5 5 ENTS689L: Packet Processing and Switching Introduction Physical Network (Ethernet) Source: http://www.fiber-optics.info/articles/telecom-nets.htm

6 6 ENTS689L: Packet Processing and Switching Introduction Physical Network (ISP WAN) Source: http://www.cisco.com/univercd/cc/td/doc/product/aggr/10000/swconfig/swref/tech-edg/ch1ovw.htm

7 7 ENTS689L: Packet Processing and Switching Introduction Router Source: http://www.cisco.com/en/US/products/hw/routers/ps167/products_tech_note09186a00801e1dc2.shtml Line and Switch Cards In this course we talk about how packets are processed and forwarded in routers

8 8 ENTS689L: Packet Processing and Switching Introduction In this course  We discuss:  Basic components in a router  The basic processes in a router  The basic requirements of router  Some network protocols  Some example architectures  We do NOT discuss:  Hardware design  Software design  Router programming  All other good stuff !

9 9 ENTS689L: Packet Processing and Switching Introduction Review of Networking

10 10 ENTS689L: Packet Processing and Switching Introduction Layering in a Network  Layering simplifies design, implementation, and testing  Protocol in each layer can be designed separately

11 11 ENTS689L: Packet Processing and Switching Introduction 7-Layer OSI Reference Model Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer Network Layer Application Data Link Layer Physical Layer Network Layer Data Link Layer Physical Layer Communicating End Systems One or More Network Nodes End-to-End Protocols

12 12 ENTS689L: Packet Processing and Switching Introduction Physical Layer  Transfers bits across link  Definition & specification of the physical aspects of a communications link  Mechanical: cable, plugs, pins...  Electrical/optical: modulation, signal strength, voltage levels, bit times, …  functional/procedural: how to activate, maintain, and deactivate physical links…  Ethernet, DSL, cable modem, telephone modems…  Twisted-pair cable, coaxial cable optical fiber, radio, infrared, …

13 13 ENTS689L: Packet Processing and Switching Introduction Data Link Layer  Transfers frames across direct connections  Groups bits into frames  Detection of bit errors; Retransmission of frames  Activation, maintenance, & deactivation of data link connections  Medium access control for local area networks  Flow control Data Link Layer Physical Layer Data Link Layer Physical Layer frames bits

14 14 ENTS689L: Packet Processing and Switching Introduction Network Layer  Transfers packets across multiple links and/or multiple networks  Addressing must scale to large networks  Nodes jointly execute routing algorithm to determine paths across the network  Forwarding transfers packet across a node  Congestion control to deal with traffic surges  Congestion vs. Flow control  Connection setup, maintenance, and teardown when connection-based

15 15 ENTS689L: Packet Processing and Switching Introduction Internetworking  Internetworking is part of network layer and provides transfer of packets across multiple possibly dissimilar networks  Gateways (routers) direct packets across networks G = gateway H = host Net 1 Net 5 Net 3 Net 2 H Net 3 G H H H G G G G G Net 1Net 2Net 4Net 5 Ethernet LAN ATM Switch ATM Switch ATM Switch ATM Switch ATM Network

16 16 ENTS689L: Packet Processing and Switching Introduction Transport Layer  Transfers data (not just packet) end-to-end from process in a machine to process in another machine  Reliable stream transfer or quick-and-simple single-block transfer  Port numbers enable multiplexing  Message segmentation and reassembly  Connection setup, maintenance, and release Transport Layer Network Layer Transport Layer Network Layer Network Layer Network Layer Communication Network

17 17 ENTS689L: Packet Processing and Switching Introduction Headers and trailers  Each protocol uses a header that carries addresses, sequence numbers, flag bits, length indicators, etc…  CRC check bits may be appended for error detection Application Layer Transport Layer Network Layer Data Link Layer Physical Layer Application Layer Transport Layer Network Layer Data Link Layer Physical Layer Application APP DATA AHAPP DATA TH AHAPP DATA NHTH AHAPP DATA DHNHTH AHAPP DATA CRC bits

18 18 ENTS689L: Packet Processing and Switching Introduction Why Internetworking  To build a “network of networks” or internet  operating over multiple, coexisting, different network technologies  providing ubiquitous connectivity through IP packet transfer  achieving huge economies of scale G G G G G G H Net 5 H Net 2 H Net 5 Net 3 H Net 5 Net 1 Net 5 Net 4

19 19 ENTS689L: Packet Processing and Switching Introduction Why Internetworking  To provide universal communication services  independent of underlying network technologies  providing common interface to user applications G G G G G G H Net 5 H Net 2 H Net 5 Net 3 H Net 5 Net 1 Net 5 Net 4

20 20 ENTS689L: Packet Processing and Switching Introduction Internet Protocol Approach  IP packets transfer information across Internet  Host A IP → router→ router…→ router→ Host B IP  IP layer in each router determines next hop (router)  Network interfaces transfer IP packets across networks Router Internet Layer Network Interface Transport Layer Internet Layer Network Interface Transport Layer Internet Layer Network Interface Host A Host B Net 5 Net 1 Net 5 Net 2 Net 5 Net 3 Router Internet Layer Network Interface Router Internet Layer Network Interface Net 5 Net 4

21 21 ENTS689L: Packet Processing and Switching Introduction How to create the routing tables  Need information on state of links  Link up/down; congested; delay or other metrics  Need to distribute link state information using a routing protocol  What information is exchanged? How often?  Exchange with neighbors; Broadcast or flood  Need to compute routes based on information  Single metric; multiple metrics  Single route; alternate routes

22 22 ENTS689L: Packet Processing and Switching Introduction Routing algorithm requirements  Responsiveness to changes  Topology or bandwidth changes, congestion  Rapid convergence of routers to consistent set of routes  Freedom from persistent loops  Optimality  Resource utilization, path length  Robustness  Continues working under high load, congestion, faults, equipment failures, incorrect implementations  Simplicity  Efficient software implementation, reasonable processing load

23 23 ENTS689L: Packet Processing and Switching Introduction Distributed Routing  Routes determined by routers using distributed algorithm  State information exchanged by routers  Adapts to topology and other changes  Better scalability

24 24 ENTS689L: Packet Processing and Switching Introduction Routing Table in Hop-by-Hop routing  Every router decides where to send the packet next by looking at the packet header (dest. address, source address, CoS, …) 2 2 3 3 4 4 5 2 6 2 Node 1 Node 2 Node 3 Node 4 Node 6 Node 5 1 1 2 4 4 4 5 6 6 6 1 3 2 5 3 3 4 3 5 5 Destination Next node 1 1 3 1 4 4 5 5 6 5 1 4 2 2 3 4 4 4 6 6 1 1 2 2 3 3 5 5 6 3 Destination Next node

25 25 ENTS689L: Packet Processing and Switching Introduction Non-Hierarchical Addresses and Routing  No relationship between addresses & routing proximity  Routing tables require 16 entries each 0000 0111 1010 1101 0001 0100 1011 1110 0011 0101 1000 1111 0011 0110 1001 1100 R1R1 1 2 5 4 3 0000 1 0111 1 1010 1 … … 0001 4 0100 4 1011 4 … … R2R2

26 26 ENTS689L: Packet Processing and Switching Introduction Hierarchical Addresses and Routing  Prefix indicates network where host is attached  Routing tables require 4 entries each  Can we do better than this? 0000 0001 0010 0011 0100 0101 0110 0111 1100 1101 1110 1111 1000 1001 1010 1011 R1R1 R2R2 1 2 5 4 3 00 1 01 3 10 2 11 3 00 3 01 4 10 3 11 5

27 27 ENTS689L: Packet Processing and Switching Introduction Shortest Path Routing  Many possible paths connect any given source to any given destination  Routing involves the selection of the path to be used to accomplish a given transfer  Typically it is possible to attach a cost or distance to a link connecting two nodes  Routing can then be posed as a shortest path problem

28 28 ENTS689L: Packet Processing and Switching Introduction Routing Metrics Means for measuring desirability of a path  Path Length = sum of costs or distances  Possible metrics  Hop count: rough measure of resources used  Reliability: link availability; BER  Delay: sum of delays along path; complex & dynamic  Bandwidth: “available capacity” in a path  Load: Link & router utilization along path  Cost: $$$

29 29 ENTS689L: Packet Processing and Switching Introduction Shortest Path Approaches Distance Vector Protocols  Neighbors exchange list of distances to destinations  Best next-hop determined for each destination  Ford-Fulkerson (distributed) shortest path algorithm Link State Protocols  Link state information flooded to all routers  Routers have complete topology information  Shortest path (& hence next hop) calculated  Dijkstra (centralized) shortest path algorithm

30 30 ENTS689L: Packet Processing and Switching Introduction i only has local info from neighbors D j" C ij” i San Jose j C ij DjDj DiDi j" C ij' j' D j' Pick current shortest path Distance Vector Routing

31 31 ENTS689L: Packet Processing and Switching Introduction Why Distance Vector Works San Jose 1 Hop From SJ 2 Hops From SJ 3 Hops From SJ Accurate info about SJ ripples across network, Shortest Path Converges SJ sends accurate info Hop-1 nodes calculate current (next hop, dist), & send to neighbors

32 32 ENTS689L: Packet Processing and Switching Introduction Bellman-Ford Algorithm  Consider computations for one destination d  Initialization  Each node table has 1 row for destination d  Distance of node d to itself is zero: D d =0  Distance of other node j to d is infinite: D j = , for j  d  Next hop node n j = -1 to indicate not yet defined for j  d  Send Step  Send new distance vector to immediate neighbors across local link  Receive Step  At node j, find the next hop that gives the minimum distance to d,  Min j { C ij + D j }  Replace old (n j, D j (d)) by new (n j *, D j *(d)) if new next node or distance  Go to send step

33 33 ENTS689L: Packet Processing and Switching Introduction IterationNode 1Node 2Node 3Node 4Node 5 Initial (-1,  ) 1 2 3 3 1 5 4 6 2 2 3 4 2 1 1 2 3 5 San Jose Table entry @ node 1 for dest SJ Table entry @ node 3 for dest SJ

34 34 ENTS689L: Packet Processing and Switching Introduction IterationNode 1Node 2Node 3Node 4Node 5 Initial (-1,  ) 1 (6,1) (-1,  ) (6,2) 2 3 San Jose D 6 =0 D 3 =D 6 +1 n 3 =6 3 1 5 4 6 2 2 3 4 2 1 1 2 3 5 D 6 =0 D 5 =D 6 +2 n 5 =6 0 2 1

35 35 ENTS689L: Packet Processing and Switching Introduction IterationNode 1Node 2Node 3Node 4Node 5 Initial (-1,  ) 1 (6, 1) (-1,  ) (6,2) 2(3,3)(5,6)(6, 1)(3,3)(6,2) 3 San Jose 3 1 5 4 6 2 2 3 4 2 1 1 2 3 5 0 1 2 3 3 6

36 36 ENTS689L: Packet Processing and Switching Introduction IterationNode 1Node 2Node 3Node 4Node 5 Initial (-1,  ) 1 (6, 1) (-1,  ) (6,2) 2(3,3)(5,6)(6, 1)(3,3)(6,2) 3(3,3)(4,4)(6, 1)(3,3)(6,2) San Jose 3 1 5 4 6 2 2 3 4 2 1 1 2 3 5 0 1 2 6 3 3 4

37 37 ENTS689L: Packet Processing and Switching Introduction 3124 111 3124 11 X (a) (b) UpdateNode 1Node 2Node 3 Before break (2,3)(3,2)(4, 1) After break (2,3)(3,2)(2,3) 1 (3,4)(2,3) 2(2,5)(3,4)(2,5) 3 (3,6)(2,5) 4(2,7)(3,6)(2,7) 5 (3,8)(2,7) ………… Counting to Infinity Problem Nodes believe best path is through each other (Destination is node 4)

38 38 ENTS689L: Packet Processing and Switching Introduction Problem: Bad News Travels Slowly Remedies  Split Horizon  Do not report route to a destination to the neighbor from which route was learned  Poisoned Reverse  Report route to a destination to the neighbor from which route was learned, but with infinite distance  Breaks erroneous direct loops immediately  Does not work on some indirect loops

39 39 ENTS689L: Packet Processing and Switching Introduction 3124 111 3124 11 X (a) (b) Split Horizon with Poison Reverse Nodes believe best path is through each other UpdateNode 1Node 2Node 3 Before break(2, 3)(3, 2)(4, 1) After break(2, 3)(3, 2) (-1,  ) Node 2 advertizes its route to 4 to node 3 as having distance infinity; node 3 finds there is no route to 4 1(2, 3) (-1,  ) Node 1 advertizes its route to 4 to node 2 as having distance infinity; node 2 finds there is no route to 4 2 (-1,  ) Node 1 finds there is no route to 4

40 40 ENTS689L: Packet Processing and Switching Introduction Link-State Algorithm  Basic idea: two step procedure  Each source node gets a map of all nodes and link metrics (link state) of the entire network  Find the shortest path on the map from the source node to all destination nodes  Broadcast of link-state information  Every node i in the network broadcasts to every other node in the network:  ID’s of its neighbors: N i =set of neighbors of i  Distances to its neighbors: {C ij | j  N i }  Flooding is a popular method of broadcasting packets

41 41 ENTS689L: Packet Processing and Switching Introduction Dijkstra Algorithm: Finding shortest paths in order sww"w' Closest node to s is 1 hop away w"xx' 2 nd closest node to s is 1 hop away from s or w” xzz' 3rd closest node to s is 1 hop away from s, w”, or x w' Find shortest paths from source s to all other destinations

42 42 ENTS689L: Packet Processing and Switching Introduction Dijkstra’s algorithm  N: set of nodes for which shortest path already found  Initialization: (Start with source node s)  N = {s}, D s = 0, “s is distance zero from itself”  D j =C sj for all j  s, distances of directly-connected neighbors  Step A: (Find next closest node i)  Find i  N such that  D i = min Dj for j  N  Add i to N  If N contains all the nodes, stop  Step B: (update minimum costs)  For each node j  N  D j = min (D j, D i +C ij )  Go to Step A Minimum distance from s to j through node i in N

43 43 ENTS689L: Packet Processing and Switching Introduction Execution of Dijkstra’s algorithm IterationND2D2 D3D3 D4D4 D5D5 D6D6 Initial{1}325  1{1,3}324  3 2{1,2,3}32473 3{1,2,3,6}32453 4{1,2,3,4,6}32453 5{1,2,3,4,5,6}32453 1 2 4 5 6 1 1 2 3 2 3 5 2 4 3 1 2 4 5 6 1 1 2 3 2 3 5 2 4 33 1 2 4 5 6 1 1 2 3 2 3 5 2 4 3 1 2 4 5 6 1 1 2 3 2 3 5 2 4 3 3 1 2 4 5 6 1 1 2 3 2 3 5 2 4 3 3 1 2 4 5 6 1 1 2 3 2 3 5 2 4 3 3 1 2 4 5 6 1 1 2 3 2 3 5 2 4 3 3

44 44 ENTS689L: Packet Processing and Switching Introduction Shortest Paths in Dijkstra’s Algorithm 1 2 4 5 6 1 1 2 3 2 3 5 2 4 33 1 2 4 5 6 1 1 2 3 2 3 5 2 4 3 1 2 4 5 6 1 1 2 3 2 3 5 2 4 3 3 1 2 4 5 6 1 1 2 3 2 3 5 2 4 3 3 1 2 4 5 6 1 1 2 3 2 3 5 2 4 3 3 1 2 4 5 6 1 1 2 3 2 3 5 2 4 3 3

45 45 ENTS689L: Packet Processing and Switching Introduction Reaction to Failure  If a link fails,  Router sets link distance to infinity & floods the network with an update packet  All routers immediately update their link database & recalculate their shortest paths  Recovery very quick  But watch out for old update messages  Add time stamp or sequence # to each update message  Check whether each received update message is new  If new, add it to database and broadcast  If older, send update message on arriving link

46 46 ENTS689L: Packet Processing and Switching Introduction Why is Link State Better?  Fast, loopless convergence  Support for precise metrics, and multiple metrics if necessary (throughput, delay, cost, reliability)  Support for multiple paths to a destination  algorithm can be modified to find best two paths

47 47 ENTS689L: Packet Processing and Switching Introduction  OSPF is a well known routing protocol for IP (RFC 2328 (v2))  OSPF is a link state routing protocol  Enables each router to learn complete network topology  Each router monitors the link state to each neighbor and floods the link- state information to other routers  Each router builds an identical link-state database  Allows router to build shortest path tree with router as root  OSPF typically converges faster than RIP when there is a failure in the network Open Shortest Path First

48 48 ENTS689L: Packet Processing and Switching Introduction  Used in OSPF to distribute link state (LS) information  Forward incoming packet to all ports except where packet came in  Packet eventually reaches destination as long as there is a path between the source and destination  Generates exponential number of packet transmissions  Approaches to limit # of transmissions:  Use a TTL at each packet; won’t flood if TTL is reached  Each router adds its identifier to header of packet before it floods the packet; won’t flood if its identifier is detected  Each packet from a given source is identified with a unique sequence number; won’t flood if sequence number is same Flooding

49 49 ENTS689L: Packet Processing and Switching Introduction Example OSPF Topology 10.5.1.1 10.5.1.310.5.1.5 10.5.1.210.5.1.4 10.5.1.6 At steady state:  All routers have same LS database  Know how many routers in network  Interfaces & links between routers  Cost of each link  Occasional Hello messages (10 sec) & LS updates sent (30 min)

50 50 ENTS689L: Packet Processing and Switching Introduction Exterior Gateway Protocols  Within each AS, there is a consistent set of routes connecting the constituent networks  The Internet is woven into a coherent whole by Exterior Gateway Protocols (EGPs) that operate between AS’s  EGP enables two AS’s to exchange routing information about:  The networks that are contained within each AS  The AS’s that can be reached through each AS  EGP path selection guided by policy rather than path optimality  Trust, peering arrangements, etc

51 51 ENTS689L: Packet Processing and Switching Introduction BGP Example AS1 AS2 AS3 R1 R2 R3 R4 N1 N1 reachable through AS3 R4 advertises that network N1 can be reached through AS3 R3 examines announcement & applies policy to decide whether it will forward packets to N1 through R4 If yes, routing table updated in R3 to indicate R4 as next hop to N1 BGP propagates N1 reachability information through AS2 Only BGP routers are shown

52 52 ENTS689L: Packet Processing and Switching Introduction BGP Example AS1 AS2 AS3 R1 R2 R3 R4 N1 N1 reachable through AS2 BGP routers within an AS, e.g. R3 and R2, are kept consistent Suppose AS2 willing to handle transit packets from AS1 to N1 R2 advertises to AS1 the reachability of N1 through AS2 R1 applies its policy to decide whether to send to N1 via AS2

53 53 ENTS689L: Packet Processing and Switching Introduction Peering and Inter-AS connectivity Tier 1 ISP (Transit AS) Non-transit AS’s (stub & multihomed) do not carry transit traffic Tier 1 ISPs peer with each other, privately & peering centers Tier 2 ISPs peer with each other & obtain transit services from Tier 1s; Tier 1’s carry transit traffic between their Tier 2 customers Client AS’s obtain service from Tier 2 ISPs AS Content or Application Service Provider (Non-transit) Tier 1 ISP (Transit AS) Tier 2 (transit AS) AS Tier 2 (transit AS) AS Peering Centre

54 54 ENTS689L: Packet Processing and Switching Introduction EGP Requirements  Scalability to global Internet  Provide connectivity at global scale  Link-state does not scale  Should promote address aggregation  Fully distributed  EGP path selection guided by policy rather than path optimality  Trust, peering arrangements, etc  EGP should allow flexibility in choice of paths

55 55 ENTS689L: Packet Processing and Switching Introduction BGP Features  BGP is path vector protocol: advertises sequence of AS numbers to the destination network  Path vector info used to prevent routing loops  BGP enforces policy through selection of different paths to a destination and by control of redistribution of routing information  Uses CIDR to support aggregation & reduction of routing information

56 56 ENTS689L: Packet Processing and Switching Introduction iBGP & eBGP  eBGP to exchange reachability information in different AS’s  eBGP peers directly connected  iBGP to ensure net reachability info is consistent among the BGP speakers in the same AS  usually not directly connected  iBGP speakers exchange info learned from other iBGP speakers, and thus fully meshed R R R R iBGP eBGP R R R R iBGP

57 57 ENTS689L: Packet Processing and Switching Introduction Path Selection  Each BGP speaker  Evaluates paths to a destination from an AS border router  Selects the best that complies with policies  Advertises that route to all BGP neighbors  BGP assigns a preference order to each path & selects path with highest value; BGP does not keep a cost metric to any path  When multiple paths to a destination exist, BGP maintains all of the paths, but only advertises the one with highest preference value

58 58 ENTS689L: Packet Processing and Switching Introduction BGP Policy  Examples of policy:  Never use AS X  Never use AS X to get to a destination in AS Y  Never use AS X and AS Y in the same path


Download ppt "1 ENTS689L: Packet Processing and Switching Introduction Introduction Vahid Tabatabaee Fall 2007."

Similar presentations


Ads by Google