Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSEE W4140 Networking Laboratory Lecture 5: IP Routing (OSPF and BGP) Jong Yul Kim 02.18.2009.

Similar presentations

Presentation on theme: "CSEE W4140 Networking Laboratory Lecture 5: IP Routing (OSPF and BGP) Jong Yul Kim 02.18.2009."— Presentation transcript:

1 CSEE W4140 Networking Laboratory Lecture 5: IP Routing (OSPF and BGP) Jong Yul Kim 02.18.2009

2 Today’s topics

3 Link State Routing: Properties  Each node requires complete topology information  Link state information must be flooded to all nodes  Guaranteed to converge

4 Link State Routing: Basic princples 1. Each router establishes a relationship (“adjacency”) with its neighbors 2.Each router generates link state advertisements (LSAs) which are distributed to all routers LSA = (link id, state of the link, cost, neighbors of the link) 3. Each router maintains a database of all received LSAs (topological database or link state database), which describes the network as a graph with weighted edges 4. Each router uses its link state database to run a shortest path algorithm (Dijikstra’s algorithm) to produce the shortest path to each network

5 Operation of a Link State Routing protocol Received LSAs IP Routing Table Dijkstra’s Algorithm Link State Database LSAs are flooded to other interfaces

6 OSPF  OSPF = Open Shortest Path First  The OSPF routing protocol is the most important link state routing protocol on the Internet  The complexity of OSPF is significant  Most recent version is OSPFv2.

7 Features of OSPF  Provides authentication of routing messages  Enables load balancing by allowing traffic to be split evenly across routes with equal cost  Type-of-Service routing allows to setup different routes dependent on the TOS field  Supports subnetting  Supports multicasting  Allows hierarchical routing

8 Example Network Router IDs are selected independent of interface addresses 3 42 5 1 1 32 Link costs are called Metric Metric is in the range [0, 2 16 ] Metric can be asymmetric

9 Link State Advertisement (LSA)  The LSA of router is as follows:  Link State ID: = can be Router ID  Advertising Router: = Router ID  Number of links: 3 = 2 links plus router itself  Description of Link 1: Link ID =, Metric = 4  Description of Link 2: Link ID =, Metric = 3  Description of Link 3: Link ID =, Metric = 0 3 4 2 Each router sends its LSA to all routers in the network (using a method called reliable flooding)

10 Network and Link State Database Each router has a database which contains the LSAs from all other routers

11 Link State Database  The collection of all LSAs is called the link- state database  Each router has and identical link-state database Useful for debugging: Each router has a complete description of the network  If neighboring routers discover each other for the first time, they will exchange their link-state databases  The link-state databases are synchronized using reliable flooding

12 OSPF Packet Format Destination IP: neighbor’s IP address or (ALLSPFRouters) or (AllDRouters) TTL: set to 1 (in most cases) OSPF packets are not carried as UDP payload! OSPF has its own IP protocol number: 89

13 OSPF Packet Format 2: current version is OSPF V2 Message types: 1: Hello (tests reachability) 2: Database description 3: Link Status request 4: Link state update 5: Link state acknowledgement ID of the Area from which the packet originated Standard IP checksum taken over entire packet 0: no authentication 1: Cleartext password 2: MD5 checksum (added to end packet) Authentication passwd = 1: 64 cleartext password Authentication passwd = 2: 0x0000 (16 bits) KeyID (8 bits) Length of MD5 checksum (8 bits) Nondecreasing sequence number (32 bits) Prevents replay attacks

14 OSPF LSA Format LSA Header Link 1 Link 2

15 Discovery of Neighbors  Routers multicasts OSPF Hello packets on all OSPF-enabled interfaces.  If two routers share a link, they can become neighbors, and establish an adjacency  After becoming a neighbor, routers exchange their link state databases Scenario: Router restarts

16 Neighbor discovery and database synchronization Sends empty database description Scenario: Router restarts Discovery of adjacency Sends database description. (description only contains LSA headers) Database description of Acknowledges receipt of description After neighbors are discovered the nodes exchange their databases

17 Regular LSA exchanges explicitly requests each LSA from sends requested LSAs has more recent value for and sends it to (with higher sequence number)

18 Routing Data Distribution  LSA-Updates are distributed to all other routers via Reliable Flooding  Example: Flooding of LSA from LSA Update database ACK LSA ACK LSA Update database ACK Update database

19 Dissemination of LSA-Update  A router sends and refloods LSA-Updates, whenever the topology or link cost changes. (If a received LSA does not contain new information, the router will not flood the packet)  Exception: Infrequently (every 30 minutes), a router will flood LSAs even if there are no new changes.  Acknowledgements of LSA-updates:  explicit ACK, or  implicit via reception of an LSA-Update

20 BGP Overview  BGP = Border Gateway Protocol v4. RFC 1771. (~ 60 pages)  Note: In the context of BGP, a gateway is nothing else but an IP router that connects autonomous systems.  Interdomain routing protocol for routing between autonomous systems.  Uses TCP to establish a BGP session and to send routing messages over the BGP session.  Update only new routes.  BGP is a path vector protocol. Routing messages in BGP contain complete routes.  Network administrators can specify routing policies.

21 BGP  BGP’s goal is to find any path (not an optimal one). Since the internals of the AS are never revealed, finding an optimal path is not feasible.  For each autonomous system (AS), BGP distinguishes:  local traffic = traffic with source or destination in AS  transit traffic = traffic that passes through the AS  Stub AS = has connection to only one AS, only carry local traffic  Multihomed AS = has connection to >1 AS, but does not carry transit traffic  Transit AS = has connection to >1 AS and carries transit traffic

22 BGP Policy-based Routing  Each node is assigned an AS number (ASN)  BGP’s goal is to find any AS-path (not an optimal one). Since the internals of the AS are never revealed, finding an optimal path is not feasible.  Network administrator sets BGP’s policies to determine the best path to reach a destination network.

23 BGP = RFC 1771 + “optional” extensions RFC 1997 (communities) RFC 2439 (damping) RFC 2796 (reflection) RFC3065 (confederation) … + routing policy configuration languages (vendor-specific) + Current Best Practices in management of Interdomain Routing BGP was not DESIGNED. It EVOLVED. The Border Gateway Protocol (BGP)

24 24 BGP Route Processing Best Route Selection Apply Import Policies Best Route Table Apply Export Policies Install forwarding Entries for best Routes. Receive BGP Updates Best Routes Transmit BGP Updates Apply Policy = filter routes & tweak attributes Based on Attribute Values IP Forwarding Table Apply Policy = filter routes & tweak attributes Open ended programming. Constrained only by vendor configuration language

25 BGP Attributes Value Code Reference ----- --------------------------------- --------- 1 ORIGIN [RFC1771] 2 AS_PATH [RFC1771] 3 NEXT_HOP [RFC1771] 4 MULTI_EXIT_DISC [RFC1771] 5 LOCAL_PREF [RFC1771] 6 ATOMIC_AGGREGATE [RFC1771] 7 AGGREGATOR [RFC1771] 8 COMMUNITY [RFC1997] 9 ORIGINATOR_ID [RFC2796] 10 CLUSTER_LIST [RFC2796] 11 DPA [Chen] 12 ADVERTISER [RFC1863] 13 RCID_PATH / CLUSTER_ID [RFC1863] 14 MP_REACH_NLRI [RFC2283] 15 MP_UNREACH_NLRI [RFC2283] 16 EXTENDED COMMUNITIES [Rosen]... 255 reserved for development From IANA: Important attributes Not all attributes need to be present in every announcement

26 NEXT_HOP Attribute  EGP: IP address used to reach the advertising router  IGP: next-hop address is carried into local AS

27 AS_PATH Attribute  Used to detect routing loops and find shortest paths

28 Main Points of Lab 4 Parts 5~7  OSPF Configuration and convergence Hierarchical setup using “areas”  BGP Configuration and convergence

29 Homework  No prelab due this week  Lab report 4 part 1 due by beginning of lab 4 part 2 next week  Reading Assignment Read as much as you can about TCP

Download ppt "CSEE W4140 Networking Laboratory Lecture 5: IP Routing (OSPF and BGP) Jong Yul Kim 02.18.2009."

Similar presentations

Ads by Google