ICND2 OSPF Revision notes

Useful information for ICND1 and ICND2 OSPF

———————————————————————————————————-

OSPF ELECTION PROCESS FOR DR AND BDR

1- Choose the highest OSPF priority (default is 1, highest is 255, note that if you configure priority of 0 that router wont enter the election process – used on FR networks.)

2- Choose the highest router-id

3- Choose the highest loopback interface

4- Choose the highest configured physical interface (must be up/up)

Mind that there is no preemption meaning that when a DR goes ofline, the BDR takes his place and when it comes back online it wont be the DR again, for it to be considered for another election process in a network segment, all DR/BDR must go offline so that one router can become the DR again for that segment.

———————————————————————————————————-

Types of OSPF networks

5 DIFFERENT TYPES OF OSPF NETWORK

Broadcast to Broadcast

Non-broadcast to Non-broadcast

Point-to-Point to Point-to-Point

Broadcast to Non-broadcast (adjust hello/dead timers)

Point-to-Point to Point-to-Multipoint (adjust hello/head timers

Non-Broadcast

The Non-Broadcast network type is the default for OSPF enabled frame relay physical interfaces.

Non-Broadcast networks requires the configuration of static neighbors; hello’s are sent via unicast.

The Non-Broadcast network type has a 30 second hello and 120 second dead timer.

An OSPF Non-Broadcast network type requires the use of a DR/BDR

Broadcast

The Broadcast network type is the default for an OSPF enabled ethernet interface.

The Broadcast network type requires that a link support Layer 2 Broadcast capabilities.

The Broadcast network type has a 10 second hello and 40 second dead timer.

An OSPF Broadcast network type requires the use of a DR/BDR.

Point-to-Point

A Point-to-Point OSPF network type does not maintain a DR/BDR relationship.

The Point-to-Point network type has a 10 second hello and 40 second dead timer.

Point-to-Point network types are intended to be used between 2 directly connected routers.

Point-to-Multipoint

 

OSPF treats Point-to-Multipoint networks as a collective of point-to-point links.

Point-to-Multipoint networks do not maintain a DR/BDR relationship.

Point-to-Multipoint networks advertise a hot route for all the frame-relay endpoints.

The Point-to-Multipoint network type has a 30 second hello and 120 second dead timer.

Point-to-Multipoint Non-Broadcast

 

Same as Point-to-Multipoint but requires static neighbors. Used on Non-broadcast layer 2 topologies.

Gives you the ability to define link cost on a per neighbor basis.

Loopback

 

The default OSPF network type; only available to loopback interfaces.

Advertises the interface as a host route; changeable by configuring the interface as point-to-point.

—————————————————————————————–

Another simpler table – Exam only needs first 5 LSA types

LSA Type Description
1 All router Router LSA (Generated by each router, flooded within an area)
2 DR Network LSA (Generated by DR, flooded within an area)
3 ABR Summary LSA (Created by ABR, flooded into next door area, about inter area routes)
4 ABR- about ASBR ASBR Summary LSA (Created by ABR, flooded into backbone –info about routes to ASBR)
5 ABR- about external routes Autonomous system LSA (Created by ASBR, flooded into OSPF domain Info about external routes from ASBR)

————————————————————

Path Cost Calculation:

Q. How does OSPF calculate its metric or cost?

A. OSPF uses a reference bandwidth of 100 Mbps for cost calculation. The formula to calculate the cost is reference bandwidth divided by interface bandwidth. For example, in the case of Ethernet, it is 100 Mbps / 10 Mbps = 10.

Note: If ip ospf cost cost is used on the interface, it overrides this formulated cost. For more information, refer toOSPF Cost.

OSPF broadcast types

(1) Hello Discovers neighbors and builds adjacencies between them
(2) Database Description Checks for database synchronization between routers
(3) Link-State Request Requests specific link-state records from another router
(4) Link-State Update Sends specifically requested link-state records
(5) Link-State Acknowledgement Acknowledges the other packet types

————————————————————————

Neighbor states

 

(1) Down No hello packets. (Int is not necessarily down)
(2) Attempt Neighbors must be configured manually-NBMA
(3) Init Hello packets received
(4) 2 Way Hello packets with own router id in field received. Bidirectional communication. Election in BMA networks. Non DR and BDR routers stop here in their relationship with each other.
(5) Exstart DR and BDR establish master-slave relationships.
(6) Exchange Routing info eschanged using DBD
(7) Loading LSR and LSA sent
(8)Full LSA info synchronised amongst neighbors. Now routing can take place.

Troubleshooting OSPF

Know (aside from what’s allowed or disabled on your exam):
1. show ip protocols: It displays OSPF status, process-id and neighbors/gateways. It also shows area types configured (normal, stub, NSSA etc.). Lastly, it lists protocols that are being redistributed and networks that are being advertised.

Helpful in troubleshooting: Neighbor relationships, missing routes, and problems with summarization and filtering.

2. show ip route ospf: Displays OSPF routes that are being received from neighbors and their administrative distances. It also shows the cumulative cost metric to reach a particular subnet and what the route source and interface is.

Helpful in troubleshooting: General issues, missing routes, and problems with summarization and filtering.

3. show ip ospf interfaces: Displays OSPF interfaces. It also shows type(s) of network, neighbor count, type of authentication and timer values.

Helpful in troubleshooting: Neighbor relationships, local configuration issues, and routing problems.

4. show ip ospf neighbors: Displays active fully adjacent neighbors, router ID of neighbors, neighbor state/DR state, IP addresses/interfaces and dead time of neighbors.

Helpful in troubleshooting: Neighbor relationships and local configuration issues.

5. show ip ospf database: Displays LSA types per area, advertising router, Link ID (subnet) and age.

Helpful in troubleshooting: Missing routes, filtering problems and general issues.

6. show ip ospf border-routers: Displays router ID, advertising router, area, ABR or ASBR, and cost details.

Helpful in troubleshooting: Missing routes, filtering problems and general issues.

7. show ip ospf: Displays OSPF process ID, configured areas, number or types of areas, It also shows the number of times the SPF algorithm is executed. If you see a very high number of SPF calculations, it could be a flapping router or an interface with an issue.

Helpful in troubleshooting: Missing routes, filtering problems, and general issues.

Following debug commands can also help in troubleshooting many issues:

1. debug ip ospf adjacency: It is used to debug neighbor adjacencies.

Helpful in troubleshooting: Neighbor relationships, routing update issues and stub router problems.

2. debug ip ospf events: It is used to debug network events.

Helpful in troubleshooting: Routing update issues, convergence issues and interface flapping.

3. debug ip spf hello: It is used to debug neighbor adjacencies.

Helpful in troubleshooting: Neighbor relationships, configuration issues and DR/BDR election problems.

ICND 2: FHRP HSRP VRRP GLBP

FHRP means First Hop Redundancy Protocols.

ICND2- FHRP (FIRST HOP REDUNDANCY PROTOCOLS)

 

There are 3 types: HSRP (Hot Standby Router Protocol), VRRP (Virtual Router Redundancy Protocol) and GLBP (Gateway Load Balancing Protocol.

HSRP:  Essential Facts

Cisco Prop
Timers – Hello 3s, hold,10s
Virtual Router, Active Router, Standby Router
MAC address 000.0c07.xxxx
Active router – highest priority.

HSRP does interface tracking on outside interface.

Sample config of HSRP using GNS3:

First, configure internet access through R1 and R3 for the host XP1:

 

HSRP

To set it up:  basic commands are
int fa0/1
standby 1 ip 192.168.1.10
on all routers.

Fault finding:

R1#sh standby
FastEthernet0/1 – Group 1
  State is Standby
    2 state changes, last state change 00:17:06
  Virtual IP address is 192.168.1.10
  Active virtual MAC address is 0000.0c07.ac01
    Local virtual MAC address is 0000.0c07.ac01 (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 2.136 secs
  Preemption disabled
  Active router is 192.168.1.2, priority 100 (expires in 8.152 sec)
  Standby router is local
  Priority 100 (default 100)
  Group name is “hsrp-Fa0/1-1” (default)

R1#sh standby brief
P indicates configured to preempt.
                     |
Interface   Grp  Pri P State   Active          Standby         Virtual IP
Fa0/1       1    100   Standby 192.168undebug standby

.1.2     local           192.168.1.10

R1#debug standby
HSRP debugging is on
R1#
*Mar  1 00:35:51.687: HSRP: Fa0/1 Grp 1 Hello  out 192.168.1.1 Standby pri 100 vIP 192.168.1.10
*Mar  1 00:35:52.519: HSRP: Fa0/1 Grp 1 Hello  in  192.168.1.2 Active  pri 100 vIP 192.168.1.10
R1#
*Mar  1 00:35:53.715: HSRP: Fa0/1 Grp 1 Hello  in  192.168.1.2 Active  pri 100 vIP 192.168.1.10
*Mar  1 00:35:54.687: HSRP: Fa0/1 Grp 1 Hello  out 192.168.1.1 Standby pri 100 vIP 192.168.1.10
R1#
*Mar  1 00:35:56.727: HSRP: Fa0/1 Grp 1 Hello  in  192.168.1.2 Active  pri 100 vIP 192.168.1.10
*Mar  1 00:35:57.687: HSRP: Fa0/1 Grp 1 Hello  out 192.168.1.1 Standby pri 100 vIP 192.168.1.10

————————————————————-

GLBP: Essential facts

Cisco prop

AVG – Active Virtual Gateway:  the router that controls the gateway.
AVF – Active virtual forwarder

Client sends request for MAC address of gateway. AVG gives mac address of one of the AVFs, on a round robin basis.

Sample configuration using GNS3 (See Cisco starter config to see how to connect virtual PC to internet via virtual router)

GLBP

To set up GLBP:

R1(config)#int fa0/0
R1(config-if)#blbp 1 ip 192.168.1.10
R1(config-if)#glbp 1 name test
*Mar  1 00:31:17.871: %GLBP-6-STATECHANGE: FastEthernet0/0 Grp 1 state Standby -> Active
R1(config-if)#glbp 1 priority 110

And likewise for other routers, but priority changed as desired, or not at all.

To see config:

R1#sh glbp
FastEthernet0/0 – Group 1
  State is Active
    2 state changes, last state change 00:18:46
  Virtual IP address is 192.168.1.10
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 1.736 secs
  Redirect time 600 sec, forwarder timeout 14400 sec
  Preemption disabled
  Active is local
  Standby is 192.168.1.3, priority 100 (expires in 7.628 sec)
  Priority 110 (configured)
  Weighting 100 (default 100), thresholds: lower 1, upper 100
  Load balancing: round-robin
  IP redundancy name is “test”
  Group members:
    c201.105c.0000 (192.168.1.1) local
    c202.1430.0000 (192.168.1.2)
    c203.09ec.0000 (192.168.1.3)
  There are 3 forwarders (1 active)
  Forwarder 1
    State is Active
      1 state change, last state change 00:18:36
    MAC address is 0007.b400.0101 (default)
    Owner ID is c201.105c.0000
    Redirection enabled
    Preemption enabled, min delay 30 sec
    Active is local, weighting 100
    Client selection count: 1
  Forwarder 2
    State is Listen
    MAC address is 0007.b400.0102 (learnt)
    Owner ID is c202.1430.0000
    Redirection enabled, 597.792 sec remaining (maximum 600 sec)
    Time to live: 14397.640 sec (maximum 14400 sec)
    Preemption enabled, min delay 30 sec
    Active is 192.168.1.2 (primary), weighting 100 (expires in 7.364 sec)
    Client selection count: 1
  Forwarder 3
    State is Listen
    MAC address is 0007.b400.0103 (learnt)
    Owner ID is c203.09ec.0000
    Redirection enabled, 597.012 sec remaining (maximum 600 sec)
    Time to live: 14399.876 sec (maximum 14400 sec)
    Preemption enabled, min delay 30 sec
    Active is 192.168.1.3 (primary), weighting 100 (expires in 9.580 sec)