​Junos Basic Multi Area OSPF Example

In this post, we will look at a basic multi-area OSPF configuration. If you haven’t already, it would be worth a quick review of the single-area configuration.

This example is relevant to all Junos-based devices – M, T, MX, PTX, SRX, EX, and QFX.

In the examples that follow, we will extend an existing OSPF network by adding two new normal areas to it.

The configuration is simple and adds additional interfaces to the OSPF configuration, but places them under a different area.

set protocols ospf area <<area>> interface <<interface>>

Lab Environment

The lab environment uses logical systems. These are connected using logical tunnel (lt-) interfaces.

  • R1 through R10 are configured using logical systems
  • R3 through R8 are already configured for area 0.
  • R3 through R8 have their OSPF interfaces set as point-to-point (p2p).
  • All routers have a loopback interface configured, and a router-id set.
  • All the interfaces are already configured.

The configuration and show commands listed below are done with the ‘cli logical-system’ set to be the relevant logical system. This means commands don’t need to refer to which logical system to run the command against. This makes the output the same as if we were not using logical systems.

Here is an example showing the configuration of R3 before we start.

lab@vRouter-1:R3> show configuration 
interfaces {
    lt-0/0/0 {
        unit 4 {
            encapsulation ethernet;
            peer-unit 3;
            family inet {
                address 172.16.13.2/24;
            }
        }
        unit 7 {
            encapsulation ethernet;
            peer-unit 8;
            family inet {
                address 172.16.34.1/24;
            }
        }
        unit 9 {
            encapsulation ethernet;
            peer-unit 10;
            family inet {
                address 172.16.35.1/24;
            }
        }
    }                                   
    lo0 {
        unit 3 {
            family inet {
                address 192.168.0.3/32;
            }
        }
    }
}
protocols {
    ospf {
        area 0.0.0.0 {
            interface lt-0/0/0.7 {
                interface-type p2p;
            }
            interface lt-0/0/0.9 {
                interface-type p2p;
            }
            interface lo0.3 {
                passive;
            }
        }
        reference-bandwidth 100g;
    }                                   
}
routing-options {
    router-id 192.168.0.3;
}

lab@vRouter-1:R3>

And here is some OSPF output to validate the current network

lab@vRouter-1:R3> show ospf interface 
Interface           State   Area            DR ID           BDR ID          Nbrs
lo0.3               DRother 0.0.0.0         0.0.0.0         0.0.0.0            0
lt-0/0/0.7          PtToPt  0.0.0.0         0.0.0.0         0.0.0.0            1
lt-0/0/0.9          PtToPt  0.0.0.0         0.0.0.0         0.0.0.0            1

lab@vRouter-1:R3> show ospf neighbor 
Address          Interface              State           ID               Pri  Dead
172.16.34.2      lt-0/0/0.7             Full            192.168.0.4      128    34
172.16.35.2      lt-0/0/0.9             Full            192.168.0.5      128    35

lab@vRouter-1:R3> show route protocol ospf 

inet.0: 18 destinations, 18 routes (18 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.16.46.0/24     *[OSPF/10] 00:11:09, metric 2
                    >  to 172.16.34.2 via lt-0/0/0.7
172.16.56.0/24     *[OSPF/10] 00:10:59, metric 2
                    >  to 172.16.35.2 via lt-0/0/0.9
172.16.57.0/24     *[OSPF/10] 00:10:59, metric 2
                    >  to 172.16.35.2 via lt-0/0/0.9
172.16.68.0/24     *[OSPF/10] 00:10:59, metric 3
                       to 172.16.34.2 via lt-0/0/0.7
                    >  to 172.16.35.2 via lt-0/0/0.9
172.16.78.0/24     *[OSPF/10] 00:10:59, metric 3
                    >  to 172.16.35.2 via lt-0/0/0.9
192.168.0.4/32     *[OSPF/10] 00:11:09, metric 1
                    >  to 172.16.34.2 via lt-0/0/0.7
192.168.0.5/32     *[OSPF/10] 00:10:59, metric 1
                    >  to 172.16.35.2 via lt-0/0/0.9
192.168.0.6/32     *[OSPF/10] 00:10:59, metric 2
                       to 172.16.34.2 via lt-0/0/0.7
                    >  to 172.16.35.2 via lt-0/0/0.9
192.168.0.7/32     *[OSPF/10] 00:10:59, metric 2
                    >  to 172.16.35.2 via lt-0/0/0.9
192.168.0.8/32     *[OSPF/10] 00:10:59, metric 3
                    >  to 172.16.34.2 via lt-0/0/0.7
                       to 172.16.35.2 via lt-0/0/0.9
224.0.0.5/32       *[OSPF/10] 00:11:19, metric 1
                       MultiRecv

inet6.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)

lab@vRouter-1:R3> show ospf database 

    OSPF database, Area 0.0.0.0
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router  *192.168.0.3      192.168.0.3      0x80000003   684  0x22 0x4a06  84
Router   192.168.0.4      192.168.0.4      0x80000002   690  0x22 0x989e  84
Router   192.168.0.5      192.168.0.5      0x80000004   680  0x22 0x326c 108
Router   192.168.0.6      192.168.0.6      0x80000003   686  0x22 0xb3ba 108
Router   192.168.0.7      192.168.0.7      0x80000002   691  0x22 0xab1   84
Router   192.168.0.8      192.168.0.8      0x80000002   692  0x22 0x9e03  84

lab@vRouter-1:R3>

Because we have set all the interfaces as point-to-point, we only see Router LSAs, there are no network LSAs present in the OSPF database.

Next, we’ll move on to configuring area 1.

R3 Configuration – Area 1

Since R3 has area 0 already configured, we just need to configure the lt-0/0/0.4 interface under area 1.

lab@vRouter-1:R3> configure   
Entering configuration mode

[edit]
lab@vRouter-1:R3# show protocols ospf 
area 0.0.0.0 {
    interface lt-0/0/0.7 {
        interface-type p2p;
    }
    interface lt-0/0/0.9 {
        interface-type p2p;
    }
    interface lo0.3 {
        passive;
    }
}
reference-bandwidth 100g;

[edit]
lab@vRouter-1:R3# set protocols ospf area 1 interface lt-0/0/0.4 interface-type p2p 

[edit]
lab@vRouter-1:R3# show protocols ospf                                                  
area 0.0.0.0 {
    interface lt-0/0/0.7 {
        interface-type p2p;
    }
    interface lt-0/0/0.9 {
        interface-type p2p;
    }
    interface lo0.3 {
        passive;
    }
}
area 0.0.0.1 {
    interface lt-0/0/0.4 {
        interface-type p2p;
    }
}
reference-bandwidth 100g;

[edit]
lab@vRouter-1:R3# commit 
commit complete

[edit]
lab@vRouter-1:R3#

R4 Configuration – Area 1

R4 is similar to R3. We just need to add the interface to area 1.

lab@vRouter-1:R4> configure 
Entering configuration mode

[edit]
lab@vRouter-1:R4# show protocols ospf 
area 0.0.0.0 {
    interface lo0.4 {
        passive;
    }
    interface lt-0/0/0.8 {
        interface-type p2p;
    }
    interface lt-0/0/0.11 {
        interface-type p2p;
    }
}
reference-bandwidth 100g;

[edit]
lab@vRouter-1:R4# set protocols ospf area 1 interface lt-0/0/0.6 interface-type p2p 

[edit]
lab@vRouter-1:R4# show protocols ospf                                                  
area 0.0.0.0 {
    interface lo0.4 {
        passive;
    }
    interface lt-0/0/0.8 {
        interface-type p2p;
    }
    interface lt-0/0/0.11 {
        interface-type p2p;
    }
}
area 0.0.0.1 {
    interface lt-0/0/0.6 {
        interface-type p2p;
    }
}
reference-bandwidth 100g;

[edit]
lab@vRouter-1:R4# commit and-quit 
commit complete
Exiting configuration mode

lab@vRouter-1:R4>

R1 Configuration – Area 1

R1 doesn’t have any OSPF configuration to start with. It will be an area internal router. We’ll configure the interface facing R3 as point-to-point but leave the interface facing R2 as a broadcast network so we’ll have a network LSA in area 1.

[edit]
lab@vRouter-1:R1# show protocols ospf 

[edit]
lab@vRouter-1:R1# set protocols ospf reference-bandwidth 100g 

[edit]
lab@vRouter-1:R1# set protocols ospf area 1 interface lo0.1 passive 

[edit]
lab@vRouter-1:R1# set protocols ospf area 1 interface lt-0/0/0.3 interface-type p2p 

[edit]
lab@vRouter-1:R1# set protocols ospf area 1 interface lt-0/0/0.1                       

[edit]
lab@vRouter-1:R1# show protocols ospf 
area 0.0.0.1 {
    interface lo0.1 {
        passive;
    }
    interface lt-0/0/0.3 {
        interface-type p2p;
    }
    interface lt-0/0/0.1;
}
reference-bandwidth 100g;

[edit]
lab@vRouter-1:R1# commit 
commit complete

[edit]
lab@vRouter-1:R1#

R2 Configuration – Area 1

The configuration for R2 is shown below. This is similar to the R1 configuration.

[edit]
lab@vRouter-1:R2# show protocols ospf 
area 0.0.0.1 {
    interface lt-0/0/0.5 {
        interface-type p2p;
    }
    interface lt-0/0/0.2;
    interface lo0.2 {
        passive;
    }
}
reference-bandwidth 100g;

[edit]
lab@vRouter-1:R2#

Area 1 Validation

Validation From R1

First, let’s look at the OSPF interfaces and neighbors.

lab@vRouter-1:R1> show ospf interface          
Interface           State   Area            DR ID           BDR ID          Nbrs
lo0.1               DRother 0.0.0.1         0.0.0.0         0.0.0.0            0
lt-0/0/0.1          BDR     0.0.0.1         192.168.0.2     192.168.0.1        1
lt-0/0/0.3          PtToPt  0.0.0.1         0.0.0.0         0.0.0.0            1

lab@vRouter-1:R1> show ospf neighbor     
Address          Interface              State           ID               Pri  Dead
172.16.12.2      lt-0/0/0.1             Full            192.168.0.2      128    39
172.16.13.2      lt-0/0/0.3             Full            192.168.0.3      128    35

lab@vRouter-1:R1> 

As you might expect, the interfaces are all in area 1. The link from R1 to R2 has selected R2 as the DR to advertise the Network LSA.

R1 has two neighbors.

Next, we’ll check the OSPF database.

lab@vRouter-1:R1> show ospf database 

    OSPF database, Area 0.0.0.1
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router  *192.168.0.1      192.168.0.1      0x80000006   529  0x22 0xc563  72
Router   192.168.0.2      192.168.0.2      0x80000004   525  0x22 0x8986  72
Router   192.168.0.3      192.168.0.3      0x80000002   941  0x22 0x2820  48
Router   192.168.0.4      192.168.0.4      0x80000002   699  0x22 0x9995  48
Network  172.16.12.2      192.168.0.2      0x80000001   530  0x22 0x46e7  32
Summary  172.16.34.0      192.168.0.3      0x80000001  1234  0x22 0x7878  28
Summary  172.16.34.0      192.168.0.4      0x80000001  1092  0x22 0x727d  28
Summary  172.16.35.0      192.168.0.3      0x80000001  1234  0x22 0x6d82  28
Summary  172.16.35.0      192.168.0.4      0x80000002   323  0x22 0x6f7d  28
Summary  172.16.46.0      192.168.0.3      0x80000002   599  0x22 0xfbe6  28
Summary  172.16.46.0      192.168.0.4      0x80000001  1092  0x22 0xedf5  28
Summary  172.16.56.0      192.168.0.3      0x80000002   437  0x22 0x8d4b  28
Summary  172.16.56.0      192.168.0.4      0x80000002   173  0x22 0x8750  28
Summary  172.16.57.0      192.168.0.3      0x80000002   275  0x22 0x8255  28
Summary  172.16.57.0      192.168.0.4      0x80000002    24  0x22 0x864f  28
Summary  172.16.68.0      192.168.0.3      0x80000002   126  0x22 0x13b8  28
Summary  172.16.68.0      192.168.0.4      0x80000001  1092  0x22 0x5c7   28
Summary  172.16.78.0      192.168.0.3      0x80000001  1234  0x22 0xa61c  28
Summary  172.16.78.0      192.168.0.4      0x80000001  1092  0x22 0xa021  28
Summary  192.168.0.3      192.168.0.3      0x80000001  1234  0x22 0x9bc8  28
Summary  192.168.0.3      192.168.0.4      0x80000001  1092  0x22 0x9fc2  28
Summary  192.168.0.4      192.168.0.3      0x80000001  1234  0x22 0x9bc6  28
Summary  192.168.0.4      192.168.0.4      0x80000001  1092  0x22 0x8bd6  28
Summary  192.168.0.5      192.168.0.3      0x80000001  1234  0x22 0x91cf  28
Summary  192.168.0.5      192.168.0.4      0x80000001  1092  0x22 0x95c9  28
Summary  192.168.0.6      192.168.0.3      0x80000001  1234  0x22 0x91cd  28
Summary  192.168.0.6      192.168.0.4      0x80000001  1092  0x22 0x81dd  28
Summary  192.168.0.7      192.168.0.3      0x80000001  1234  0x22 0x87d6  28
Summary  192.168.0.7      192.168.0.4      0x80000001  1092  0x22 0x8bd0  28
Summary  192.168.0.8      192.168.0.3      0x80000001  1234  0x22 0x87d4  28
Summary  192.168.0.8      192.168.0.4      0x80000001  1092  0x22 0x77e4  28

lab@vRouter-1:R1>

First, we have four Router LSAs and one Network LSA, which are internal to Area 1. Next, we have a lot of Summary LSAs representing the information from area 0. Since both R3 and R4 are acting as ABRs, they both announce summary LSAs into area 1.

The routing table is shown below.

lab@vRouter-1:R1> show route table inet.0 

inet.0: 21 destinations, 21 routes (21 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.16.12.0/24     *[Direct/0] 01:45:14
                    >  via lt-0/0/0.1
172.16.12.1/32     *[Local/0] 01:45:14
                       Local via lt-0/0/0.1
172.16.13.0/24     *[Direct/0] 01:45:13
                    >  via lt-0/0/0.3
172.16.13.1/32     *[Local/0] 01:45:13
                       Local via lt-0/0/0.3
172.16.24.0/24     *[OSPF/10] 00:12:01, metric 2
                    >  to 172.16.12.2 via lt-0/0/0.1
172.16.34.0/24     *[OSPF/10] 00:18:55, metric 2
                    >  to 172.16.13.2 via lt-0/0/0.3
172.16.35.0/24     *[OSPF/10] 00:18:55, metric 2
                    >  to 172.16.13.2 via lt-0/0/0.3
172.16.46.0/24     *[OSPF/10] 00:12:01, metric 3
                    >  to 172.16.12.2 via lt-0/0/0.1
                       to 172.16.13.2 via lt-0/0/0.3
172.16.56.0/24     *[OSPF/10] 00:18:55, metric 3
                    >  to 172.16.13.2 via lt-0/0/0.3
172.16.57.0/24     *[OSPF/10] 00:18:55, metric 3
                    >  to 172.16.13.2 via lt-0/0/0.3
172.16.68.0/24     *[OSPF/10] 00:12:01, metric 4
                       to 172.16.12.2 via lt-0/0/0.1
                    >  to 172.16.13.2 via lt-0/0/0.3
172.16.78.0/24     *[OSPF/10] 00:18:55, metric 4
                    >  to 172.16.13.2 via lt-0/0/0.3
192.168.0.1/32     *[Direct/0] 01:45:14
                    >  via lo0.1
192.168.0.2/32     *[OSPF/10] 00:12:01, metric 1
                    >  to 172.16.12.2 via lt-0/0/0.1
192.168.0.3/32     *[OSPF/10] 00:18:55, metric 1
                    >  to 172.16.13.2 via lt-0/0/0.3
192.168.0.4/32     *[OSPF/10] 00:12:01, metric 2
                       to 172.16.12.2 via lt-0/0/0.1
                    >  to 172.16.13.2 via lt-0/0/0.3
192.168.0.5/32     *[OSPF/10] 00:18:55, metric 2
                    >  to 172.16.13.2 via lt-0/0/0.3
192.168.0.6/32     *[OSPF/10] 00:12:01, metric 3
                       to 172.16.12.2 via lt-0/0/0.1
                    >  to 172.16.13.2 via lt-0/0/0.3
192.168.0.7/32     *[OSPF/10] 00:18:55, metric 3
                    >  to 172.16.13.2 via lt-0/0/0.3
192.168.0.8/32     *[OSPF/10] 00:12:01, metric 4
                    >  to 172.16.12.2 via lt-0/0/0.1
                       to 172.16.13.2 via lt-0/0/0.3
224.0.0.5/32       *[OSPF/10] 00:19:00, metric 1
                       MultiRecv

lab@vRouter-1:R1>

You may notice that some routes have two available next hops. Since we have not configured any sort of load-balancing, the default behavior is that for each route, Junos will pick one of the paths to use.

Validation From R3

The validation from R3 is a bit different. It acts as an ABR and has interfaces in two areas.

lab@vRouter-1:R3> show ospf interface 
Interface           State   Area            DR ID           BDR ID          Nbrs
lo0.3               DRother 0.0.0.0         0.0.0.0         0.0.0.0            0
lt-0/0/0.7          PtToPt  0.0.0.0         0.0.0.0         0.0.0.0            1
lt-0/0/0.9          PtToPt  0.0.0.0         0.0.0.0         0.0.0.0            1
lt-0/0/0.4          PtToPt  0.0.0.1         0.0.0.0         0.0.0.0            1

lab@vRouter-1:R3> show ospf neighbor 
Address          Interface              State           ID               Pri  Dead
172.16.34.2      lt-0/0/0.7             Full            192.168.0.4      128    31
172.16.35.2      lt-0/0/0.9             Full            192.168.0.5      128    32
172.16.13.1      lt-0/0/0.4             Full            192.168.0.1      128    32

lab@vRouter-1:R3>

When we show the OSPF database on R3, we see the output is broken into different areas.

lab@vRouter-1:R3> show ospf database 

    OSPF database, Area 0.0.0.0
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router  *192.168.0.3      192.168.0.3      0x80000005  1538  0x22 0x4904  84
Router   192.168.0.4      192.168.0.4      0x80000004  1259  0x22 0x979c  84
Router   192.168.0.5      192.168.0.5      0x80000005   210  0x22 0x306d 108
Router   192.168.0.6      192.168.0.6      0x80000004   216  0x22 0xb1bb 108
Router   192.168.0.7      192.168.0.7      0x80000003   221  0x22 0x8b2   84
Router   192.168.0.8      192.168.0.8      0x80000003   222  0x22 0x9c04  84
Summary *172.16.12.0      192.168.0.3      0x80000002  1021  0x22 0x7391  28
Summary  172.16.12.0      192.168.0.4      0x80000001  1183  0x22 0x6f95  28
Summary *172.16.13.0      192.168.0.3      0x80000002  1258  0x22 0x5ea6  28
Summary  172.16.13.0      192.168.0.4      0x80000002  1016  0x22 0x6c95  28
Summary *172.16.24.0      192.168.0.3      0x80000002  1015  0x22 0xf8fe  28
Summary  172.16.24.0      192.168.0.4      0x80000002   971  0x22 0xde1a  28
Summary *192.168.0.1      192.168.0.3      0x80000001  1093  0x22 0xb9ab  28
Summary  192.168.0.1      192.168.0.4      0x80000002  1016  0x22 0xbba6  28
Summary *192.168.0.2      192.168.0.3      0x80000002  1015  0x22 0xb7aa  28
Summary  192.168.0.2      192.168.0.4      0x80000001  1185  0x22 0xa9b9  28

    OSPF database, Area 0.0.0.1
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router   192.168.0.1      192.168.0.1      0x80000006  1024  0x22 0xc563  72
Router   192.168.0.2      192.168.0.2      0x80000004  1020  0x22 0x8986  72
Router  *192.168.0.3      192.168.0.3      0x80000002  1434  0x22 0x2820  48
Router   192.168.0.4      192.168.0.4      0x80000002  1194  0x22 0x9995  48
Network  172.16.12.2      192.168.0.2      0x80000001  1025  0x22 0x46e7  32
Summary *172.16.34.0      192.168.0.3      0x80000001  1728  0x22 0x7878  28
Summary  172.16.34.0      192.168.0.4      0x80000001  1587  0x22 0x727d  28
Summary *172.16.35.0      192.168.0.3      0x80000001  1728  0x22 0x6d82  28
Summary  172.16.35.0      192.168.0.4      0x80000002   818  0x22 0x6f7d  28
Summary *172.16.46.0      192.168.0.3      0x80000002  1092  0x22 0xfbe6  28
Summary  172.16.46.0      192.168.0.4      0x80000001  1587  0x22 0xedf5  28
Summary *172.16.56.0      192.168.0.3      0x80000002   930  0x22 0x8d4b  28
Summary  172.16.56.0      192.168.0.4      0x80000002   668  0x22 0x8750  28
Summary *172.16.57.0      192.168.0.3      0x80000002   768  0x22 0x8255  28
Summary  172.16.57.0      192.168.0.4      0x80000002   519  0x22 0x864f  28
Summary *172.16.68.0      192.168.0.3      0x80000002   619  0x22 0x13b8  28
Summary  172.16.68.0      192.168.0.4      0x80000002   369  0x22 0x3c8   28
Summary *172.16.78.0      192.168.0.3      0x80000002   469  0x22 0xa41d  28
Summary  172.16.78.0      192.168.0.4      0x80000002   219  0x22 0x9e22  28
Summary *192.168.0.3      192.168.0.3      0x80000001  1728  0x22 0x9bc8  28
Summary  192.168.0.3      192.168.0.4      0x80000002    69  0x22 0x9dc3  28
Summary *192.168.0.4      192.168.0.3      0x80000002   320  0x22 0x99c7  28
Summary  192.168.0.4      192.168.0.4      0x80000001  1587  0x22 0x8bd6  28
Summary *192.168.0.5      192.168.0.3      0x80000002   171  0x22 0x8fd0  28
Summary  192.168.0.5      192.168.0.4      0x80000001  1587  0x22 0x95c9  28
Summary *192.168.0.6      192.168.0.3      0x80000002    21  0x22 0x8fce  28
Summary  192.168.0.6      192.168.0.4      0x80000001  1587  0x22 0x81dd  28
Summary *192.168.0.7      192.168.0.3      0x80000001  1728  0x22 0x87d6  28
Summary  192.168.0.7      192.168.0.4      0x80000001  1587  0x22 0x8bd0  28
Summary *192.168.0.8      192.168.0.3      0x80000001  1728  0x22 0x87d4  28
Summary  192.168.0.8      192.168.0.4      0x80000001  1587  0x22 0x77e4  28

lab@vRouter-1:R3>

Area 0 now has ten summary LSAs. Five each from R3 and R4 which are acting as ABRs.

The routing table for R3 is shown below.

lab@vRouter-1:R3> show route table inet.0 

inet.0: 22 destinations, 22 routes (22 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.16.12.0/24     *[OSPF/10] 00:19:41, metric 2
                    >  to 172.16.13.1 via lt-0/0/0.4
172.16.13.0/24     *[Direct/0] 01:52:48
                    >  via lt-0/0/0.4
172.16.13.2/32     *[Local/0] 01:52:48
                       Local via lt-0/0/0.4
172.16.24.0/24     *[OSPF/10] 00:19:35, metric 3
                    >  to 172.16.13.1 via lt-0/0/0.4
172.16.34.0/24     *[Direct/0] 01:52:47
                    >  via lt-0/0/0.7
172.16.34.1/32     *[Local/0] 01:52:47
                       Local via lt-0/0/0.7
172.16.35.0/24     *[Direct/0] 01:52:47
                    >  via lt-0/0/0.9
172.16.35.1/32     *[Local/0] 01:52:47
                       Local via lt-0/0/0.9
172.16.46.0/24     *[OSPF/10] 00:56:15, metric 2
                    >  to 172.16.34.2 via lt-0/0/0.7
172.16.56.0/24     *[OSPF/10] 00:56:05, metric 2
                    >  to 172.16.35.2 via lt-0/0/0.9
172.16.57.0/24     *[OSPF/10] 00:56:05, metric 2
                    >  to 172.16.35.2 via lt-0/0/0.9
172.16.68.0/24     *[OSPF/10] 00:56:05, metric 3
                       to 172.16.34.2 via lt-0/0/0.7
                    >  to 172.16.35.2 via lt-0/0/0.9
172.16.78.0/24     *[OSPF/10] 00:56:05, metric 3
                    >  to 172.16.35.2 via lt-0/0/0.9
192.168.0.1/32     *[OSPF/10] 00:20:53, metric 1
                    >  to 172.16.13.1 via lt-0/0/0.4
192.168.0.2/32     *[OSPF/10] 00:19:35, metric 2
                    >  to 172.16.13.1 via lt-0/0/0.4
192.168.0.3/32     *[Direct/0] 01:52:48
                    >  via lo0.3
192.168.0.4/32     *[OSPF/10] 00:56:15, metric 1
                    >  to 172.16.34.2 via lt-0/0/0.7
192.168.0.5/32     *[OSPF/10] 00:56:05, metric 1
                    >  to 172.16.35.2 via lt-0/0/0.9
192.168.0.6/32     *[OSPF/10] 00:56:05, metric 2
                       to 172.16.34.2 via lt-0/0/0.7
                    >  to 172.16.35.2 via lt-0/0/0.9
192.168.0.7/32     *[OSPF/10] 00:56:05, metric 2
                    >  to 172.16.35.2 via lt-0/0/0.9
192.168.0.8/32     *[OSPF/10] 00:56:05, metric 3
                    >  to 172.16.34.2 via lt-0/0/0.7
                       to 172.16.35.2 via lt-0/0/0.9
224.0.0.5/32       *[OSPF/10] 00:56:25, metric 1
                       MultiRecv

lab@vRouter-1:R3>

R7 through R10 Configuration – Area 2

The OSPF configuration for R7 through R10 is similar to that for R1 through R4. In this case, R9 and R10 are the area 2 internal routers, and R7 and R8 are the ABRs.

For brevity, I’ll just show the OSPF stanza for each router.

R7:

[edit]
lab@vRouter-1:R7# show protocols ospf 
area 0.0.0.0 {
    interface lo0.7 {
        passive;
    }
    interface lt-0/0/0.16 {
        interface-type p2p;
    }
    interface lt-0/0/0.19 {
        interface-type p2p;
    }
}
area 0.0.0.2 {
    interface lt-0/0/0.21 {
        interface-type p2p;
    }
}
reference-bandwidth 100g;

[edit]
lab@vRouter-1:R7#

R8:

[edit]
lab@vRouter-1:R8# show protocols ospf 
area 0.0.0.0 {
    interface lo0.8 {
        passive;
    }
    interface lt-0/0/0.18 {
        interface-type p2p;
    }
    interface lt-0/0/0.20 {
        interface-type p2p;
    }
}
area 0.0.0.2 {
    interface lt-0/0/0.23 {
        interface-type p2p;
    }
}
reference-bandwidth 100g;

[edit]
lab@vRouter-1:R8#

R9:

[edit]
lab@vRouter-1:R9# show protocols ospf 
area 0.0.0.2 {
    interface lo0.9 {
        passive;
    }
    interface lt-0/0/0.22 {
        interface-type p2p;
    }
    interface lt-0/0/0.25;
}
reference-bandwidth 100g;

[edit]
lab@vRouter-1:R9#

R10:

[edit]
lab@vRouter-1:R10# show protocols ospf 
area 0.0.0.2 {
    interface lo0.10 {
        passive;
    }
    interface lt-0/0/0.24 {
        interface-type p2p;
    }
    interface lt-0/0/0.26;
}
reference-bandwidth 100g;

[edit]
lab@vRouter-1:R10# 

Area 2 Validation

Validation From R9

First, we’ll check the OSPF interface and neighbors.

lab@vRouter-1:R9> show ospf interface 
Interface           State   Area            DR ID           BDR ID          Nbrs
lo0.9               DRother 0.0.0.2         0.0.0.0         0.0.0.0            0
lt-0/0/0.22         PtToPt  0.0.0.2         0.0.0.0         0.0.0.0            1
lt-0/0/0.25         DR      0.0.0.2         192.168.0.9     192.168.0.10       1

lab@vRouter-1:R9> show ospf neighbor 
Address          Interface              State           ID               Pri  Dead
172.16.79.1      lt-0/0/0.22            Full            192.168.0.7      128    38
172.16.190.2     lt-0/0/0.25            Full            192.168.0.10     128    35

lab@vRouter-1:R9>

As R9 is an internal area router, it only sees the OSPF database for Area 2. Once again, we have two ABRs, both advertising summaries for the other areas.

lab@vRouter-1:R9> show ospf database 

    OSPF database, Area 0.0.0.2
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router   192.168.0.7      192.168.0.7      0x80000002   406  0x22 0xf6bd  48
Router   192.168.0.8      192.168.0.8      0x80000002   406  0x22 0x687e  48
Router  *192.168.0.9      192.168.0.9      0x80000003    83  0x22 0x62c3  72
Router   192.168.0.10     192.168.0.10     0x80000003    84  0x22 0x9db8  72
Network *172.16.190.1     192.168.0.9      0x80000001    83  0x22 0x3d28  32
Summary  172.16.12.0      192.168.0.7      0x80000001   406  0x22 0x718e  28
Summary  172.16.12.0      192.168.0.8      0x80000001   406  0x22 0x6b93  28
Summary  172.16.13.0      192.168.0.7      0x80000001   406  0x22 0x5ca3  28
Summary  172.16.13.0      192.168.0.8      0x80000001   406  0x22 0x609d  28
Summary  172.16.24.0      192.168.0.7      0x80000001   406  0x22 0xec07  28
Summary  172.16.24.0      192.168.0.8      0x80000001   406  0x22 0xdc17  28
Summary  172.16.34.0      192.168.0.7      0x80000001   406  0x22 0x7476  28
Summary  172.16.34.0      192.168.0.8      0x80000001   406  0x22 0x6e7b  28
Summary  172.16.35.0      192.168.0.7      0x80000001   406  0x22 0x5f8b  28
Summary  172.16.35.0      192.168.0.8      0x80000001   406  0x22 0x6385  28
Summary  172.16.46.0      192.168.0.7      0x80000001   406  0x22 0xefee  28
Summary  172.16.46.0      192.168.0.8      0x80000001   406  0x22 0xdffe  28
Summary  172.16.56.0      192.168.0.7      0x80000001   406  0x22 0x775e  28
Summary  172.16.56.0      192.168.0.8      0x80000001   406  0x22 0x7163  28
Summary  172.16.57.0      192.168.0.7      0x80000001   406  0x22 0x6273  28
Summary  172.16.57.0      192.168.0.8      0x80000001   406  0x22 0x666d  28
Summary  172.16.68.0      192.168.0.7      0x80000001   406  0x22 0xf2d6  28
Summary  172.16.68.0      192.168.0.8      0x80000001   406  0x22 0xe2e6  28
Summary  172.16.78.0      192.168.0.7      0x80000001   406  0x22 0x7a46  28
Summary  172.16.78.0      192.168.0.8      0x80000001   406  0x22 0x744b  28
Summary  192.168.0.1      192.168.0.7      0x80000001   406  0x22 0xb5a9  28
Summary  192.168.0.1      192.168.0.8      0x80000001   406  0x22 0xb9a3  28
Summary  192.168.0.2      192.168.0.7      0x80000001   406  0x22 0xb5a7  28
Summary  192.168.0.2      192.168.0.8      0x80000001   406  0x22 0xa5b7  28
Summary  192.168.0.3      192.168.0.7      0x80000001   406  0x22 0x97c6  28
Summary  192.168.0.3      192.168.0.8      0x80000001   406  0x22 0x9bc0  28
Summary  192.168.0.4      192.168.0.7      0x80000001   406  0x22 0x97c4  28
Summary  192.168.0.4      192.168.0.8      0x80000001   406  0x22 0x87d4  28
Summary  192.168.0.5      192.168.0.7      0x80000001   406  0x22 0x79e3  28
Summary  192.168.0.5      192.168.0.8      0x80000001   406  0x22 0x7ddd  28
Summary  192.168.0.6      192.168.0.7      0x80000001   406  0x22 0x79e1  28
Summary  192.168.0.6      192.168.0.8      0x80000001   406  0x22 0x69f1  28
Summary  192.168.0.7      192.168.0.7      0x80000001   406  0x22 0x5b01  28
Summary  192.168.0.7      192.168.0.8      0x80000001   406  0x22 0x5ffa  28
Summary  192.168.0.8      192.168.0.7      0x80000001   406  0x22 0x5bfe  28
Summary  192.168.0.8      192.168.0.8      0x80000001   406  0x22 0x4b0f  28

lab@vRouter-1:R9> 

Since we’ve now got the full OSPF network in place, we can ping and traceroute from R9’s loopback to the loopbacks of R1 and R2.

lab@vRouter-1:R9> ping 192.168.0.1 source 192.168.0.9 count 2          
PING 192.168.0.1 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: icmp_seq=0 ttl=61 time=2.935 ms
64 bytes from 192.168.0.1: icmp_seq=1 ttl=61 time=456.195 ms

--- 192.168.0.1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 2.935/229.565/456.195/226.630 ms

lab@vRouter-1:R9> traceroute 192.168.0.1 source 192.168.0.9      
traceroute to 192.168.0.1 (192.168.0.1) from 192.168.0.9, 30 hops max, 52 byte packets
 1  172.16.79.1 (172.16.79.1)  18.063 ms  11.819 ms  7.889 ms
 2  172.16.57.1 (172.16.57.1)  6.906 ms  12.994 ms  4.581 ms
 3  172.16.35.1 (172.16.35.1)  11.152 ms  6.661 ms  4.786 ms
 4  192.168.0.1 (192.168.0.1)  4.105 ms  8.805 ms  7.889 ms

lab@vRouter-1:R9> ping 192.168.0.2 source 192.168.0.9 count 2    
PING 192.168.0.2 (192.168.0.2): 56 data bytes
64 bytes from 192.168.0.2: icmp_seq=0 ttl=60 time=3.969 ms
64 bytes from 192.168.0.2: icmp_seq=1 ttl=60 time=2.403 ms

--- 192.168.0.2 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 2.403/3.186/3.969/0.783 ms

lab@vRouter-1:R9> traceroute 192.168.0.2 source 192.168.0.9      
traceroute to 192.168.0.2 (192.168.0.2) from 192.168.0.9, 30 hops max, 52 byte packets
 1  172.16.190.2 (172.16.190.2)  5.968 ms  7.041 ms  5.213 ms
 2  172.16.180.1 (172.16.180.1)  5.089 ms  4.753 ms  2.876 ms
 3  172.16.68.1 (172.16.68.1)  2.560 ms  4.276 ms  2.622 ms
 4  172.16.46.1 (172.16.46.1)  3.076 ms  3.365 ms  3.347 ms
 5  192.168.0.2 (192.168.0.2)  4.785 ms  4.756 ms  5.262 ms

lab@vRouter-1:R9>

Validation From R7

The OSPF interface shows interfaces in two different areas. The neighbor output shows three neighbors.

lab@vRouter-1:R7> show ospf interface 
Interface           State   Area            DR ID           BDR ID          Nbrs
lo0.7               DRother 0.0.0.0         0.0.0.0         0.0.0.0            0
lt-0/0/0.16         PtToPt  0.0.0.0         0.0.0.0         0.0.0.0            1
lt-0/0/0.19         PtToPt  0.0.0.0         0.0.0.0         0.0.0.0            1
lt-0/0/0.21         PtToPt  0.0.0.2         0.0.0.0         0.0.0.0            1

lab@vRouter-1:R7> show ospf neighbor 
Address          Interface              State           ID               Pri  Dead
172.16.57.1      lt-0/0/0.16            Full            192.168.0.5      128    31
172.16.78.2      lt-0/0/0.19            Full            192.168.0.8      128    32
172.16.79.2      lt-0/0/0.21            Full            192.168.0.9      128    31

lab@vRouter-1:R7>

The output for the OSPF database on R7 is growing larger. R7 sees the database for both area 0 and area 2.

lab@vRouter-1:R7> show ospf database 

    OSPF database, Area 0.0.0.0
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router   192.168.0.3      192.168.0.3      0x80000005  2712  0x22 0x4904  84
Router   192.168.0.4      192.168.0.4      0x80000004  2433  0x22 0x979c  84
Router   192.168.0.5      192.168.0.5      0x80000005  1382  0x22 0x306d 108
Router   192.168.0.6      192.168.0.6      0x80000004  1388  0x22 0xb1bb 108
Router  *192.168.0.7      192.168.0.7      0x80000005   384  0x22 0x7b0   84
Router   192.168.0.8      192.168.0.8      0x80000005   385  0x22 0x9b02  84
Summary  172.16.12.0      192.168.0.3      0x80000002  2195  0x22 0x7391  28
Summary  172.16.12.0      192.168.0.4      0x80000001  2357  0x22 0x6f95  28
...
<<Output removed for brevity>>
...
Summary *192.168.0.9      192.168.0.7      0x80000001   680  0x22 0x5108  28
Summary  192.168.0.9      192.168.0.8      0x80000001   366  0x22 0x5502  28
Summary *192.168.0.10     192.168.0.7      0x80000001   365  0x22 0x5106  28
Summary  192.168.0.10     192.168.0.8      0x80000001   681  0x22 0x4116  28

    OSPF database, Area 0.0.0.2
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router  *192.168.0.7      192.168.0.7      0x80000002   687  0x22 0xf6bd  48
Router   192.168.0.8      192.168.0.8      0x80000002   689  0x22 0x687e  48
Router   192.168.0.9      192.168.0.9      0x80000003   366  0x22 0x62c3  72
Router   192.168.0.10     192.168.0.10     0x80000003   367  0x22 0x9db8  72
Network  172.16.190.1     192.168.0.9      0x80000001   366  0x22 0x3d28  32
Summary *172.16.12.0      192.168.0.7      0x80000002   271  0x22 0x6f8f  28
Summary  172.16.12.0      192.168.0.8      0x80000002   274  0x22 0x6994  28
Summary *172.16.13.0      192.168.0.7      0x80000002   159  0x22 0x5aa4  28
Summary  172.16.13.0      192.168.0.8      0x80000002   162  0x22 0x5e9e  28
...
<<Output removed for brevity>>
...
Summary *192.168.0.1      192.168.0.7      0x80000001   687  0x22 0xb5a9  28
Summary  192.168.0.1      192.168.0.8      0x80000001   689  0x22 0xb9a3  28
Summary *192.168.0.2      192.168.0.7      0x80000001   687  0x22 0xb5a7  28
Summary  192.168.0.2      192.168.0.8      0x80000001   689  0x22 0xa5b7  28
Summary *192.168.0.3      192.168.0.7      0x80000001   687  0x22 0x97c6  28
Summary  192.168.0.3      192.168.0.8      0x80000001   689  0x22 0x9bc0  28
Summary *192.168.0.4      192.168.0.7      0x80000001   687  0x22 0x97c4  28
Summary  192.168.0.4      192.168.0.8      0x80000001   689  0x22 0x87d4  28
Summary *192.168.0.5      192.168.0.7      0x80000001   687  0x22 0x79e3  28
Summary  192.168.0.5      192.168.0.8      0x80000001   689  0x22 0x7ddd  28
Summary *192.168.0.6      192.168.0.7      0x80000001   687  0x22 0x79e1  28
Summary  192.168.0.6      192.168.0.8      0x80000001   689  0x22 0x69f1  28
Summary *192.168.0.7      192.168.0.7      0x80000001   687  0x22 0x5b01  28
Summary  192.168.0.7      192.168.0.8      0x80000001   689  0x22 0x5ffa  28
Summary *192.168.0.8      192.168.0.7      0x80000001   687  0x22 0x5bfe  28
Summary  192.168.0.8      192.168.0.8      0x80000001   689  0x22 0x4b0f  28

lab@vRouter-1:R7>

Multi-Area OSPF And External Routes

The next thing we will look at is the behavior of external routes.

We’ll configure R1, R5, and R9 to advertise an external network into OSPF. This advertises an external network into OSPF from one router in each area.

  • R1 will advertise 172.20.1.0/24
  • R5 will advertise 172.20.0.0/24
  • R9 will advertise 172.20.2.0/24

The third octet of each route represents the area number.

The configuration for R5 is shown below for reference. R1 and R9 are configured the same, using the relevant static route.

[edit]
lab@vRouter-1:R5# show routing-options 
router-id 192.168.0.5;
static {
    route 172.20.0.0/24 reject;
}

[edit]
lab@vRouter-1:R5# show policy-options 
policy-statement exp-static {
    term static {
        from {
            protocol static;
            route-filter 172.20.0.0/16 longer;
        }
        then accept;
    }
    term final {
        then reject;
    }
}

[edit]
lab@vRouter-1:R5# show protocols ospf 
area 0.0.0.0 {
    interface lo0.5 {
        passive;
    }
    interface lt-0/0/0.10 {
        interface-type p2p;
    }
    interface lt-0/0/0.13 {
        interface-type p2p;
    }
    interface lt-0/0/0.15 {
        interface-type p2p;
    }
}
export exp-static;
reference-bandwidth 100g;

[edit]
lab@vRouter-1:R5#

External Route Verification

This time, we will validate the network from R6.

First, let’s look at the routes for the 172.20.x.x networks.

lab@vRouter-1:R6> show route 172.20/16 

inet.0: 30 destinations, 30 routes (30 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.20.0.0/24      *[OSPF/150] 00:21:13, metric 0, tag 0
                    >  to 172.16.56.1 via lt-0/0/0.14
172.20.1.0/24      *[OSPF/150] 00:21:08, metric 0, tag 0
                       to 172.16.46.1 via lt-0/0/0.12
                    >  to 172.16.56.1 via lt-0/0/0.14
172.20.2.0/24      *[OSPF/150] 00:21:03, metric 0, tag 0
                       to 172.16.56.1 via lt-0/0/0.14
                    >  to 172.16.68.2 via lt-0/0/0.17

lab@vRouter-1:R6>

The routes are present, which is always a good start. Next, let’s look at the OSPF database.

lab@vRouter-1:R6> show ospf database 

    OSPF database, Area 0.0.0.0
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router   192.168.0.3      192.168.0.3      0x80000004   319  0x22 0x4b03  84
Router   192.168.0.4      192.168.0.4      0x80000005   321  0x22 0x959d  84
Router   192.168.0.5      192.168.0.5      0x80000004  1362  0x22 0x3864 108
Router  *192.168.0.6      192.168.0.6      0x80000004  1366  0x22 0xb1bb 108
Router   192.168.0.7      192.168.0.7      0x80000003  1365  0x22 0xbae   84
Router   192.168.0.8      192.168.0.8      0x80000005    22  0x22 0x9b02  84
Summary  172.16.12.0      192.168.0.3      0x80000002  1336  0x22 0x7391  28
...
<<Output removed for brevity>>
...
Summary  192.168.0.10     192.168.0.7      0x80000001  1339  0x22 0x5106  28
Summary  192.168.0.10     192.168.0.8      0x80000002   220  0x22 0x3f17  28
ASBRSum  192.168.0.1      192.168.0.3      0x80000002   419  0x22 0xa9b9  28
ASBRSum  192.168.0.1      192.168.0.4      0x80000001  1335  0x22 0xafb2  28
ASBRSum  192.168.0.9      192.168.0.7      0x80000002   426  0x22 0x4116  28
ASBRSum  192.168.0.9      192.168.0.8      0x80000001  1338  0x22 0x470f  28
    OSPF AS SCOPE link state database
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Extern   172.20.0.0       192.168.0.5      0x80000001  1386  0x22 0x2162  36
Extern   172.20.1.0       192.168.0.1      0x80000001  1388  0x22 0x2e58  36
Extern   172.20.2.0       192.168.0.9      0x80000001  1391  0x22 0xf28a  36

lab@vRouter-1:R6>

We now have a few extra types of LSAs in the OSPF database. We have external type-5 and ASBR Summary type-4 LSAs.

The externals represent the external networks that have been exported into OSPF. The ASBR Summaries allow R6 to know where the ASBR routers are in the other areas. The ASBR Summaries are generated by the ABR routers R3, R4, R7, and R8.

We can trace from R6’s loopback address to the ‘.1’ address of each of the external networks.

lab@vRouter-1:R6> traceroute 172.20.0.1 source 192.168.0.6    
traceroute to 172.20.0.1 (172.20.0.1) from 192.168.0.6, 30 hops max, 52 byte packets
 1  172.16.56.1 (172.16.56.1)  4.658 ms !N  4.008 ms !N  9.146 ms !N

lab@vRouter-1:R6> traceroute 172.20.1.1 source 192.168.0.6    
traceroute to 172.20.1.1 (172.20.1.1) from 192.168.0.6, 30 hops max, 52 byte packets
 1  172.16.56.1 (172.16.56.1)  5.140 ms  6.660 ms  3.258 ms
 2  172.16.35.1 (172.16.35.1)  10.048 ms  6.974 ms  7.801 ms
 3  172.16.13.1 (172.16.13.1)  5.109 ms !N  5.440 ms !N  3.960 ms !N

lab@vRouter-1:R6> traceroute 172.20.2.1 source 192.168.0.6    
traceroute to 172.20.2.1 (172.20.2.1) from 192.168.0.6, 30 hops max, 52 byte packets
 1  172.16.68.2 (172.16.68.2)  4.888 ms  4.273 ms  7.906 ms
 2  172.16.180.2 (172.16.180.2)  3.536 ms  3.818 ms  3.136 ms
 3  172.16.190.1 (172.16.190.1)  3.965 ms !N  3.542 ms !N  2.878 ms !N

lab@vRouter-1:R6>

The paths are as follows:

  • 172.20.0.1 – R6, R5.
  • 172.20.1.1 – R6, R5, R3, R1.
  • 172.20.2.1 – R6, R8, R10, R9.

Note: because R1, R5, and R9 had the static routes configured with a next-hop of reject, they generate an unreachable message for traffic destined for those networks. This is why we see the ‘!N’ in the last hop of the traceroute output.

Summary

In this post, we have looked at

  • Advertising external routes into OSPF in each area.
  • Basic multi-area OSPF configuration.

Leave a Comment

Your email address will not be published. Required fields are marked *