Step 1: Check OSPF on an ASBR
Action
To verify the OSPF configuration on an ASBR router in your network, enter the following JUNOS command-line interface (CLI) operational mode commands:
user@host>show configurationuser@host>show ospf interfaceSample Output
The following sample output is for an OSPF configuration on
R1,an ASBR router shown in Figure 11:user@R1>show configuration[...Output truncated...]interfaces {so-0/0/0{unit 0 {family inet{address 10.1.12.1/30;}}}so-0/0/2{unit 0 {family inet{address 10.1.13.1/30;}}}lo0{unit 0 {family inet{address 10.0.0.1/32;}}}}routing-options {static {[...Output truncated...]route 10.0.0.100/32 next-hop 10.1.13.2;}router-id 10.0.0.1;}protocols {ospf {export export-to-ospf;area 0.0.0.1{nssa;interface so-0/0/0.0;interface lo0.0 {passive;}}}}policy-options {policy-statement export-to-ospf{term external-router {from {route-filter 10.0.0.100/32 exact;}then accept;}}}user@R1>show ospf interfaceInterface State Area DR ID BDR ID Nbrslo0.0 DRother 0.0.0.1 0.0.0.0 0.0.0.0 0so-0/0/0.0PtToPt 0.0.0.1 0.0.0.0 0.0.0.0 1The following sample output is for an OSPF configuration on
R6,an ASBR router shown in Figure 11:user@R6>show configuration[...Output truncated...]interfaces {so-0/0/0{unit 0 {family inet{address 10.1.56.2/30;}}}so-0/0/3{unit 0 {family inet{address 10.1.36.2/30;}}}lo0{unit 0 {family inet{address 10.0.0.6/32;}}}}routing-options {static {[...Output truncated...]route 10.0.0.101/32 next-hop 10.1.56.1;}router-id 10.0.0.6;}protocols {ospf {export export-to-ospf;area 0.0.0.3 {interface so-0/0/3.0;interface lo0.0 {passive;}}}}policy-options {policy-statement export-to-ospf{term external-router {from {route-filter 10.0.0.101/32 exact;}then accept;}}}user@R6>show ospf interfaceInterface State Area DR ID BDR ID Nbrslo0.0 DRother 0.0.0.3 0.0.0.0 0.0.0.0 0so-0/0/3.0PtToPt 0.0.0.3 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 theR1andR6ASBR routers. In addition, both routers have an export policy,export-to-ospf, configured. The export policy allows external routes to be injected into the OSPF database and communicated throughout the AS.
R1has two interfaces included at the [edit protocols ospf] hierarchy level:so-0/0/0and the loopback interface(lo0). Both interfaces have thefamily inetstatement included at the [edit interfaces] hierarchy level and are in area0.0.0.1. Area0.0.0.1is attached to the backbone throughR2, anABR.In addition,
R1has thenssastatement included at the [edit protocols ospf] hierarchy level indicating that it is an ASBR running in an NSSA. An NSSA allows external routes from outside the AS to be flooded within it. In this instance, the routes learned from external router B through the export policyexport-to-ospfare injected into theR1OSPF database and communicated throughout the AS. For more information on OSPF routes, see Examine OSPF Routes.
R6has two interfaces included at the [edit protocols ospf] hierarchy level:so-0/0/3and the loopback interface (lo0). Both interfaces have thefamily inetstatement included at the [edit interfaces] hierarchy level and are in area0.0.0.3. Area0.0.0.3is attached to the backbone throughR3, an ABR. In addition, external router B is attached toR6which has the export policyexport-to-ospfconfigured. The export policy allows external routes to be injected into theR6OSPF database and communicated throughout the AS.Both routers (
R1andR6) 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 ASBR exchanges routing information with routers in other autonomous systems. ASBRs advertise externally learned routes throughout the AS. With the exception of routers in stub areas, any router in the AS—an internal router, an area border router, or a backbone router—can be an ASBR.
See the JUNOS Routing Protocols Configuration Guide for more information on configuring OSPF on a router.