Magoo's Wise Words
CCNP Study guides

Posted:
23 Aug 07

 

 

 


C
C
N
P

 

 


B
S
C
I

 

 

 


O
S
P
F

OSPF

 

  1. Basics

    1. Link state protocol

    2. runs spf algorithm

    3. maintains topology table

    4. Broken down into areas to increase stability and allow summarization - this reduces the size of the Link State Database and routing table, decreases the frequency of spf calculations, and hides topology changes in one area from the rest of the network

  2. OSPF areas

    1. Areas start and end on interfaces - each interface is part of a single area

    2. Areas are arranged in a two-layer hierarchy

      1. Transit area

        1. This is the backbone area - Area 0

        2. all other areas areas must connect to the backbone

      2. regular area

        1. contains groups and resources

        2. should be grouped to allow for summarization

    3. Special areas

      1. stub area

        1. does not accept routes that are external to the AS - uses a default route

        2. cannot contain ASBRs except the ABR (see III - Router types)

        3. area id stub router config command

        4. all routers in the area must be configured as stub

      2. totally stubby area

        1. cisco only

        2. same as stub area except is also does not accept inter-area routes - uses a default route out of the area instead

        3. area id stub no-summary router command on ABR

      3. Not So Stubby Area

        1. a stubby area that can have an ASBR

        2. uses a Type 7 lsa to advertise external routes

        3. the ABR takes the type 7 from the ASBR and changes it into a type 5 to send to the rest of the ospf domain

        4. area id nssa router command

      4. totally stubby NSSA - same as totally stubby area except it allows ASBR's with type 7 lsa's

      5. set the cost of the default route advertised by ABR's in a stub area with router command area area-id default-cost cost

    4. Design recommendations

      1. Areas should be smaller than 50 routers

      2. each router should have less than 60 neighbors

      3. each router should be in 3 or less areas

  3. Types of routers

    1. Area Border Router (ABR)

      1. connects an area to the backbone

      2. focus point for route summarization

    2. Autonomous System Boarder Router (ASBR) - has at least one interface in a non-ospf routing domain

  4. Protocol

    1. OSPF is a layer 4 protocol, encapsulated into an IP packet - IP protocol 89

    2. header

      1. Version # - usually 2

      2. Type of OSPF packet

      3. length of the packet

      4. router ID

        1. 32 bit number that uniquely identifies a router

        2. can be manually configured

        3. defaults to highest loopback IP

        4. defaults next to highest interface IP

      5. Area ID

      6. checksum

      7. authentication type

      8. authentication

    3. OSPF packet types

      1. 1 - Hello

        1. finds and negotiates neighbors

        2. also contains a list of known neighbors

      2. 2 - Database Description (DBD)

        1. Allows for database synchronization between routers

        2. contains a summary of the LSDB

      3. 3 - Link-State Request (LSR)

        1. Requests specific link-state records from other routers

        2. contains the LSU needed and the router ID of the router that has it

      4. 4 - Link State Update (LSU)

        1. sends specifically requested link-state records (LSA)

        2. can contain more than one LSA

        3. Types of LSA

          • 1 - Router LSA

          • 2 - Network LSA

          • 3 - Area Summary LSA

          • 4 - ASBR router LSA - sent by ABR's to describe ASBRs within the area

          • 5 - AS external LSA

          • 6 - Multicast OSPF LSA

          • 7 - NSSA LSA

          • 8 - External attributes LSA (BGP)

          • 9,10,11 - Opaque LSA's

      5. 5 - LSAck - Acknowledges other packet types

  5. OSPF neighbors

    1. hello packets are multicast on active ospf interfaces to 224.0.0.5

      1. contains area number, hello interval, and dead interval - which must match other router for adjacencies to form

      2. also contains a list of known neighbors

      3. bidirectional communication is established when a router sees itself in another router's hello

    2. states

      1. down - ospf has been enabled but no packets have been exchanged

      2. attempt - for statically configured neighbors, unicast hellos are sent every polling interval

      3. init - the router sends a hello packet. all routers that receive the hello add this router to their neighbor list and send a unicast reply

      4. two-way - The router has received replies and adds all these replying router ID's to its database and hello packets

      5. exstart - Designated and Backup Designated routers are chosen (non-preempting) and master/slave relationship is established during this state

      6. exchange - DBD's are exchanged. DBD's are acknowledged and then compared to the LSDB.

      7. Loading - any link-state's with a newer sequence number than the database generates a LSR to get detailed information about that link. the other router responds with an LSU. An LSAck is sent.

      8. Full - all LSDB's are synchronized and routing can begin

    3. All router form full adjacencies with the DR only - they do keep track of other neighbors in their hello packets

  6. OSPF routing

    1. LSDB

      1. Sequence number tracks changes in information about a link

        1. 32 bits long

        2. starts at 0x80000001 and ends at 0x7FFFFFFF

        3. LSA's are aged out at 07FFFFFFF and a new LSA is sent starting back at the beginning

      2. aging

        1. Each LSU has an aging timer (30 minutes by default)

        2. when the timer expires, a Link-State Update with a new sequence # is sent to refresh the link

    2. metric

      1. cost is assigned to each link in the network

      2. metric is sum of the cost of each link a packet would travel along a path

      3. default behavior is that cost is calculated based on configured bandwidth (100/bandwidth in Mb)

    3. Route types

      1. O - intra-area routes (from Type 1 and Type 2 LSA's)

      2. O IA - inter-area (from summary LSA's - type 3 and 4 LSA's)

      3. O E1 - outside OSPF domain. Includes external cost of the path plus internal cost of the path to the ASBR

      4. O E2 - outside OSPF domain. Includes only external cost. Cost of path to the ASBR is not added

  7. Behavior on different types of networks

    1. Point-to-point

      1. no special config needed

      2. routers will NOT elect a DR or BDR

    2. Broadcast

      1. no special config needed

      2. routers WILL elect a DR and BDR

      3. DROthers will only establish a full adjacency with the DR and BDR

    3. NBMA

      1. default hello and dead intervals are 30/120 (instead of 10/30)

      2. multicast hellos cannot be sent because of non-broadcast nature

      3. interface command ip ospf network network-type

      4. choices

        1. non-broadcast

          • neighbors must be manually configured.

          • dr/bdr are elected and need full connectivity to all neighbors

        2. point to multipoint

          • network is treated as a collection of point-point links but still uses multicast.

          • typically used in partial mesh networks.

          • dr/bdr not elected

        3. point-multipoint non-broadcast (cisco only)

          • neighbors must be manually configured

          • no dr/bdr election

        4. point-point (cisco only)

          • different ip subnet on each subinterface

          • no dr/bdr election

        5. broadcast (cisco only)

          • need full connectivity for DR/BDR

  8. DR and BDR election

    1. DR and BDR are elected to reduce the amount of traffic needed for ospf on a broadcast network

    2. Router with the highest priority becomes the DR

    3. second highest priority becomes BDR

    4. highest router id breaks priority ties

    5. BDR is chosen first from all routers not claiming to be the DR, then DR is chosen, then BDR is chosen again in case the BDR became the DR

    6. DR/BDR cannot be preempted by another router with a higher priority once elected

  9. configuring OSPF

    1. router ospf process-id [vrf vpn-name] global command - turns on ospf

    2. router-id id router command - optionally manually set the routerID

    3. neighbor neighbor-ip priority num router command - necessary for non-broadcast only

    4. ip ospf priority number interface command establishes a routers DR priority

      1. range is 0 - 255

      2. default is 1

      3. routers with 0 priority are ineligible for DR/BDR

    5. identify the networks you want advertised

      1. network network-add wildcard-mask area area-id router command

      2. at least one network on an interface must be advertised for ospf to run on that interface

      3. alternative method is with the ip ospf proc-id area area-id [secondaries none] interface command

    6. route summarization

      1. on an ABR for inter-area routes - area id range net-add mask [cost cost] router config command

      2. to summarize routes redistributed from outside the AS on an ASBR use summary-address net-add mask router config command

    7. default route

      1. used to advertise a default route into ospf with a type 5 lsa

      2. 'default-information originate' command - router needs a default route to do this

      3. add the always keyword to advertise a default route even if this router doesn't have one already

    8. Virtual Links

      1. can be used to connect a discontinuous area 0 or to connect an area to area 0 through a transit area

      2. area id virtual-link router-id router command. Use area id of transit area and router id of the virtual link neighbor

      3. configured on each end of the virtual link

    9. Authentication

      1. can be used to secure routing updates against accidental or malicious route updates

      2. ospf already uses a non-decreasing sequence number, which prevents replay attacks

      3. plain text

        1. ip ospf authentication interface command enables authentication

        2. can also be enabled per area with the area id authentication router command

        3. ip ospf authentication-key password interface command sets the password. can be up to 8 bytes. stored in plain text if service password-encrypt is not on

      4. MD5

        1. ip ospf authentication message-digest interface command, or area router command, sets the type

        2. ip ospf message-digest-key key-id md5 password interface command

    10. LSDB overload protection

      1. protects against too many LSA's eating up memory

      2. max-lsa max [ignore-time mins] [ignore-count numb] router command

      3. if max count is reached for more than 1 min, OSPF clears all adjacencies and clears the LSDB, entering the 'ignore' state until the ignore time expires

      4. if it enters ignore state more than the ignore count times consecutively, it will remain in the ignore state until manually removed from it

    11. Changing default bandwidth reference

      1. by default, OSPF cost is calculated so that FastE is a cost of 1 (reference of 100)

      2. change that with router command ospf auto-cost reference-bandwidth reference

  10. verifying

    1. show ip protocols

    2. show ip route ospf

    3. sh ip ospf interfaces

    4. sh ip ospf neighbor

    5. sh ip ospf database

  11. Troubleshooting

    1. debug ip ospf events

    2. debug ip ospf adj

    3. debug ip packet

  12. References

    1. Cisco Press BSCI Authorized Self-Study Guide

    2. Cisco Press BSCI Official Exam Certification Guide

    3. Wikipedia

    4. Sybex CCNP Complete

    5. Sybex CCNA Deluxe Edition

Back to EIGRP - Up to index - Next to IS-IS

Updated:
23 Aug 07

 

 

 


C
C
N
P

 

 

 

B
S
C
I


 

 


O
S
P
F