Tuesday, April 30, 2013

Things to Remember in OSPF


DR and BDR

DR - Designated Router and BDR backup designated Router are Routers on a Broadcast segment. For example Ethernet a DR and optionally an BDR is chosen. The election is based on
  • The highest priority on the interface
    • Default priority is 1. Can be set in the range 0 - 255
    • If priority is set to 0 the router can not be a DR
    • The priority is set on a per-link basis.
  • The highest RID - Router ID
interface fastethernet 0/0
 ip ospf priority 255

RID: Router ID

The RID is the IP address which the Router is known as.
  1. Set manually
  2. Highest Loopback IP address
  3. Highest IP address if no Loopbacks defined
interface Loopback 0
 ip address 10.10.10.1
!
interface Loopback 1
 ip address 192.168.10.1
!
router ospf 1
  router-id 10.10.10.1

Stub Areas

OSPF RFC's describe Stub and Not-So-Stubby-Area. Totally Stub Area is a Cisco proprietary standard.

What is Stub Areas

Stub Areas are part of a network which don't need to have a copy of the total Link-State database. It reduces the memory requirements and CPU overhead of the router. Often stub areas only have a default gateway.

Stub Area

  • Stub Areas blocks Type 5 LSA's. (External Routes)
    • Routing to the outside world is based on a default route.
    • A Stub Area will accept Summary Routes from other Areas.

Totally Stub Area

  • totally Stub Areas blocks Type 3,4 and 5 LSA's. Only a default gateway.
    • Has a default route out of the Area,

NSSA: Not So Stubby Area

  • A NSSA imports a limited number of External Routes. The number of Routes is limited to those Routes required to provide connectivity between Areas.

Example

Example

Stub Area example


Example

Totally Stub Area example


Example

NSSA: Not So Stubby Areas


Example

Example

Example

Example

Virtual links


Example

Example

Example

Single Area configuration

Example 1


Example network 1



hostname R1
!
interface fastethernet 0/0
  ip address 192.168.0.1 255.255.255.0
!
interface fastethernet 0/1
  ip address 10.0.1.1 255.255.255.0
!
router ospf 88
  network 192.168.0.0 0.0.0.255 area 0
  network 10.0.1.0 0.0.0.255 area 0
hostname R2
!
interface fastethernet 0/0
  ip address 192.168.0.2 255.255.255.0
!
interface fastethernet 0/1
  ip address 10.0.2.1 255.255.255.0
!
router ospf 77
  network 192.168.0.0 0.0.0.255 area 0
  network 10.0.2.0 0.0.0.255 area 0
hostname R3
!
interface fastethernet 0/0
  ip address 192.168.0.3 255.255.255.0
!
interface fastethernet 0/1
  ip address 10.0.3.1 255.255.255.0
!
interface serial 0/0
  ip address 172.16.0.1 255.255.255.252
!
router ospf 66
  network 192.168.0.0 0.0.0.255 area 0
  network 10.0.3.0 0.0.0.255 area 0
  network 172.16.0.0 0.0.0.3 area 0
hostname R4
!
interface fastethernet 0/1
  ip address 10.0.4.1 255.255.255.0
!
interface serial 0/0
  ip address 172.16.0.2 255.255.255.252
router ospf 66
  network 172.16.0.0 0.0.0.3 area 0
  network 10.0.4.0 0.0.0.255 area 0

Default administrative Distance

 

Cisco implementation


Default Administrative Distance (metric)
Route SourceDistance
Connected Interface0
Static Route out an Interface0
Static Route to a next hop1
EIGRP summary route5
External BGP20
Internal EIGRP90
IGRP100
OSPF110
IS-IS115
RIP (Version 1 og 2)120
EGP140
ODR (On Denmand Routing)160
External EIGRP170
Internal BGP200
Ukendt source255

 

LSA Types

 

LSA Types
Type ABR Sent to Meaning
1 O 224.0.0.5 Router Link: Indeholder alle Routerens Links. Floodes til Area
2 O 224.0.0.6 Network Link: Floodes fra DR til Area. Indeholder alle Naboer på MA-medie
3 O IA Summary Link: Sendes fra Area til Area gennem ABR. Indeholder IA Summaries.
4 O IA ASBR summary Link: Sendes fra ASBR’s. Indeholder externe router.
5 O E1/2 Externe Router fra ASBR. E1 intern + extern cost. E2 kun extern cost.
7 O E1/2 Externe Routes fra ASBR i NSSA
8 OSPF and BGP internetworking
9,10,11 Opaque LSA used by Cisco for MPLS

 

The following are descriptions of each type of LSA.

 

Type 1


Every router generates router link advertisements for each area to which it belongs. A type 1 LSA describes the collective states of the directly connected links (interfaces) of the router. These LSAs are flooded only within the area in which they are originated.

 

  Type 2


A type 2 LSA is generated for every transit broadcast and NBMA network within an area. A transit network has at least two directly attached OSPF routers. Ethernet is an example of a transit network.
The DR of the network is responsible for advertising the network LSA. A type 2 network LSA lists each of the attached routers that make up the transit network, including the DR itself, as well as the subnet mask used on the link. The type 2 LSA then floods to all routers within the transit network area. Type 2 LSAs never cross an area boundary. The link-state ID for a network LSA is the IP interface address of the DR that advertises it.

Type 3


The ABR sends type 3 summary LSAs. Type 3 LSAs advertise any networks owned by an area to the rest of the areas in the OSPF autonomous system, as shown in Figure .
The link-state ID is set to the network number; the mask is also advertised.

By default, OSPF does not automatically summarize groups of contiguous subnets or summarize a network to its classful boundary. The network operator uses configuration commands to specify how the summarization occurs. By default, a type 3 LSA is advertised into the backbone area for every subnet defined in the originating area, which can cause significant flooding problems. Consequently, you should always consider using manual route summarization at the ABR.

Summary LSAs are flooded throughout a single area only, but are regenerated by ABRs to flood into other areas.

Note By default, summary LSAs do not contain summarized routes.

Type 4

A type 4 summary LSA is generated by an ABR only when an ASBR exists within an area. A type 4 LSA identifies the ASBR and provides a route to it. The link-state ID is set to the ASBR router ID. All traffic destined to an external autonomous system requires routing table knowledge of the ASBR that originated the external routes.

In Figure , the ASBR sends a type 1 router LSA with an external bit (e bit) that is set to identify itself as an ASBR. When the ABR, which is identified with a border bit (b bit) in the router LSA, receives the type 1 LSA, it builds a type 4 LSA and floods it to the backbone (area 0). Subsequent ABRs regenerate a type 4 LSA to flood into their areas.

Type 5

Type 5 external LSAs describe routes to networks outside the OSPF autonomous system. Type 5 LSAs are originated by the ASBR and are flooded to the entire autonomous system.

The link-state ID is the external network number. Because of the flooding scope, and depending on the number of external networks, the default lack of route summarization can be a major issue with external LSAs. Therefore, you should summarize blocks of external network numbers at the ASBR to reduce flooding problems.

Type 6

Type 6 LSAs are specialized LSAs that are used in multicast OSPF applications.

Type 7

Type 7 is an LSA type that is used in not-so-stubby areas (NSSAs). They are originated by ASBRs within NSSAs and are flooded only within the NSSA in which they originated.

Type 8

Type 8 is a specialized LSA that is used in internetworking OSPF and Border Gateway Protocol (BGP).

Types 9, 10, and 11

The opaque LSAs, types 9, 10, and 11, are designated for future upgrades to OSPF for application-specific purposes. For example, Cisco Systems uses opaque LSAs for Multiprotocol Label Switching (MPLS) with OSPF. Opaque LSAs are distributed using standard LSDB flooding mechanisms. Each type has a different flooding scope.

Notes

  • loopback interfaces advitces as /32 unless ip ospf network point-to-point command is run on the Interface. 
 

No comments:

Post a Comment