Presentation is loading. Please wait.

Presentation is loading. Please wait.

TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Network Protocols Routing.

Similar presentations


Presentation on theme: "TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Network Protocols Routing."— Presentation transcript:

1 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Network Protocols Routing

2 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 IPv4 unicast routing All Internet hosts perform basic routing for local net destinations, forward to local host for non-local nets, forward to default router Dedicated routers often used between networks Routing tables maintain next hop information Forwarding decision based on destination address routers can use other info to influence decision Routers forward to next-hop if not locally attached

3 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Basic IPv4 forwarding process For an IP datagram received on an interface... remove layer 2 information, extract destination IP address (D), find best match for (D) in routing table, extract forwarding address (F) for next hop, create layer 2 info on outgoing interface, send datagram to (F).

4 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 IP routing tables Since each row in a routing table represents an entry associated with one IP network, the size of the routing table is directly proportional to the number of IP networks known throughout the entire internetwork.

5 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 IP routing table illustrated

6 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Populating the routing table Statically (through manual configuration) Simple for small sites with few links/routers Lacks scalability and flexibility Useful for permanent route entries Automatically (with distributed routing protocols) Allows quick re-route around failures/changes Useful for large networks with redundant paths Failures in protocol can be catastrophic

7 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 IP routing illustrated

8 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 IP routing illustrated (continued)

9 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Routing metrics Shortest/longest hop path Lowest/highest cost path Lowest/highest reliable path Best/worst latency/delay Site specific path policy decision

10 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Some routing terminology Autonomous system (AS) Network(s) set administered by a single entity Interior gateway protocol (IGP) distributed routing protocol used within an AS Exterior gateway protocol (EGP) distributed routing protocol used between ASes

11 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Distance vector routing Each node maintains a distance to destination e.g. 4 hops to network XYZ, 2 hops to ABC Periodically advertise attached nets out each link Learn other nets from other router advertisements Advertise learned routes (add 1 to hop count) Also known as Bellman-Ford after the inventors

12 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Distance vector illustrated

13 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Distance vector illustrated [cont]

14 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Distance vector illustrated [cont] coverged

15 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Problems with distance vector Convergence time can be slow Also known as the count to infinity problem What happens when link to A fails?

16 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Solving count to infinity Hold down advertise infinity for a route and wait before switching paths. hope that news of the change propagates before timer expires. Kludge. Report the entire path guarantees no loops, but resource expensive Split horizon Do not advertise route to neighbor if it was received from that neighbor. Not foolpoof.

17 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Other distance vector tricks Triggered updates advertise changes immediately, may cause route flapping, but generally a good thing to do Poison reverse this is used with split horizon, advertise infinity rather than nothing at all DUAL like hold down, but can switch paths if a new distance is lower, sufficiently complex

18 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Routing information protocol (RIP) RFC 1058 (RIPv1) and RFC 2453 (RIPv2) Very simple distance vector protocol Slow convergence time UDP broadcast every 30 seconds (by default) Route times out after 180 seconds (by default) Widely used as an IGP (RIPv2 in particular) 15 hop limit (anything greater equals infinity)

19 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 RIPv2 Mainly updated to support subnet masks Supports simple authentication Uses IP multicast group for destination address Route tag option for interaction with EGPs Next-hop option to associated with advertisement

20 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 RIPv1 packet format Packet format: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | command (1) | version (1) | must be zero (2) | +---------------+---------------+-------------------------------+ | ~ RIP Entry (20) ~ | +---------------+---------------+---------------+---------------+ A RIPv1 entry has the following format: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | address family identifier (2) | must be zero (2) | +-------------------------------+-------------------------------+ | IPv4 address (4) | +---------------------------------------------------------------+ | must be zero (4) | +---------------------------------------------------------------+ | must be zero (4) | +---------------------------------------------------------------+ | metric (4) | +---------------------------------------------------------------+

21 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 RIPv2 packet format Packet format is the same, RIPv2 entry format is: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address Family Identifier (2) | Route Tag (2) | +-------------------------------+-------------------------------+ | IP Address (4) | +---------------------------------------------------------------+ | Subnet Mask (4) | +---------------------------------------------------------------+ | Next Hop (4) | +---------------------------------------------------------------+ | Metric (4) | +---------------------------------------------------------------+ Authentication uses one entry of the format: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Command (1) | Version (1) | unused | +---------------+---------------+-------------------------------+ | 0xFFFF | Authentication Type (2) | +-------------------------------+-------------------------------+ ~ Authentication (16) ~ +---------------------------------------------------------------+

22 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Link state routing All routes have complete network topology information (database within their area) link state packets are flooded to all area routers Each router computes its own optimal path Convergence time is very short Protocol complexity is higher than distance vector Ensures a loop free environment

23 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Link state routing illustrated

24 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Link state routing databases Link state database contains latest link state packet from each router PATH (permanent) database (router id / path cost / forwarding direction) tuple TENT (tenative) database same format as PATH, candidate PATH entries Forwarding database (aka FIB) contains ID and forwarding direction

25 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Dijkstra's algorithm Start with self as root of the tree (my ID / cost 0 / forwarding direction 0) in PATH For each node in PATH, examine its LSP and place those neighbors in TENT if not already in PATH or TENT (with lower cost) If TENT is empty, exit, otherwise find ID with lowest cost in TENT and move it to PATH

26 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Dijkstra's algorithm illustrated 1. Start with A, put A in PATH, examine A's LSP, add B and D to TENT 2. B is lowest path cost in TENT, place B in PATH, examine B's LSP, put C,E in TENT 3. D is lowest path cost in TENT, place D in PATH, examine D's LSP, found better E path 4. C is lowest path cost in TENT, place C in PATH, exame C's LSP, found better E path again 5. E is lowest path cost in TENT, place E in PATH, examine E's LSP (no better paths) 6. TENT is empty, terminate

27 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Open shortest path first (OSPF) Standardized as RFC 2328 (OSPFv2) Relatively complex Supports multiple route metrics (no one does this) Allows 2-tier area hierarchy for scaling Relatively efficient Good convergence properties Runs directly over IP Recommended IGP by the IETF

28 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 OSPF packets Hello link maintenance Exchange initial exchange of routing tables Flooding incremental routing updates

29 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 OSPF database records Router links summarizes links from advertising router Network links transit networks (broadcast and non-broadcast) Summary links summary info advertised by area border routers External links imported routes, typically from EGP

30 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Common OSPF header 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version # | Type | Packet length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Router ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Area ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | AuType | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Authentication | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Authentication | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

31 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Interdomain routing Routing domains are independently funded Routing domains do not trust each other Different routing domains have different policies Static routing EGP – first interdomain routing protocol BGP – current path vector routing protocol

32 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Border gateway protocol (BGP) Current version 4 standardized in RFC 1771 Runs over TCP List of AS numbers comprise a full path to network Announcements can be edited (paths padded) Can selectively filter or preference received routes Route can be selected on path or a preference external BGP versus internal BGP

33 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 BGP attributes Describes routes in BGP updates Confusing descriptions of attributes e.g. well known must be supported e.g. mandatory must be present in updates Examples AS path community unreachable

34 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Confederations Group of ASes that appear as a single AS A form of aggregation May simplify routing policies “Don't route through confed X” as opposed to “don't go through AS A, AS B, AS C, etc...” Sub-optimal routing may result multiple ASes in path vector appear as a loop

35 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 BGP message types Open first message when neighbors come up Update contains routing information Notification final message before session is disconnected Keepalive reassures reachability in absence of updates

36 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Route dampening Routes that oscillate ripple through the Internet consumes CPU and causes instability (churn) Unstable (flapping) routes are penalized for some period of time, the flap is suppressed suppression time can increase to a maximum suppression of routes results in lost connectivity Dampen big/important netblocks more cautiously Dampening may introduce stabilities of its own

37 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Sample Cisco config Router bgp 12345 bgp log-neighbor-changes network 128.160.0.0 mask 255.255.0.0 neighbor 36.5.1.1 remote-as 54321 neighbor 36.5.1.1 description E-BGP peer with XYZ corp. neighbor 36.5.1.1 password as54321password neighbor 36.5.1.1 version 4 neighbor 36.5.1.1 prefix-list invalid in neighbor 36.5.1.1 prefix-list announce out ip prefix-list invalid seq 10 deny 0.0.0.0/8 le 32 ip prefix-list invalid seq 20 deny 10.0.0.0/8 le 32 ip prefix-list invalid seq 30 deny 127.0.0.0/8 le 32... ip prefix-list announce seq 10 permit 128.160.0.0/16 ip prefix-list announce seq 20 deny 0.0.0.0/0 le 32

38 TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Final thoughts Routing protocols tend to work 99.99% of the time But when failures occur, they tend to be catastrphic This is probably the most network intelligence needed for basic Internet operation Internet peering Route filtering, protection and policy issues


Download ppt "TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Network Protocols Routing."

Similar presentations


Ads by Google