Step 2: Check OSPF on an ABR
Action
To verify the OSPF configuration on an ABR router in your network, enter the following JUNOS CLI operational mode commands:
user@host>show configurationuser@host>show ospf interfaceSample Output
The following sample output is for an OSPF configuration on
R2, an NSSA ABR shown in Figure 11:user@R2>show configuration[...Output truncated...]interfaces {so-0/0/0{unit 0 {family inet{address 10.1.12.2/30;}}}so-0/0/1{unit 0 {family inet{address 10.1.23.1/30;}}}so-0/0/3{unit 0 {family inet{address 10.1.24.1/30;}}}lo0{unit 0 {family inet{address 10.0.0.2/32;}}}}routing-options {}router-id 10.0.0.2;}protocols {ospf {area 0.0.0.1{nssa{default-lsa default-metric 10;}interface so-0/0/0.0;}area 0.0.0.0{interface so-0/0/3.0;interface so-0/0/1.0;interface lo0.0 {passive;}}}}user@R2>show ospf interfaceInterface State Area DR ID BDR ID Nbrslo0.0 DRother 0.0.0.0 0.0.0.0 0.0.0.0 0so-0/0/1.0 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1so-0/0/3.0 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1so-0/0/0.0 PtToPt 0.0.0.1 0.0.0.0 0.0.0.0 1The following sample output is for an OSPF configuration on
R3,an ABR shown in Figure 11:user@R3>show configurationinterfaces {so-0/0/0{unit 0 {family inet{address 10.1.34.1/30;}}}so-0/0/1{unit 0 {family inet{address 10.1.23.2/30;}}}so-0/0/3{unit 0 {family inet{address 10.1.36.1/30;}}}lo0{unit 0 {family inet{address 10.0.0.3/32;}}}}routing-options {router-id 10.0.0.3;}protocols {ospf {area 0.0.0.0{interface so-0/0/0.0;interface so-0/0/1.0;interface lo0.0 {passive;}}area 0.0.0.3{interface so-0/0/3.0;}}user@R3>show ospf interfaceInterface State Area DR ID BDR ID Nbrslo0.0 DRother 0.0.0.0 0.0.0.0 0.0.0.0 0so-0/0/0.0 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1so-0/0/1.0 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1so-0/0/3.0 PtToPt 0.0.0.3 0.0.0.0 0.0.0.0 1The following sample output is for an OSPF configuration on
R4, an ABR shown in Figure 11:user@R4>show configuration[...Output truncated...]interfaces {so-0/0/0{unit 0 {family inet{address 10.1.34.2/30;}}}so-0/0/2{unit 0 {family inet{address 10.1.45.1/30;}}}so-0/0/3{unit 0 {family inet{address 10.1.24.2/30;}}}lo0{unit 0 {family inet{address 10.0.0.4/32;}}}}routing-options {router-id 10.0.0.4;}protocols {ospf {area 0.0.0.0{interface so-0/0/0.0;interface so-0/0/3.0;interface lo0.0 {passive;}}area 0.0.0.2{stub default-metric 10;interface so-0/0/2.0;}}}user@R4>show ospf interfaceInterface State Area DR ID BDR ID Nbrslo0.0 DRother 0.0.0.0 0.0.0.0 0.0.0.0 0so-0/0/0.0 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1so-0/0/3.0 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1so-0/0/2.0 PtToPt 0.0.0.2 0.0.0.0 0.0.0.0 1What It Means
The sample output shows a basic OSPF configuration at the [
edit protocols ospf] and [edit interfaces] hierarchy levels on theR2,R3, andR4ABR routers.
R2has four interfaces included at the [edit protocols ospf] hierarchy level, and those interfaces have thefamily inetstatement included at the [edit interfaces] hierarchy level. Three interfaces—so-0/0/1.0,so-0/0/3.0, and the loopback (lo0) interface—are in the backbone (0.0.0.0). One interface,so-0/0/0.0,is in the NSSA (0.0.0.1). BecauseR2has one interface configured for an NSSA, external routes learned from outside the AS (throughR1) are redistributed throughout the network. For more information on OSPF routes, see Examine OSPF Routes.
R3has four interfaces included at the [edit protocols ospf] hierarchy level, and those interfaces have thefamily inetstatement included at the [edit interfaces] hierarchy level. Three interfaces—so-0/0/0.0,so-0/0/1.0, and the loopback (lo0) interface— are in the backbone (0.0.0.0). One interface,so-0/0/3.0, is in a non-backbone area (0.0.0.3).
R4has four interfaces included at the [edit protocols ospf] hierarchy level, and those interfaces have thefamily inetstatement included at the [edit interfaces] hierarchy level. Two interfaces,so-0/0/0.0andso-0/0/3.0, are in the backbone (0.0.0.0). One interface,so-0/0/2.0,is in the stub area (0.0.0.2). Because internal routers within a stub area do not receive external LSA information, they must rely on either direct static routes or a default route to get to external destinations. A default route can be statically configured on the internal router or learned from the stub ABR. To advertise a default LSA from the stub ABR, include the stubdefault-metricstatement at the [edit protocols ospf area area-id] hierarchy level to activate the default route.All routers (
R2,R3, andR4) have the router ID configured manually to avoid possible problems when the OSPF router ID (RID) changes; for example, when multiple loopback addresses are configured. The RID uniquely identifies the router within the OSPF network. It is transmitted within the LSAs used to populate the link-state database and calculate the shortest-path tree. In a link-state network, it is important that two routers do not share the same RID value, otherwise IP routing problems may occur.An ABR belongs to more than one area and maintains a separate topological database for each area to which it is connected. For more information on the OSPF database, see Examine the OSPF Link-State Database.
See the JUNOS Routing Protocols Configuration Guide for more information on configuring OSPF on a router.