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


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

Sample 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 interface 
Interface        State     Area            DR ID           BDR ID       Nbrs
lo0.0            DRother  0.0.0.0         0.0.0.0         0.0.0.0         0
so-0/0/1.0       PtToPt   0.0.0.0         0.0.0.0         0.0.0.0         1
so-0/0/3.0       PtToPt   0.0.0.0         0.0.0.0         0.0.0.0         1
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 R3, an ABR shown in Figure 11:

user@R3> show configuration
interfaces {
    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 interface 
Interface       State     Area            DR ID           BDR ID       Nbrs
lo0.0           DRother  0.0.0.0         0.0.0.0         0.0.0.0         0
so-0/0/0.0      PtToPt   0.0.0.0         0.0.0.0         0.0.0.0         1
so-0/0/1.0      PtToPt   0.0.0.0         0.0.0.0         0.0.0.0         1
so-0/0/3.0      PtToPt   0.0.0.3         0.0.0.0         0.0.0.0         1

The 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 interface 
Interface        State     Area            DR ID           BDR ID       Nbrs
lo0.0            DRother  0.0.0.0         0.0.0.0         0.0.0.0         0
so-0/0/0.0       PtToPt   0.0.0.0         0.0.0.0         0.0.0.0         1
so-0/0/3.0       PtToPt   0.0.0.0         0.0.0.0         0.0.0.0         1
so-0/0/2.0       PtToPt   0.0.0.2         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 R2, R3, and R4 ABR routers.

R2 has four interfaces included at the [edit protocols ospf] hierarchy level, and those interfaces have the family inet statement 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). Because R2 has one interface configured for an NSSA, external routes learned from outside the AS (through R1) are redistributed throughout the network. For more information on OSPF routes, see Examine OSPF Routes.

R3 has four interfaces included at the [edit protocols ospf] hierarchy level, and those interfaces have the family inet statement 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).

R4 has four interfaces included at the [edit protocols ospf] hierarchy level, and those interfaces have the family inet statement included at the [edit interfaces] hierarchy level. Two interfaces, so-0/0/0.0 and so-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 stub default-metric statement at the [edit protocols ospf area area-id] hierarchy level to activate the default route.

All routers (R2, R3, and R4) 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.


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