Advanced Networking Routing: RIP, OSPF, Hierarchical routing, BGP



Similar documents
Based on Computer Networking, 4 th Edition by Kurose and Ross

Route Discovery Protocols

Routing Protocols. Interconnected ASes. Hierarchical Routing. Hierarchical Routing

Module 7. Routing and Congestion Control. Version 2 CSE IIT, Kharagpur

Routing Protocols (RIP, OSPF, BGP)

Distance Vector Routing Protocols. Routing Protocols and Concepts Ola Lundh

Border Gateway Protocol (BGP-4)

Border Gateway Protocol (BGP)

OSPF Version 2 (RFC 2328) Describes Autonomous Systems (AS) topology. Propagated by flooding: Link State Advertisements (LSAs).

BGP overview BGP operations BGP messages BGP decision algorithm BGP states

Inter-domain Routing Basics. Border Gateway Protocol. Inter-domain Routing Basics. Inter-domain Routing Basics. Exterior routing protocols created to:

GregSowell.com. Mikrotik Routing

Inter-domain Routing. Outline. Border Gateway Protocol

Outline. Internet Routing. Alleviating the Problem. DV Algorithm. Routing Information Protocol (RIP) Link State Routing. Routing algorithms

Dynamic Routing Protocols II OSPF. Distance Vector vs. Link State Routing

IP Routing Configuring RIP, OSPF, BGP, and PBR

How To Understand Bg

Introduction to TCP/IP

Faculty of Engineering Computer Engineering Department Islamic University of Gaza Network Chapter# 19 INTERNETWORK OPERATION

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

Routing in Small Networks. Internet Routing Overview. Agenda. Routing in Large Networks

Chapter 4. Distance Vector Routing Protocols

Routing with OSPF. Introduction

CSE331: Introduction to Networks and Security. Lecture 8 Fall 2006

6.263 Data Communication Networks

Lecture 8: Routing I Distance-vector Algorithms. CSE 123: Computer Networks Stefan Savage

Datagram-based network layer: forwarding; routing. Additional function of VCbased network layer: call setup.

Exterior Gateway Protocols (BGP)

Administrative Distance

Using the Border Gateway Protocol for Interdomain Routing

OSPF Routing Protocol

Computer Networks. Main Functions

Internet Control Message Protocol (ICMP)

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

Internet inter-as routing: BGP

Interconnecting Cisco Networking Devices Part 2

Introduction to LAN/WAN. Network Layer

--BGP 4 White Paper Ver BGP-4 in Vanguard Routers

Layer 3 Routing User s Manual

Textbook Required: Cisco Networking Academy Program CCNP: Building Scalable Internetworks v5.0 Lab Manual.

LAB FOUR Dynamic Routing Protocols

CS551 External v.s. Internal BGP

: Interconnecting Cisco Networking Devices Part 2 v1.1

Chapter 49 Border Gateway Protocol version 4 (BGP-4)

ITRI CCL. IP Routing Primer. Paul C. Huang, Ph.D. ITRI / CCL / N300. CCL/N300; Paul Huang 1999/6/2 1

APNIC elearning: BGP Basics. Contact: erou03_v1.0

Zarząd (7 osób) F inanse (13 osób) M arketing (7 osób) S przedaż (16 osób) K adry (15 osób)

IP Multicasting. Applications with multiple receivers

Introduction to IP Multicast Routing

CSC458 Lecture 6. Homework #1 Grades. Inter-domain Routing IP Addressing. Administrivia. Midterm will Cover Following Topics

Network layer: Overview. Network layer functions IP Routing and forwarding

NETWORK LAYER/INTERNET PROTOCOLS

Configuring and Testing Border Gateway Protocol (BGP) on Basis of Cisco Hardware and Linux Gentoo with Quagga Package (Zebra)

CS Computer Networks 1: Routing Algorithms

CCNA Exploration 4.0: (II) Routing Protocols and Concepts. Chapter 1: Introduction to Routing and Packet Forwarding

Chapter 10 Link-State Routing Protocols

- Routing Information Protocol -

Cisco CCNP Optimizing Converged Cisco Networks (ONT)

BGP Router Startup Message Flow

Internet Protocol version 4 Part I

Using OSPF in an MPLS VPN Environment

CS335 Sample Questions for Exam #2

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

8.2 The Internet Protocol

How To Set Up Bgg On A Network With A Network On A Pb Or Pb On A Pc Or Ipa On A Bg On Pc Or Pv On A Ipa (Netb) On A Router On A 2

Cisco Configuring Commonly Used IP ACLs

order ateway Sicherheit im Internet, Patrick Lederer,,

Internetworking and Internet-1. Global Addresses

Table of Contents. Cisco How Does Load Balancing Work?

Advanced Routing. FortiOS Handbook v3 for FortiOS 4.0 MR3

BGP4 Case Studies/Tutorial

Introduction to Dynamic Routing Protocols

APNIC elearning: BGP Attributes

RARP: Reverse Address Resolution Protocol

Computer Networks Administration Help Manual Sana Saadaoui Jemai Oliver Wellnitz

Internet Protocol (IP) IP - Network Layer. IP Routing. Advantages of Connectionless. CSCE 515: Computer Network Programming IP routing

A Study of the interaction of BGP/OSPF in Zebra/ZebOS/Quagga

Border Gateway Protocol BGP4 (2)

Lecture 12: Link-state Routing"

Route Optimization. rek Petr Grygarek, VSB-TU Ostrava, Routed and Switched Networks 1

IP - The Internet Protocol

O /27 [110/129] via , 00:00:05, Serial0/0/1

Link-State Routing Protocols

Router and Routing Basics

Network Level Multihoming and BGP Challenges

The ISP Column. An Introduction to BGP the Protocol

Understanding Route Redistribution & Filtering

PRASAD ATHUKURI Sreekavitha engineering info technology,kammam

BGP Terminology, Concepts, and Operation. Chapter , Cisco Systems, Inc. All rights reserved. Cisco Public

ZXR /5200 Series

Routing Protocol - BGP

BGP Basics. BGP Uses TCP 179 ibgp - BGP Peers in the same AS ebgp - BGP Peers in different AS's Private BGP ASN. BGP Router Processes

(Refer Slide Time: 02:17)

Outline. EE 122: Interdomain Routing Protocol (BGP) BGP Routing. Internet is more complicated... Ion Stoica TAs: Junda Liu, DK Moon, David Zats

Routing and Packet Forwarding

Comparison of RIP, EIGRP, OSPF, IGRP Routing Protocols in Wireless Local Area Network (WLAN) By Using OPNET Simulator Tool - A Practical Approach

Exercises TCP/IP Networking. Solution. With Solutions

DD2491 p Inter-domain routing and BGP part I Olof Hagsand KTH/CSC

Routing in packet-switching networks

Transcription:

Advanced Networking Routing: RIP, OSPF, Hierarchical routing, BGP Renato Lo Cigno

Routing Algorithms: One or Many? Is there a single routing protocol in the Internet? How can different protocols and algorithms coexist Homogeneous results Risk of incosistent routing Complexity of routing algorithms/protocols Can they scale? There is a tradeoff between traffic and computation? Hierarchical routing Policy routing: what is it, why not performance? Advanced Networking Routing 2

RIP - History * Late 1960s: Distance Vector protocols were used in the ARPANET * Mid-1970s: XNS (Xerox Network system) routing protocol is the precursor of RIP in IP (and Novell s IPX RIP and Apple s routing protocol) * 1982: Release of routing software for BSD Unix * 1988: RIPv1 (RFC 1058) - classful routing * 1993: RIPv2 (RFC 1388) - adds subnet masks with each route entry - allows classless routing * 1998: Current version of RIPv2 (RFC 2453) Advanced Networking Routing 3

A simple intradomain protocol RIP at a glance Straightforward implementation of Distance Vector Routing Distributed version of Bellman-Ford (DBF) with well known issues slow convergence works with limited network size Strengths simple to implement simple management widespread use Advanced Networking Routing 4

Metric based on hop count RIP at a glance maximum hop count is 15, with 16 equal to imposed to limit the convergence time the network administrator can also assign values higher than 1 to a single hop Each router advertises its distance vector every 30 seconds (or whenever its routing table changes) to all of its neighbors RIP uses UDP, port 520, for sending messages Changes are propagated across network Routes are timeout (set to 16) after 3 minutes if they are not updated Advanced Networking Routing 5

Recall: counting to infinity problem C B 1 1 1 A Router A Dest Next Metric NTW_1 D 2 Router B Dest Next Metric Consider the entries in each routing table for network NTW_1 10 D NTW_1 1 NTW_1 A 3 Router C Dest Next Metric NTW_1 A 3 Router D Router D is directly connected to NTW_1 Dest Next Metric NTW_1 dir 1 Advanced Networking Routing 6

Recall: counting to infinity problem (2) B time Router A Router A Router A C 1 1 1 A Dest Next Metric NTW_1 Unr. - Router B Dest Next Metric Dest Next Metric NTW_1 C 4 Router B Dest Next Metric Dest Next Metric NTW_1 C 5 Router B Dest Next Metric 10 D 1 NTW_1 A Router C 3 NTW_1 C Router C 4 NTW_1 C Router C 5 Dest Next Metric Dest Next Metric Dest Next Metric NTW_1 NTW_1 A Router D 3 NTW_1 B Router D 4 NTW_1 B Router D 5 Link between B and D fails Dest NTW_1 Next dir Metric 1 Dest NTW_1 Next dir Metric 1 Dest NTW_1 Next dir Metric 1 Advanced Networking Routing 7

Recall: counting to infinity problem (3) B time Router A Router A C 1 1 1 10 D A Dest Next Metric NTW_1 C 11 Router B Dest Next Metric NTW_1 C 11 Router C Dest Next Metric NTW_1 C 12 Router B Dest Next Metric NTW_1 C 12 Router C Dest Next Metric Dest Next Metric NTW_1 NTW_1 B Router D 11 NTW_1 D Router D 11 Dest Next Metric Dest Next Metric NTW_1 dir 1 NTW_1 dir 1 Advanced Networking Routing 8

RIP: solution to counting to infinity Maximum number of hops bounded to 15 this limits the convergence time Split Horizon simple each node omits routes learned from one neighbor in update sent to that neighbor with poisoned reverse each node include routes learned from one neighbor in update sent to that neighbor, setting their metrics to infinity drawback: routing message size greater than simple Split Horizon Advanced Networking Routing 9

RIP: solution to counting to infinity (cont d) Triggered updates: nodes send messages as soon as they notice a change in their routing tables only routes that has changed are sent faster reaction but more resources are used (bandwidth, processing) cascade of triggered updates superposition with regular updates Advanced Networking Routing 10

Command: 1=request 2=response Updates are replies whether asked for or not Initializing node broadcasts request Requests are replied to immediately Version: 1 Address family: 2 for IP IP address: non-zero network portion, zero host portion Identifies particular network Metric Path distance from this router to network Typically 1, so metric is hop count RIP-1: Message Format one route entry (20 bytes) IP UDP RIP Message 32 bits Command Version 0 0 address family 0 0 IP address (32-bit) 0...0 0...0 metric address family 0 0 IP address (32-bit) 0...0 0...0 metric (up to 25 total route entries) Advanced Networking Routing 11

RIP procedures: introduction RIP routing tables are managed by application-level process e.g., routed on UNIX machines Advertisements are sent in UDP packets (port 520) RIP maintains 3 different timers to support its operations Periodic update timer (25-30 sec) used to sent out update messages Invalid timer (180 sec) If update for a particular entry is not received for 180 sec, route is invalidated Garbage collection timer (120 sec) An invalid route in marked, not immediately deleted For next 120 s. the router advertises this route with distance infinity TCP IP Data Link Physical route UDP Advanced Networking Routing 12

RIP procedures: input processing Request Messages they may arrive from routers which have just come up action: the router responds directly to the requestor s address and port request is processed entry by entry Response Messages they may arrive from routers that perform regular updates, triggered updates or respond to a specific query action: the router updates its routing table in case of new route or changed routes, the router starts a triggered update procedure Advanced Networking Routing 13

RIP procedures: output processing Output are generated when the router comes up in the network if required by the input processing procedures by regular routing update Action: the router generates the messages according to the commands received the messages contain entries from the routing table timers timers timers input output input output input output request response response response response Advanced Networking Routing 14

Version: 2 Route Tag: used to carry information from other routing protocols e.g., autonomous system number Subnet mask for IP address Next hop identifies a better next-hop address on the same subnet than the advertising router, if one exists (otherwise 0.0) RIPv2: Message Format one route entry (20 bytes) IP UDP RIPv2 Message Command Version 0 0 address family address family 32 bits IP address (32-bit) Subnet mask Next hop metric IP address (32-bit) Subnet mask Next hop metric Route Tag Route Tag (up to 25 total route entries) Advanced Networking Routing 15

Any host sending packets on UDP port 520 would be considered a router Malicious users can inject fake routing entries With authentication, only authorized router can send Rip packets Authentication type password MD5 Authentication plain text password MD5 hash RIPv2: authentication authentication entry route entry IP UDP RIPv2 Message Command Version 0 0 0xFFFF address family 32 bits Authentication IP address (32-bit) Subnet mask Next hop metric Authentication Type Route Tag (up to 24 total route entries) Advanced Networking Routing 16

RIPv2: other aspects Explicit use of subnets Interoperability RIPv1 and RIPv2 can be present in the same network since RIPv1 simply ignores fields not known RIPv2 responds to RIPv1 Request with a RIPv1 Response Multicast instead of broadcasting RIP messages, RIPv2 uses multicast address 224.0.0.9 Advanced Networking Routing 17

RIP limitations: the cost of simplicity Destinations with metric more than 15 are unreachable If larger metric allowed, convergence becomes lengthy Simple metric leads to sub-optimal routing tables Packets sent over slower links Accept RIP updates from any device (if no security is implemented) Misconfigured device can disrupt entire configuration Advanced Networking Routing 18

RIP Was the first... but... Why is RIP not enough to manage the Internet? Can Link-State protocols perform better? OSPF MOSPF (no MRIP exists!!) Inter-AS routing requires an entirely different approach... if not for else for the sake of competition! Advanced Networking Routing 19

Non-RIP, DV Protocols: EXAMPLE IGRP (Interior Gateway Routing Protocol) CISCO proprietary; builds on RIP (mid 80 s) Distance Vector, like RIP several cost metrics (delay, bandwidth, reliability, load etc.) uses TCP to exchange routing updates routing tables exchanged only when costs change Loop free routing achieved by using a Distributed Updating Alg. (DUAL) based on diffused computation In DUAL, after a distance increase, the routing table is frozen until all affected nodes have learned of the change (cfr. split horizon in RIP) Advanced Networking Routing 20

Open Shortest Path First (OSPF) RIP limited in large internets OSPF is often preferred interior routing protocol for TCP/IP based internets Uses link state routing Floods the messages to all routers in the AS (area) Advanced Networking Routing 21

OSPF advanced features (not in RIP) Security: all OSPF messages are authenticated (to prevent malicious intrusion); TCP connections used Multiple same-cost paths allowed only one path in RIP For each link, multiple cost metrics for different TOS (eg, satellite link cost set low for best effort; high for real time) Integrated uni- and multicast support: Multicast (MOSPF) uses same topology data base as OSPF Hierarchical OSPF in large domains Advanced Networking Routing 22

Link State Routing When initialized, router determines link cost on each interface Router advertises these costs to all other routers in topology Router monitors its costs When changes occurs, costs are re-advertised Each router constructs topology and calculates shortest path to each destination network No distributed version of routing algorithm Can use any algorithm Dijkstra is recommended and normally used All routers in AS must use same algorithm Advanced Networking Routing 23

Packet sent by source router to every neighbor Flooding Incoming packet resent to all outgoing links except source link Duplicate packets already transmitted are discarded Prevent incessant retransmission All possible routes tried so packet will get through if route exists Highly robust At least one packet follows minimum delay route Reach all routers quickly All nodes connected to source are visited All routers get information to build routing table High traffic load Advanced Networking Routing 24

Flooding Example Advanced Networking Routing 25

OSPF Overview Router maintains descriptions of state of local links Transmits updated state information to all routers it knows about (flooding) Router receiving update must acknowledge Lots of traffic generated Each router maintains database Directed graph Advanced Networking Routing 26

Vertices Router Network Transit Stub Edges Connecting two routers Connecting router to network Router Database Graph Built using link state information from other routers Advanced Networking Routing 27

Sample Autonomous System Advanced Networking Routing 28

Directed Graph of Autonomous System in previous slide Advanced Networking Routing 29

Link Costs Cost of each hop in each direction is called routing metric OSPF provides flexible metric scheme based on type of service (TOS) Normal (TOS) 0 Minimize monetary cost (TOS 2) Maximize reliability (TOS 4) Maximize throughput (TOS 8) Minimize delay (TOS 16) Each router can generate 5 spanning trees (and 5 routing tables) AS decision! Advanced Networking Routing 30

What is the SP for Router 6? Advanced Networking Routing 31

The Tree for Router R6 Advanced Networking Routing 32

OSPF Packet Header Advanced Networking Routing 33

Packet Format Notes Version number: 2 is current Type: one of 5, see next slide Packet length: in octets including header Router id: this packet s source, 32 bit Area id: Area to which source router belongs Authentication type: Null Simple password Encryption Authentication data: used by authentication procedure Advanced Networking Routing 34

1. Hello: used in neighbor discovery OSPF Packet Types 2. Database description: Defines set of link state information present in each router s database 3. Link state request 4. Link state update 5. Link state acknowledgement Advanced Networking Routing 35

Make large internets more manageable Configure as backbone and multiple areas Area Collection of contiguous networks and hosts plus routers connected to any included network Areas Backbone contiguous collection of networks not contained in any area, their attached routers and routers belonging to multiple areas Advanced Networking Routing 36

Hierarchical OSPF Advanced Networking Routing 37

Operation of Areas Each area runs a separate copy of the link state algorithm Topological database and graph of just that area Link state information broadcast to other routers in area Reduces traffic Intra-area routing relies solely on local link state information Advanced Networking Routing 38

Path consists of three legs Within source area Intra-area Through backbone Has properties of an area Inter-Area Routing Uses link state routing algorithm for interarea routing Within destination area Intra-area Advanced Networking Routing 39

Hierarchical OSPF Two level hierarchy: local area and backbone Link state advertisements do not leave respective areas Nodes in each area have detailed area topology; they only know direction (shortest path) to networks in other areas Area Border routers summarize distances to networks in the area and advertise them to other Area Border routers Backbone routers run an OSPF routing alg limited to the backbone Boundary routers connect to other ASs Advanced Networking Routing 40

Intra-AS and Inter-AS routing a C C.b b d A A.a a b A.c c B.a a B c Gateways: perform inter-as routing amongst themselves b perform intra-as routers with other routers in their AS inter-as, intra-as routing in gateway A.c network layer link layer physical layer Advanced Networking Routing 41

Intra-AS and Inter-AS routing a Host h1 C C.b b A.a Inter-AS routing between A and B A.c a d A b c Intra-AS routing within AS A B.a a B c b Host h2 Intra-AS routing within AS B We ll examine specific inter-as and intra-as Internet routing protocols shortly Advanced Networking Routing 42

Inter-AS routing BGP (Border Gateway Protocol): the de facto standard Path Vector protocol an extension of Distance Vector Each Border Gateway broadcast to neighbors (peers) the entire path (ie, sequence of AS s) to destination For example, Gwy X may store the following path to destination Z: Path (X,Z) = X,Y1,Y2,Y3,,Z Advanced Networking Routing 43

Inter-AS routing Now, suppose Gwy X send its path to peer Gwy W Gwy W may or may not select the path offered by Gwy X, because of cost, policy or loop prevention reasons If Gwy W selects the path advertised by Gwy X, then: Path (W,Z) = w, Path (X,Z) Note: path selection based not so much on cost (eg,# of AS hops), but mostly on administrative and policy issues (eg, do not route packets of competitor s AS) Advanced Networking Routing 44

Why different Intra- and Inter-AS routing? Policy: Inter is concerned with policies (which provider we must select/avoid, etc). Intra is contained in a single organization, so, no policy decisions necessary Scale: Inter provides an extra level of routing table size and routing update traffic reduction above the Intra layer Performance: Intra is focused on performance metrics; needs to keep costs low. In Inter it is difficult to propagate performance metrics efficiently (latency, privacy etc). Besides, policy related information is more meaningful. We need BOTH! Advanced Networking Routing 45

Boarder Gateway Protocol (BGP) Allows routers (gateways) in different ASs to exchange routing information Messages sent over TCP Messages in next slide Three functional procedures Neighbor acquisition Neighbor reachability Network reachability Advanced Networking Routing 46

BGP Messages Open Start neighbor relationship with another router Update Transmit information about single route List multiple routes to be withdrawn Keepalive Acknowledge open message Periodically confirm neighbor relationship Notification Send when error condition detected Used for closing connections too Advanced Networking Routing 47

Neighbor Acquisition Neighbors attach to same subnetwork If in different ASs routers may wish to exchange information Neighbor acquisition is when two neighboring routers agree to exchange routing information regularly Needed because one router may not wish to take part One router sends request, the other acknowledges Knowledge of existence of other routers and need to exchange information established at configuration time or by active intervention Advanced Networking Routing 48

Neighbor Reachability Periodic issue of keepalive messages Between all routers that are neighbors Each router keeps database of subnetworks it can reach and preferred route When change is made, router issues update message (to neighbors only) All BGP routers build up and maintain routing information Advanced Networking Routing 49

BGP Message Formats Advanced Networking Routing 50

Neighbor Acquisition Detail Router opens TCP connection with neighbor Sends open message Identifies sender s AS and gives IP address Includes Hold Time As proposed by sender If recipient prepared to open neighbor relationship Calculate hold time min [own hold time, received hold time] Max time between keepalive/update messages Reply with keepalive Advanced Networking Routing 51

Header only Enough to prevent hold time expiring Keepalive Detail If hold time expires a topology change is triggered Marker is a field that used for authentication purposes Advanced Networking Routing 52

Update Detail Information about single route through internet Information to be added to database of any recipient router Network layer reachability information (NLRI) List of network portions of IP addresses of subnets reached by this route Total path attributes length field Path attributes field (next slide) List of previously advertised routes being withdrawn May contain both Advanced Networking Routing 53

Path Attributes Field Origin Interior (e.g. OSPF) or exterior (BGP) protocol AS_Path ASs traversed for this route Next_Hop IP address of boarder router for next hop Multi_Exit_disc Information about routers internal to AS Local_Pref Tell other routers within AS degree of preference Atomic_Aggregate, Aggregator Uses subnet addresses in tree view of network to reduce information needed in NLRI Advanced Networking Routing 54

Withdrawal of Route(s) Route identified by IP address of destination subnetwork(s) May be issued because subnets are not reachable or because policies have changed Advanced Networking Routing 55

Notification Message Error notification Message header error Includes authentication and syntax errors Open message error Syntax errors and option not recognised Proposed hold time unacceptable Update message error Syntax and validity errors Hold time expired Finite state machine error Cease Close connection in absence of any other error Advanced Networking Routing 56

BGP Routing Information Exchange R1 constructs routing table for AS1 using OSPF R1 issues update message to R5 (in AS2) AS_Path: identity of AS1 Next_Hop: IP address of R1 NLRI: List of all subnets in AS1 Suppose R5 has neighbor relationship with R9 in AS3 R5 forwards information from R1 to R9 in update message AS_Path: list of ids {AS2,AS1} Next_Hop: IP address of R5 NLRI: All subnets in AS1 R9 decides if this is prefered route and forwards to neighbors Advanced Networking Routing 57

Routing Domain Confederations Set of connected AS Appear to outside world as single AS Recursive Effective scaling Advanced Networking Routing 58