Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS4470 Computer Networking Protocols

Similar presentations


Presentation on theme: "CS4470 Computer Networking Protocols"— Presentation transcript:

1 CS4470 Computer Networking Protocols
8/1/2018 CS Computer Networking Protocols 12. Routing protocols Huiping Guo Department of Computer Science California State University, Los Angeles

2 Outline Hierarchical routing Internet routing ICMP Intro-AS Routing
RIP OSPF Inter-AS Routing BGP ICMP 12. Routing protocols CS4470

3 Hierarchical Routing scale: with 200 million routers:
Our routing study thus far – idealization We’ve viewed the network simply as a collection of interconnected routers All routers execute the same routing algorithm to compute routing paths through the entire network Not true in practice scale: with 200 million routers: can’t store all dest’s in routing tables! routing table exchange would swamp links! administrative autonomy internet = network of networks each network admin may want to control routing in its own network 12. Routing protocols CS4470

4 Hierarchical Routing Aggregate routers into regions, “autonomous systems” (AS) Each AS contains a group of routers under the same administrative control Routers in same AS run same routing protocol “intra-AS” routing protocol routers in different AS can run different intra-AS routing protocol Gateway router Direct link to router in another AS 12. Routing protocols CS4470

5 Interconnected ASes 3c 3a 2c 3b 2a AS3 2b 1c
Intra-AS Routing algorithm Inter-AS Forwarding table 3c Forwarding table is configured by both intra- and inter-AS routing algorithm Intra-AS sets entries for internal dests Inter-AS & Intra-As sets entries for external dests 12. Routing protocols CS4470

6 Routing a datagram Source and destination are in the same AS
Each router knows the optimal path and where to forward Source and destination are in different ASes and the source AS only has one gateway router Forward the packet to the gateway router Source and destination are in different ASes and the source AS has multiple gateway routers Which gateway router to forward the datagram to? 12. Routing protocols CS4470

7 Inter-AS tasks AS1 needs:
to learn which dests are reachable through AS2 and which through AS3 to propagate this reachability info to all routers in AS1 Job of inter-AS routing! Suppose router in AS1 receives datagram for which dest is outside of AS1 Router should forward packet towards one of the gateway routers, but which one? 3b 1d 3a 1c 2a AS3 AS1 AS2 1a 2c 2b 1b 3c 12. Routing protocols CS4470

8 Example: Setting forwarding table in router 1d
Suppose AS1 learns from the inter-AS protocol that subnet x is reachable from AS3 (gateway 1c) but not from AS2. Inter-AS protocol propagates reachability info to all internal routers. Router 1d determines from intra-AS routing info that its interface I is on the least cost path to 1c. Puts in forwarding table entry (x, I). 12. Routing protocols CS4470

9 Example: Choosing among multiple ASes
Now suppose AS1 learns from the inter-AS protocol that subnet x is reachable from AS3 and from AS2. To configure forwarding table, router 1d must determine towards which gateway it should forward packets for dest x. This is also the job of inter-AS routing protocol! Hot potato routing: send packet towards closest of two routers. Learn from inter-AS protocol that subnet x is reachable via multiple gateways Use routing info from intra-AS protocol to determine costs of least-cost paths to each of the gateways Hot potato routing: Choose the gateway that has the smallest least cost Determine from forwarding table the interface I that leads to least-cost gateway. Enter (x,I) in forwarding table 12. Routing protocols CS4470

10 Intra-AS Routing Also known as Interior Gateway Protocols (IGP)
8/1/2018 Intra-AS Routing Also known as Interior Gateway Protocols (IGP) Most common Intra-AS routing protocols: RIP: Routing Information Protocol OSPF: Open Shortest Path First IGRP: Interior Gateway Routing Protocol (Cisco proprietary) 12. Routing protocols CS4470

11 RIP ( Routing Information Protocol)
Distance vector algorithm Cost metric: # of hops # of hops: the number of subnets traversed along the shortest path from source router to destination subnet Each link has a cost of 1 The maximum cost of a path is limited to 15 Can only use RIP in ASes that are fewer than 15 hops diameter 12. Routing protocols CS4470

12 RIP ( Routing Information Protocol)
D C B A u v w x y z destination hops u v w x y z From router A to subsets: 12. Routing protocols CS4470

13 Review: Distance Vector algorithm
Neighboring routers exchange distance vectors with each other The distance vector for any one router contains the current estimate of the shortest path distances from that router to other subnets 12. Routing protocols CS4470

14 RIP advertisements Routing tables are exchanged among neighbors every 30 sec using a RIP Response Message (also called RIP advertisement) The response message contains a list of up to 15 destination subnets within the AS, as well as the sender’s distance to each of those subnets 12. Routing protocols CS4470

15 RIP: Example z w x y A D B C y B 2 z B 7 x -- 1
Destination Network Next Router Num. of hops to dest. w A 2 y B 2 z B 7 x …. … Routing table in D 12. Routing protocols CS4470

16 RIP: Example Advertisement from A to D w x y z A C D B
Dest Next hops w x z C 4 …. … Advertisement from A to D w x y z A C D B Destination Network Next Router Num. of hops to dest. w A 2 y B 2 z B A 7 5 x …. … Routing table in D 12. Routing protocols CS4470

17 OSPF (Open Shortest Path First)
“open”: specification publicly available As opposed to Cisco’s EIGRP protocol Uses Link State algorithm Uses flooding of link-state information Construct a complete topological map of the entire AS Route computation using Dijkstra’s algorithm Usually deployed in upper-tier Internet Service Providers (ISPs) RIP is deployed in lower-tier ISPs and enterprise networks 12. Routing protocols CS4470

18 OSPF (Open Shortest Path First)
A router broadcasts routing information all other routers in the AS system whenever there is a change in a link’s state And periodically (at least once every 30 minutes) even if the link’s state has not changed OSPF advertisements carried in OSPF messages directly over IP OSPF must itself implement functionality such as reliable message transfer 12. Routing protocols CS4470

19 OSPF “advanced” features (not in RIP)
Security: all OSPF messages authenticated (to prevent malicious intrusion) Multiple same-cost paths allowed (only one path in RIP) Load balancing: if 2 routes to the same destination have the same cost, the traffic to the destination will be distributed to the two routes. Multiple cost metrics It’s up to the network administrator to choose the cost metrics Support for Hierarchy within a single routing domain The most significant advance in OSPF is the ability to structure an AS hierarchically 12. Routing protocols CS4470

20 Hierarchical OSPF An OSPF AS can be configured into areas
8/1/2018 Hierarchical OSPF An OSPF AS can be configured into areas Each area runs its own OSPF link state routing algorithm Each router in an area broadcasts its link state to all other routers in the area The internal details of an area are invisible to all routers outside the area Intra-area routing involves only those routers within the same area 12. Routing protocols CS4470

21 Hierarchical OSPF Exactly one OSPF area in the AS is configured to be the backbone area Route traffic between the other areas in the AS Contains all the areas border routers in the AS and may contain nonborder routers as well Area border routers: “summarize” distances to nets in own area Route traffic outside the area Belong to both an area and the backbone 12. Routing protocols CS4470

22 Hierarchical OSPF Backbone routers (non border routers)
run OSPF routing limited to backbone. Perform routing within the backbone Not the area border routers Boundary routers connect to other AS’s. Internal routers Belong to non-backbone areas Perform only intra-area routing 12. Routing protocols CS4470

23 Hierarchical OSPF 12. Routing protocols CS4470

24 Intra-AS routing Summary
Two of the protocols RIP OSPF The purpose of intra-AS routing algorithms Decide the entries with dest. address in the same AS in the routing table How to set the entries with dest. Addesses in different ASes? Inter-AS routing: BGP 12. Routing protocols CS4470

25 Internet inter-AS routing: BGP
BGP (Border Gateway Protocol): the de facto standard Allows a subnet to advertise its existence to rest of the Internet: “I am here” Make sure that all the ASes in the Internet know about the subnet and how to get there BGP is a critical protocol for the Internet It’s the protocol that glues the whole thing together 12. Routing protocols CS4470

26 Internet inter-AS routing: BGP
BGP provides each AS a means to: Obtain subnet reachability information from neighboring ASs. Propagate the reachability information to all routers internal to the AS. Determine “good” routes to subnets based on reachability information and policy. 12. Routing protocols CS4470

27 BGP basics 3c 2c 3a 3b 2a AS3 2b 1c 1a 1b 1d AS1
Pairs of routers (BGP peers) exchange routing info over connections: BGP sessions eBGP sessions: for gateway routers iBGP sessions: for internal routers Note that BGP sessions do not correspond to physical links. Reachability information: advertised by the gateway routers When AS2 advertises a prefix to AS1, AS2 is promising it will forward any datagram destined to that prefix 3b 1d 3a 1c 2a AS3 AS1 AS2 1a 2c 2b 1b 3c eBGP session iBGP session 12. Routing protocols CS4470

28 Distributing reachability info
With eBGP session between 3a and 1c, AS3 sends prefix reachability info to AS1. 1c can then use iBGP do distribute this new prefix reach info to all routers in AS1 1b can then re-advertise the new reach info to AS2 over the 1b-to-2a eBGP session When router learns about a new prefix, it creates an entry for the prefix in its forwarding table. 3b 1d 3a 1c 2a AS3 AS1 AS2 1a 2c 2b 1b 3c eBGP session iBGP session 12. Routing protocols CS4470

29 Why different Intra- and Inter-AS routing ?
Policy: Inter-AS: admin wants control over how its traffic routed, who routes through its net. Intra-AS: single admin, so no policy decisions needed Scale: hierarchical routing saves table size, reduced update traffic Performance: Intra-AS: can focus on performance Inter-AS: policy may dominate over performanc 12. Routing protocols CS4470

30 IP Semantics IP is best-effort Datagrams can be Lost Delayed
Duplicated Delivered out of order Corrupted 12. Routing protocols CS4470

31 Error Detection IP is NOT careless, it attempts Errors detected
avoid errors Report errors when they occur Errors detected Corrupted bits Illegal addresses Routing loops Fragment loss 12. Routing protocols CS4470

32 Problems And Solutions
Corrupted header bits Header checksum Illegal destination address Routing tables Routing loop Time-To-Live (TTL) field Fragment loss Timeout 12. Routing protocols CS4470

33 ICMP (Internet Control Management Protocol)
Separate protocol for Errors Information Required part of IP Sends error messages to original source 12. Routing protocols CS4470

34 Example ICMP Message Types
12. Routing protocols CS4470

35 Example ICMP Messages Time Exceeded Sent by router Sent by host
TTL on datagram reached zero Not a request for retransmission Sent by host Reassembly timeout (some fragments lost) 12. Routing protocols CS4470

36 Example ICMP Messages Echo request and reply Not an error
Tests whether destination reachable Request sent by ping program Reply sent by ICMP on destination computer 12. Routing protocols CS4470

37 ICMP Message Transport
Messages carried in IP Two levels of encapsulation IP type field specifies ICMP 12. Routing protocols CS4470

38 Avoiding An Infinite Loop
Datagram D causes an ICMP error message, I1 Error message I1 causes another error, which generates ICMP message I2 Message I2 generates another error, I3 Error messages cascade To avoid the problem No error messages about ICMP error messages 12. Routing protocols CS4470

39 Traceroute A network diagnostic program that finds the address of all routers between the user’s computer and a specific destination Run the command Windows C:> tracert C:>tracert Unix $traceroute $traceroute 12. Routing protocols CS4470

40 Traceroute: how it works
The source sends three ICMP echo request messages to the destination with TTL set to 1 The first router sees the datagram, decreases TTL by 1 to 0, discards the datatgram and sends an ICMP time-exceeded message back to the source The source sends three ICMP echo request messages to the destination with TTL set to 2 The first router sees the datagram, decreases TTL by 1 to 1 The second router sees the datagram, decreases TTL by 1 to 0, discards the datatgram and sends an ICMP time-exceeded message back to the source 3 probes 3 probe 12. Routing protocols CS4470

41 “Real” Internet delays and routes
C:>tracert Three delay measurements * means no response (probe lost, router not replying) 12. Routing protocols CS4470


Download ppt "CS4470 Computer Networking Protocols"

Similar presentations


Ads by Google