[Contents] [Prev] [Next] [Index] [Report an Error]


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 configuration
user@host> show ospf interface

Sample 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 interface   
Interface       State     Area            DR ID           BDR ID       Nbrs
lo0.0           DRother  0.0.0.1         0.0.0.0         0.0.0.0         0
so-0/0/0.0      PtToPt   0.0.0.1         0.0.0.0         0.0.0.0         1

The 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 interface 
Interface        State     Area            DR ID           BDR ID       Nbrs
lo0.0            DRother  0.0.0.3         0.0.0.0         0.0.0.0         0
so-0/0/3.0       PtToPt   0.0.0.3         0.0.0.0         0.0.0.0         1

What It Means

The sample output shows a basic OSPF configuration at the [edit protocols ospf] and [edit interfaces] hierarchy levels on the R1 and R6 ASBR 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.

R1 has two interfaces included at the [edit protocols ospf] hierarchy level: so-0/0/0 and the loopback interface (lo0). Both interfaces have the family inet statement included at the [edit interfaces] hierarchy level and are in area 0.0.0.1. Area 0.0.0.1 is attached to the backbone through R2, an ABR.

In addition, R1 has the nssa statement 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 policy export-to-ospf are injected into the R1 OSPF database and communicated throughout the AS. For more information on OSPF routes, see Examine OSPF Routes.

R6 has two interfaces included at the [edit protocols ospf] hierarchy level: so-0/0/3 and the loopback interface (lo0). Both interfaces have the family inet statement included at the [edit interfaces] hierarchy level and are in area 0.0.0.3. Area 0.0.0.3 is attached to the backbone through R3, an ABR. In addition, external router B is attached to R6 which has the export policy export-to-ospf configured. The export policy allows external routes to be injected into the R6 OSPF database and communicated throughout the AS.

Both routers (R1 and R6) 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.


[Contents] [Prev] [Next] [Index] [Report an Error]