2010-CCNA exp 2-v405-Ch.11

download 2010-CCNA exp 2-v405-Ch.11

of 63

Transcript of 2010-CCNA exp 2-v405-Ch.11

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    1/63

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    2/63

    CCNA2 Semester 2, 2010 2Dept. of Information Communications, Dongyang Mirae Univ.

    AgendaAgenda

    11.1 Introduction to OSPF

    Introduction, packet types & message format, OSPFalgorithm & process, AD, authentication

    11.2 Basic OSPF Configuration

    Topology, router & network command, router ID,examination & verification commands

    11.3 The OSPF Metric

    Metric & modification

    11.4 OSPF and Multiaccess Networks

    DR/BDR election and their use in multiaccess networks

    11.5 More OSPF Configuration

    Redistributing an OSPF default route, fine-tuning

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    3/63

    CCNA2 Semester 2, 2010 3Dept. of Information Communications, Dongyang Mirae Univ.

    IntroductionIntroduction

    OSPF: a linklink--state, classlessstate, classless routing protocol

    Developed as the robust solution to overcome the RIPslimitation in the larger networks

    ScalabilityScalability to much larger network using the concept of areasconcept of areas

    Fast convergenceFast convergence OSPF metric as an arbitrary value called cost

    The Cisco IOS uses bandwidth

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    4/63

    CCNA2 Semester 2, 2010 4Dept. of Information Communications, Dongyang Mirae Univ.

    IntroductionIntroduction

    Key concepts1.Introduction to OSPF (11.1)

    ScalableScalable, robust link-state routing protocol

    Supports hierarchical designhierarchical design using multiple areas

    Reduces overhead, speeds up convergence, confines networkinstability to one area, improves performance

    Build a complete topological database

    Uses Dijkstras SPF algorithmSPF algorithm to build routing table

    Uses cost as metric

    2.Basic OSPF configurationconfiguration (11.2) ParametersParameters to be configured

    Process-id, network address & wildcard-mask, area number

    Adjustable OSPF parameters

    Hello & dead interval timing, router priority, metric

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    5/63

    CCNA2 Semester 2, 2010 5Dept. of Information Communications, Dongyang Mirae Univ.

    IntroductionIntroduction

    3.The OSPF metric (11.3) is costcost Cisco IOS uses accumulated bandwidthaccumulated bandwidth for an entire route as the

    cost

    Administrator can modify the cost of a link

    4.OSPF in multi-access network (11.4) Use DR/BDRDR/BDR to reduce update packet between neighbors

    Router priorityRouter priority affects the process of DR/BDR election

    Administrator can adjust the router priority

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    6/63

    CCNA2 Semester 2, 2010 6Dept. of Information Communications, Dongyang Mirae Univ.

    ObjectivesObjectives

    Describe the background and basic featuresbasic features of OSPF

    Identify and apply the basic OSPF configuration commandsbasic OSPF configuration commands

    Describe, modify and calculate the metric used by OSPFmetric used by OSPF

    Describe the Designated Router/Backup Designated Router(DR/BDRDR/BDR) election processelection process in multiaccess networks

    Describe the uses ofadditional configuration commandsadditional configuration commands inOSPF

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    7/63

    CCNA2 Semester 2, 2010 7Dept. of Information Communications, Dongyang Mirae Univ.

    Introduction to OSPFIntroduction to OSPF

    11.1 Introduction to OSPF11.1.1 Background of OSPF

    11.1.2 OSPF Message Encapsulation

    11.1.3 OSPF Packet Types

    11.1.4 Hello Protocol

    11.1.5 OSPF Link-State Updates

    11.1.6 OSPF Algorithm

    11.1.7 Administrative Distance

    11.1.8 Authentication

    11.2 Basic OSPF Configuration

    11.3 The OSPF Metric

    11.4 OSPF and Multiaccess Networks

    11.5 More OSPF Configuration

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    8/63

    CCNA2 Semester 2, 2010 8Dept. of Information Communications, Dongyang Mirae Univ.

    Background ofOSPFBackground ofOSPF

    Began in 1987 by IETF1989 OSPFv1 released in RFC 1131

    This version was experimental & never deployed

    1991 OSPFv2 released in RFC 1247

    1998 OSPFv2 updatedin RFC 2328

    1999 OSPFv3 for IPv6 published in RFC 2740

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    9/63

    CCNA2 Semester 2, 2010 9Dept. of Information Communications, Dongyang Mirae Univ.

    OSPF Message EncapsulationOSPF Message Encapsulation

    OSPF packet

    OSPF packet

    HeaderHeader

    Data

    Header Data

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    10/63

    CCNA2 Semester 2, 2010 10Dept. of Information Communications, Dongyang Mirae Univ.

    OSPFPacket TypesOSPFPacket Types

    Packet types defined by the type code in the packet header1.Hello packet (type=0x01)

    Establishes and maintains adjacency with other OSPF routers

    2.The Database Description (DBD, DD) packet (type=0x02)

    An abbreviated list of the sending router's link-state database

    Used by receiving routers to check against the local link-statedatabase.

    3.Link-State Request (LSR) packet (type=0x03)

    Receiving routers request more information about specific entry inthe DBD

    4.Link-State Update (LSU) packet (type=0x04) Replies to specific LSRs or announces new information

    Contains 11 different types of Link-State Advertisements (LSAs)

    5.Link-State Acknowledgement (LSAck) packet (type=0x05)

    Acknowledges the receipt of other types of OSPF packet

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    11/63

    CCNA2 Semester 2, 2010 11Dept. of Information Communications, Dongyang Mirae Univ.

    Hello ProtocolHello Protocol

    Purpose of OSPF hello packet Ensure bi-directional communication and maintain keepalive

    Advertise parameters on which routers must agree to becomeneighbors

    Hello interval, dead interval, network type

    Discover OSPF neighbors & establish adjacencies Elect a Designated Router (DR) and a Backup DR (BDR) used in

    multi-access networks Type: OSPF Packet Type: Hello (1),

    DBD (2), LSR (3), LSU (4), LSACK (5) Router ID: ID of the originating router Area ID: area from which the packet

    originated

    Network Mask: Subnet maskassociated with the sending interface Hello Interval: number of seconds

    between the sending router's hellos Router Priority: Used in DR/BDR

    election Designated Router (DR): Router ID

    of the DR, if any Backup Designated Router (BDR):

    Router ID of the BDR, if any List of Neighbors: lists the OSPF

    Router ID of the neighboring router(s)

    the highest ip addressconfigured on anyinterface in this router

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    12/63

    CCNA2 Semester 2, 2010 12Dept. of Information Communications, Dongyang Mirae Univ.

    Hello ProtocolHello Protocol

    Neighbor establishment Any other OSPF neighbors on any of its links?

    1. Send and receive hello on all OSPF-enabled interfaces

    2. Determine the OSPF router ID of the sending router

    3. Establishes adjacency with the neighbor

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    13/63

    CCNA2 Semester 2, 2010 13Dept. of Information Communications, Dongyang Mirae Univ.

    OSPF Hello intervals Usually periodically multicast (all SPF routers; 224.0.0.5)

    10 sec. (multiaccess & point-to-point segment) or

    30 sec. (NBMA segments such as Frame relay, X.25, ATM)

    OSPF Dead intervals

    Time for the router to wait without receiving hello packet before itthinks the neighbor is down

    When expired, link-state update about the down neighbor is

    flooded Default value = 4 hello interval

    Hello ProtocolHello Protocol

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    14/63

    CCNA2 Semester 2, 2010 14Dept. of Information Communications, Dongyang Mirae Univ.

    Hello ProtocolHello Protocol

    Electing a DR (designated router) and BDR (backup DR) Used to reduce the amount of OSPF traffic on multicast networks

    A router with the (second) highest priorityhighest priority is elected as the (B)DRDR

    Without DR & BDR

    All OSPF routers flood link-state update packets to all others

    With DR & BDR

    1.All OSPF routers send link-state update packets to DR & BDR

    Multicast to 224.0.0.6

    2.DR sends them to all other routers

    Multicast to 224.0.0.5

    BDR takes over DR when DR fails

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    15/63

    CCNA2 Semester 2, 2010 15Dept. of Information Communications, Dongyang Mirae Univ.

    OSPF LinkOSPF Link--State UpdatesState Updates

    Link-state update (LSU) packet Used for OSPF routing updates

    Deliver link state advertisements (LSAs)

    An LSA contains information about neighbors & path costs

    An LSU packet can contain 1 LSAs

    There are 11 different types of LSAs in a LSU packet

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    16/63

    CCNA2 Semester 2, 2010 16Dept. of Information Communications, Dongyang Mirae Univ.

    OSPF AlgorithmOSPF Algorithm

    Maintains a link-state database containing the received LSAsUses Dijkstra's shortest path first (SPF) algorithm to create

    an SPF tree

    The SPF tree is then used to populate the IP routing table

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    17/63

    CCNA2 Semester 2, 2010 17Dept. of Information Communications, Dongyang Mirae Univ.

    OSPF AlgorithmOSPF Algorithm

    OSPF process steps summary1.Send hello packets and wait to receive hello packets from

    others (packet type=1;downinit state)

    2.Using received hello packets, [elect DR/BDR in multi-accessnetwork and] establish adjacencies (2-way state)

    In the MA networks, adjacencies are established only with DR

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    18/63

    CCNA2 Semester 2, 2010 18Dept. of Information Communications, Dongyang Mirae Univ.

    OSPF AlgorithmOSPF Algorithm

    3. Go through a sequence of status The two neighbors determine a master/slave relationship based

    on the ID (highest IP interface address) (type=1; exstart state)

    Exchange topology summary (type=2;exchange state)

    Called database description packet (DDP)

    Link-state request (LSR;type=3) link-state update (LSU;type=4) link-state acknowledge (LSAck;type=5); loading state

    LSAs in the LSU packets are multicast

    In MA network, other routers multicast LSUs to DR first (224.0.0.6)

    Next, DR multicasts them to all other routers (224.0.0.5)

    LSUs are flooded over an OSPF area

    Record LSAs in a link-state database and reply with a LSA Ack.

    Repeat the processes until the databases are complete (in fullstate)

    All routers in an OSPF area have the same topological database

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    19/63

    CCNA2 Semester 2, 2010 19Dept. of Information Communications, Dongyang Mirae Univ.

    OSPF AlgorithmOSPF Algorithm

    DDP

    LSR

    LSU

    This is detailed information

    DDP

    LSAckI have received LSU

    LSU

    LSAck

    This is detailed information

    LSR

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    20/63

    CCNA2 Semester 2, 2010 20Dept. of Information Communications, Dongyang Mirae Univ.

    OSPF AlgorithmOSPF Algorithm

    4.Apply SPF algorithm to calculate the shortest loop free route Routing information is recorded in a routing table

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    21/63

    CCNA2 Semester 2, 2010 21Dept. of Information Communications, Dongyang Mirae Univ.

    Administrative DistanceAdministrative Distance

    Default Administrative Distance for OSPF is 110 OSPF is preferred over IS-IS and RIP, but not over EIGRP

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    22/63

    CCNA2 Semester 2, 2010 22Dept. of Information Communications, Dongyang Mirae Univ.

    AuthenticationAuthentication

    OSPF can be configured for authentication Routers will only accept routing information from other routers

    configured with the same password or authenticationinformation

    RIPv2, EIGRP, OSPF, IS-IS, & BGP all supports encryption

    and authentication This is an interface specific configuration

    Authentication does not encrypt the router's routing table

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    23/63

    CCNA2 Semester 2, 2010 23Dept. of Information Communications, Dongyang Mirae Univ.

    Basic OSPF ConfigurationBasic OSPF Configuration

    11.1 Introduction to OSPF11.2 Basic OSPF Configuration

    11.2.1 Lab Topology

    11.2.2 The router ospf Command

    11.2.3

    The network Command11.2.4 OSPF Router ID

    11.2.5 Verifying OSPF

    11.2.6 Examining the Routing Table

    11.3 The OSPF Metric

    11.4 OSPF and Multiaccess Networks

    11.5 More OSPF Configuration

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    24/63

    CCNA2 Semester 2, 2010 24Dept. of Information Communications, Dongyang Mirae Univ.

    Lab TopologyLab Topology

    Discontiguous & VLSM IP addressing schemeSerial links ofvarious bandwidths (not now, yet)

    Multiple paths to each remote network

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    25/63

    CCNA2 Semester 2, 2010 25Dept. of Information Communications, Dongyang Mirae Univ.

    TheThe router ospfrouter ospf CommandCommand

    Enabling OSPF on a router

    1 process_id 65,535, chosen by the administrator

    A router can have multiple OSPF processes (unusual & expensive)

    Used to identify each OSPF process on a router (local to the router) Locally significant

    No need to match other OSPF routers in order to establish adjacencies withthose neighbors

    Ex: On R1~R3, enable OSPF with the process id of 1

    R1(config)#router ospfprocess_id

    R1(config)#router ospf 1

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    26/63

    CCNA2 Semester 2, 2010 26Dept. of Information Communications, Dongyang Mirae Univ.

    TheThe networknetwork CommandCommand

    The function of the network commandAny interfaces matching the network address in the network

    command will be enabled to send and receive OSPF packets.

    This network (or subnet) will be included in OSPF routingupdates.

    Syntax

    OSPF always requiresalways requires the wildcard maskconfiguredconfigured

    Specify the [range of] interfaces that will be enabled for OSPF

    Can be 0.0.0.0 if the single interface is to be specified

    area area-idrefers to the OSPF area

    An OSPF area is a group of routers that share link-state information

    Only single area OSPF is covered in CCNA

    R1(config)#network network-address wildcard-maskarea area-id

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    27/63

    CCNA2 Semester 2, 2010 27Dept. of Information Communications, Dongyang Mirae Univ.

    TheThe networknetwork CommandCommand

    Configure R1~R3 with network command: Use area_idof 0

    Apply appropriate wildcard-maskfor each subnet

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    28/63

    CCNA2 Semester 2, 2010 28Dept. of Information Communications, Dongyang Mirae Univ.

    OSPF Router IDOSPF Router ID

    Determining the router IDAn IP address used to identify a routerused in DR/BDR electionDR/BDR election

    Must be unique for each router in an OSPF area

    3 rule for deriving the router ID

    1. Use IP address configured with OSPF router-idcommand

    It takes precedence over loopback and physical interface addresses

    It is used at the next reload orat a manual OSPF process restart

    2. If not configured, router chooses highest IP address of anyloopback interfaces

    3. If no loopback interfaces are configured, then the highest IPaddress on any active interface is used

    Ex: Using the criteria described above, determine the router IDs

    for R1~R3

    and verify them

    R1(config-router)#routeridip_address

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    29/63

    CCNA2 Semester 2, 2010 29Dept. of Information Communications, Dongyang Mirae Univ.

    OSPF Router IDOSPF Router ID

    Verifying current router IDR1#sh ip protocol

    Routing Protocol is "ospf 1"Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not setRouter ID 192.168.10.5

    Number of areas in this router is 0. 0 normal 0 stub 0 nssa

    R1#show ip ospfRouting Process "ospf 1" with ID 192.168.10.5

    Supports only single TOS(TOS0) routes

    R1#show ip ospf interface s0/0/0Serial0/0/0 is up, line protocol is up

    Internet address is 192.168.10.1/30, Area 0Process ID 1, Router ID 192.168.10.5, Network Type POINT-TO-

    POINT, Cost: 64

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    30/63

    CCNA2 Semester 2, 2010 30Dept. of Information Communications, Dongyang Mirae Univ.

    OSPF Router IDOSPF Router ID

    Router ID & loopback addresses Once configured, loopback interface is always up and never fails

    It is always preferred over any IP address of real interfaces

    Ex: Configure loopback 0 of R1~R3 with 10.1.1.1, 10.2.2.2,10.3.3.3 with the subnet mask of /32 (Are router IDs changed?)

    Modifying the router IDModifying the router ID

    The router ID is selected when OSPF is configured with its firstOSPF network command

    After that moment, modifying the router ID requiresrequires reload or

    restarting the OSPF process

    Ex: Apply the modifications in the above example and verify them

    R1#reload OR,R1#clear ip ospf process

    effective only forrouter-idcommand

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    31/63

    CCNA2 Semester 2, 2010 31Dept. of Information Communications, Dongyang Mirae Univ.

    Verifying OSPFVerifying OSPF

    R3#show ip ospf neighborNeighbor ID Pri State Dead Time Address Interface10.1.1.1 1 FULL/- 00:00:35 192.168.10.5 Serial0/0/010.2.2.2 1 FULL/- 00:00:36 192.168.10.9 Serial0/0/1

    show ip ospf neighborcommand Used to verify and troubleshoot OSPF neighbor relationships

    Two routers may not form an OSPF adjacency if:

    Unmatched subnet masks, causing the routers to be on separatenetworks.

    Unmatched Hello or Dead timers.

    Unmatched OSPF Network types. Missing or incorrect OSPF

    network command.

    Ex: Verify the neighbors atR1~R2

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    32/63

    CCNA2 Semester 2, 2010 32Dept. of Information Communications, Dongyang Mirae Univ.

    Verifying OSPFVerifying OSPF

    Additional OSPF troubleshooting commands

    Ex: Apply above commands on R1~R3 and examine the outputs

    Command Description

    show ip protocolsDisplays OSPF process ID, router ID,networks router is advertising & administrativedistance

    show ip ospfDisplays OSPF process ID, router ID, OSPFarea information & the last time SPF algorithmcalculated

    show ip ospf interface Displays hello interval and dead interval

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    33/63

    CCNA2 Semester 2, 2010 33Dept. of Information Communications, Dongyang Mirae Univ.

    Verifying OSPFVerifying OSPF

    R1#show ip protocols

    Routing Protocol is "ospf 1"Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not setRouter ID 10.1.1.1Number of areas in this router is 1. 1 normal 0 stub 0 nssa

    Maximum path: 4Routing for Networks:172.16.1.16 0.0.0.15 area 0192.168.10.0 0.0.0.3 area 0192.168.10.4 0.0.0.3 area 0

    Routing Information Sources:Gateway Distance Last Update

    192.168.10.2 110 00:17:06192.168.10.6 110 00:17:06

    Distance: (default is 110)

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    34/63

    CCNA2 Semester 2, 2010 34Dept. of Information Communications, Dongyang Mirae Univ.

    Verifying OSPFVerifying OSPF

    R2#show ip ospfRouting Process "ospf 1" with ID 10.2.2.2Supports only single TOS(TOS0) routesSupports opaque LSA

    SPF schedule delay 5 secs, Hold time between two SPFs 10 secsMinimum LSA interval 5 secs. Minimum LSA arrival 1 secs

    Number of external LSA 0. Checksum Sum 0x000000Number of opaque AS LSA 0. Checksum Sum 0x000000

    Number of DCbitless external and opaque AS LSA 0Number of DoNotAge external and opaque AS LSA 0Number of areas in this router is 1. 1 normal 0 stub 0 nssa

    External flood list length 0

    Area BACKBONE(0)Number of interfaces in this area is 3Area has no authenticationSPF algorithm executed 3 times

    Area ranges areNumber of LSA 6. Checksum Sum 0x04734eNumber of opaque link LSA 0. Checksum Sum 0x000000

    Number of DCbitless LSA 0Number of indication LSA 0Number of DoNotAge LSA 0

    Flood list length 0

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    35/63

    CCNA2 Semester 2, 2010 35Dept. of Information Communications, Dongyang Mirae Univ.

    Verifying OSPFVerifying OSPF

    R3#show ip ospf interface serial 0/0/1Serial0/0/1 is up, line protocol is up

    Internet address is 192.168.10.10/30, Area 0Process ID 1, Router ID 10.3.3.3, Network Type POINT-TO-POINT, Cost:

    64Transmit Delay is 1 sec, State POINT-TO-POINT,

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

    Hello due in 00:00:08

    Index 3/3, flood queue length 0Next 0x0(0)/0x0(0)Last flood scan length is 1, maximum is 1

    Last flood scan time is 0 msec, maximum is 0 msecNeighbor Count is 1 , Adjacent neighbor count is 1

    Adjacent with neighbor 192.168.10.9

    Suppress hello for 0 neighbor(s)

    Must match toform adjacencyMust match toform adjacency

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    36/63

    CCNA2 Semester 2, 2010 36Dept. of Information Communications, Dongyang Mirae Univ.

    Examining the Routing TableExamining the Routing Table

    R1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static route

    Gateway of last resort is not set

    10.0.0.0/8 is variably subnetted, 2 subnets, 2 masksC 10.1.1.1/32 is directly connected, Loopback0O 10.10.10.0/24 [110/65] via 192.168.10.2, 00:54:26, Serial0/0/0

    172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks

    C 172.16.1.16/28 is directly connected, FastEthernet0/0O 172.16.1.32/29 [110/65] via 192.168.10.6, 01:03:15, Serial0/0/1

    192.168.10.0/30 is subnetted, 3 subnetsC 192.168.10.0 is directly connected, Serial0/0/0

    C 192.168.10.4 is directly connected, Serial0/0/1O 192.168.10.8 [110/128] via 192.168.10.6, 00:54:26, Serial0/0/1

    [110/128] via 192.168.10.2, 00:54:26, Serial0/0/0

    Not advertised

    by OSPF

    Not automaticallysummarized

    Equal-costload balancing

    Examine the routing table of R1~R3

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    37/63

    CCNA2 Semester 2, 2010 37Dept. of Information Communications, Dongyang Mirae Univ.

    The OSPF MetricThe OSPF Metric

    11.1 Introduction to OSPF11.2 Basic OSPF Configuration

    11.3 The OSPF Metric

    11.3.1 OSPF Metric

    11.3.2 Modifying the Cost of the Link11.4 OSPF and Multiaccess Networks

    11.5 More OSPF Configuration

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    38/63

    CCNA2 Semester 2, 2010 38Dept. of Information Communications, Dongyang Mirae Univ.

    OSPF MetricOSPF Metric

    The OSPF metric is defined as cost in RFC 2328:A cost is associated with the output side of each router interface

    This cost is configurable by the system administrator

    The lower the cost, the more likely the interface is to be used toforward data traffic.

    Values to be used to determine the cost are not specified by RFC

    The cost in Cisco IOS

    The cumulativecumulative bandwidthsbandwidths of the outgoing interfaces from therouter to the destination network

    In EIGRP, minimum bandwidth is used

    Cost =Cost = 101088/ bandwidth/ bandwidth [bps]

    108 is the reference bandwidth

    Can be modified to accommodate links with the bandwidth > 108

    R1(config-router)#auto-cost reference-bandwidth ref-bw

    Rate in Mbps (1 ~ 4294967)Default = 100

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    39/63

    CCNA2 Semester 2, 2010 39Dept. of Information Communications, Dongyang Mirae Univ.

    OSPF MetricOSPF Metric

    Cisco cost values for several types of link

    Verifying the cost (calculated bandwidth) of a link

    R1#show ip ospf interface s0/0/0Serial0/0/0 is up, line protocol is upInternet address is 192.168.10.1/30, Area 0Process ID 1, Router ID 10.1.1.1, Network Type POINT-TO-POINT, Cost: 64Transmit Delay is 1 sec, State POINT-TO-POINT,Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    40/63

    CCNA2 Semester 2, 2010 40Dept. of Information Communications, Dongyang Mirae Univ.

    OSPF MetricOSPF Metric

    R1#show ip route

    Gateway of last resort is not set

    10.0.0.0/8 is variably subnetted, 2 subnets, 2 masksC 10.1.1.1/32 is directly connected, Loopback0

    O 10.10.10.0/24 [110/65] via 192.168.10.2, 00:54:26, Serial0/0/0

    OSPF accumulates costs The accumulated value from a router to the destination network

    Ex: Cost from R1 to R2s LAN

    = Cost1 + Cost2

    = 64+1 = 65

    Cost1=64

    Cost2=1

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    41/63

    CCNA2 Semester 2, 2010 41Dept. of Information Communications, Dongyang Mirae Univ.

    OSPF MetricOSPF Metric

    Default bandwidth on serial interfaces Most serial link default to 1.544Mbps

    Some are 128kbps

    Does not actually affect nor reflect the speed of the link

    Need to configure the interface with the actual link speed

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    42/63

    CCNA2 Semester 2, 2010 42Dept. of Information Communications, Dongyang Mirae Univ.

    Modifying the Cost of the LinkModifying the Cost of the Link

    Router(config-if)#bandwidth bandwidth-kbps

    Two alternatives in modifying the cost of a link1. Modifying bandwidth of the interface

    Cost is calculated by the formula cost = 108/bandwidth

    2. Modifying the cost of the interface itself

    1 cost 65,535

    Useful in multi-vendor environment, where bandwidth is not usedas the cost

    Must be modified on all interfaces of a link

    Router(config-if)#ip ospf cost cost

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    43/63

    CCNA2 Semester 2, 2010 43Dept. of Information Communications, Dongyang Mirae Univ.

    Modifying the Cost of the LinkModifying the Cost of the Link

    Thebandwidth command vs. the ip ospf cost command

    Ex: Modify the cost as shown in the topology, using either of

    the commands. Then verify changes in the routing table of

    each router

    1

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    44/63

    CCNA2 Semester 2, 2010 44Dept. of Information Communications, Dongyang Mirae Univ.

    OSPF and Multiaccess NetworksOSPF and Multiaccess Networks

    11.1 Introduction to OSPF11.2 Basic OSPF Configuration

    11.3 The OSPF Metric

    11.4 OSPF and Multiaccess Networks

    11.4.1 Challenges in Multiaccess Networks11.4.2 DR/BDR Election Process

    11.4.3 OSPF Interface Priority

    11.5 More OSPF Configuration

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    45/63

    CCNA2 Semester 2, 2010 45Dept. of Information Communications, Dongyang Mirae Univ.

    Challenges in MultiaccessChallenges in MultiaccessNetworksNetworks

    Point-to-multipoint

    Five network types defined in OSPF :1.Broadcast Multiaccess

    Ethernet, Token Ring, or FDDI

    2.Point-to-point

    Point-to-point serial link, HDLC3.Nonbroadcast Multiaccess (NBMA)

    Frame Relay, X.25, ATM

    4.Point-to-multipoint

    5.Virtual links For connecting discontiguous backbone area

    (area 0) in multi-area OSPF

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    46/63

    CCNA2 Semester 2, 2010 46Dept. of Information Communications, Dongyang Mirae Univ.

    Challenges in MultiaccessChallenges in MultiaccessNetworksNetworks

    Two challenges in the flooding of LSAs in mulitaccessnetworks:

    1.Multiple adjacencies, one adjacency for every pair of routers.

    2.Extensive flooding of LSAs

    Multiple Adjacencies ForN routers in a multiaccess network, every router make

    adjacencies with N-1 routers

    Total adjacencies = N(N-1)/2

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    47/63

    CCNA2 Semester 2, 2010 47Dept. of Information Communications, Dongyang Mirae Univ.

    Challenges in MultiaccessChallenges in MultiaccessNetworksNetworks

    Flooding of LSAs N(N-1) LSAs are needed (see the animation in 11.4.1 of the

    curriculum)

    Solution: Designated Router (DR)

    Elect a DR & backup DR (BDR) in the multiaccess network BDR acts as DR when DR fails

    All other routers (DROthers) make adjacencies only with DR &BDR

    Only 2N

    -3

    adjacencies are made (including DRBDR adjacency)A routersends LSAs only to DR & BDR (2 LSAs)

    Multicast to 224.0.0.6 (ALLDRouters - All DR routers)

    Only DR floods received LSAs to all other routers (N-1 LSAs)

    Multicast to 224.0.0.5 (AllSPFRouters - All OSPF routers)

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    48/63

    CCNA2 Semester 2, 2010 48Dept. of Information Communications, Dongyang Mirae Univ.

    DR/BDR Election ProcessDR/BDR Election Process

    Changes in the scenario topology DR/BDR elections do not occur in point-to-point networks

    Multiaccess topology scenario is needed

    Configure OSPF with process ID 1 & area 0

    Fa0/0 192.168.1.4/24D

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    49/63

    CCNA2 Semester 2, 2010 49Dept. of Information Communications, Dongyang Mirae Univ.

    DR/BDR Election ProcessDR/BDR Election Process

    DR/BDR Election DR: Router with the highest OSPFhighest OSPF interface priorityinterface priority

    BDR: Router with the second highest OSPF interface priority

    The default OSPF interface priority is 1

    The OSPF interface priority can be modified by:

    The interface connected to the MA network in the election process

    For equal priority, the highest router IDhighest router ID is used to break the tie.

    Adjacencies

    DROthers only form FULL adjacencies with the DR and BDR

    Still form a neighbor(2way) adjacencies with any DROthers

    Still receive Hello packets from all other DROther routers

    Router(config-if)#ip ospf priority {0~255}

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    50/63

    CCNA2 Semester 2, 2010 50Dept. of Information Communications, Dongyang Mirae Univ.

    DR/BDR Election ProcessDR/BDR Election Process

    Verify the routerstate and DR/BDR

    using show ipospf interfacefa0/0 command on

    A~D

    A#show ip ospf neighborNeighbor ID Pri State Dead Time Address Interface192.168.31.22 1 FULL/BDR 00:00:32 192.168.1.2 FastEthernet0/0192.168.31.33 1 FULL/DR 00:00:35 192.168.1.3 FastEthernet0/0

    B#show ip ospf neighborNeighbor ID Pri State Dead Time Address Interface192.168.31.11 1 FULL/DROTHER 00:00:37 192.168.1.1 FastEthernet0/0192.168.31.33 1 FULL/DR 00:00:32 192.168.1.3 FastEthernet0/0

    C#show ip ospf neighborNeighbor ID Pri State Dead Time Address Interface192.168.31.11 1 FULL/DROTHER 00:00:32 192.168.1.1 FastEthernet0/0192.168.31.22 1 FULL/BDR 00:00:35 192.168.1.2 FastEthernet0/0

    D

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    51/63

    CCNA2 Semester 2, 2010 51Dept. of Information Communications, Dongyang Mirae Univ.

    DR/BDR Election ProcessDR/BDR Election Process

    Timing of DR/BDR electionAs soon as the 1st router with an OSPF enabled interface is

    active on the multiaccess network

    A router with a lower router ID that is configured first willbecome the DR

    The router enabled later with higher priority cannot be the DR/BDR

    Conditions for the changes in DR/BDR:

    Conditions for BDR DR (promotion)

    The DR fails.

    The OSPF process on the DR fails.

    The multiaccess interface on the DR failsDROther with the highest priority (or router ID) among DROthers is

    elected as BDR

    Conditions for DR/BDR re-election process

    Both current DR and BDR must fail at the same time

    Failed [B]DR becomes DROther when it is re-enabled

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    52/63

    CCNA2 Semester 2, 2010 52Dept. of Information Communications, Dongyang Mirae Univ.

    DR/BDR Election ProcessDR/BDR Election Process

    BDR DR takeover processA#sh ip ospf neigh

    Neighbor ID Pri State Dead Time Address Interface192.168.31.22 1 FULL/BDR 00:00:33 192.168.1.2 FastEthernet0/0192.168.31.33 1 FULL/DR 00:00:23 192.168.1.3 FastEthernet0/0A#00:15:30: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.33 on FastEthernet0/0 from FULL to DOWN,

    Neighbor Down: Dead timer expired00:15:30: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.33 on FastEthernet0/0 from FULL to Down:Interface down or detachedA#A#sh ip ospf neigh

    Neighbor ID Pri State Dead Time Address Interface192.168.31.22 1 FULL/DR 00:00:39 192.168.1.2 FastEthernet0/0

    A#

    00:18:15: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.31.33 on FastEthernet0/0 from EXCHANGE toFULL, Exchange DoneA#sh ip ospf neigh

    Neighbor ID Pri State Dead Time Address Interface192.168.31.22 1 FULL/DR 00:00:39 192.168.1.2 FastEthernet0/0192.168.31.33 1 FULL/DROTHER 00:00:31 192.168.1.3 FastEthernet0/0A#

    RouterCdown

    RouterCre-up

    BDRDR

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    53/63

    CCNA2 Semester 2, 2010 53Dept. of Information Communications, Dongyang Mirae Univ.

    DR/BDR Election ProcessDR/BDR Election Process

    Making sure that the routers you want to be DR and BDR winthe election

    Changing the OSPF interface priority can control the elections

    OR the router ID if the priorities are identical for all routers in thebroadcast multiple access network

    1.Boot up routers in the order of the DR, BDR, and all others, OR

    2.Shut down the interface on all routers, then enable DR, BDR, and then all others.

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    54/63

    CCNA2 Semester 2, 2010 54Dept. of Information Communications, Dongyang Mirae Univ.

    OSPFInterface PriorityOSPFInterface Priority

    Controlling the election priority Set the interface priorityinterface priorityhigher for the preferred router

    The larger, the higher priority

    Router with interface priority value 0 can never participate DR/BDR

    election process Force election

    Shutdown and re-enable all interfaces

    The order of re-enabling is still important

    Ex: Set the interface priority of fa0/0 in A to 250, B to 200, then

    restart election process, then verify the priorities and identify theDR & BDR

    Shutdown all Fa0/0s, then enable Ds and Bs, wait DR/BDRselection, then enable As and Cs

    Examine neighbor tables and identify DR/BDR

    Shutdown DRs Fa0/0, wait 40sec., re-enabe and identify DR/BDR

    Router(config-if)#ip ospf priority {0~255}

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    55/63

    CCNA2 Semester 2, 2010 55Dept. of Information Communications, Dongyang Mirae Univ.

    More OSPF ConfigurationMore OSPF Configuration

    11.1 Introduction to OSPF11.2 Basic OSPF Configuration

    11.3 The OSPF Metric

    11.4 OSPF and Multiaccess Networks

    11.5 More OSPF Configuration11.5.1 Redistributing an OSPF Default Route

    11.5.2 Fine-tuning OSPF

    R di t ib ti OSPF D f ltR di t ib ti OSPF D f lt

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    56/63

    CCNA2 Semester 2, 2010 56Dept. of Information Communications, Dongyang Mirae Univ.

    Redistributing an OSPF DefaultRedistributing an OSPF DefaultRouteRoute

    R1(config)#ip route 0.0.0.0 0.0.0.0 lo11.Configuring a static default route on R1

    Exit interface is not configured as part of the OSPF routingdomain

    R1 becomes an ASBR (autonomous system boundary router) The router located between an OSPF routing domain and a non-

    OSPF network

    Redistributing an OSPF DefaultRedistributing an OSPF Default

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    57/63

    CCNA2 Semester 2, 2010 57Dept. of Information Communications, Dongyang Mirae Univ.

    Redistributing an OSPF DefaultRedistributing an OSPF DefaultRouteRoute

    2.Propagating installed static default route to all the routers ina normal OSPF area

    The OSPF router does not, by default, generate a defaultroute into the OSPF domain

    Ex: Verify the redistributed default route in R1~R3

    R1(config-router)#default-information originate [metric value] [metric-type type]

    OSPF external

    route type

    (Default=2)

    Default=1

    R2#show ip route

    C 192.168.10.8 is directly connected, Serial0/0/1O*E2 0.0.0.0/0 [110/1] via 192.168.10.10, 00:00:10, Serial0/0/1

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    58/63

    CCNA2 Semester 2, 2010 58Dept. of Information Communications, Dongyang Mirae Univ.

    FineFine--tuning OSPFtuning OSPF

    Modifying reference bandwidth

    ref-bw is the new reference bandwidth in Mbps (1 ~ 4294967)

    Default = 100

    Make sure to configure on all routers in the OSPF routingdomain

    Ex: Modify the reference bandwidth to 10Gbps and comparethe changes in the metrics in R1

    R1(config-router)#auto-cost reference-bandwidth ref-bw

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    59/63

    CCNA2 Semester 2, 2010 59Dept. of Information Communications, Dongyang Mirae Univ.

    FineFine--tuning OSPFtuning OSPF

    Modifying OSPF timers Impact of reducing the timers

    Increase in traffic

    Faster detection of network failures and quick convergence

    Modifying OSPF Hello and Dead intervals

    Modifying Hello interval results in the automatic modification ofDead interval

    Explicit modification is strongly recommended for the purpose of

    documentation The Hello and Dead intervals should match between two adjacent

    routers

    In EIGRP, it is not the adjacency condition

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

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

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    60/63

    CCNA2 Semester 2, 2010 60Dept. of Information Communications, Dongyang Mirae Univ.

    FineFine--tuning OSPFtuning OSPF

    Ex: Modify the hello & dead intervals of R1R2 to the half ofdefault value

    Verify R1 & R2s neighbors and timers

    Modify R1s timers

    Wait for over 20 seconds

    Examine what happens in IOS Examine changes R1s neighbors and timers

    Modify R2s timers

    Verify R1 & R2s neighbors and timers

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    61/63

    CCNA2 Semester 2, 2010 61Dept. of Information Communications, Dongyang Mirae Univ.

    RFC 2

    328 describes OSPF link state concepts and operations

    OSPF Characteristics

    A commonly deployed link state routing protocol

    Employs DRs & BDRs on multi-access networks

    DRs & BDRs are electedDR & BDRs are used to transmit and receive LSAs

    Uses 5 packet types:

    1: HELLO

    2: DATABASE DESCRIPTION

    3: LINK STATE REQUEST

    4: LINK STATE UPDATE

    5: LINK STATE ACKNOWLEDGEMENT

    SummarySummary

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    62/63

    CCNA2 Semester 2, 2010 62Dept. of Information Communications, Dongyang Mirae Univ.

    SummarySummary

    OSPF Characteristics Metric = cost [ = 108/bandwidth [bps] in Cisco IOS]

    Lowest cost = best path

    Configuration

    Enable OSPF on a router using the following command

    R1(config)#router ospfprocess-id

    Use the network command to define which interfaces

    will participate in a given OSPF process

    Router(config-router)#network network-addresswildcard-mask area area-id

  • 8/8/2019 2010-CCNA exp 2-v405-Ch.11

    63/63

    SummarySummary

    Verifying OSPF configuration Use the following commands

    show ip protocol

    show ip route

    show ip ospf interfaceshow ip ospf neighbor

    Advertising the existing 0.0.0.0/0 into the OSPF domain

    defaultinformation originate