OSPF Cisco IOS
- 1 DR and BDR
- 2 Stub Areas
- 3 Virtual links
- 4 Single Area configuration
- 5 Default administrative Distance
- 6 LSA Types
- 7 Notes
- 8 Links
- 9 References
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.
- Set manually
- Highest Loopback IP address
- 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
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 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.
Stub Area example
Totally Stub Area example
NSSA: Not So Stubby Areas
If you want to redistribute a default route into the OSPF Domain through a NSSA Area you need to use the area 1 nssa default-information-originate on the ASBR
NSSA behaves strange when redistributing 2 default gateways from 2 different NSSA's. See the this example.
Single Area configuration
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
|Static Route out an Interface||0|
|Static Route to a next hop||1|
|EIGRP summary route||5|
|RIP (Version 1 og 2)||120|
|ODR (On Denmand Routing)||160|
|1||O||220.127.116.11||Router Link: Indeholder alle Routerens Links. Floodes til Area|
|2||O||18.104.22.168||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.
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.
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.
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.
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 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 LSAs are specialized LSAs that are used in multicast OSPF applications.
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 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.
- loopback interfaces advitces as /32 unless ip ospf network point-to-point command is run on the Interface.