ospf for isps

Upload: nelsonbohr

Post on 02-Jun-2018

230 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/11/2019 Ospf for Isps

    1/39

    1 2005 Cisco Systems, Inc. All rights reserved.

    Session Number

    Presentation_ID Cisco Confidential

    Deploying OSPF for ISPs

    ISP/IXP WorkshopsISP/IXP Workshops

  • 8/11/2019 Ospf for Isps

    2/39

    2 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    Agenda

    OSPF Design in SP Networks

    Adding Networks in OSPF

    OSPF in IOS

  • 8/11/2019 Ospf for Isps

    3/39

    3 2005 Cisco Systems, Inc. All rights reserved.

    Session Number

    Presentation_ID Cisco Confidential

    OSPF Design

    As applicable to Service Provider Networks

  • 8/11/2019 Ospf for Isps

    4/39

    4 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    Service Providers

    SP networks aredivided into PoPs

    Transit routinginformation is carried

    via BGP

    IGP is used to carrynext hop only

    Optimal path to the next

    hop is critical

  • 8/11/2019 Ospf for Isps

    5/39

    5 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    SP Architecture

    Major routing informationis ~190K prefixes via BGP

    Largest known IGP routingtable is ~67K

    Total of 196K 6K/196K ~ 4% of IGP

    routes in an ISP network

    A very small factor but hasa huge impact on networkconvergence!

    IP Backbone

    POP

    POPPOP

    POP

    Area 1/L1

    BGP 1

    POP POP

    Area 6/L1

    BGP 1

    Area 5/L1

    BGP 1Area 4/L1

    BGP 1

    Area 2/L1

    BGP 1

    Area 3/L1

    BGP 1Area0/L2

    BGP 1

  • 8/11/2019 Ospf for Isps

    6/39

    6 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    SP Architecture

    You can reduce the IGP sizefrom 6K to approx thenumber of routers in yournetwork

    This will bring really fast

    convergence

    Optimise where you mustand summarise where youcan

    Stops unnecessary flapping

    RR

    Regional

    Core

    Access

    customer customer customer

    IGP

  • 8/11/2019 Ospf for Isps

    7/39

    7 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    Backbone

    Router

    OSPF Areas and Rules

    Area 1

    Area 4

    Area 0

    Area 2 Area 3

    InternalRouter

    AreaBorder

    Router

    Autonomous

    System (AS)

    Border Router

    Internet

    Backbone area (0)

    must be present

    All other areas

    must have

    connection

    to backbone

    Backbone must

    be contiguous

    Do NOTpartitionarea (0)

  • 8/11/2019 Ospf for Isps

    8/39

    8 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    OSPF Design: Addressing

    OSPF Design and Addressing go together

    Objective is to keep the Link State Database lean

    Create an address hierarchy to match the topology

    Use separate Address Blocks for network infrastructure,

    customer interfaces, customers, etc.

  • 8/11/2019 Ospf for Isps

    9/39

    9 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    OSPF Design: Areas

    Examine physical topology

    Is it meshed or hub-and-spoke?

    Use areas and summarisation

    This reduces overhead and LSA counts(but watch next-hop for iBGP when summarising)

    Dont bother with the various stub areas

    No benefits for ISPs, causes problems for iBGP

    Push the creation of a backboneReduces mesh and promotes hierarchy

  • 8/11/2019 Ospf for Isps

    10/39

    10 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    OSPF Design: Areas

    One SPF per area, flooding done per area

    Watch out for overloading ABRs

    Avoid externals in OSPF

    External LSAs flood through entire network

    Different types of areas do different flooding

    Normal areas

    Stub areas

    Totally stubby (stub no-summary)

    Not so stubby areas (NSSA)

  • 8/11/2019 Ospf for Isps

    11/39

  • 8/11/2019 Ospf for Isps

    12/39

    12 2005 Cisco Systems, Inc. All rights reserved.

    Session Number

    Presentation_ID Cisco Confidential

    OSPF for Service Providers

    Adding Networks

  • 8/11/2019 Ospf for Isps

    13/39

    13 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    OSPF: Adding Networks

    BCP Individual OSPFNetwork statement foreach infrastructure link

    Have separate IP addressblocks for infrastructureand

    customer links

    Use IP UnnumberedInterfaces or iBGP next-hop-self for customer /30 point-to-point links

    OSPF should only carryinfrastructure routes in anISPs network

    OC12c

    OC12c

    Customer Connections

    OC48

    ISP Backbone

  • 8/11/2019 Ospf for Isps

    14/39

    14 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    OSPF: Adding NetworksMethod One

    redistribute connected subnets

    Works for all connected interfaces on the router but sendsnetworks as external type-2s which are not summarized

    router ospf 100

    redistribute connected subnets

    Do NOT do this!

    Because:

    Type-2 LSAs flood through entire network

    These LSAs are not all useful for determining paths throughbackbone; simply take up space

  • 8/11/2019 Ospf for Isps

    15/39

    15 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    OSPF: Adding NetworksMethod Two

    Specific network statements

    Every active interface with a configured IP address needs anOSPF network statement

    Interface that will have no OSPF neighbours needspassive-interface to disable OSPF Hellos

    That is: all interfaces connecting to devices outside the ISPbackbone (i.e. customers, peers, etc)

    router ospf 100

    network 192.168.1.1 0.0.0.3 area 51

    network 192.168.1.5 0.0.0.3 area 51

    passive interface Serial 1/0

  • 8/11/2019 Ospf for Isps

    16/39

    16 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    OSPF: Adding NetworksMethod Three

    Network statements wildcard mask

    Every active interface with configured IP address covered bywildcard mask used in OSPF network statement

    Interfaces covered by wildcard mask but having no OSPFneighbours needpassive-interface (or usepassive-interface

    default and then activate the interfaces which will have OSPFneighbours)

    router ospf 100

    network 192.168.1.0 0.0.0.255 area 51

    passive-interface default

    no passive interface POS 4/0

  • 8/11/2019 Ospf for Isps

    17/39

    17 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    OSPF: Adding NetworksRecommendations

    Dont ever use Method 1

    Method 2 doesnt scale too well when router has alarge number of interfaces but only a few with OSPF

    neighbours solution is to use Method 3 with no passive on interfaceswith OSPF neighbours

    Method 2 is fine for core/infrastructure routers

    Method 3 is preferred for aggregation routers

    Or use iBGP next-hop-self

    Or even ip unnumbered on external point-to-point links

  • 8/11/2019 Ospf for Isps

    18/39

    18 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    OSPF: Adding NetworksExample One

    Aggregation router with large number of leased linecustomers and just two links to the core network:

    interface loopback 0ip address 192.168.255.1 255.255.255.255interface POS 0/0ip address 192.168.10.1 255.255.255.252

    interface POS 1/0ip address 192.168.10.5 255.255.255.252interface serial 2/0:0 ...ip unnumbered loopback 0! Customers connect here ^^^^^^^router ospf 100network 192.168.255.1 0.0.0.0 area 51

    network 192.168.10.0 0.0.0.3 area 51network 192.168.10.4 0.0.0.3 area 51passive-interface defaultno passive interface POS 0/0no passive interface POS 1/0

  • 8/11/2019 Ospf for Isps

    19/39

    19 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    OSPF: Adding NetworksExample Two

    Core router with only links to other core routers (ascore routers do!):

    interface loopback 0ip address 192.168.255.1 255.255.255.255interface POS 0/0ip address 192.168.10.129 255.255.255.252

    interface POS 1/0ip address 192.168.10.133 255.255.255.252interface POS 2/0ip address 192.168.10.137 255.255.255.252interface POS 2/1ip address 192.168.10.141 255.255.255.252router ospf 100

    network 192.168.255.1 0.0.0.0 area 0network 192.168.10.128 0.0.0.3 area 0network 192.168.10.132 0.0.0.3 area 0network 192.168.10.136 0.0.0.3 area 0network 192.168.10.140 0.0.0.3 area 0passive interface loopback 0

  • 8/11/2019 Ospf for Isps

    20/39

    20 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    OSPF: Adding NetworksSummary

    Key Theme when selecting a technique: Keep theLink State Database Lean

    Increases Stability

    Reduces the amount of information in the Link State

    Advertisements (LSAs)Speeds Convergence Time

  • 8/11/2019 Ospf for Isps

    21/39

    21 2005 Cisco Systems, Inc. All rights reserved.

    Session Number

    Presentation_ID Cisco Confidential

    OSPF in IOS

    Useful features for ISPs

  • 8/11/2019 Ospf for Isps

    22/39

    22 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    Areas

    An area is stored as a32-bit field:

    Defined in IPaddress format

    Can also be defined usingsingle decimal value (i.e.,Area 0.0.0.0, or Area 0)

    0.0.0.0 reserved for thebackbone area

    Area 0

    Area 1

    Area 2

    Area 3

  • 8/11/2019 Ospf for Isps

    23/39

    23 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    Logging Adjacency Changes

    The router will generate a log messagewhenever an OSPF neighbour changes state

    Syntax:

    [no] [ospf] log-adjacency-changes

    (OSPF keyword is optional, depending on IOS version)

    Example of a typical log message:

    %OSPF-5-ADJCHG: Process 1, Nbr 223.127.255.223 onEthernet0 from LOADING to FULL, Loading Done

  • 8/11/2019 Ospf for Isps

    24/39

  • 8/11/2019 Ospf for Isps

    25/39

  • 8/11/2019 Ospf for Isps

    26/39

    26 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    Router ID

    If the loopback interface exists and has an IPaddress, that is used as the router ID in routingprotocols stability!

    If the loopback interface does not exist, or has no

    IP address, the router ID is the highest IP addressconfigured danger!

    OSPF sub command to manually set the Router ID:

    router-id

  • 8/11/2019 Ospf for Isps

    27/39

    27 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    Cost & Reference Bandwidth

    Bandwidth used in Metric calculation

    Cost = 10^8/bandwidth

    Not useful for interface bandwidths > 100 Mbps

    Syntax:ospf auto-cost reference-bandwidth

    Default reference bandwidth still 100 Mbps forbackward compatibility

    Most ISPs simply choose to develop their own coststrategy and apply to each interface type

  • 8/11/2019 Ospf for Isps

    28/39

    28 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    Cost: Example Strategy

    40GE 40Gbps cost = 1

    10GE/OC192 10Gbps cost = 5

    OC48 2.5Gbps cost = 10

    GigEthernet 1Gbps cost = 20OC12 622Mbps cost = 50

    OC3 155Mbps cost = 100

    FastEthernet 100Mbps cost = 500

    Ethernet 10Mbps cost = 1000

    E1 2Mbps cost = 5000

  • 8/11/2019 Ospf for Isps

    29/39

    29 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    Clear/Restart

    OSPF clearcommands

    If no process ID is given, all OSPF processes on the router areassumed

    clear ip ospf [pid] redistribution

    This command clears redistribution based on OSPF routing

    process ID clear ip ospf [pid] counters

    This command clears counters based on OSPF routing processID

    clear ip ospf [pid] process

    This command will restart the specified OSPF process. It attemptsto keep the old router-id, except in cases where a new router-idwas configured or an old user configured router-id was removed.Since this command can potentially cause a network churn, auser confirmation is required before performing any action

  • 8/11/2019 Ospf for Isps

    30/39

    30 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    Use OSPF Authentication

    Use authentication; too many people overlook thisbasic feature

    When using authentication, use the MD5 feature

    area authentication message-digest

    (whole area)ip ospf message-digest-key 1 md5

    Authentication can be selectively disabled perinterface with:

    ip ospf authentication null

  • 8/11/2019 Ospf for Isps

    31/39

  • 8/11/2019 Ospf for Isps

    32/39

  • 8/11/2019 Ospf for Isps

    33/39

    33 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    Tuning OSPF (3)

    OSPF startup

    max-metric router-lsa on-startup wait-for-bgp

    Avoids blackholing traffic on router restart

    Causes OSPF to announce its prefixes with highest possiblemetric until iBGP is up and running

    When iBGP is running, OSPF metrics return to normal, makethe path valid

    (Introduced by CSCdp82156 in 12.0S, 12.2 and 12.2S)

    (Equivalent to ISIS setting over-load-bit)

  • 8/11/2019 Ospf for Isps

    34/39

    34 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    Tuning OSPF (4)

    LSA filtering/interface blocking

    Per interface:

    ip ospf database-filter all out (no options)

    Per neighbor:

    neighbor 1.1.1.1 database-filter all out (no options)

    OSPFs router will flood an LSA out all interfaces except thereceiving one; LSA filtering can be useful in cases where suchflooding unnecessary (i.e., NBMA networks), where the DR/BDRcan handle flooding chores

    area filter-list

    Filters out specific Type 3 LSAs at ABRs

    Improper use can result in routing loops and black-holes thatcan be very difficult to troubleshoot

  • 8/11/2019 Ospf for Isps

    35/39

    35 2005 Cisco Systems, Inc. All rights reserved.

    Session Number

    Presentation_ID Cisco Confidential

    Deploying OSPF for ISPs

    ISP/IXP WorkshopsISP/IXP Workshops

  • 8/11/2019 Ospf for Isps

    36/39

    36 2005 Cisco Systems, Inc. All rights reserved.

    Session Number

    Presentation_ID Cisco Confidential

    OSPF Command Summary

  • 8/11/2019 Ospf for Isps

    37/39

    37 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    Redistributing Routes into OSPF

    ROUTER OSPF

    REDISTRIBUTE {protocol}

  • 8/11/2019 Ospf for Isps

    38/39

    38 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

    Router Sub-commands

    NETWORK AREA

    AREA STUB {no-summary}AREA AUTHENTICATION

    AREA DEFAULT_COST

    AREA VIRTUAL-LINK ...

    AREA RANGE

  • 8/11/2019 Ospf for Isps

    39/39