Cnap 3 02 Single Area OSPF

Embed Size (px)

Citation preview

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    1/76

    The

    SaigonCTT

    1

    CNAP Semester 3: Switching Basics and

    Intermediate Routing

    Module 2

    Single Area OSPF

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    2/76

    The

    SaigonCTT

    2

    Objectives

    Identify the key features of link-state routing Explain how link-state routing information is

    maintained

    Discuss the link-state routing algorithm

    Examine the advantages and disadvantages of link-state routing

    Compare and contrast link-state routing with

    distance vector routing Enable OSPF on a router

    Configure a loopback address to set router priority

    Change OSPF route preference by modifying thecost metric

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    3/76

    The

    SaigonCTT

    3

    Objectives

    Configure OSPF authentication Change OSPF timers

    Describe the steps to create and propagate a

    default route Use show commands to verify OSPF operation

    Configure the OSPF routing process

    Define key OSPF terms Describe the OSPF network types

    Describe the OSPF Hello protocol

    Identify the basics steps in the operation of OSPF

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    4/76

    The

    SaigonCTT

    4

    Table of Content

    1 Link-state Routing Protocol2 Single Area OSPF Concepts

    3 Single Area OSPF Configuration

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    5/76

    The

    SaigonCTT

    5

    LINK-STATE ROUTING PROTOCOL

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    6/76

    The

    SaigonCTT

    6

    Overview of link-state routing

    Protocol Description Characteristics

    Distancevector

    RIP v1 and RIPv2

    InterriorGateway RoutingProtocol (IGRP)

    Copies routing table toneighbors

    Updates frequently

    Slow convergeRIP v1 and RIP v2 use hopcount as metric

    View network from neighbors

    perspectiveSusceptible to routing loops

    Easy to configure andadministrate

    Consumes a lot of bandwidth

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    7/76

    The

    SaigonCTT

    7

    Overview of link-state routing

    Protocol Description Characteristics

    Link-state Open ShortestPath First(OSPF)

    Intermediate-system to

    Intermediate-system (IS-IS)

    Use shortest path

    Updates are event triggered

    Fast to converge

    Send link-state packets to all networkrouters

    Has common view of network

    Not as susceptible to routing loops

    Harder to configure Requires more memory andprocessing power than distancevector

    Consumes less bandwidth thandistance vector

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    8/76

    The

    SaigonCTT

    8

    Link-state routing protocol functions

    Link-state routing protocols collect routinginformation from all other routers in the network.

    Each router maintains its own complex database of

    topology information, the own view of the network. Link-state routing protocols functions:

    Respond quickly to network changes

    Send triggered updates only when a network change hasoccurred

    Send periodic updates known as link-state refreshes

    Use a hello mechanism to determine the reachability of

    neighbors

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    9/76

    The

    SaigonCTT

    9

    Link-state routing protocol features

    Uses the hello information and Link-stateadvertisements (LSAs) it receives from otherrouters to build a database about the network

    A topological database

    Uses the shortest path first (SPF) algorithm(Dijkstra algorithm) to calculate the shortest route

    to each network The resulting SPF tree

    Stores this route information in its routing table

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    10/76

    The

    Saigon

    CTT

    10

    Hello mechanism

    Perth1 network Perth2 network

    Perth3 network

    Perth4 network

    Hello Hello Hello Hello

    HelloHello

    Hello

    P1 P2 P3

    P4

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    11/76

    The

    Saigon

    CTT

    11

    Link-state advertisements (LSAs).

    Network 1 Network 2

    Network 3

    Perth4network

    Hello Hello Hello Hello

    HelloHello

    Hello

    P1 P2 P3

    P4

    Neighbors P3 and P4 onnetwork 3

    Neighbors P2 on network1

    Neighbors P1 and P4 onnetwork 3

    Neighbors P2 on network2

    Neighbors P1 and P3 onnetwork 3

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    12/76

    The

    Saigon

    CTT

    12

    How routing information is maintained

    When a failure occurs in the network, each link-state router take flowing action:

    Flood LSAs using a special multicast address

    throughout an area. Copy of the LSA and updates its link-state, or

    topological database.

    Then forward the LSA to all neighboring devices Recalculate their routing tables.

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    13/76

    The

    Saigon

    CTT

    13

    Link-state routing algorithms

    They are known collectively as shortest path first(SPF) protocols.

    They maintain a complex database of the networktopology.

    They are based on the Dijkstra algorithm.

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    14/76

    The

    Saigon

    CTT

    14

    Link-state routing algorithms

    Cost=1

    A B

    DC

    Net 20Net 10

    Net 30 Net 40

    Cost=1

    Cost=1

    Cost=1

    Cost=1

    Router Destination Nexthop

    Cost

    A 20 B 1

    A 30 C 1

    A 40 C 2

    A 40 B 2

    B 10 A 1

    B 30 C 1

    B 40 D 1B

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    15/76

    The

    Saigon

    CTT

    15

    Advantages and disadvantages of link-state routing

    Advantages Disadvantages

    Fast convergence: Changesare reported immediately bythe source affected

    Robustness against routingloops

    Routers know the topology

    Link-state packets aresequenced and aged

    The link-state database sizescan minimized with careful

    network design

    Significant demands onmemory and processingresources

    Requires very strict networkdesign

    Requires a knowledgeablenetwork administrator

    Initial flooding can impedenetwork performance

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    16/76

    The

    Saigon

    CTT

    16

    SINGLE AREA OSPF CONCEPTS

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    17/76

    The

    Saigon

    CTT

    17

    OSPF overview

    Open Shortest Path First (OSPF) is a link-staterouting protocol based on open standards.

    The most recent description is RFC 2328. The Openin OSPF means that it is open to the public and is

    non-proprietary.

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    18/76

    The

    Saigon

    CTT

    18

    OSPF terminology

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    19/76

    The

    Saigon

    CTT

    19

    OSPF terminology: Links

    TokenRing

    Links

    An interface on Router

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    20/76

    The

    Saigon

    CTT

    20

    OSPF terminology: Link state

    The status of a link between two routers. Also arouters interface and its relationship to itsneighboring routers.

    Neighbors

    TokenRing

    Links

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    21/76

    The

    SaigonC

    TT

    21

    OSPF terminology: Area

    A collection of networks and routers that have thesame area identification.

    Each router within an area has the same link-stateinformation.

    A router within an area is an internal router

    TokenRing

    Area 1

    Area 0

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    22/76

    The

    SaigonC

    TT

    22

    OSPF AreasExample

    Area 0

    Area 1

    Area 2

    Area 3

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    23/76

    The

    SaigonC

    TT

    23

    OSPF terminology: Link Cost

    The value assigned to a link. Rather thanhops, link-state protocols assign a cost to alink that is based on the speed of the media.

    Interface Output Cost.

    Neighbors

    TokenRing

    Interfaces

    Cost = 10

    Cost = 6Cost = 1785

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    24/76

    The

    SaigonC

    TT

    24

    OSPF terminology: Adjacency database

    A listing of all the neighbors to which a router hasestablished bi-directional communication. Not everypair of neighboring routers become adjacent

    Adjacencydatabase

    Neighbors

    TokenRing

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    25/76

    The

    SaigonC

    TT

    25

    OSPF terminology: Link-state database

    Also known as a topological database

    A list of link-state entries of all other routers in theinternetwork

    Token

    Ring

    TopologicalDatabase

    Adjacencydatabase

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    26/76

    The

    SaigonC

    TT

    26

    OSPF terminology: Routing table

    The routing table (also known as forwarding

    database) generated when an algorithm is run onthe link-state database.

    Each routers routing table is unique

    AdjacencyDatabase

    Lists neighbors

    Token

    Ring

    TopologicalDatabase

    Lists all routes

    RoutingTable

    Lists best routes

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    27/76

    The

    SaigonC

    TT

    27

    OSPF terminology: DR and BDR router

    Designated router (DR) and backup designatedrouter (BDR):

    A router that is elected by all other routers on thesame LAN to represent all the routers.

    Each network has a DR and BDR

    TokenRing

    DR

    BDR

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    28/76

    The

    SaigonC

    TT

    28

    Comparing OSPF with distance vector routing protocols

    Distance vector OSPF

    View network topology fromneighbors perspective

    Adds distance vectors from

    router to router Frequent, periodic update:

    Slow convergence

    Passes copies routing tables

    to neighbor routers

    Use flat topology

    Gets common view ofentire network topology

    Calculates the shortest

    path to other routers Event-triggered update:

    Fast to convergence

    Passes link-state routing

    updates to other routers

    Allow hierarchical designfor large internetworks

    Support for VLSM

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    29/76

    The

    SaigonC

    TT

    29

    Shortest path algorithm

    1

    4

    1 4

    2

    22

    ABC

    D

    E F G

    The best path is the lowest cost path.

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    30/76

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    31/76

    The

    SaigonC

    TT

    31

    OSPF network types

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    32/76

    The

    SaigonC

    TT

    32

    OSPF network types: Fourth type

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    33/76

    The

    SaigonC

    TT

    33

    DR and BDR receive LSAs

    Hellos elect DR and BDR to present segment

    Each router then forms adjacency with DR and BDR

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    34/76

    The

    SaigonC

    TT

    34

    OSPF Hello Protocol

    The rules that govern the exchange of OSPF hellopackets are called the Hello protocol.

    Hello packets use : 224.0.0.5 (all routers).

    Hello packets are sent at regular intervals (default):

    Multi access and Point-to-point: 10s

    NBMA : 30s

    On multi-access networks the Hello protocol elects a

    designated router (DR) and a backup designatedrouter (BDR).

    The hello packet carries information that allneighbors must agree upon before an adjacency is

    formed, and link-state information is exchanged.

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    35/76

    The

    Saigon

    CTT

    35

    OSPF packet header

    For the hello packet the type field is set to 1.

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    36/76

    The

    Saigon

    CTT

    36

    OSPF Hello Protocol - Hello header

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    37/76

    The

    Saigon

    CTT

    37

    Steps in the operation of OSPF

    5 steps of operation:

    1. Establish router adjacencies.

    2. Elect a DR and BDR (if necessary).3. Discover routes.

    4. Select the appropriate routes to use.

    5. Maintain routing information.

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    38/76

    The

    Saigon

    CTT

    38

    OSPF Topologies

    Point-to-Point

    BroadcastMultiaccess

    NBMA X.25Frame Relay

    OSPF O ti i

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    39/76

    The

    Saigon

    CTT

    39

    2000, Cisco Systems, Inc. www.cisco.com 4-39

    OSPF Operation in a

    Broadcast Multiaccess Topology

    BroadcastMultiaccess

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    40/76

    The

    Saigon

    CTT

    40

    Step 1: Establish router adjacencies

    First step in OSPF operation is to establish routeradjacencies

    RTB sends hello packets, advertising its own router

    ID highest IP address:10.6.0.1(no loopback)

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    41/76

    The

    Saigon

    CTT

    41

    Step 1: Establish router adjacencies (cont.)

    Router IDHello/dead intervals

    NeighborsArea-IDRouter priorityDR IP addressBDR IP addressAuthentication passwordStub area flag

    **

    **

    * Entry must match on neighboring routers

    Hello

    afadjfjorqpoeru39547439070713

    Hello

    A

    D E

    CB

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    42/76

    The

    Saigon

    CTT

    42

    Step 2: Electing the DR and BDR (if necessary).

    P=1 P=0P=1

    P=3 P=2

    DR BDR

    Hello

    The router with the highest priority value is the DR. The router with the second highest priority value isthe BDR.

    The default for the interface OSPF priority is 1. In

    case of a tie (ha nhau), the routers router ID is used.

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    43/76

    The

    Saigon

    CTT

    43

    Step 3: Discover routes

    On difference network have differ discover process.

    On multi-access network, the exchange ofrouting information occurs between the DR orBDR and every other router on the network.

    Link partners on a point-to-point or point-to-multipoint network also engage (tham gia) in the

    exchange process.

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    44/76

    The

    Saigon

    CTT

    44

    Exchange Process

    Router BNeighbors List

    172.16.5.1/24, int E1

    172.16.5.1/24E0

    I am router ID 172.16.5.2, and I see 172.16.5.1.

    Router ANeighbors List

    172.16.5.2/24, int E0

    172.16.5.2/24E1

    I am router ID 172.16.5.1 and I see no one.

    Down State

    Init State

    A B

    Two-way State

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    45/76

    The

    Saigon

    CTT

    45

    Step 3: Discover routes (cont.)

    DBD

    afadjfjorqpoeru39547439070713

    Here is a summary of my link-state database.

    Here is a summary of my link-state database.DBD

    afadjfjorqpoeru39547439070713

    E0

    172.16.5.1

    DR

    E0

    172.16.5.3

    No, I will start exchange because I have ahigher router ID.

    I will start exchange because I have router ID 172.16.5.1.Hello

    afadjfjorqpoeru39547439070713

    Hello

    afadjfjorqpoeru39547439070713

    Exstart State

    Exchange State

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    46/76

    The

    Saigon

    CTT

    46

    Step 3: Discover routes (cont.)

    Full State

    I need the complete entry for network 172.16.6.0/24.

    Here is the entry for network 172.16.6.0/24.

    Thanks for the information!

    LSR

    afadjfjorqpoeru39547439070713

    LSAck

    afadjfjorqpoeru39547439070713

    LSU

    afadjfjorqpoeru39547439070713

    Loading State

    E0

    172.16.5.1

    E0

    172.16.5.3

    LSAck

    afadjfjorqpoeru39547439070713

    Thanks for the information!LSAck

    afadjfjorqpoeru39547439070713

    DR

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    47/76

    The

    Saigon

    CTT

    47

    Step 4: Choosing Routes

    Topology TableNet Cost Out Interface10.2.2.0 6 To010.3.3.0 7 To010.3.3.0 10 E0

    This is the best route to 10.3.3.0.

    TokenRing

    Cost=10

    Cost=6

    FDDI

    Cost=1

    A B C

    10.1.1.0/24 10.2.2.0/24 10.3.3.0/24

    10.4.4.0/24

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    48/76

    The

    Saigon

    CTT

    48

    Step 5: Maintaining Routing Information

    Router A tells all OSPF DRs on 224.0.0.6

    xxLSU1

    Link-State ChangeDR

    AB

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    49/76

    The

    Saigon

    CTT

    49

    Step 5: Maintaining Routing Information

    Router A tells all OSPF DRs on 224.0.0.6

    DR tells all others on 224.0.0.5

    LSU

    2

    xx

    Link-State Change

    LSU1

    DR

    AB

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    50/76

    The

    Saigon

    CTT

    50

    LSU

    3

    Step 5: Maintaining Routing Information

    LSU

    2

    xx

    Link-State Change

    LSU1

    DR

    AB

    Router A tells all OSPF DRs on 224.0.0.6

    DR tells all others on 224.0.0.5

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    51/76

    The

    Saigon

    CTT

    51

    Step 5: Maintaining Routing Information

    I need to updatemy routing table.

    4

    LSU

    3

    LSU

    2

    xx

    Link-State Change

    LSU1

    DR

    AB

    Router A tells all OSPF DRs on 224.0.0.6

    DR tells all others on 224.0.0.5

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    52/76

    The

    Saigon

    CTT

    52

    Step 5: Maintaining Routing Information (cont.)

    Is entry inlink-statedatabase?

    LSA

    LSU

    No

    Run SPF to calculatenew routing table

    Add to database

    Flood LSA

    End

    Send LSAckto DR

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    53/76

    The

    Saigon

    CTT

    53

    Step 5: Maintaining Routing Information (cont.)

    Yes

    Is seq. #the same?

    Yes

    Ignore LSAIs entry inlink-statedatabase?

    LSA

    LSU

    No

    Run SPF to calculatenew routing table

    Add to database

    Flood LSA

    Send LSAckto DR

    End

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    54/76

    The

    Saigon

    CTT

    54

    Step 5: Maintaining Routing Information (cont.)

    No

    Send LSUwith newer

    information tosource

    Is seq. #higher?

    No

    Yes

    Is seq. #the same?

    Yes

    Ignore LSAIs entry inlink-statedatabase?

    LSA

    LSU

    No

    Run SPF to calculatenew routing table

    Add to database

    Flood LSA

    Send LSAckto DR

    End End

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    55/76

    The

    Saigon

    CTT

    55

    Step 5: Maintaining Routing Information (cont.)

    Yes

    GotoA

    A

    No

    Send LSUwith newer

    information tosource

    Is seq. #higher?

    No

    Yes

    Is seq. #the same?

    Yes

    Ignore LSAIs entry inlink-statedatabase?

    LSA

    LSU

    No

    Run SPF to calculatenew routing table

    Add to database

    Flood LSA

    Send LSAckto DR

    End End

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    56/76

    The

    Saigon

    CTT

    56

    OSPF Operation in a Point-to-Point

    Point-to-Point Neighborship Router dynamically detects its neighboring router

    using the Hello protocol

    No election: Adjacency is automatic as soon asthe two routers can communicate

    OSPF packets are always sent as multicast224.0.0.5

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    57/76

    The

    Saigon

    CTT

    57

    OSPF Operation in an NBMA

    NBMA Topology

    Single interface interconnects multiple sites NBMA topologies support multiple routers but

    without broadcasting capabilities

    X.25

    Frame Relay

    ATM

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    58/76

    The

    Saigon

    CTT

    58

    SINGLE AREA OSPF Configuration

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    59/76

    The

    Saigon

    CTT

    59

    interface Ethernet0ip address 10.64.0.2 255.255.255.0!interface Serial0ip address 10.2.1.2 255.255.255.0

    interface Ethernet0ip address 10.64.0.1 255.255.255.0!

    router ospf 1

    Basic OSPF Configuration

    Can Assign Network or

    Interface Address.

    Broadcast Network Point-to-Point NetworkE0

    10.64.0.1

    10.64.0.2

    E0

    S0

    10.2.1.2 10. 2.1.1

    S1A B C

    network 10.0.0.0 0.255.255.255 area 0 router ospf 50

    network 10.2.1.2 0.0.0.0 area 0

    network 10.64.0.2 0.0.0.0 area 0

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    60/76

    The

    Saigon

    CTT

    60

    Configuring OSPF loopback address

    Router ID:

    Number by which the router is known to OSPF

    Default: The highest IP address on an activeinterface at the moment of OSPF process startup

    Can be overridden by a loopback interface: HighestIP address of any active loopback interface

    ! Create the loopback 0 interface

    Router(configf)#Interface loopback 0Router(configf-if)#ip address 192.168.31.33 255.255.255.255

    ! Remove loopback 0 interface

    Router(configf)#no Interface loopback 0

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    61/76

    The

    Saigon

    CTT

    61

    Configuring OSPF router priority

    The router with the highest priority value is the DR. The default for the interface OSPF priority is 1. In

    case of a tie, the routers router ID is used.

    ! Setting OSPF Priority

    Router(configf)#Interface Fastethernet 0/0Router(configf-if)#ip ospf priority 50

    The priorities can be set to any value from 0 to 255

    The command show ip ospf interface will displaythe interface priority value as well as other keyinformation.

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    62/76

    The

    Saigon

    CTT

    62

    Modifying OSPF cost metric

    Cost is calculated using the formula 108/bandwidth,where bandwidth is expressed in bps.

    Bandwidth dividend is user configurable: Interface subcommand: bandwidth 64

    Interface subcommand: ip ospf cost

    Relevant going out an interface only

    Medium Cost

    56 kbps serial link 1785

    T1 (1.544 Mbps serial link) 64

    E1 (2.048 Mbps serial link) 48

    Ethernet 10

    Fast Ethernet/FDDI 1

    C fi i OS i i

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    63/76

    The

    Saigon

    CTT

    63

    Configuring OSPF authentication

    ! Create a key that is used to generate the authentication data! in the OSPF packet header.

    Router(config-if)#ip ospf authentication-key password

    ! After the password is configured, authentication must be enabled:

    Router(config-router)#area area-numberauthentication

    The authentication key, known as a password, is a shared

    secret between the routers. The password can be up to eight characters. The password is sent as plain text.

    C fi i OSPF h i i i h MD5

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    64/76

    The

    Saigon

    CTT

    64

    Configuring OSPF authentication: with MD5

    ! Specifies the type of message-digest hashing algorithm to use! and key value

    Router(config-if)#ip ospf message-digest-key key-idmd5 encryption-typekey

    ! After that, authentication must be enabled:

    Router(config-router)#area area-idauthentication message-digest

    The value of encryption-type field is 0 means none and 7

    means proprietary. The key-id is an identifier (1 to 255) The key is an alphanumeric password up to sixteen

    characters. Neighbor routers must use the same key identifier with the

    same key value.

    C fi i OSPF i

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    65/76

    The

    Saigon

    CTT

    65

    Configuring OSPF timers

    ! To configure the hello and dead intervals on an interface

    Router(config-if)#ip ospf hello-interval secondsRouter(config-if)#ip ospf dead-interval seconds

    OSPF networks, the default

    Hello interval is 10 seconds Dead interval is 40 seconds.

    On nonbroadcast networks, the default Hello interval is 30 seconds Dead interval is 120 seconds.

    These timers must be configured to match those ofany neighboring router.

    OSPF i d f l

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    66/76

    The

    Saigon

    CTT

    66

    OSPF, propagating a default route

    !Configure a gateway of last resort

    Router(config)#ip route 0.0.0.0 0.0.0.0 [interface | next-hop address]

    ! To propagate this route to all the routers in a normal OSPF area

    Router(config-router)#default-information originate

    C OSPF fi ti i

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    67/76

    The

    Saigon

    CTT

    67

    Common OSPF configuration issues

    Failure to establish a neighbor relationship is caused by any

    of the following reasons: Hellos are not sent from both neighbors.

    Hello and dead interval timers are not the same.

    Interfaces are on different network types. Authentication passwords or keys are different.

    In OSPF routing it is also important to ensure the following:

    All interfaces have the correct addresses and subnet

    mask. network area statements have the correct wildcard

    masks.

    network area statements put interfaces into the correctarea.

    V if i OSPF O ti

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    68/76

    The

    Saigon

    CTT

    68

    Router#

    show ip ospf interface

    Verifying OSPF Operation

    Displays area ID and adjacency information

    Router#

    show ip protocols

    Verifies that OSPF is configured

    Router#

    show ip route

    Displays all the routes learned by the router

    V if i OSPF O ti ( t )

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    69/76

    The

    Saigon

    CTT

    69

    Displays OSPF timers and statistics

    Displays information about DR, BDR and neighbors

    Displays the link-state database

    Verifying OSPF Operation (cont.)

    Router#

    show ip ospf neighbor detail

    Router#

    show ip ospf database

    Router#

    show ip ospf

    V if i OSPF O ti ( t )

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    70/76

    The

    Saigon

    CTT

    70

    Allows you to clear the IP routing table

    Router#

    clear ip route *

    Router#

    debug ip ospf opt ion

    Displays router interaction during the hello,exchange, and flooding processes

    Verifying OSPF Operation (cont.)

    h i f i t f

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    71/76

    The

    Saigon

    CTT

    71

    show ip ospf interface

    R2#sh ip ospf int e0

    Ethernet0 is up, line protocol is up

    Internet Address 192.168.0.12/24, Area 0

    Process ID 1, Router ID 192.168.0.12, Network Type BROADCAST, Cost: 10Transmit Delay is 1 sec, State DROTHER, Priority 1

    Designated Router (ID) 192.168.0.11, Interface address 192.168.0.11

    Backup Designated router (ID) 192.168.0.13, Interface address

    192.168.0.13

    Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

    Hello due in 00:00:04

    Neighbor Count is 3, Adjacent neighbor count is 2Adjacent with neighbor 192.168.0.13 (Backup Designated Router)

    Adjacent with neighbor 192.168.0.11 (Designated Router)

    Suppress hello for 0 neighbor(s)

    h i f i hb

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    72/76

    The

    Saigon

    CTT

    72

    show ip ospf neighbor

    Neighbor ID Pri State Dead Time Address Interface

    192.168.0.13 1 2WAY/DROTHER 00:00:31 192.168.0.13 Ethernet0

    192.168.0.14 1 FULL/BDR 00:00:38 192.168.0.14 Ethernet0

    192.168.0.11 1 2WAY/DROTHER 00:00:36 192.168.0.11 Ethernet0

    192.168.0.12 1 FULL/DR 00:00:38 192.168.0.12 Ethernet0

    OSPF over Ethernet - Multiaccess Network

    Neighbor ID Pri State Dead Time Address Interface192.168.0.11 1 FULL/ - 00:00:39 10.1.1.2 Serial1

    OSPF over HDLC - Point-to-Point Network

    sho ip ospf database

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    73/76

    The

    Saigon

    CTT

    73

    R2#show ip ospf database

    OSPF Router with ID (192.168.0.12) (Process ID 1)

    Router Link States (Area 0)

    Link ID ADV Router Age Seq# Checksum Link count

    192.168.0.10 192.168.0.10 817 0x80000003 0xFF56 1

    192.168.0.11 192.168.0.11 817 0x80000003 0xFD55 1

    192.168.0.12 192.168.0.12 816 0x80000003 0xFB54 1

    192.168.0.13 192.168.0.13 816 0x80000003 0xF953 1

    192.168.0.14 192.168.0.14 817 0x80000003 0xD990 1

    Net Link States (Area 0)

    Link ID ADV Router Age Seq# Checksum

    192.168.0.14 192.168.0.14 812 0x80000002 0x4AC8

    show ip ospf database

    Summary

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    74/76

    The

    Saigon

    CTT

    74

    Summary

    Link-state routing protocols collect routing information fromall other router in the network or within a defined area ofthe network. Link-state routing protocols perform thefollowing functions:

    Respond quickly to network changes

    Send triggered update only when a network change hasoccurred

    Send periodic updates know as link-state refreshes

    Use a hello mechanism to determine the reachability ofneighbors

    OSPF is link-state routing protocol based on open standards.

    OSPF routing uses the concept of area. Each router contains

    a complete database of link-states in specific area

    Q&A

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    75/76

    The

    Saigon

    CTT

    75

    Q&A

  • 7/27/2019 Cnap 3 02 Single Area OSPF

    76/76

    The

    Saigon

    CTT