ECE 5600 Introduction to Computer Networking Lecture 24

  • Slides: 34
Download presentation
ECE 5600 Introduction to Computer Networking Lecture 24 – Internet Routing: BGP and OSPF

ECE 5600 Introduction to Computer Networking Lecture 24 – Internet Routing: BGP and OSPF Prof. Rose Qingyang Hu Electrical and Computer Engineering Department Utah State University

READING Book: Andrew S. Tanenbaum, Computer Networks, Fifth Edition, Prentice Hall Chapters 5. 6.

READING Book: Andrew S. Tanenbaum, Computer Networks, Fifth Edition, Prentice Hall Chapters 5. 6. 4 -5. 6. 7

INTERNET ARCHITECTURE v The Internet is an interconnected collection of many networks

INTERNET ARCHITECTURE v The Internet is an interconnected collection of many networks

INTERNET ARCHITECTURE v The internet consists of a group of connected Autonomous Systems (AS)

INTERNET ARCHITECTURE v The internet consists of a group of connected Autonomous Systems (AS) v An AS is a network, operated independently of all the other networks. v An AS is a collection of links and routers with a common routing policy. v Different AS may internationally use different routing algorithms. For example, one network may use link state routing and another distance vector routing.

INTERNET ARCHITECTURE v Routing policy is political, not technical, e. g. don’t route USA

INTERNET ARCHITECTURE v Routing policy is political, not technical, e. g. don’t route USA packets through IRAQ; don’t route IBM packets destined to Microsoft v A two-level routing algorithm: Within each network, an intradomain is used for routing; Across the networks that make up the internet, an interdomain is used. v The networks may all use different intradomain protocols, but they must use the SAME interdomain protocol: All autonomous systems interface with each other using BGP (Border Gateway Protocol)

AUTONOMOUS SYSTEMS v Each AS is identified by a 16 - or 32 -bit

AUTONOMOUS SYSTEMS v Each AS is identified by a 16 - or 32 -bit identifier. For example, USU’s AS number is 26046

INTRADOMAIN AND INTERDOMAIN ROUTING Intradomain Routing • Routing within an AS • Ignores the

INTRADOMAIN AND INTERDOMAIN ROUTING Intradomain Routing • Routing within an AS • Ignores the Internet outside the AS • Protocols for Intradomain routing are also called Interior Gateway Protocols or IGP’s. • Popular protocols are • RIP (simple, old) • OSPF Interdomain Routing • Routing between AS’s • Assumes that the Internet consists of a collection of interconnected AS’s • Normally, there is one dedicated router in each AS that handles interdomain traffic. • Protocols for inter-domain routing are also called Exterior Gateway Protocols or EGP’s. • Routing protocols: – BGP

ROUTING ALGORITHMS IN THE INTERNET Distance Vector • Routing Information Protocol (RIP) • Gateway-to-Gateway

ROUTING ALGORITHMS IN THE INTERNET Distance Vector • Routing Information Protocol (RIP) • Gateway-to-Gateway Protocol (GGP) • Exterior Gateway Protocol (EGP) • Interior Gateway Routing Protocol (IGRP) Link State • Intermediate System (ISIS) • Open Shortest Path First (OSPF)

REVIEW OF ROUTING ALGORITHMS 1. Distance Vector Routing • Each node knows the distance

REVIEW OF ROUTING ALGORITHMS 1. Distance Vector Routing • Each node knows the distance (=cost) to its directly connected neighbors • A node sends periodically a list of routing updates to its neighbors. • If all nodes update their distances, the routing tables eventually converge • New nodes advertise themselves to their neighbors 2. Link State Routing • Each node knows the distance to its neighbors • The distance information (=link state) is broadcast to all nodes in the network • Each node calculates the routing tables independently • Needs to know the topology

INTERDOMAIN ROUTING v Interdomain routing is based on connectivity between autonomous systems v Interdomain

INTERDOMAIN ROUTING v Interdomain routing is based on connectivity between autonomous systems v Interdomain routing can ignore many details of router interconnection

AUTONOMOUS SYSTEMS TERMINOLOGY Local traffic § traffic with source or destination in AS Transit

AUTONOMOUS SYSTEMS TERMINOLOGY 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

STUB AND TRANSIT NETWORKS v AS 1 and AS 5 are stub networks v

STUB AND TRANSIT NETWORKS v AS 1 and AS 5 are stub networks v AS 2 is a multihomed stub network v AS 3 and AS 4 are transit networks

SELECTIVE TRANSIT Example: v Transit AS 3 carries traffic between AS 1 and AS

SELECTIVE TRANSIT Example: v Transit AS 3 carries traffic between AS 1 and AS 4 and between AS 2 and AS 4 v But AS 3 does not carry traffic between AS 1 and AS 2 v The example shows a routing policy.

BORDER GATEWAY PROTOCOL Between AS, have to worry about politics Typical policies involve political,

BORDER GATEWAY PROTOCOL Between AS, have to worry about politics Typical policies involve political, security or economic considerations. Possible routing constraints: § Never put Iraq on a route starting at the Pentagon § Traffic starting or ending at IBM should not transit Microsoft § Do not carry commercial traffic on the educational network § Use Telia. Sonera instead of Verizon because it is cheaper § Don’t use AT&T in Australia because performance is poor BGP router pairs communicate via TCP Uses distance vector protocol § but “cost” can be any metric

BGP FUNCTIONS An autonomous system uses BGP to advertise its network address(es) to other

BGP FUNCTIONS An autonomous system uses BGP to advertise its network address(es) to other AS’s BGP helps an autonomous system with the following: § Collect information about reachable networks from neighboring AS’s § Disseminate the information about reachable networks to routers inside the AS and to neighboring AS’s § Picks routes if there are multiple routes available

ROUTING INSIDE THE AS All the intradomain protocol has to do is to move

ROUTING INSIDE THE AS All the intradomain protocol has to do is to move packets as efficiently as possible from the source to the destination Routing Protocols (Interior Gateway Protocols) § RIP (Router Information Protocol) § OSPF (Open Shortest Path First)

RIP Original IGP used was RIP Based on Bellman-Ford Algorithm Worked well in small

RIP Original IGP used was RIP Based on Bellman-Ford Algorithm Worked well in small systems Suffered from problems of Distance Vector Protocol § Count to Infinity Problem § Slow Convergence

OSPF HISTORY OSPF = Open Shortest Path First OSPF is a link-state routing protocol

OSPF HISTORY OSPF = Open Shortest Path First OSPF is a link-state routing protocol for Internet Protocol (IP) networks, operating within a single AS. The algorithm had to be published in the open literature The OSPF routing protocol is the most important link state routing protocol on the Internet History: 1989: RFC 1131 1991: RFC 1247 1994: RFC 1583 1997: RFC 2178 1998: RFC 2328 2008: RFC 5340 OSPF Version 1 OSPF Version 2 (revised) OSPF Version 2 (for IPv 4) OSPF Version 3 (for IPv 6)

OSPF FEATURES v OSPF operates by abstracting the collection of actual networks, routers and

OSPF FEATURES v OSPF operates by abstracting the collection of actual networks, routers and links into a directed graph in which each arc is assigned a weight (distance, delay, network throughput, link availability and reliability, etc. ) v OSPF uses the link state method to have every router compute the shortest path from itself to all other nodes. v Multiple paths may be found that are equally short. In this case, OSPF remembers the set of shortest paths and during packet forwarding, traffic is split across them. This provides traffic load balancing between routes of equal cost. It is called ECMP (Equal Cost Multi. Path).

GRAPH REPRESENTATION OF AS

GRAPH REPRESENTATION OF AS

OSPF FEATURES OSPF detects changes in the topology, such as link failure, and converges

OSPF FEATURES OSPF detects changes in the topology, such as link failure, and converges on a new loop-free routing structure within seconds. OSPF does not use a TCP/IP transport protocol (UDP, TCP), but is encapsulated directly in IP datagrams with protocol number 89. This is in contrast to other routing protocols, such as RIP, or BGP. OSPF can operate securely between routers, optionally using a variety of authentication methods to allow only trusted routers to participate in routing.

OSPF BASICS Distributed, replicated database model § describes complete routing topology Link state advertisements

OSPF BASICS Distributed, replicated database model § describes complete routing topology Link state advertisements (LSA) § carry local piece of routing topology Distribution of LSAs using reliable flooding Link state database § identical for all the routers

OSPF AREA TYPES Many of the ASes in Internet are themselves large and nontrivial

OSPF AREA TYPES Many of the ASes in Internet are themselves large and nontrivial to manage. Hence, OSPF allows an AS to be divided into numbered areas. Area 0 (Backbone) § All other areas must be connected to Area 0. (direct or virtual) § Handles external routing. Stub Areas § If there is only one border router out of an area. Not so stubby Areas § Like a stub, but may connect to another AS. Transit Area § Provides a virtual link to Area 0 for areas that are not physically connected to Area 0.

OSPF AREA IDENTIFIERS By convention, area 0 or 0. 0 represents the backbone area

OSPF AREA IDENTIFIERS By convention, area 0 or 0. 0 represents the backbone area of OSPF network. The identifications of other areas my be chosen at will: often, administrators select the IP address of a main router in an area as the area’s identification. Area identifiers are labeled with 32 -bit. Sometimes area identifiers are written in the dotdecimal notation. They are not IP addresses and may duplicate, without conflict.

OSPF ROUTER TYPES ABR (Area Border Router) § ABR is connected to two or

OSPF ROUTER TYPES ABR (Area Border Router) § ABR is connected to two or more areas § Forms the Boundary between one area and another ASBR (Autonomous System Border Router) § Connects to another autonomous system using BGP IR (Internal router) BR(Backbone router)

OSPF

OSPF

OSPF Area 0 (Backbone) R R Area 1 ABR ASBR R ABR Area 51

OSPF Area 0 (Backbone) R R Area 1 ABR ASBR R ABR Area 51 R R Area 2 Q: Area 51 is not connected to Area 0. Is that a problem? A: The ABRs can open a virtual link between Areas 0 and 51.

DESIGNATED ROUTER A Designated Router (DR) is the router interface elected among all routers

DESIGNATED ROUTER A Designated Router (DR) is the router interface elected among all routers on a particular multi-access network segment, generally assumed to be broadcast multi-access. There is a backup designated router (BDR) too. DR’s exist for the purpose of reducing network traffic by providing a source for routing updates. The DR maintains a complete topology table of the network and sends the updates to other routers via multicast. All routers in a multi-access network segment will form a slave/master relationship with the DR. All routers do not have to constantly update each other, and can rather get all their updates from a single source.

COMMUNICATION BETWEEN OSPF ROUTERS OSPF packets encapsulated in IP packets § standard 24 byte

COMMUNICATION BETWEEN OSPF ROUTERS OSPF packets encapsulated in IP packets § standard 24 byte header § OSPF packet type field § OSPF router ID of sender § Packet checksum § Authentication fields § OSPF Area ID OSPF uses multicast addressing for route flooding on a broadcast domain. OSPF reserves the multicast address 224. 0. 0. 5 (all link state routers, also known as ALLSPFRouters) and 224. 0. 0. 6 (all Designated Routers, ALLDRouters).

OSPF PACKET FORMAT OSPF packets are not carried as UDP payload! OSPF has its

OSPF PACKET FORMAT OSPF packets are not carried as UDP payload! OSPF has its own IP protocol number: 89 TTL: set to 1 (in most cases) Destination IP: neighbor’s IP address or 224. 0. 0. 5 (ALLSPFRouters) or 224. 0. 0. 6 (All. DRouters)

OSPF PACKET FORMAT 2: current version is OSPF V 2 ID of the Area

OSPF PACKET FORMAT 2: current version is OSPF V 2 ID of the Area from which the packet originated Message types: 1: Hello (tests reachability) 2: Database description 3: Link Status request 4: Link state update 5: Link state acknowledgement 0: no authentication 1: Simple password authentication 2: Cryptographic authentication Standard IP checksum taken over entire packet Authentication passwd = 1: Authentication passwd = 2: 64 cleartext password 0 x 0000 (16 bits) Key. ID (8 bits) Length of MD 5 checksum (8 bits) Nondecreasing sequence number (32 bits) Prevents replay attacks 31

OSPF PACKET FORMAT Version # (1 byte): Set to 2 for OSPF version 2.

OSPF PACKET FORMAT Version # (1 byte): Set to 2 for OSPF version 2. Type(1 byte): Indicates the type of OSPF message (five types) Message length(2 bytes): The length of the message in bytes, including the 24 bytes of this header Source router IP address(4 bytes): The ID of the router that generated this message Area ID (4 bytes): An identification of OSPF area to which this message belongs Checksum(2 bytes): A 16 -bit checksum Authentication type(2 bytes): Indicate the type of authentication used for this message Authentication(8 bytes): A 64 -bit field used for authentication of the message

OSPF MESSAGE TYPE HELLO § When a router boots, it sends HELLO messages; from

OSPF MESSAGE TYPE HELLO § When a router boots, it sends HELLO messages; from the responses, each router learns who its neighbor are. LINK STATE UPDATE § During normal operation, each router periodically floods LINK STATE UPDATE messages to each of its adjacent routers. § The message gives its state and provide the costs used in the topological database § Each message has a sequence number, so a router can see whether an incoming LINK STATE UPDATE is older or newer than what it currently has. DATABASE DESCRIPTION § Give the sequence numbers of all the link state entries currently held by the sender § By comparing its own values with those of the sender, the receiver can determine who has the most recent values.

OSPF MESSAGE TYPE

OSPF MESSAGE TYPE