В прошлой части мы остановились на настройке аутентификации. Перейдем к следующему заданию

Настройка STUB и NSSA областей:

  • На R11 создайте статические NULL-маршруты для следующих сетей: 0.0.0.0/0, 20.20.0.0/24, 20.20.1.0/24, 20.20.2.0/24

Статические маршруты настраиваются в контекста routing-options:

[edit]
root@VR-Device-1# edit routing-instances R11 routing-options static    

[edit routing-instances R11 routing-options static]
root@VR-Device-1# set route 0.0.0.0/0 reject 

[edit routing-instances R11 routing-options static]
root@VR-Device-1# set route 20.20.0.0/24 reject 

[edit routing-instances R11 routing-options static]
root@VR-Device-1# set route 20.20.1.0/24 reject    

[edit routing-instances R11 routing-options static]
root@VR-Device-1# set route 20.20.2.0/24 reject    

[edit routing-instances R11 routing-options static]
root@VR-Device-1# commit and-quit 
commit complete
Exiting configuration mode

Проверим результаты настройки:

root@VR-Device-1> show route protocol static table R11.inet.0
R11.inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

0.0.0.0/0          *[Static/5] 00:01:05
                      Reject
20.20.0.0/24       *[Static/5] 00:01:05
                      Reject
20.20.1.0/24       *[Static/5] 00:01:05
                      Reject
20.20.2.0/24       *[Static/5] 00:01:05
                      Reject

Маршруты появились в таблице маршрутизации. Идем дальше:

  • Между R11 и R10 настройте RIP таким образом, чтобы устанавливались связности только по RIPv2-протоколу

R10 и R11 между собой подключены через интерфейс ge-0/0/3.1011. Для того, соседства были только RIPv2, нужно также указать, чтобы роутеры получали только RIPv2-пакеты, а отправляли только multicast-пакеты:

R11:
root@VR-Device-1# edit routing-instances R11 protocols rip group R10  

[edit routing-instances R11 protocols rip group R10]
root@VR-Device-1#  set neighbor ge-0/0/3.1011 send multicast

[edit routing-instances R11 protocols rip group R10]
root@VR-Device-1# set neighbor ge-0/0/3.1011 receive version-2
R10:
root@VR-Device-2# edit routing-instances R10 protocols rip group R11    

[edit routing-instances R10 protocols rip group R11]
root@VR-Device-2# set neighbor ge-0/0/3.1011 send multicast 

[edit routing-instances R10 protocols rip group R11]
root@VR-Device-2# set neighbor ge-0/0/3.1011 receive version-2                

[edit routing-instances R10 protocols rip group R11]
root@VR-Device-2# commit and-quit 

Проверим соседей и маршруты по протоколу RIP:

R10:

root@VR-Device-2> show rip neighbor instance R10 
                  Local  Source          Destination     Send   Receive   In
Neighbor          State  Address         Address         Mode   Mode     Met 
--------          -----  -------         -----------     ----   -------  --- 
ge-0/0/3.1011        Up 172.20.11.2     224.0.0.9       mcast  v2 only    1

root@VR-Device-2> show route protocol rip table R10.inet.0 

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

224.0.0.9/32       *[RIP/100] 00:02:43, metric 1
                      MultiRecv

R11:

root@VR-Device-1> show rip neighbor instance R11 
                  Local  Source          Destination     Send   Receive   In
Neighbor          State  Address         Address         Mode   Mode     Met 
--------          -----  -------         -----------     ----   -------  --- 
ge-0/0/3.1011        Up 172.20.11.1     224.0.0.9       mcast  v2 only    1

root@VR-Device-1> show route protocol rip table R11.inet.0 

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

224.0.0.9/32       *[RIP/100] 00:02:15, metric 1
                      MultiRecv

В обоих случаях видно, что у нас действительно настроен RIPv2 (поля send и receive), но в таблице маршрутизации пока нет маршрутов, поэтому однозначно утверждать о правильности конфигурации мы пока не можем. Перейдем к следующей части задания:

  • С R11 проанонсируйте в сторону R10 loopback-интерфейс, а также статические маршруты

Чтобы проанонсировать direct и static-сети нужно создать специальную политику и применить ее в контексте настройки протокола rip. Начнем с политики, нам нужно с R11 проанонсировать адрес 192.168.100.11/32 и статические маршруты. Сделаем настройку для каждого пункта отдельно, назвав общую политику rip_export:

[edit]
root@VR-Device-1# edit policy-options policy-statement rip_export

[edit policy-options policy-statement rip_export]
root@VR-Device-1# set term loopback-to-rip from protocol direct 

[edit policy-options policy-statement rip_export]
root@VR-Device-1# set term loopback-to-rip from route-filter 192.168.100.11/32 exact              

[edit policy-options policy-statement rip_export]
root@VR-Device-1# set term loopback-to-rip then accept     

Итого, политика получилась такая:

[edit policy-options policy-statement rip_export]
root@VR-Device-1# show 
term loopback-to-rip {
    from {
        protocol direct;
        route-filter 192.168.100.11/32 exact;
    }
    then accept;
}

Здесь мы указали, что из direct-сетей необходимо пропустить только сеть 192.168.100.11/32. Теперь создадим правило для статических маршрутов:


[edit policy-options policy-statement rip_export]
root@VR-Device-1# set term static-to-rip from protocol static 

[edit policy-options policy-statement rip_export]
root@VR-Device-1# set term static-to-rip then accept     

Итоговая конфигурация политики:

[edit policy-options policy-statement rip_export]
root@VR-Device-1# show 
term loopback-to-rip {
    from {
        protocol direct;
        route-filter 192.168.100.11/32 exact;
    }
    then accept;
}
term static-to-rip {
    from protocol static;
    then accept;
}

И теперь применим эту политику в качестве правила экспорта в контексте rip:

[edit]
root@VR-Device-1# edit routing-instances R11 protocols rip group R11 

[edit routing-instances R11 protocols rip group R10]
root@VR-Device-1# set export rip_export 

Итоговая конфигурация rip для R11:

[edit routing-instances R11 protocols rip]
root@VR-Device-1# show 
group R10 {
    export rip_export;
    neighbor ge-0/0/3.1011 {
        send multicast;
        receive version-2;
    }
}

Сохраняем конфигурацию и проверим таблицу маршрутизации на R10:

root@VR-Device-2> show route protocol rip table R10.inet.0
R10.inet.0: 32 destinations, 32 routes (32 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

0.0.0.0/0          *[RIP/100] 00:00:14, metric 2, tag 0
                    > to 172.20.11.1 via ge-0/0/3.1011
20.20.0.0/24       *[RIP/100] 00:00:14, metric 2, tag 0
                    > to 172.20.11.1 via ge-0/0/3.1011
20.20.1.0/24       *[RIP/100] 00:00:14, metric 2, tag 0
                    > to 172.20.11.1 via ge-0/0/3.1011
20.20.2.0/24       *[RIP/100] 00:00:14, metric 2, tag 0
                    > to 172.20.11.1 via ge-0/0/3.1011
192.168.100.11/32  *[RIP/100] 00:00:14, metric 2, tag 0
                    > to 172.20.11.1 via ge-0/0/3.1011
224.0.0.9/32       *[RIP/100] 00:15:38, metric 1
                      MultiRecv

Отлично, маршруты от R11 прилетели. Теперь действительно ясно, что RIP-соседство установлено. Идем дальше:

  • C R10 отдайте в сторону R11 direct-сети, а также сети, получаемые по OSPF
[edit]
root@VR-Device-2# edit policy-options policy-statement rip_export    

[edit policy-options policy-statement rip_export]
root@VR-Device-2# set term direct-to-rip from protocol direct 

[edit policy-options policy-statement rip_export]
root@VR-Device-2# set term direct-to-rip then accept             

[edit policy-options policy-statement rip_export]
root@VR-Device-2# set term ospf-to-rip from protocol ospf 

[edit policy-options policy-statement rip_export]
root@VR-Device-2# set term ospf-to-rip then accept           

[edit policy-options policy-statement rip_export]

Общий вид политики:

[edit policy-options policy-statement rip_export]
root@VR-Device-2# show 
term direct-to-rip {
    from protocol direct;
    then accept;
}
term ospf-to-rip {
    from protocol ospf;
    then accept;
}

И теперь применим ее к протоколу rip:

[edit]
root@VR-Device-2# edit routing-instances R10 protocols rip group R11 

[edit routing-instances R10 protocols rip group R11]
root@VR-Device-2# set export rip_export 

[edit routing-instances R10 protocols rip group R11]
root@VR-Device-2# commit and-quit 

Проверим таблицу маршрутизации R11:

root@VR-Device-1> show route table R11.inet.0

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

0.0.0.0/0          *[Static/5] 00:35:35
                      Reject
20.20.0.0/24       *[Static/5] 00:35:35
                      Reject
20.20.1.0/24       *[Static/5] 00:35:35
                      Reject
20.20.2.0/24       *[Static/5] 00:35:35
                      Reject
172.20.11.0/30     *[Direct/0] 00:38:59
                    > via ge-0/0/3.1011
172.20.11.1/32     *[Local/0] 00:39:00
                      Local via ge-0/0/3.1011
172.20.12.0/30     *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
172.20.14.0/30     *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
172.20.15.0/30     *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
172.20.19.0/30     *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
172.20.23.0/30     *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
172.20.24.0/30     *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
172.20.25.0/30     *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
172.20.36.0/30     *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
172.20.37.0/30     *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
172.20.78.0/30     *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
172.20.89.0/30     *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
172.20.106.0/30    *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
192.168.100.1/32   *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
192.168.100.2/32   *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
192.168.100.3/32   *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
192.168.100.4/32   *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
192.168.100.5/32   *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
192.168.100.6/32   *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
192.168.100.7/32   *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
192.168.100.8/32   *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
192.168.100.9/32   *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
192.168.100.10/32  *[RIP/100] 00:00:34, metric 2, tag 0
                    > to 172.20.11.2 via ge-0/0/3.1011
192.168.100.11/32  *[Direct/0] 00:39:36
                    > via lo0.11
224.0.0.9/32       *[RIP/100] 00:11:54, metric 1
                      MultiRecv

И снова все прекрасно, маршруты прилетели.

  • На R10 маршруты, полученные по RIP, проанонсируйте в OSPF-процесс (кроме маршрута 0.0.0.0/0)
root@VR-Device-2# edit policy-options policy-statement rip-to-ospf 

[edit policy-options policy-statement rip-to-ospf]
root@VR-Device-2# set term deny-default from protocol rip 

[edit policy-options policy-statement rip-to-ospf]
root@VR-Device-2# set term deny-default from route-filter 0.0.0.0/0 exact 

[edit policy-options policy-statement rip-to-ospf]
root@VR-Device-2# set term deny-default then reject                         

[edit policy-options policy-statement rip-to-ospf]
root@VR-Device-2# set term permit-rip from protocol rip 

[edit policy-options policy-statement rip-to-ospf]
root@VR-Device-2# set term permit-rip then accept          

Общий вид политики таков:

[edit policy-options policy-statement rip-to-ospf]
root@VR-Device-2# show 
term deny-default {
    from {
        protocol rip;
        route-filter 0.0.0.0/0 exact;
    }
    then reject;
}
term permit-rip {
    from protocol rip;
    then accept;
}

Поскольку в задании сказано, что экспортировать дефолтный маршрут не нужно, сначала нужно создать условие deny-default которое бы отбрасывало этот маршрут, а уже после этого вторым правилом брать все маршруты, полученные по RIP, и пропускать в OSPF

Применяем политику:

[edit routing-instances R10 protocols ospf]
root@VR-Device-2# set export rip-to-ospf 

[edit routing-instances R10 protocols ospf]
root@VR-Device-2# commit and-quit 

Проверим новые маршруты на R5, дабы убедиться, что импортированные из RIP сети распространились по OSPF:

root@VR-Device-2> show route table R5.inet.0
R5.inet.0: 29 destinations, 29 routes (29 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

20.20.0.0/24       *[OSPF/150] 00:12:47, metric 2, tag 0
                    > to 172.20.25.1 via ge-0/0/6.25
20.20.1.0/24       *[OSPF/150] 00:12:47, metric 2, tag 0
                    > to 172.20.25.1 via ge-0/0/6.25
20.20.2.0/24       *[OSPF/150] 00:12:47, metric 2, tag 0
                    > to 172.20.25.1 via ge-0/0/6.25
172.20.12.0/30     *[OSPF/10] 01:07:48, metric 2
                    > to 172.20.15.1 via ge-0/0/3.15
                      to 172.20.25.1 via ge-0/0/6.25
172.20.14.0/30     *[OSPF/10] 01:07:48, metric 2
                    > to 172.20.15.1 via ge-0/0/3.15
172.20.15.0/30     *[Direct/0] 01:08:28
                    > via ge-0/0/3.15
172.20.15.2/32     *[Local/0] 01:08:29
                      Local via ge-0/0/3.15
172.20.19.0/30     *[OSPF/10] 01:07:48, metric 2
                    > to 172.20.15.1 via ge-0/0/3.15
172.20.23.0/30     *[OSPF/10] 01:07:53, metric 2
                    > to 172.20.25.1 via ge-0/0/6.25
172.20.24.0/30     *[OSPF/10] 01:07:53, metric 2
                    > to 172.20.25.1 via ge-0/0/6.25
172.20.25.0/30     *[Direct/0] 01:08:27
                    > via ge-0/0/6.25
172.20.25.2/32     *[Local/0] 01:08:29
                      Local via ge-0/0/6.25
172.20.36.0/30     *[OSPF/10] 01:07:28, metric 3
                    > to 172.20.25.1 via ge-0/0/6.25
172.20.37.0/30     *[OSPF/10] 01:07:43, metric 3
                    > to 172.20.25.1 via ge-0/0/6.25
172.20.78.0/30     *[OSPF/10] 01:07:43, metric 4
                    > to 172.20.25.1 via ge-0/0/6.25
172.20.89.0/30     *[OSPF/10] 01:07:48, metric 3
                    > to 172.20.15.1 via ge-0/0/3.15
172.20.106.0/30    *[OSPF/10] 01:07:28, metric 4
                    > to 172.20.25.1 via ge-0/0/6.25
192.168.100.1/32   *[OSPF/10] 01:07:48, metric 1
                    > to 172.20.15.1 via ge-0/0/3.15
192.168.100.2/32   *[OSPF/10] 01:07:53, metric 1
                    > to 172.20.25.1 via ge-0/0/6.25
192.168.100.3/32   *[OSPF/10] 01:07:48, metric 2
                    > to 172.20.25.1 via ge-0/0/6.25
192.168.100.4/32   *[OSPF/10] 01:07:48, metric 2
                      to 172.20.15.1 via ge-0/0/3.15
                    > to 172.20.25.1 via ge-0/0/6.25
192.168.100.5/32   *[Direct/0] 01:09:06
                    > via lo0.5
192.168.100.6/32   *[OSPF/10] 01:07:28, metric 3
                    > to 172.20.25.1 via ge-0/0/6.25
192.168.100.7/32   *[OSPF/10] 01:07:43, metric 3
                    > to 172.20.25.1 via ge-0/0/6.25
192.168.100.8/32   *[OSPF/10] 01:07:48, metric 3
                    > to 172.20.15.1 via ge-0/0/3.15
192.168.100.9/32   *[OSPF/10] 01:07:48, metric 2
                    > to 172.20.15.1 via ge-0/0/3.15
192.168.100.10/32  *[OSPF/10] 01:07:28, metric 4
                    > to 172.20.25.1 via ge-0/0/6.25
192.168.100.11/32  *[OSPF/150] 00:04:15, metric 2, tag 0
                    > to 172.20.25.1 via ge-0/0/6.25
224.0.0.5/32       *[OSPF/10] 01:09:08, metric 1
                      MultiRecv

А если R8?

root@VR-Device-2> show route table R8.inet.0
R8.inet.0: 29 destinations, 29 routes (29 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

20.20.0.0/24       *[OSPF/150] 00:13:22, metric 2, tag 0
                    > to 172.20.78.1 via ge-0/0/4.78
20.20.1.0/24       *[OSPF/150] 00:13:22, metric 2, tag 0
                    > to 172.20.78.1 via ge-0/0/4.78
20.20.2.0/24       *[OSPF/150] 00:13:22, metric 2, tag 0
                    > to 172.20.78.1 via ge-0/0/4.78
172.20.12.0/30     *[OSPF/10] 01:08:32, metric 3
                    > to 172.20.89.1 via ge-0/0/3.89
172.20.14.0/30     *[OSPF/10] 01:08:32, metric 3
                    > to 172.20.89.1 via ge-0/0/3.89
172.20.15.0/30     *[OSPF/10] 01:08:32, metric 3
                    > to 172.20.89.1 via ge-0/0/3.89
172.20.19.0/30     *[OSPF/10] 01:08:32, metric 2
                    > to 172.20.89.1 via ge-0/0/3.89
172.20.23.0/30     *[OSPF/10] 01:08:27, metric 3
                    > to 172.20.78.1 via ge-0/0/4.78
172.20.24.0/30     *[OSPF/10] 01:08:22, metric 4
                      to 172.20.89.1 via ge-0/0/3.89
                    > to 172.20.78.1 via ge-0/0/4.78
172.20.25.0/30     *[OSPF/10] 01:08:17, metric 4
                      to 172.20.89.1 via ge-0/0/3.89
                    > to 172.20.78.1 via ge-0/0/4.78
172.20.36.0/30     *[OSPF/10] 01:08:07, metric 3
                    > to 172.20.78.1 via ge-0/0/4.78
172.20.37.0/30     *[OSPF/10] 01:08:32, metric 2
                    > to 172.20.78.1 via ge-0/0/4.78
172.20.78.0/30     *[Direct/0] 01:09:02
                    > via ge-0/0/4.78
172.20.78.2/32     *[Local/0] 01:09:04
                      Local via ge-0/0/4.78
172.20.89.0/30     *[Direct/0] 01:09:03
                    > via ge-0/0/3.89
172.20.89.2/32     *[Local/0] 01:09:04
                      Local via ge-0/0/3.89
172.20.106.0/30    *[OSPF/10] 01:08:07, metric 4
                    > to 172.20.78.1 via ge-0/0/4.78
192.168.100.1/32   *[OSPF/10] 01:08:32, metric 2
                    > to 172.20.89.1 via ge-0/0/3.89
192.168.100.2/32   *[OSPF/10] 01:08:22, metric 3
                    > to 172.20.89.1 via ge-0/0/3.89
                      to 172.20.78.1 via ge-0/0/4.78
192.168.100.3/32   *[OSPF/10] 01:08:27, metric 2
                    > to 172.20.78.1 via ge-0/0/4.78
192.168.100.4/32   *[OSPF/10] 01:08:22, metric 3
                    > to 172.20.89.1 via ge-0/0/3.89
192.168.100.5/32   *[OSPF/10] 01:08:17, metric 3
                    > to 172.20.89.1 via ge-0/0/3.89
192.168.100.6/32   *[OSPF/10] 01:08:07, metric 3
                    > to 172.20.78.1 via ge-0/0/4.78
192.168.100.7/32   *[OSPF/10] 01:08:32, metric 1
                    > to 172.20.78.1 via ge-0/0/4.78
192.168.100.8/32   *[Direct/0] 01:09:41
                    > via lo0.8
192.168.100.9/32   *[OSPF/10] 01:08:32, metric 1
                    > to 172.20.89.1 via ge-0/0/3.89
192.168.100.10/32  *[OSPF/10] 01:08:07, metric 4
                    > to 172.20.78.1 via ge-0/0/4.78
192.168.100.11/32  *[OSPF/150] 00:04:50, metric 2, tag 0
                    > to 172.20.78.1 via ge-0/0/4.78
224.0.0.5/32       *[OSPF/10] 01:09:43, metric 1
                      MultiRecv

Отлично, как Loopback-адрес, так и статические маршруты успешно распространились по OSPF-сети.

  • Настройте область 40 как STUB-area, проследите за изменениями в базе данных OSPF (LSDB) и таблице маршрутизации

Для начала проверим LSDB и таблицу маршрутизации:

root@VR-Device-3> show route protocol ospf table R6.inet.0
R6.inet.0: 29 destinations, 29 routes (29 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

20.20.0.0/24       *[OSPF/150] 00:16:17, metric 2, tag 0
                    > to 172.20.106.2 via ge-0/0/4.106
20.20.1.0/24       *[OSPF/150] 00:16:17, metric 2, tag 0
                    > to 172.20.106.2 via ge-0/0/4.106
20.20.2.0/24       *[OSPF/150] 00:16:17, metric 2, tag 0
                    > to 172.20.106.2 via ge-0/0/4.106
172.20.12.0/30     *[OSPF/10] 01:11:12, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.14.0/30     *[OSPF/10] 01:11:12, metric 4
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.15.0/30     *[OSPF/10] 01:11:12, metric 4
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.19.0/30     *[OSPF/10] 01:11:12, metric 4
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.23.0/30     *[OSPF/10] 01:11:12, metric 2
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.24.0/30     *[OSPF/10] 01:11:12, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.25.0/30     *[OSPF/10] 01:11:12, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.37.0/30     *[OSPF/10] 01:11:12, metric 2
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.78.0/30     *[OSPF/10] 01:11:12, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.89.0/30     *[OSPF/10] 01:11:12, metric 5
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.1/32   *[OSPF/10] 01:11:12, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.2/32   *[OSPF/10] 01:11:12, metric 2
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.3/32   *[OSPF/10] 01:11:12, metric 1
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.4/32   *[OSPF/10] 01:11:12, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.5/32   *[OSPF/10] 01:11:12, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.7/32   *[OSPF/10] 01:11:12, metric 2
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.8/32   *[OSPF/10] 01:11:12, metric 5
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.9/32   *[OSPF/10] 01:11:12, metric 4
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.10/32  *[OSPF/10] 01:11:27, metric 1
                    > to 172.20.106.2 via ge-0/0/4.106
192.168.100.11/32  *[OSPF/150] 00:07:46, metric 2, tag 0
                    > to 172.20.106.2 via ge-0/0/4.106
224.0.0.5/32       *[OSPF/10] 01:12:42, metric 1
                      MultiRecv
root@VR-Device-3> show ospf database instance R6
    OSPF database, Area 0.0.0.40
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router   192.168.100.3    192.168.100.3    0x80000004  1765  0x22 0xdee1  36
Router  *192.168.100.6    192.168.100.6    0x80000007  1305  0x22 0x86e3  60
Router   192.168.100.10   192.168.100.10   0x80000007  1006  0x22 0x87b1  48
Network *172.20.36.2      192.168.100.6    0x80000002  1305  0x22 0x7d5   32
Network  172.20.106.2     192.168.100.10   0x80000003   230  0x22 0x3a50  32
Summary  172.20.12.0      192.168.100.3    0x80000003   861  0x22 0x702e  28
Summary  172.20.14.0      192.168.100.3    0x80000003   736  0x22 0x6437  28
Summary  172.20.15.0      192.168.100.3    0x80000003   616  0x22 0x5941  28
Summary  172.20.19.0      192.168.100.3    0x80000003   497  0x22 0x2d69  28
Summary  172.20.23.0      192.168.100.3    0x80000003  1939  0x22 0xeca7  28
Summary  172.20.24.0      192.168.100.3    0x80000003   377  0x22 0xeba6  28
Summary  172.20.25.0      192.168.100.3    0x80000003   257  0x22 0xe0b0  28
Summary  172.20.37.0      192.168.100.3    0x80000005  1823  0x22 0x4e36  28
Summary  172.20.78.0      192.168.100.3    0x80000003   137  0x22 0x97c4  28
Summary  172.20.89.0      192.168.100.3    0x80000003    17  0x22 0x321d  28
Summary  192.168.100.1    192.168.100.3    0x80000002  2753  0x22 0xb2e7  28
Summary  192.168.100.2    192.168.100.3    0x80000002  2636  0x22 0x9efb  28
Summary  192.168.100.3    192.168.100.3    0x80000003  1174  0x22 0x8811  28
Summary  192.168.100.4    192.168.100.3    0x80000002  2520  0x22 0x9403  28
Summary  192.168.100.5    192.168.100.3    0x80000002  2404  0x22 0x8a0c  28
Summary  192.168.100.7    192.168.100.3    0x80000002  2288  0x22 0x6c29  28
Summary  192.168.100.8    192.168.100.3    0x80000002  2171  0x22 0x8011  28
Summary  192.168.100.9    192.168.100.3    0x80000002  2055  0x22 0x6c25  28
    OSPF AS SCOPE link state database
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Extern   20.20.0.0        192.168.100.10   0x80000001  1006  0x22 0x1898  36
Extern   20.20.1.0        192.168.100.10   0x80000001  1006  0x22 0xda2   36
Extern   20.20.2.0        192.168.100.10   0x80000001  1006  0x22 0x2ac   36
Extern   192.168.100.11   192.168.100.10   0x80000001   494  0x22 0x9d62  36

На R10 LSDB смотреть нет смысла, поскольку она будет полностью идентична R6. Больший интерес представляет R3:

root@VR-Device-3> show route protocol ospf table R3.inet.0
R3.inet.0: 30 destinations, 30 routes (30 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

20.20.0.0/24       *[OSPF/150] 00:20:11, metric 2, tag 0
                    > to 172.20.36.2 via ge-0/0/5.36
20.20.1.0/24       *[OSPF/150] 00:20:11, metric 2, tag 0
                    > to 172.20.36.2 via ge-0/0/5.36
20.20.2.0/24       *[OSPF/150] 00:20:11, metric 2, tag 0
                    > to 172.20.36.2 via ge-0/0/5.36
172.20.12.0/30     *[OSPF/10] 01:15:16, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.14.0/30     *[OSPF/10] 01:15:16, metric 3
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.15.0/30     *[OSPF/10] 01:15:16, metric 3
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.19.0/30     *[OSPF/10] 01:15:16, metric 3
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.24.0/30     *[OSPF/10] 01:15:16, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.25.0/30     *[OSPF/10] 01:15:16, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.78.0/30     *[OSPF/10] 01:15:16, metric 2
                    > to 172.20.37.2 via ge-0/0/5.37
172.20.89.0/30     *[OSPF/10] 01:15:16, metric 4
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.106.0/30    *[OSPF/10] 01:15:06, metric 2
                    > to 172.20.36.2 via ge-0/0/5.36
192.168.100.1/32   *[OSPF/10] 01:15:16, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.2/32   *[OSPF/10] 01:15:16, metric 1
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.4/32   *[OSPF/10] 01:15:16, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.5/32   *[OSPF/10] 01:15:16, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.6/32   *[OSPF/10] 01:15:06, metric 1
                    > to 172.20.36.2 via ge-0/0/5.36
192.168.100.7/32   *[OSPF/10] 01:15:16, metric 1
                    > to 172.20.37.2 via ge-0/0/5.37
192.168.100.8/32   *[OSPF/10] 01:15:16, metric 4
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.9/32   *[OSPF/10] 01:15:16, metric 3
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.10/32  *[OSPF/10] 01:15:06, metric 2
                    > to 172.20.36.2 via ge-0/0/5.36
192.168.100.11/32  *[OSPF/150] 00:11:40, metric 2, tag 0
                    > to 172.20.36.2 via ge-0/0/5.36
224.0.0.5/32       *[OSPF/10] 01:16:36, metric 1
                      MultiRecv
root@VR-Device-3> show ospf database instance R3

    OSPF database, Area 0.0.0.0
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router   192.168.100.1    192.168.100.1    0x80000007  1199  0x22 0x24ee  48
Router   192.168.100.2    192.168.100.2    0x80000007  1549  0x22 0xc487  60
Router  *192.168.100.3    192.168.100.3    0x80000007  1284  0x22 0x19de  48
Network  172.20.12.2      192.168.100.2    0x80000003  1275  0x22 0xe11c  32
Network *172.20.23.1      192.168.100.3    0x80000003  1221  0x22 0x846c  32
Summary  172.20.14.0      192.168.100.1    0x80000005   274  0x22 0x5845  28
Summary  172.20.14.0      192.168.100.2    0x80000004   570  0x22 0x5e3e  28
Summary  172.20.15.0      192.168.100.1    0x80000004  2696  0x22 0x4f4e  28
Summary  172.20.15.0      192.168.100.2    0x80000004   225  0x22 0x5348  28
Summary  172.20.19.0      192.168.100.1    0x80000005  1008  0x22 0x2177  28
Summary  172.20.24.0      192.168.100.1    0x80000003   885  0x22 0xf79c  28
Summary  172.20.24.0      192.168.100.2    0x80000005   686  0x22 0xe3ae  28
Summary  172.20.25.0      192.168.100.1    0x80000004   151  0x22 0xeaa7  28
Summary  172.20.25.0      192.168.100.2    0x80000005   340  0x22 0xd8b8  28
Summary *172.20.36.0      192.168.100.3    0x80000005  1593  0x22 0x592c  28
Summary *172.20.37.0      192.168.100.3    0x80000005  2116  0x22 0x4e36  28
Summary *172.20.78.0      192.168.100.3    0x80000003   432  0x22 0x97c4  28
Summary  172.20.89.0      192.168.100.1    0x80000003   763  0x22 0x2a29  28
Summary *172.20.106.0     192.168.100.3    0x80000002  1941  0x22 0x64dc  28
Summary  192.168.100.4    192.168.100.1    0x80000003   641  0x22 0x9405  28
Summary  192.168.100.4    192.168.100.2    0x80000003   801  0x22 0x8e0a  28
Summary  192.168.100.5    192.168.100.1    0x80000003    29  0x22 0x8a0e  28
Summary  192.168.100.5    192.168.100.2    0x80000003   455  0x22 0x8413  28
Summary *192.168.100.6    192.168.100.3    0x80000002  1825  0x22 0x7620  28
Summary *192.168.100.7    192.168.100.3    0x80000002  2581  0x22 0x6c29  28
Summary  192.168.100.8    192.168.100.1    0x80000003   518  0x22 0x761e  28
Summary  192.168.100.9    192.168.100.1    0x80000003   396  0x22 0x6232  28
Summary *192.168.100.10   192.168.100.3    0x80000002  1709  0x22 0x5839  28
ASBRSum *192.168.100.10   192.168.100.3    0x80000001  1240  0x22 0x4c45  28

    OSPF database, Area 0.0.0.20
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router  *192.168.100.3    192.168.100.3    0x80000005  1347  0x22 0xf2ca  36
Router   192.168.100.7    192.168.100.7    0x80000007  1551  0x22 0x5c41  60
Router   192.168.100.8    192.168.100.8    0x80000004  1557  0x22 0x3c25  36
Network  172.20.37.2      192.168.100.7    0x80000002  1551  0x22 0xffd9  32
Network  172.20.78.2      192.168.100.8    0x80000003   617  0x22 0x7534  32
Summary *172.20.12.0      192.168.100.3    0x80000003  1159  0x22 0x702e  28
Summary *172.20.14.0      192.168.100.3    0x80000003  1034  0x22 0x6437  28
Summary *172.20.15.0      192.168.100.3    0x80000003   911  0x22 0x5941  28
Summary *172.20.19.0      192.168.100.3    0x80000003   792  0x22 0x2d69  28
Summary  172.20.19.0      192.168.100.8    0x80000003   321  0x22 0x58d   28
Summary *172.20.23.0      192.168.100.3    0x80000003  2232  0x22 0xeca7  28
Summary *172.20.24.0      192.168.100.3    0x80000003   672  0x22 0xeba6  28
Summary *172.20.25.0      192.168.100.3    0x80000003   552  0x22 0xe0b0  28
Summary *172.20.36.0      192.168.100.3    0x80000005  1535  0x22 0x592c  28
Summary *172.20.89.0      192.168.100.3    0x80000003   312  0x22 0x321d  28
Summary  172.20.89.0      192.168.100.8    0x80000004   912  0x22 0xf358  28
Summary *172.20.106.0     192.168.100.3    0x80000002  1883  0x22 0x64dc  28
Summary *192.168.100.1    192.168.100.3    0x80000003   192  0x22 0xb0e8  28
Summary *192.168.100.2    192.168.100.3    0x80000003    72  0x22 0x9cfc  28
Summary *192.168.100.3    192.168.100.3    0x80000003  1472  0x22 0x8811  28
Summary *192.168.100.4    192.168.100.3    0x80000002  2813  0x22 0x9403  28
Summary *192.168.100.5    192.168.100.3    0x80000002  2697  0x22 0x8a0c  28
Summary *192.168.100.6    192.168.100.3    0x80000002  1767  0x22 0x7620  28
Summary *192.168.100.8    192.168.100.3    0x80000002  2465  0x22 0x8011  28
Summary  192.168.100.8    192.168.100.8    0x80000003  1208  0x22 0x3857  28
Summary *192.168.100.9    192.168.100.3    0x80000002  2348  0x22 0x6c25  28
Summary  192.168.100.9    192.168.100.8    0x80000002  2404  0x22 0x3a54  28
Summary *192.168.100.10   192.168.100.3    0x80000002  1651  0x22 0x5839  28
ASBRSum *192.168.100.10   192.168.100.3    0x80000001  1240  0x22 0x4c45  28

    OSPF database, Area 0.0.0.40
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router  *192.168.100.3    192.168.100.3    0x80000004  2000  0x22 0xdee1  36
Router   192.168.100.6    192.168.100.6    0x80000007  1542  0x22 0x86e3  60
Router   192.168.100.10   192.168.100.10   0x80000007  1243  0x22 0x87b1  48
Network  172.20.36.2      192.168.100.6    0x80000002  1542  0x22 0x7d5   32
Network  172.20.106.2     192.168.100.10   0x80000003   467  0x22 0x3a50  32
Summary *172.20.12.0      192.168.100.3    0x80000003  1096  0x22 0x702e  28
Summary *172.20.14.0      192.168.100.3    0x80000003   971  0x22 0x6437  28
Summary *172.20.15.0      192.168.100.3    0x80000003   851  0x22 0x5941  28
Summary *172.20.19.0      192.168.100.3    0x80000003   732  0x22 0x2d69  28
Summary *172.20.23.0      192.168.100.3    0x80000003  2174  0x22 0xeca7  28
Summary *172.20.24.0      192.168.100.3    0x80000003   612  0x22 0xeba6  28
Summary *172.20.25.0      192.168.100.3    0x80000003   492  0x22 0xe0b0  28
Summary *172.20.37.0      192.168.100.3    0x80000005  2058  0x22 0x4e36  28
Summary *172.20.78.0      192.168.100.3    0x80000003   372  0x22 0x97c4  28
Summary *172.20.89.0      192.168.100.3    0x80000003   252  0x22 0x321d  28
Summary *192.168.100.1    192.168.100.3    0x80000003   132  0x22 0xb0e8  28
Summary *192.168.100.2    192.168.100.3    0x80000003    12  0x22 0x9cfc  28
Summary *192.168.100.3    192.168.100.3    0x80000003  1409  0x22 0x8811  28
Summary *192.168.100.4    192.168.100.3    0x80000002  2755  0x22 0x9403  28
Summary *192.168.100.5    192.168.100.3    0x80000002  2639  0x22 0x8a0c  28
Summary *192.168.100.7    192.168.100.3    0x80000002  2523  0x22 0x6c29  28
Summary *192.168.100.8    192.168.100.3    0x80000002  2406  0x22 0x8011  28
Summary *192.168.100.9    192.168.100.3    0x80000002  2290  0x22 0x6c25  28
    OSPF AS SCOPE link state database
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Extern   20.20.0.0        192.168.100.10   0x80000001  1243  0x22 0x1898  36
Extern   20.20.1.0        192.168.100.10   0x80000001  1243  0x22 0xda2   36
Extern   20.20.2.0        192.168.100.10   0x80000001  1243  0x22 0x2ac   36
Extern   192.168.100.11   192.168.100.10   0x80000001   731  0x22 0x9d62  36

Поскольку R3 принадлежит нулевой области, он хранит в себе базы данных состояния каналов со всех областей. R6 же хранит в себе только информацию о своей области, а также информацию об экспортированных из других протоколов маршрутизации, поскольку R6 является ASBR.

Настроим область 40 как STUB:

R3:

[edit]
root@VR-Device-3# edit routing-instances R3 protocols ospf area 40 

[edit routing-instances R3 protocols ospf area 0.0.0.40]
root@VR-Device-3# set stub 

R6:

[edit]
root@VR-Device-3# edit routing-instances R6 protocols ospf area 40 

[edit routing-instances R6 protocols ospf area 0.0.0.40]
root@VR-Device-3# set stub 

R10:

[edit]
root@VR-Device-2# edit routing-instances R10 protocols ospf area 40 

[edit routing-instances R10 protocols ospf area 0.0.0.40]
root@VR-Device-2# set stub 

Убедимся в установлении соседства:


root@VR-Device-3> show ospf neighbor instance R6    
Address          Interface              State     ID               Pri  Dead
172.20.106.2     ge-0/0/4.106           Full      192.168.100.10   128    18
172.20.36.1      ge-0/0/6.36            Full      192.168.100.3    128    18

Теперь проверим таблицу маршрутизации и LSDB R6:

root@VR-Device-3> show route protocol ospf table R6.inet.0
R6.inet.0: 25 destinations, 25 routes (25 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.20.12.0/30     *[OSPF/10] 00:00:32, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.14.0/30     *[OSPF/10] 00:00:32, metric 4
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.15.0/30     *[OSPF/10] 00:00:32, metric 4
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.19.0/30     *[OSPF/10] 00:00:32, metric 4
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.23.0/30     *[OSPF/10] 00:00:47, metric 2
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.24.0/30     *[OSPF/10] 00:00:32, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.25.0/30     *[OSPF/10] 00:00:32, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.37.0/30     *[OSPF/10] 00:00:47, metric 2
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.78.0/30     *[OSPF/10] 00:00:38, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.89.0/30     *[OSPF/10] 00:00:32, metric 5
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.1/32   *[OSPF/10] 00:00:32, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.2/32   *[OSPF/10] 00:00:32, metric 2
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.3/32   *[OSPF/10] 00:00:47, metric 1
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.4/32   *[OSPF/10] 00:00:32, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.5/32   *[OSPF/10] 00:00:32, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.7/32   *[OSPF/10] 00:00:38, metric 2
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.8/32   *[OSPF/10] 00:00:32, metric 5
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.9/32   *[OSPF/10] 00:00:32, metric 4
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.10/32  *[OSPF/10] 00:00:48, metric 1
                    > to 172.20.106.2 via ge-0/0/4.106
224.0.0.5/32       *[OSPF/10] 01:30:02, metric 1
                      MultiRecv
root@VR-Device-3> show ospf database instance R6
 OSPF database, Area 0.0.0.40
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router   192.168.100.3    192.168.100.3    0x80000009    64  0x20 0xf2ca  36
Router  *192.168.100.6    192.168.100.6    0x8000000e    63  0x20 0x96ce  60
Router   192.168.100.10   192.168.100.10   0x8000000b    65  0x20 0x97a1  48
Network *172.20.36.2      192.168.100.6    0x80000005    63  0x20 0x1fbc  32
Network  172.20.106.2     192.168.100.10   0x80000008    65  0x20 0x4e39  32
Summary  172.20.12.0      192.168.100.3    0x80000001    49  0x20 0x9210  28
Summary  172.20.14.0      192.168.100.3    0x80000001    49  0x20 0x8619  28
Summary  172.20.15.0      192.168.100.3    0x80000001    49  0x20 0x7b23  28
Summary  172.20.19.0      192.168.100.3    0x80000001    49  0x20 0x4f4b  28
Summary  172.20.23.0      192.168.100.3    0x80000007    49  0x20 0x38f   28
Summary  172.20.24.0      192.168.100.3    0x80000001    49  0x20 0xe88   28
Summary  172.20.25.0      192.168.100.3    0x80000001    49  0x20 0x392   28
Summary  172.20.37.0      192.168.100.3    0x80000005    55  0x20 0x6c1a  28
Summary  172.20.78.0      192.168.100.3    0x80000001    55  0x20 0xb9a6  28
Summary  172.20.89.0      192.168.100.3    0x80000001    49  0x20 0x54fe  28
Summary  192.168.100.1    192.168.100.3    0x80000001    49  0x20 0xd2ca  28
Summary  192.168.100.2    192.168.100.3    0x80000001    49  0x20 0xbede  28
Summary  192.168.100.3    192.168.100.3    0x80000003    69  0x20 0xa6f4  28
Summary  192.168.100.4    192.168.100.3    0x80000001    49  0x20 0xb4e5  28
Summary  192.168.100.5    192.168.100.3    0x80000001    49  0x20 0xaaee  28
Summary  192.168.100.7    192.168.100.3    0x80000001    55  0x20 0x8c0c  28
Summary  192.168.100.8    192.168.100.3    0x80000001    49  0x20 0xa0f3  28
Summary  192.168.100.9    192.168.100.3    0x80000001    49  0x20 0x8c08  28

R3:

root@VR-Device-3> show route protocol ospf table R3.inet.0
R3.inet.0: 26 destinations, 26 routes (26 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.20.12.0/30     *[OSPF/10] 00:01:04, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.14.0/30     *[OSPF/10] 00:01:04, metric 3
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.15.0/30     *[OSPF/10] 00:01:04, metric 3
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.19.0/30     *[OSPF/10] 00:01:04, metric 3
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.24.0/30     *[OSPF/10] 00:01:04, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.25.0/30     *[OSPF/10] 00:01:04, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.78.0/30     *[OSPF/10] 00:01:10, metric 2
                    > to 172.20.37.2 via ge-0/0/5.37
172.20.89.0/30     *[OSPF/10] 00:01:04, metric 4
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.106.0/30    *[OSPF/10] 00:01:18, metric 2
                    > to 172.20.36.2 via ge-0/0/5.36
192.168.100.1/32   *[OSPF/10] 00:01:04, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.2/32   *[OSPF/10] 00:01:04, metric 1
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.4/32   *[OSPF/10] 00:01:04, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.5/32   *[OSPF/10] 00:01:04, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.6/32   *[OSPF/10] 00:01:18, metric 1
                    > to 172.20.36.2 via ge-0/0/5.36
192.168.100.7/32   *[OSPF/10] 00:01:10, metric 1
                    > to 172.20.37.2 via ge-0/0/5.37
192.168.100.8/32   *[OSPF/10] 00:01:04, metric 4
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.9/32   *[OSPF/10] 00:01:04, metric 3
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.10/32  *[OSPF/10] 00:01:18, metric 2
                    > to 172.20.36.2 via ge-0/0/5.36
224.0.0.5/32       *[OSPF/10] 01:30:34, metric 1
                      MultiRecv
root@VR-Device-3> show ospf database instance R3
    OSPF database, Area 0.0.0.0
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router   192.168.100.1    192.168.100.1    0x80000006    30  0x22 0x1cf8  48
Router   192.168.100.2    192.168.100.2    0x80000005    29  0x22 0xbe90  60
Router  *192.168.100.3    192.168.100.3    0x80000006    32  0x22 0x1bdd  48
Network  172.20.12.1      192.168.100.1    0x80000001    30  0x22 0xf908  32
Network *172.20.23.1      192.168.100.3    0x80000001    37  0x22 0x886a  32
Summary  172.20.14.0      192.168.100.1    0x80000003    15  0x22 0x5c43  28
Summary  172.20.14.0      192.168.100.2    0x80000002    12  0x22 0x623c  28
Summary  172.20.15.0      192.168.100.1    0x80000003    25  0x22 0x514d  28
Summary  172.20.15.0      192.168.100.2    0x80000001    16  0x22 0x5945  28
Summary  172.20.19.0      192.168.100.1    0x80000003    15  0x22 0x2575  28
Summary  172.20.24.0      192.168.100.1    0x80000001    15  0x22 0xfb9a  28
Summary  172.20.24.0      192.168.100.2    0x80000003    22  0x22 0xe7ac  28
Summary  172.20.25.0      192.168.100.1    0x80000002    15  0x22 0xeea5  28
Summary  172.20.25.0      192.168.100.2    0x80000003    17  0x22 0xdcb6  28
Summary *172.20.36.0      192.168.100.3    0x80000004   104  0x22 0x5b2b  28
Summary *172.20.37.0      192.168.100.3    0x80000003   109  0x22 0x5234  28
Summary *172.20.78.0      192.168.100.3    0x80000002    27  0x22 0x99c3  28
Summary  172.20.89.0      192.168.100.1    0x80000001    15  0x22 0x2e27  28
Summary *172.20.106.0     192.168.100.3    0x80000002    27  0x22 0x64dc  28
Summary  192.168.100.4    192.168.100.1    0x80000001    15  0x22 0x9803  28
Summary  192.168.100.4    192.168.100.2    0x80000001    17  0x22 0x9208  28
Summary  192.168.100.5    192.168.100.1    0x80000001    20  0x22 0x8e0c  28
Summary  192.168.100.5    192.168.100.2    0x80000001    16  0x22 0x8811  28
Summary *192.168.100.6    192.168.100.3    0x80000001    99  0x22 0x781f  28
Summary *192.168.100.7    192.168.100.3    0x80000001   104  0x22 0x6e28  28
Summary  192.168.100.8    192.168.100.1    0x80000001    15  0x22 0x7a1c  28
Summary  192.168.100.9    192.168.100.1    0x80000001    15  0x22 0x6630  28
Summary *192.168.100.10   192.168.100.3    0x80000001    27  0x22 0x5a38  28

    OSPF database, Area 0.0.0.20
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router  *192.168.100.3    192.168.100.3    0x80000003   110  0x22 0xf6c8  36
Router   192.168.100.7    192.168.100.7    0x80000008    33  0x22 0x504d  60
Router   192.168.100.8    192.168.100.8    0x80000003    34  0x22 0x342f  36
Network  172.20.37.2      192.168.100.7    0x80000001   116  0x22 0x2d8   32
Network  172.20.78.1      192.168.100.7    0x80000001    38  0x22 0x8d20  32
Summary *172.20.12.0      192.168.100.3    0x80000002    22  0x22 0x722d  28
Summary *172.20.14.0      192.168.100.3    0x80000001    22  0x22 0x6835  28
Summary *172.20.15.0      192.168.100.3    0x80000001    22  0x22 0x5d3f  28
Summary *172.20.19.0      192.168.100.3    0x80000001    22  0x22 0x3167  28
Summary  172.20.19.0      192.168.100.8    0x80000002    12  0x22 0x78c   28
Summary *172.20.23.0      192.168.100.3    0x80000002    32  0x22 0xeea6  28
Summary *172.20.24.0      192.168.100.3    0x80000001    32  0x22 0xefa4  28
Summary *172.20.25.0      192.168.100.3    0x80000001    32  0x22 0xe4ae  28
Summary *172.20.36.0      192.168.100.3    0x80000004   104  0x22 0x5b2b  28
Summary *172.20.89.0      192.168.100.3    0x80000001     6  0x22 0x361b  28
Summary  172.20.89.0      192.168.100.8    0x80000003    18  0x22 0xf557  28
Summary *172.20.106.0     192.168.100.3    0x80000002    27  0x22 0x64dc  28
Summary *192.168.100.1    192.168.100.3    0x80000001    22  0x22 0xb4e6  28
Summary *192.168.100.2    192.168.100.3    0x80000001    32  0x22 0xa0fa  28
Summary *192.168.100.3    192.168.100.3    0x80000001   167  0x22 0x8c0f  28
Summary *192.168.100.4    192.168.100.3    0x80000001    11  0x22 0x9602  28
Summary *192.168.100.5    192.168.100.3    0x80000001    11  0x22 0x8c0b  28
Summary *192.168.100.6    192.168.100.3    0x80000001    99  0x22 0x781f  28
Summary *192.168.100.8    192.168.100.3    0x80000001     6  0x22 0x8210  28
Summary  192.168.100.8    192.168.100.8    0x80000001    79  0x22 0x3c55  28
Summary *192.168.100.9    192.168.100.3    0x80000001     6  0x22 0x6e24  28
Summary  192.168.100.9    192.168.100.8    0x80000001    18  0x22 0x3c53  28
Summary *192.168.100.10   192.168.100.3    0x80000001    27  0x22 0x5a38  28

    OSPF database, Area 0.0.0.40
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router  *192.168.100.3    192.168.100.3    0x80000003   110  0x20 0xfec4  36
Router   192.168.100.6    192.168.100.6    0x80000009    33  0x20 0x96d4  60
Router   192.168.100.10   192.168.100.10   0x80000004    36  0x20 0x9ba5  48
Network  172.20.36.2      192.168.100.6    0x80000001   111  0x20 0x27b8  32
Network  172.20.106.1     192.168.100.6    0x80000001    38  0x20 0x8e05  32
Summary *172.20.12.0      192.168.100.3    0x80000002    22  0x20 0x9011  28
Summary *172.20.14.0      192.168.100.3    0x80000001    22  0x20 0x8619  28
Summary *172.20.15.0      192.168.100.3    0x80000001    22  0x20 0x7b23  28
Summary *172.20.19.0      192.168.100.3    0x80000001    22  0x20 0x4f4b  28
Summary *172.20.23.0      192.168.100.3    0x80000002    32  0x20 0xd8a   28
Summary *172.20.24.0      192.168.100.3    0x80000001    32  0x20 0xe88   28
Summary *172.20.25.0      192.168.100.3    0x80000001    32  0x20 0x392   28
Summary *172.20.37.0      192.168.100.3    0x80000003   109  0x20 0x7018  28
Summary *172.20.78.0      192.168.100.3    0x80000002    27  0x20 0xb7a7  28
Summary *172.20.89.0      192.168.100.3    0x80000001     6  0x20 0x54fe  28
Summary *192.168.100.1    192.168.100.3    0x80000001    22  0x20 0xd2ca  28
Summary *192.168.100.2    192.168.100.3    0x80000001    32  0x20 0xbede  28
Summary *192.168.100.3    192.168.100.3    0x80000001   167  0x20 0xaaf2  28
Summary *192.168.100.4    192.168.100.3    0x80000001    11  0x20 0xb4e5  28
Summary *192.168.100.5    192.168.100.3    0x80000001    11  0x20 0xaaee  28
Summary *192.168.100.7    192.168.100.3    0x80000001   104  0x20 0x8c0c  28
Summary *192.168.100.8    192.168.100.3    0x80000001     6  0x20 0xa0f3  28
Summary *192.168.100.9    192.168.100.3    0x80000001     6  0x20 0x8c08  28

Поскольку основная цель STUB-area — сократить размер LSDB, в ней не могу распространяться LSA4 и LSA5, следовательно, маршрут из RIP не был экспортирован в OSPF. Это наглядно показывает LSDB и таблица маршрутизации.

  • Настройте area 40 как totally-stub area. В качестве дефолтной метрики выставите значение 80. Что на этот раз произошло с LSDB и routing table?

Totally-stub area настраивается на ABR, при этом запрещается анонсирование LSA3 внутрь тупиковой области:

[edit]
root@VR-Device-3# edit routing-instances R3 protocols ospf area 40 

[edit routing-instances R3 protocols ospf area 0.0.0.40]
root@VR-Device-3# set stub no-summaries 

[edit routing-instances R3 protocols ospf area 0.0.0.40]
root@VR-Device-3# set stub default-metric 80 

[edit routing-instances R3 protocols ospf area 0.0.0.40]
root@VR-Device-3# commit and-quit 
commit complete

Проверим таблицу маршрутизации и LSDB на R6:

root@VR-Device-3> show route protocol ospf table R6.inet.0
R6.inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

0.0.0.0/0          *[OSPF/10] 00:00:51, metric 81
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.10/32  *[OSPF/10] 00:06:13, metric 1
                    > to 172.20.106.2 via ge-0/0/4.106
224.0.0.5/32       *[OSPF/10] 00:08:33, metric 1
                      MultiRecv
root@VR-Device-3> show ospf database instance R6
    OSPF database, Area 0.0.0.40
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router   192.168.100.3    192.168.100.3    0x80000005    81  0x20 0xfac6  36
Router  *192.168.100.6    192.168.100.6    0x8000000b    85  0x20 0x92d6  60
Router   192.168.100.10   192.168.100.10   0x80000004   405  0x20 0x9ba5  48
Network *172.20.36.2      192.168.100.6    0x80000003    85  0x20 0x23ba  32
Network *172.20.106.1     192.168.100.6    0x80000001   407  0x20 0x8e05  32
Summary  0.0.0.0          192.168.100.3    0x80000001    87  0x20 0xed30  28

LSDB сократилась до минимальных размеров, она содержит в себе только маршруты, созданные в area 40, а также дефолтный маршрут, полученный от R3 с измененной метрикой. Аналогично с таблицей маршрутизации. На R3-же все осталось без изменений:

root@VR-Device-3> show route protocol ospf table R3.inet.0
R3.inet.0: 26 destinations, 26 routes (26 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

172.20.12.0/30     *[OSPF/10] 00:08:45, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.14.0/30     *[OSPF/10] 00:08:35, metric 3
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.15.0/30     *[OSPF/10] 00:08:35, metric 3
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.19.0/30     *[OSPF/10] 00:08:35, metric 3
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.24.0/30     *[OSPF/10] 00:08:45, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.25.0/30     *[OSPF/10] 00:08:45, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.78.0/30     *[OSPF/10] 00:09:57, metric 2
                    > to 172.20.37.2 via ge-0/0/5.37
172.20.89.0/30     *[OSPF/10] 00:08:19, metric 4
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.106.0/30    *[OSPF/10] 00:03:23, metric 2
                    > to 172.20.36.2 via ge-0/0/5.36
192.168.100.1/32   *[OSPF/10] 00:08:35, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.2/32   *[OSPF/10] 00:08:45, metric 1
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.4/32   *[OSPF/10] 00:08:24, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.5/32   *[OSPF/10] 00:08:24, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.6/32   *[OSPF/10] 00:03:23, metric 1
                    > to 172.20.36.2 via ge-0/0/5.36
192.168.100.7/32   *[OSPF/10] 00:09:57, metric 1
                    > to 172.20.37.2 via ge-0/0/5.37
192.168.100.8/32   *[OSPF/10] 00:08:19, metric 4
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.9/32   *[OSPF/10] 00:08:19, metric 3
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.10/32  *[OSPF/10] 00:03:23, metric 2
                    > to 172.20.36.2 via ge-0/0/5.36
224.0.0.5/32       *[OSPF/10] 00:11:05, metric 1
                      MultiRecv
root@VR-Device-3> show ospf database instance R3

    OSPF database, Area 0.0.0.0
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router   192.168.100.1    192.168.100.1    0x80000007   127  0x22 0x1af9  48
Router   192.168.100.2    192.168.100.2    0x80000005   540  0x22 0xbe90  60
Router  *192.168.100.3    192.168.100.3    0x80000006   543  0x22 0x1bdd  48
Network  172.20.12.1      192.168.100.1    0x80000002    69  0x22 0xf709  32
Network *172.20.23.1      192.168.100.3    0x80000001   548  0x22 0x886a  32
Summary  172.20.14.0      192.168.100.1    0x80000003   526  0x22 0x5c43  28
Summary  172.20.14.0      192.168.100.2    0x80000002   523  0x22 0x623c  28
Summary  172.20.15.0      192.168.100.1    0x80000003   536  0x22 0x514d  28
Summary  172.20.15.0      192.168.100.2    0x80000001   527  0x22 0x5945  28
Summary  172.20.19.0      192.168.100.1    0x80000003   526  0x22 0x2575  28
Summary  172.20.24.0      192.168.100.1    0x80000001   526  0x22 0xfb9a  28
Summary  172.20.24.0      192.168.100.2    0x80000003   533  0x22 0xe7ac  28
Summary  172.20.25.0      192.168.100.1    0x80000002   526  0x22 0xeea5  28
Summary  172.20.25.0      192.168.100.2    0x80000003   528  0x22 0xdcb6  28
Summary *172.20.36.0      192.168.100.3    0x80000006   221  0x22 0x572d  28
Summary *172.20.37.0      192.168.100.3    0x80000004    85  0x22 0x5035  28
Summary *172.20.78.0      192.168.100.3    0x80000002   538  0x22 0x99c3  28
Summary  172.20.89.0      192.168.100.1    0x80000001   526  0x22 0x2e27  28
Summary *172.20.106.0     192.168.100.3    0x80000003   221  0x22 0x62dd  28
Summary  192.168.100.4    192.168.100.1    0x80000001   526  0x22 0x9803  28
Summary  192.168.100.4    192.168.100.2    0x80000001   528  0x22 0x9208  28
Summary  192.168.100.5    192.168.100.1    0x80000001   531  0x22 0x8e0c  28
Summary  192.168.100.5    192.168.100.2    0x80000001   527  0x22 0x8811  28
Summary *192.168.100.6    192.168.100.3    0x80000002   221  0x22 0x7620  28
Summary *192.168.100.7    192.168.100.3    0x80000001   615  0x22 0x6e28  28
Summary  192.168.100.8    192.168.100.1    0x80000001   526  0x22 0x7a1c  28
Summary  192.168.100.9    192.168.100.1    0x80000001   526  0x22 0x6630  28
Summary *192.168.100.10   192.168.100.3    0x80000002   221  0x22 0x5839  28

    OSPF database, Area 0.0.0.20
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router  *192.168.100.3    192.168.100.3    0x80000003   621  0x22 0xf6c8  36
Router   192.168.100.7    192.168.100.7    0x80000008   544  0x22 0x504d  60
Router   192.168.100.8    192.168.100.8    0x80000003   545  0x22 0x342f  36
Network  172.20.37.2      192.168.100.7    0x80000001   627  0x22 0x2d8   32
Network  172.20.78.1      192.168.100.7    0x80000001   549  0x22 0x8d20  32
Summary *172.20.12.0      192.168.100.3    0x80000002   533  0x22 0x722d  28
Summary *172.20.14.0      192.168.100.3    0x80000001   533  0x22 0x6835  28
Summary *172.20.15.0      192.168.100.3    0x80000001   533  0x22 0x5d3f  28
Summary *172.20.19.0      192.168.100.3    0x80000001   533  0x22 0x3167  28
Summary  172.20.19.0      192.168.100.8    0x80000002   523  0x22 0x78c   28
Summary *172.20.23.0      192.168.100.3    0x80000002   543  0x22 0xeea6  28
Summary *172.20.24.0      192.168.100.3    0x80000001   543  0x22 0xefa4  28
Summary *172.20.25.0      192.168.100.3    0x80000001   543  0x22 0xe4ae  28
Summary *172.20.36.0      192.168.100.3    0x80000006   221  0x22 0x572d  28
Summary *172.20.89.0      192.168.100.3    0x80000001   517  0x22 0x361b  28
Summary  172.20.89.0      192.168.100.8    0x80000003   529  0x22 0xf557  28
Summary *172.20.106.0     192.168.100.3    0x80000003   221  0x22 0x62dd  28
Summary *192.168.100.1    192.168.100.3    0x80000001   533  0x22 0xb4e6  28
Summary *192.168.100.2    192.168.100.3    0x80000001   543  0x22 0xa0fa  28
Summary *192.168.100.3    192.168.100.3    0x80000002   323  0x22 0x8a10  28
Summary *192.168.100.4    192.168.100.3    0x80000001   522  0x22 0x9602  28
Summary *192.168.100.5    192.168.100.3    0x80000001   522  0x22 0x8c0b  28
Summary *192.168.100.6    192.168.100.3    0x80000002   221  0x22 0x7620  28
Summary *192.168.100.8    192.168.100.3    0x80000001   517  0x22 0x8210  28
Summary  192.168.100.8    192.168.100.8    0x80000001   590  0x22 0x3c55  28
Summary *192.168.100.9    192.168.100.3    0x80000001   517  0x22 0x6e24  28
Summary  192.168.100.9    192.168.100.8    0x80000001   529  0x22 0x3c53  28
Summary *192.168.100.10   192.168.100.3    0x80000002   221  0x22 0x5839  28

    OSPF database, Area 0.0.0.40
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router  *192.168.100.3    192.168.100.3    0x80000005   221  0x20 0xfac6  36
Router   192.168.100.6    192.168.100.6    0x8000000b   227  0x20 0x92d6  60
Router   192.168.100.10   192.168.100.10   0x80000004   547  0x20 0x9ba5  48
Network  172.20.36.2      192.168.100.6    0x80000003   227  0x20 0x23ba  32
Network  172.20.106.1     192.168.100.6    0x80000001   549  0x20 0x8e05  32
Summary *0.0.0.0          192.168.100.3    0x80000001   227  0x20 0xed30  28
  • Измените тип area 40 на NSSA, какие изменения в таблице маршрутизации и LSDB произошли?
R3
[edit]
root@VR-Device-3# edit routing-instances R3 protocols ospf area 40 

[edit routing-instances R3 protocols ospf area 0.0.0.40]
root@VR-Device-3# delete stub 

[edit routing-instances R3 protocols ospf area 0.0.0.40]
root@VR-Device-3# set nssa 
R6
[edit]
root@VR-Device-3# edit routing-instances R6 protocols ospf area 40    

[edit routing-instances R6 protocols ospf area 0.0.0.40]
root@VR-Device-3# set nssa        
R10
[edit routing-instances R10 protocols ospf area 0.0.0.40]
root@VR-Device-2# delete stub    

[edit routing-instances R10 protocols ospf area 0.0.0.40]
root@VR-Device-2# set nssa 

Как видно, в R3 и R10 была введена команда, а в R6 — нет. Но при этом stub была заменена на nssa:

root@VR-Device-3> show configuration routing-instances R6 protocols ospf area 40
nssa;
interface lo0.6;
interface ge-0/0/6.36 {
    hello-interval 5;
    dead-interval 20;
    authentication {
        md5 1 key "$9$Ct-sAORhclMLNylJDkP3nylKvWxZUi5QnGD.5" start-time "2020-3-26.00:00:00 +0000"; ## SECRET-DATA
        md5 2 key "$9$zQoAF9p0ORSlM1Rs4ZjPf1RhcyKYgaDHmGDnC" start-time "2020-3-26.07:00:00 +0000"; ## SECRET-DATA
    }
}
interface ge-0/0/4.106 {
    hello-interval 5;
    dead-interval 20;
    authentication {
        md5 1 key "$9$36NXnA0B1hrK8Rh2aUH5TRhSylMgoZqmT4ajq" start-time "2020-3-26.00:00:00 +0000"; ## SECRET-DATA
        md5 2 key "$9$mPz69Cu1EytuNb2aiHtuOBIc-VsoZjgo5F" start-time "2020-3-26.07:00:00 +0000"; ## SECRET-DATA
    }
}

Это происходит автоматически, поскольку область может быть либо stub, либо nssa. Проверим изменения в LSDB и таблице маршрутизации на R3 и R6:

R3:

root@VR-Device-3> show route table R3.inet.0 protocol ospf
R3.inet.0: 30 destinations, 30 routes (30 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

20.20.0.0/24       *[OSPF/150] 00:05:38, metric 2, tag 0
                    > to 172.20.36.2 via ge-0/0/5.36
20.20.1.0/24       *[OSPF/150] 00:05:38, metric 2, tag 0
                    > to 172.20.36.2 via ge-0/0/5.36
20.20.2.0/24       *[OSPF/150] 00:05:38, metric 2, tag 0
                    > to 172.20.36.2 via ge-0/0/5.36
172.20.12.0/30     *[OSPF/10] 00:23:06, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.14.0/30     *[OSPF/10] 00:23:06, metric 3
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.15.0/30     *[OSPF/10] 00:23:06, metric 3
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.19.0/30     *[OSPF/10] 00:23:06, metric 3
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.24.0/30     *[OSPF/10] 00:23:06, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.25.0/30     *[OSPF/10] 00:23:06, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.78.0/30     *[OSPF/10] 00:23:01, metric 2
                    > to 172.20.37.2 via ge-0/0/5.37
172.20.89.0/30     *[OSPF/10] 00:22:50, metric 4
                    > to 172.20.23.2 via ge-0/0/4.23
172.20.106.0/30    *[OSPF/10] 00:06:13, metric 2
                    > to 172.20.36.2 via ge-0/0/5.36
192.168.100.1/32   *[OSPF/10] 00:23:06, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.2/32   *[OSPF/10] 00:23:06, metric 1
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.4/32   *[OSPF/10] 00:22:50, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.5/32   *[OSPF/10] 00:22:50, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.6/32   *[OSPF/10] 00:06:13, metric 1
                    > to 172.20.36.2 via ge-0/0/5.36
192.168.100.7/32   *[OSPF/10] 00:23:01, metric 1
                    > to 172.20.37.2 via ge-0/0/5.37
192.168.100.8/32   *[OSPF/10] 00:22:50, metric 4
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.9/32   *[OSPF/10] 00:22:50, metric 3
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.10/32  *[OSPF/10] 00:05:38, metric 2
                    > to 172.20.36.2 via ge-0/0/5.36
192.168.100.11/32  *[OSPF/150] 00:05:38, metric 2, tag 0
                    > to 172.20.36.2 via ge-0/0/5.36
224.0.0.5/32       *[OSPF/10] 00:24:08, metric 1
                      MultiRecv
root@VR-Device-3> show ospf database instance R3
 OSPF database, Area 0.0.0.0
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router   192.168.100.1    192.168.100.1    0x80000006  1000  0x22 0x26ed  48
Router   192.168.100.2    192.168.100.2    0x80000007   732  0x22 0xc487  60
Router  *192.168.100.3    192.168.100.3    0x80000007   420  0x22 0x1fd6  48
Network  172.20.12.2      192.168.100.2    0x80000002   843  0x22 0xe31b  32
Network *172.20.23.1      192.168.100.3    0x80000002   996  0x22 0x866b  32
Summary  172.20.14.0      192.168.100.1    0x80000003  1399  0x22 0x5c43  28
Summary  172.20.14.0      192.168.100.2    0x80000002  1399  0x22 0x623c  28
Summary  172.20.15.0      192.168.100.1    0x80000003  1405  0x22 0x514d  28
Summary  172.20.15.0      192.168.100.2    0x80000001  1405  0x22 0x5945  28
Summary  172.20.19.0      192.168.100.1    0x80000003  1405  0x22 0x2575  28
Summary  172.20.24.0      192.168.100.1    0x80000001  1399  0x22 0xfb9a  28
Summary  172.20.24.0      192.168.100.2    0x80000003  1405  0x22 0xe7ac  28
Summary  172.20.25.0      192.168.100.1    0x80000002   172  0x22 0xeea5  28
Summary  172.20.25.0      192.168.100.2    0x80000003  1405  0x22 0xdcb6  28
Summary *172.20.36.0      192.168.100.3    0x80000005   400  0x22 0x592c  28
Summary *172.20.37.0      192.168.100.3    0x80000003  1408  0x22 0x5234  28
Summary *172.20.78.0      192.168.100.3    0x80000002  1402  0x22 0x99c3  28
Summary  172.20.89.0      192.168.100.1    0x80000001  1405  0x22 0x2e27  28
Summary *172.20.106.0     192.168.100.3    0x80000002   365  0x22 0x64dc  28
Summary  192.168.100.4    192.168.100.1    0x80000001  1399  0x22 0x9803  28
Summary  192.168.100.4    192.168.100.2    0x80000001  1405  0x22 0x9208  28
Summary  192.168.100.5    192.168.100.1    0x80000001  1405  0x22 0x8e0c  28
Summary  192.168.100.5    192.168.100.2    0x80000001  1405  0x22 0x8811  28
Summary *192.168.100.6    192.168.100.3    0x80000001   400  0x22 0x781f  28
Summary *192.168.100.7    192.168.100.3    0x80000002    44  0x22 0x6c29  28
Summary  192.168.100.8    192.168.100.1    0x80000001  1405  0x22 0x7a1c  28
Summary  192.168.100.9    192.168.100.1    0x80000001  1405  0x22 0x6630  28
Summary *192.168.100.10   192.168.100.3    0x80000001   365  0x22 0x5a38  28

    OSPF database, Area 0.0.0.20
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router  *192.168.100.3    192.168.100.3    0x80000004   420  0x22 0xfac1  36
Router   192.168.100.7    192.168.100.7    0x80000006  1406  0x22 0x5e40  60
Router   192.168.100.8    192.168.100.8    0x80000004   622  0x22 0x3c25  36
Network  172.20.37.2      192.168.100.7    0x80000001  1415  0x22 0x2d8   32
Network  172.20.78.2      192.168.100.8    0x80000002   345  0x22 0x7733  32
Summary *172.20.12.0      192.168.100.3    0x80000002   637  0x22 0x722d  28
Summary *172.20.14.0      192.168.100.3    0x80000002   548  0x22 0x6636  28
Summary *172.20.15.0      192.168.100.3    0x80000002   458  0x22 0x5b40  28
Summary *172.20.19.0      192.168.100.3    0x80000002   368  0x22 0x2f68  28
Summary  172.20.19.0      192.168.100.8    0x80000001  1403  0x22 0x98b   28
Summary *172.20.23.0      192.168.100.3    0x80000004   727  0x22 0xeaa8  28
Summary *172.20.24.0      192.168.100.3    0x80000002   279  0x22 0xeda5  28
Summary *172.20.25.0      192.168.100.3    0x80000002   217  0x22 0xe2af  28
Summary *172.20.36.0      192.168.100.3    0x80000005   400  0x22 0x592c  28
Summary *172.20.89.0      192.168.100.3    0x80000001  1397  0x22 0x361b  28
Summary  172.20.89.0      192.168.100.8    0x80000003  1408  0x22 0xf557  28
Summary *172.20.106.0     192.168.100.3    0x80000002   365  0x22 0x64dc  28
Summary *192.168.100.1    192.168.100.3    0x80000002   160  0x22 0xb2e7  28
Summary *192.168.100.2    192.168.100.3    0x80000002   102  0x22 0x9efb  28
Summary *192.168.100.3    192.168.100.3    0x80000002  1085  0x22 0x8a10  28
Summary *192.168.100.4    192.168.100.3    0x80000001  1397  0x22 0x9602  28
Summary *192.168.100.5    192.168.100.3    0x80000001  1397  0x22 0x8c0b  28
Summary *192.168.100.6    192.168.100.3    0x80000001   400  0x22 0x781f  28
Summary *192.168.100.8    192.168.100.3    0x80000001  1397  0x22 0x8210  28
Summary  192.168.100.8    192.168.100.8    0x80000002   900  0x22 0x3a56  28
Summary *192.168.100.9    192.168.100.3    0x80000001  1397  0x22 0x6e24  28
Summary  192.168.100.9    192.168.100.8    0x80000001  1403  0x22 0x3c53  28
Summary *192.168.100.10   192.168.100.3    0x80000001   365  0x22 0x5a38  28

    OSPF database, Area 0.0.0.40
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router  *192.168.100.3    192.168.100.3    0x80000003   400  0x20 0x5bc   36
Router   192.168.100.6    192.168.100.6    0x80000006   366  0x20 0x9cd1  60
Router   192.168.100.10   192.168.100.10   0x80000004   327  0x20 0xa19d  48
Network  172.20.36.2      192.168.100.6    0x80000001   401  0x20 0x27b8  32
Network  172.20.106.1     192.168.100.6    0x80000001   366  0x20 0x8e05  32
Summary *172.20.12.0      192.168.100.3    0x80000001   420  0x20 0x9210  28
Summary *172.20.14.0      192.168.100.3    0x80000001   420  0x20 0x8619  28
Summary *172.20.15.0      192.168.100.3    0x80000001   420  0x20 0x7b23  28
Summary *172.20.19.0      192.168.100.3    0x80000001   420  0x20 0x4f4b  28
Summary *172.20.23.0      192.168.100.3    0x80000001   420  0x20 0xf89   28
Summary *172.20.24.0      192.168.100.3    0x80000001   420  0x20 0xe88   28
Summary *172.20.25.0      192.168.100.3    0x80000001   420  0x20 0x392   28
Summary *172.20.37.0      192.168.100.3    0x80000001   420  0x20 0x7416  28
Summary *172.20.78.0      192.168.100.3    0x80000001   420  0x20 0xb9a6  28
Summary *172.20.89.0      192.168.100.3    0x80000001   420  0x20 0x54fe  28
Summary *192.168.100.1    192.168.100.3    0x80000001   420  0x20 0xd2ca  28
Summary *192.168.100.2    192.168.100.3    0x80000001   420  0x20 0xbede  28
Summary *192.168.100.3    192.168.100.3    0x80000001   420  0x20 0xaaf2  28
Summary *192.168.100.4    192.168.100.3    0x80000001   420  0x20 0xb4e5  28
Summary *192.168.100.5    192.168.100.3    0x80000001   420  0x20 0xaaee  28
Summary *192.168.100.7    192.168.100.3    0x80000001   420  0x20 0x8c0c  28
Summary *192.168.100.8    192.168.100.3    0x80000001   420  0x20 0xa0f3  28
Summary *192.168.100.9    192.168.100.3    0x80000001   420  0x20 0x8c08  28
NSSA     20.20.0.0        192.168.100.10   0x80000001   367  0x28 0x7759  36
NSSA     20.20.1.0        192.168.100.10   0x80000001   367  0x28 0x6c63  36
NSSA     20.20.2.0        192.168.100.10   0x80000001   367  0x28 0x616d  36
NSSA     192.168.100.11   192.168.100.10   0x80000001   367  0x28 0xfc23  36
    OSPF AS SCOPE link state database   
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Extern  *20.20.0.0        192.168.100.3    0x80000001   365  0x22 0x18c7  36
Extern  *20.20.1.0        192.168.100.3    0x80000001   365  0x22 0xdd1   36
Extern  *20.20.2.0        192.168.100.3    0x80000001   365  0x22 0x2db   36
Extern  *192.168.100.11   192.168.100.3    0x80000001   365  0x22 0x9d91  36

На R3 видно, что помимо префиксов, принадлежащих area 40, в нулевую область прилетели внешние маршруты, полученные по протоколу RIP. В OSPF они отмечены как External и принимаются с AD (Administrative Distance или preference) = 150 (, в отличии от обычных OSPF-маршрутов, у которых AD = 10.

R6:

root@VR-Device-3> show route protocol ospf table R6.inet.0

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

20.20.0.0/24       *[OSPF/150] 00:08:44, metric 2, tag 0
                    > to 172.20.106.2 via ge-0/0/4.106
20.20.1.0/24       *[OSPF/150] 00:08:44, metric 2, tag 0
                    > to 172.20.106.2 via ge-0/0/4.106
20.20.2.0/24       *[OSPF/150] 00:08:44, metric 2, tag 0
                    > to 172.20.106.2 via ge-0/0/4.106
172.20.12.0/30     *[OSPF/10] 00:09:19, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.14.0/30     *[OSPF/10] 00:09:19, metric 4
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.15.0/30     *[OSPF/10] 00:09:19, metric 4
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.19.0/30     *[OSPF/10] 00:09:19, metric 4
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.23.0/30     *[OSPF/10] 00:09:19, metric 2
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.24.0/30     *[OSPF/10] 00:09:19, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.25.0/30     *[OSPF/10] 00:09:19, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.37.0/30     *[OSPF/10] 00:09:19, metric 2
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.78.0/30     *[OSPF/10] 00:09:19, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
172.20.89.0/30     *[OSPF/10] 00:09:19, metric 5
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.1/32   *[OSPF/10] 00:09:19, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.2/32   *[OSPF/10] 00:09:19, metric 2
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.3/32   *[OSPF/10] 00:09:19, metric 1
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.4/32   *[OSPF/10] 00:09:19, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.5/32   *[OSPF/10] 00:09:19, metric 3
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.7/32   *[OSPF/10] 00:09:19, metric 2
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.8/32   *[OSPF/10] 00:09:19, metric 5
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.9/32   *[OSPF/10] 00:09:19, metric 4
                    > to 172.20.36.1 via ge-0/0/6.36
192.168.100.10/32  *[OSPF/10] 00:08:44, metric 1
                    > to 172.20.106.2 via ge-0/0/4.106
192.168.100.11/32  *[OSPF/150] 00:08:44, metric 2, tag 0
                    > to 172.20.106.2 via ge-0/0/4.106
224.0.0.5/32       *[OSPF/10] 00:27:14, metric 1
                      MultiRecv
root@VR-Device-3> show ospf database instance R6

    OSPF database, Area 0.0.0.40
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router   192.168.100.3    192.168.100.3    0x80000003   585  0x20 0x5bc   36
Router  *192.168.100.6    192.168.100.6    0x80000006   549  0x20 0x9cd1  60
Router   192.168.100.10   192.168.100.10   0x80000004   510  0x20 0xa19d  48
Network *172.20.36.2      192.168.100.6    0x80000001   584  0x20 0x27b8  32
Network *172.20.106.1     192.168.100.6    0x80000001   549  0x20 0x8e05  32
Summary  172.20.12.0      192.168.100.3    0x80000001   605  0x20 0x9210  28
Summary  172.20.14.0      192.168.100.3    0x80000001   605  0x20 0x8619  28
Summary  172.20.15.0      192.168.100.3    0x80000001   605  0x20 0x7b23  28
Summary  172.20.19.0      192.168.100.3    0x80000001   605  0x20 0x4f4b  28
Summary  172.20.23.0      192.168.100.3    0x80000001   605  0x20 0xf89   28
Summary  172.20.24.0      192.168.100.3    0x80000001   605  0x20 0xe88   28
Summary  172.20.25.0      192.168.100.3    0x80000001   605  0x20 0x392   28
Summary  172.20.37.0      192.168.100.3    0x80000001   605  0x20 0x7416  28
Summary  172.20.78.0      192.168.100.3    0x80000001   605  0x20 0xb9a6  28
Summary  172.20.89.0      192.168.100.3    0x80000001   605  0x20 0x54fe  28
Summary  192.168.100.1    192.168.100.3    0x80000001   605  0x20 0xd2ca  28
Summary  192.168.100.2    192.168.100.3    0x80000001   605  0x20 0xbede  28
Summary  192.168.100.3    192.168.100.3    0x80000001   605  0x20 0xaaf2  28
Summary  192.168.100.4    192.168.100.3    0x80000001   605  0x20 0xb4e5  28
Summary  192.168.100.5    192.168.100.3    0x80000001   605  0x20 0xaaee  28
Summary  192.168.100.7    192.168.100.3    0x80000001   605  0x20 0x8c0c  28
Summary  192.168.100.8    192.168.100.3    0x80000001   605  0x20 0xa0f3  28
Summary  192.168.100.9    192.168.100.3    0x80000001   605  0x20 0x8c08  28
NSSA     20.20.0.0        192.168.100.10   0x80000001   550  0x28 0x7759  36
NSSA     20.20.1.0        192.168.100.10   0x80000001   550  0x28 0x6c63  36
NSSA     20.20.2.0        192.168.100.10   0x80000001   550  0x28 0x616d  36
NSSA     192.168.100.11   192.168.100.10   0x80000001   550  0x28 0xfc23  36

В таблице маршрутизации R6 присутствуют все OSPF-сети, плюс внешние маршруты. Состояние LSDB для area 40 соответствует LSDB на R3.

  • Теперь установите area 40 как totally nssa. На узле R10 дефолтный маршрут, полученный по протоколу RIP, используйте в качестве основного маршрута по-умолчанию.

Totally nssa, как и stub nssa настраивается на ABR:

root@VR-Device-3> configure 
Entering configuration mode

[edit]
root@VR-Device-3# edit routing-instances R3 protocols ospf area 40 

[edit routing-instances R3 protocols ospf area 0.0.0.40]
root@VR-Device-3# set nssa no-summaries default-lsa default-metric 80

[edit routing-instances R3 protocols ospf area 0.0.0.40]
root@VR-Device-3# top commit 
commit complete

Значение метрики указываем произвольное, возьмем 80. И в итоге получилась такая конфигурация:

root@VR-Device-3# show routing-instances R3 protocols ospf area 40
nssa {
    default-lsa default-metric 80;
    no-summaries;
}
interface ge-0/0/5.36 {
    hello-interval 5;
    dead-interval 20;
    authentication {
        md5 1 key "$9$y4/rMX7Nb2oGdbT39pREdbsYgJQF60BEz3A0" start-time "2020-3-26.00:00:00 +0000"; ## SECRET-DATA
        md5 2 key "$9$25gZjHkPQ39.PhrvLVb.P5Tz6cye8xdM8oG" start-time "2020-3-26.07:00:00 +0000"; ## SECRET-DATA
    }
}

Проверим таблицу маршрутизации R6:

root@VR-Device-3> show route table R6.inet.0
R6.inet.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

0.0.0.0/0          *[OSPF/10] 00:01:30, metric 81
                    > to 172.20.36.1 via ge-0/0/6.36
20.20.0.0/24       *[OSPF/150] 00:23:40, metric 2, tag 0
                    > to 172.20.106.2 via ge-0/0/4.106
20.20.1.0/24       *[OSPF/150] 00:23:40, metric 2, tag 0
                    > to 172.20.106.2 via ge-0/0/4.106
20.20.2.0/24       *[OSPF/150] 00:23:40, metric 2, tag 0
                    > to 172.20.106.2 via ge-0/0/4.106
172.20.36.0/30     *[Direct/0] 00:41:29
                    > via ge-0/0/6.36
172.20.36.2/32     *[Local/0] 00:41:31
                      Local via ge-0/0/6.36
172.20.106.0/30    *[Direct/0] 00:41:30
                    > via ge-0/0/4.106
172.20.106.1/32    *[Local/0] 00:41:31
                      Local via ge-0/0/4.106
192.168.100.6/32   *[Direct/0] 00:42:07
                    > via lo0.6
192.168.100.10/32  *[OSPF/10] 00:23:40, metric 1
                    > to 172.20.106.2 via ge-0/0/4.106
192.168.100.11/32  *[OSPF/150] 00:23:40, metric 2, tag 0
                    > to 172.20.106.2 via ge-0/0/4.106
224.0.0.5/32       *[OSPF/10] 00:42:10, metric 1
                      MultiRecv

Перейдем к R10:

root@VR-Device-2> show route table R10.inet.0
0.0.0.0/0          *[OSPF/10] 00:13:44, metric 82
                    > to 172.20.106.1 via ge-0/0/4.106
                    [RIP/100] 00:53:31, metric 2, tag 0
                    > to 172.20.11.1 via ge-0/0/3.1011
20.20.0.0/24       *[RIP/100] 00:53:31, metric 2, tag 0
                    > to 172.20.11.1 via ge-0/0/3.1011
20.20.1.0/24       *[RIP/100] 00:53:31, metric 2, tag 0
                    > to 172.20.11.1 via ge-0/0/3.1011
20.20.2.0/24       *[RIP/100] 00:53:31, metric 2, tag 0
                    > to 172.20.11.1 via ge-0/0/3.1011
172.20.11.0/30     *[Direct/0] 00:53:45
                    > via ge-0/0/3.1011
172.20.11.2/32     *[Local/0] 00:53:46
                      Local via ge-0/0/3.1011
172.20.36.0/30     *[OSPF/10] 00:35:54, metric 2
                    > to 172.20.106.1 via ge-0/0/4.106
172.20.106.0/30    *[Direct/0] 00:53:45
                    > via ge-0/0/4.106
172.20.106.2/32    *[Local/0] 00:53:46
                      Local via ge-0/0/4.106
192.168.100.6/32   *[OSPF/10] 00:35:54, metric 1
                    > to 172.20.106.1 via ge-0/0/4.106
192.168.100.10/32  *[Direct/0] 00:54:20
                    > via lo0.10
192.168.100.11/32  *[RIP/100] 00:53:31, metric 2, tag 0
                    > to 172.20.11.1 via ge-0/0/3.1011
224.0.0.5/32       *[OSPF/10] 00:54:24, metric 1
                      MultiRecv
224.0.0.9/32       *[RIP/100] 00:35:54, metric 1
                      MultiRecv

Здесь видно, что у маршрута 0.0.0.0/0 есть 2 источника — RIP и OSPF. Причем приоритетным является OSPF, поскольку его AD = 10. У RIP же AD = 100. Нужно либо увеличить AD OSPF, либо уменьшить AD RIP. Пойдем по второму пути. Установим preference = 9. Для этого напишем политику:


root@VR-Device-2> configure 
Entering configuration mode

[edit]
root@VR-Device-2# edit policy-options policy-statement change-preference 

[edit policy-options policy-statement change-preference]
root@VR-Device-2# set term 1 from route-filter 0.0.0.0/0 exact 

[edit policy-options policy-statement change-preference]
root@VR-Device-2# set term 1 then preference 8 
root@VR-Device-2# show policy-statement change-preference 
term 1 {
    from {
        route-filter 0.0.0.0/0 exact;
    }
    then {
        preference 8;
    }
}

И применим ее к нашему RIP-соседу:


[edit routing-instances R10 protocols rip group R11]
root@VR-Device-2# set import change-preference 

[edit routing-instances R10 protocols rip group R11]
root@VR-Device-2# commit and-quit 
commit complete
Exiting configuration mode

Таблица маршрутизации R10 для дефолтного маршрута:

root@VR-Device-2> show route 0/0 exact table R10.inet.0
R10.inet.0: 14 destinations, 15 routes (14 active, 1 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

0.0.0.0/0          *[RIP/8] 01:12:52, metric 2, tag 0
                    > to 172.20.11.1 via ge-0/0/3.1011
                    [OSPF/10] 00:33:05, metric 82
                    > to 172.20.106.1 via ge-0/0/4.106

Отлично, сейчас приоритетным стал RIP-маршрут и весь трафик по-умолчанию будет ходить через него.

На R6 же правки конфигурации R10 никак не повлияли:


root@VR-Device-3> show route table R6.inet.0 

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

0.0.0.0/0          *[OSPF/10] 00:34:36, metric 81
                    > to 172.20.36.1 via ge-0/0/6.36
20.20.0.0/24       *[OSPF/150] 00:56:46, metric 2, tag 0
                    > to 172.20.106.2 via ge-0/0/4.106
20.20.1.0/24       *[OSPF/150] 00:56:46, metric 2, tag 0
                    > to 172.20.106.2 via ge-0/0/4.106
20.20.2.0/24       *[OSPF/150] 00:56:46, metric 2, tag 0
                    > to 172.20.106.2 via ge-0/0/4.106
172.20.36.0/30     *[Direct/0] 01:14:35
                    > via ge-0/0/6.36
172.20.36.2/32     *[Local/0] 01:14:37
                      Local via ge-0/0/6.36
172.20.106.0/30    *[Direct/0] 01:14:36
                    > via ge-0/0/4.106
172.20.106.1/32    *[Local/0] 01:14:37
                      Local via ge-0/0/4.106
192.168.100.6/32   *[Direct/0] 01:15:13
                    > via lo0.6
192.168.100.10/32  *[OSPF/10] 00:56:46, metric 1
                    > to 172.20.106.2 via ge-0/0/4.106
192.168.100.11/32  *[OSPF/150] 00:56:46, metric 2, tag 0
                    > to 172.20.106.2 via ge-0/0/4.106
224.0.0.5/32       *[OSPF/10] 01:15:16, metric 1
                      MultiRecv

Перейдем к следующей части задания

Настройка суммарных маршрутов:

  • Для сетей 20.20.0.0/24, 20.20.1.0/24 и 20.20.2.0/24, получаемых от R11 по протоколу RIP настройте суммарный маршрут и отдайте его в магистральную область

Данная конфигурация также настраивается на ABR в режиме настройки nssa area 40 (в нашем случае). В общем виде команда выполняется так:

[edit protocols ospf area <AREA-ID> nssa]
root@router#set area-range <AREA-RANGE>

где <AREA-RANGE> — суммарный маршрут. В нашем случае лучше всего подойдет сеть 20.20.0.0/22, которая будет включать в себя сети от 20.20.0.0/24 до 20.20.3.0/24. Пропишем на оборудовании настройки:

[edit]
root@VR-Device-3# edit routing-instances R3 protocols ospf area 40 nssa 

[edit routing-instances R3 protocols ospf area 0.0.0.40 nssa]
root@VR-Device-3# set area-range 20.20.0.0/22  

[edit routing-instances R3 protocols ospf area 0.0.0.40 nssa]
root@VR-Device-3# commit and-quit 
commit complete
Exiting configuration mode

Проверим таблицу маршрутизации R3:

root@VR-Device-3> show route 20.20.0.0/22 table R3.inet.0 

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

20.20.0.0/22       *[OSPF/150] 00:02:27, metric 16777215, tag 0
                      Discard
20.20.0.0/24       *[OSPF/150] 00:55:45, metric 2, tag 0
                    > to 172.20.36.2 via ge-0/0/5.36
20.20.1.0/24       *[OSPF/150] 00:55:45, metric 2, tag 0
                    > to 172.20.36.2 via ge-0/0/5.36
20.20.2.0/24       *[OSPF/150] 00:55:45, metric 2, tag 0

Здесь у нас, помимо суммарного маршрута, присутствуют оригинальные сетки. Это связано с тем, что R3 подключен к area 40, где эти маршруты и были импортированы в OSPF. Также стоить обратить внимание, что preference суммарного маршрута будет равен максимальному preference составных сеток. То есть, если бы у нас одна из сетей имела preference 170, то и суммарный маршрут был бы со значением 170.

Проверим таблицу маршрутизации R1:

root@VR-Device-1> show route 20.20.0.0/22 table R1.inet.0 

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

20.20.0.0/22       *[OSPF/150] 00:04:48, metric 3, tag 0
                    > to 172.20.12.2 via ge-0/0/3.12

Отлично, прилетел всего один суммарный маршрут.

  • Попробуйте вышеуказанное объединение сетей, но уже с опцией RESTRICT. Создайте ситуацию, которая продемонстрировала бы функционал этой опции
[edit]
root@VR-Device-3# edit routing-instances R3 protocols ospf area 40 nssa 

[edit routing-instances R3 protocols ospf area 0.0.0.40 nssa]
root@VR-Device-3# set area-range 20.20.0.0/22 restrict 

[edit routing-instances R3 protocols ospf area 0.0.0.40 nssa]
root@VR-Device-3# commit and-quit 
commit complete
Exiting configuration mode

Если суммарный маршрут создается с опцией RESTRICT, то это означает, что все сети, входящие в общую сеть, перестанут анонсироваться за пределы своей области. Для начала на R3 добавим опцию RESTRICT:

[edit]
root@VR-Device-3# edit routing-instances R3 protocols ospf area 40 

[edit routing-instances R3 protocols ospf area 0.0.0.40]
root@VR-Device-3# set nssa area-range 20.20.0.0/22 restrict 

[edit routing-instances R3 protocols ospf area 0.0.0.40]
root@VR-Device-3# commit 
commit complete

Проверим таблицу маршрутизации R1:

root@VR-Device-1> show route table R1.inet.0 protocol ospf 

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

172.20.23.0/30     *[OSPF/10] 00:10:25, metric 2
                    > to 172.20.12.2 via ge-0/0/3.12
172.20.24.0/30     *[OSPF/10] 00:11:49, metric 2
                    > to 172.20.14.2 via ge-0/0/5.14
172.20.25.0/30     *[OSPF/10] 00:10:31, metric 2
                    > to 172.20.15.2 via ge-0/0/3.15
172.20.36.0/30     *[OSPF/10] 00:06:39, metric 3
                    > to 172.20.12.2 via ge-0/0/3.12
172.20.37.0/30     *[OSPF/10] 00:08:24, metric 3
                    > to 172.20.12.2 via ge-0/0/3.12
172.20.78.0/30     *[OSPF/10] 00:08:05, metric 4
                    > to 172.20.12.2 via ge-0/0/3.12
172.20.89.0/30     *[OSPF/10] 00:11:49, metric 2
                    > to 172.20.19.2 via ge-0/0/5.19
172.20.106.0/30    *[OSPF/10] 00:06:34, metric 4
                    > to 172.20.12.2 via ge-0/0/3.12
192.168.100.2/32   *[OSPF/10] 00:10:25, metric 1
                    > to 172.20.12.2 via ge-0/0/3.12
192.168.100.3/32   *[OSPF/10] 00:08:24, metric 2
                    > to 172.20.12.2 via ge-0/0/3.12
192.168.100.4/32   *[OSPF/10] 00:11:49, metric 1
                    > to 172.20.14.2 via ge-0/0/5.14
192.168.100.5/32   *[OSPF/10] 00:10:31, metric 1
                    > to 172.20.15.2 via ge-0/0/3.15
192.168.100.6/32   *[OSPF/10] 00:06:34, metric 3
                    > to 172.20.12.2 via ge-0/0/3.12
192.168.100.7/32   *[OSPF/10] 00:08:05, metric 3
                    > to 172.20.12.2 via ge-0/0/3.12
192.168.100.8/32   *[OSPF/10] 00:10:25, metric 2
                    > to 172.20.19.2 via ge-0/0/5.19
192.168.100.9/32   *[OSPF/10] 00:11:49, metric 1
                    > to 172.20.19.2 via ge-0/0/5.19
192.168.100.10/32  *[OSPF/10] 00:06:34, metric 4
                    > to 172.20.12.2 via ge-0/0/3.12
192.168.100.11/32  *[OSPF/150] 00:06:34, metric 2, tag 0
                    > to 172.20.12.2 via ge-0/0/3.12
224.0.0.5/32       *[OSPF/10] 00:12:59, metric 1
                      MultiRecv

И действительно, как мелкие маршруты (20.20.0.0/24, 20.20.1.0/24, 20.20.2.0/24), так и общий (20.20.0.0/22) пропали из таблицы маршрутизации. Давайте теперь на R3 в качестве суммарного маршрута возьмем префикс 20.20.0.0/23:

[edit routing-instances R3 protocols ospf area 0.0.0.40]
root@VR-Device-3# delete nssa area-range 20.20.0.0/22 

[edit routing-instances R3 protocols ospf area 0.0.0.40]
root@VR-Device-3# set nssa area-range 20.20.0.0/23 restrict 

[edit routing-instances R3 protocols ospf area 0.0.0.40]
root@VR-Device-3# commit 
commit complete

Теперь, судя по логике, за пределы area 40 должна выйти лишь подсеть 20.20.2.0/24, поскольку в сеть 20.20.0.0/23 входят только 20.20.0.0/24 и 20.20.1.0/24:


root@VR-Device-1> show route table R1.inet.0 protocol ospf 20.20.0.0/16 

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

20.20.2.0/24       *[OSPF/150] 00:01:43, metric 2, tag 0
                    > to 172.20.12.2 via ge-0/0/3.12

И действительно, за пределы area 40 вышла лишь одна сеть, которую мы и ожидали.

Перейдем к следующей части задания

Настройка multi-area

  • Разорвите OSPF-соседство между R1 и R4 и выполните трассировку с R1 до R4. Оптимален ли данный маршрут?
  • Настройте multi-area соседство между R1 и R2 для ospf area 10
  • Повторите процедуру трассировки и убедитесь в корректности настройки

Перед тем как разорвем соседство, выполним просто трассировку от R1 к R4 (между loopback-адресами):


root@VR-Device-1> traceroute 192.168.100.4 source 192.168.100.1 routing-instance R1    
traceroute to 192.168.100.4 (192.168.100.4) from 192.168.100.1, 30 hops max, 40 byte packets
 1  192.168.100.4 (192.168.100.4)  1.347 ms  1.225 ms  1.209 ms

То есть между R1 и R4 есть прямая связность, что и доказала трассировка. Деактивируем OSPF на интерфейсе ge-0/0/5.14 R1:


[edit]
root@VR-Device-1# edit routing-instances R1 protocols ospf area 10    

[edit routing-instances R1 protocols ospf area 0.0.0.10]
root@VR-Device-1# set interface ge-0/0/5.14 disable 

[edit routing-instances R1 protocols ospf area 0.0.0.10]
root@VR-Device-1# commit and-quit 
commit complete
Exiting configuration mode

Проверим состояние соседства:

root@VR-Device-1> show ospf neighbor instance R1 
Address          Interface              State     ID               Pri  Dead
172.20.12.2      ge-0/0/3.12            Full      192.168.100.2    128    11
172.20.15.2      ge-0/0/3.15            Full      192.168.100.5    128    17
172.20.19.2      ge-0/0/5.19            Full      192.168.100.9    128    16

root@VR-Device-1> show ospf neighbor instance R4    
Address          Interface              State     ID               Pri  Dead
172.20.24.2      ge-0/0/3.24            Full      192.168.100.2    128    16

Отлично, связность пропала. Снова выполним трассировку от R1 до R4:

root@VR-Device-1> traceroute 192.168.100.4 source 192.168.100.1 routing-instance R1
traceroute to 192.168.100.4 (192.168.100.4) from 192.168.100.1, 30 hops max, 40 byte packets
1 172.20.15.2 (172.20.15.2) 1.485 ms 1.266 ms 1.375 ms
2 172.20.25.1 (172.20.25.1) 1.712 ms 1.751 ms 1.813 ms
3 192.168.100.4 (192.168.100.4) 2.703 ms 3.095 ms 3.974 ms

Получается, трафик идет по такому маршруту: R1 — R5 — R2 — R4, что не есть самый оптимальный маршрут

Правильнее было бы пустить трафик по маршруту R1 — R2 — R4. Для этого необходимо выполнить замыкание OSPF area 10 между R1 и R2. Делается это следующей командой:

[edit route protocol ospf area <AREA-ID>]
root@router# set interface <INTERFACE-NAME> secondary

где <AREA-ID> — номер OSPF-области, для которой нужно выполнить замыкание,
<INTERFACE-NAME> — интерфейс, через который нужно выполнить замыкание

В нашем случае нужно замкнуть area 10 между интерфейсами ge-0/0/3.12 маршрутизаторов R1 и R2.

Конфигурация для R1:

root@VR-Device-1# edit routing-instances R1 protocols ospf area 10 

[edit routing-instances R1 protocols ospf area 0.0.0.10]
root@VR-Device-1# set interface ge-0/0/3.12 secondary 

[edit routing-instances R1 protocols ospf area 0.0.0.10]
root@VR-Device-1# commit and-quit 
commit complete
Общий вид конфигурации OSPF area 10 на R1

[edit routing-instances R1 protocols ospf area 0.0.0.10]
root@VR-Device-1# show 
interface ge-0/0/3.15 {
    hello-interval 5;
    dead-interval 20;
}
interface ge-0/0/5.14 {
    disable;
    hello-interval 5;
    dead-interval 20;
}
interface ge-0/0/3.12 {
    secondar

Конфигурация R2:


root@VR-Device-2> configure 
Entering configuration mode

[edit]
root@VR-Device-2# edit routing-instances R2 protocols ospf area 10    

[edit routing-instances R2 protocols ospf area 0.0.0.10]
root@VR-Device-2# set interface ge-0/0/3.12 secondary 

[edit routing-instances R2 protocols ospf area 0.0.0.10]
root@VR-Device-2# commit and-quit 
commit complete
Exiting configuration mode
Общий вид конфигурации OSPF area 10 на R2
[edit routing-instances R2 protocols ospf area 0.0.0.10]
root@VR-Device-2# show 
interface ge-0/0/3.24 {
    hello-interval 5;
    dead-interval 20;
}
interface ge-0/0/5.25 {
    hello-interval 5;
    dead-interval 20;
}
interface ge-0/0/3.12 {
    secondary;
}

Проверим OSPF-соседей на R1:

root@VR-Device-1> show ospf neighbor instance R1 
Address          Interface              State     ID               Pri  Dead
172.20.12.2      ge-0/0/3.12            Full      192.168.100.2    128    10
  Area 0.0.0.0
172.20.12.2      ge-0/0/3.12            Full      192.168.100.2    128    34
  Area 0.0.0.10
172.20.15.2      ge-0/0/3.15            Full      192.168.100.5    128    17
  Area 0.0.0.10
172.20.19.2      ge-0/0/5.19            Full      192.168.100.9    128    18
  Area 0.0.0.30

Выше видно, что через интерфейс ge-0/0/3.12 у нас установлено 2 ospf-соседства: для area 0 и area 10. Заглянем чуть глубже в ospf-интерфейс ge-0/0/3.12:

root@VR-Device-1> show ospf interface ge-0/0/3.12 instance R1 detail 
Interface           State   Area            DR ID           BDR ID          Nbrs
ge-0/0/3.12         DR      0.0.0.0         192.168.100.1   192.168.100.2      1
  Type: LAN, Address: 172.20.12.1, Mask: 255.255.255.252, MTU: 1500, Cost: 1
  DR addr: 172.20.12.1, BDR addr: 172.20.12.2, Priority: 128
  Adj count: 1
  Hello: 3, Dead: 12, ReXmit: 5, Not Stub
  Auth type: None
  Protection type: None
  Topology default (ID 0) -> Cost: 1
ge-0/0/3.12         PtToPt  0.0.0.10        0.0.0.0         0.0.0.0            1
  Type: P2P, Address: 172.20.12.1, Mask: 255.255.255.252, MTU: 1500, Cost: 1
  Adj count: 1, Secondary
  Hello: 10, Dead: 40, ReXmit: 5, Not Stub
  Auth type: None
  Protection type: None
  Topology default (ID 0) -> Cost: 1

Более подробный вывод показывает, что для area 10 у нас тип соединения точка-точка (p2p), а также видно, что интерфейс secondary, то есть используется для настройки multi-area.

Глянем аналогичное на R2:

root@VR-Device-2> show ospf neighbor instance R2 
Address          Interface              State     ID               Pri  Dead
172.20.12.1      ge-0/0/3.12            Full      192.168.100.1    128    10
  Area 0.0.0.0
172.20.23.1      ge-0/0/4.23            Full      192.168.100.3    128    10
  Area 0.0.0.0
172.20.12.1      ge-0/0/3.12            Full      192.168.100.1    128    32
  Area 0.0.0.10
172.20.24.1      ge-0/0/3.24            Full      192.168.100.4    128    19
  Area 0.0.0.10
172.20.25.2      ge-0/0/5.25            Full      192.168.100.5    128    19
  Area 0.0.0.10

root@VR-Device-2> show ospf interface ge-0/0/3.12 detail instance R2 
Interface           State   Area            DR ID           BDR ID          Nbrs
ge-0/0/3.12         BDR     0.0.0.0         192.168.100.1   192.168.100.2      1
  Type: LAN, Address: 172.20.12.2, Mask: 255.255.255.252, MTU: 1500, Cost: 1
  DR addr: 172.20.12.1, BDR addr: 172.20.12.2, Priority: 128
  Adj count: 1
  Hello: 3, Dead: 12, ReXmit: 5, Not Stub
  Auth type: None
  Protection type: None
  Topology default (ID 0) -> Cost: 1
ge-0/0/3.12         PtToPt  0.0.0.10        0.0.0.0         0.0.0.0            1
  Type: P2P, Address: 172.20.12.2, Mask: 255.255.255.252, MTU: 1500, Cost: 1
  Adj count: 1, Secondary
  Hello: 10, Dead: 40, ReXmit: 5, Not Stub
  Auth type: None
  Protection type: None
  Topology default (ID 0) -> Cost: 1

Как видно, информация аналогична той, что была на R1. Выполним теперь трассировку от R1 до R4:

root@VR-Device-1> traceroute 192.168.100.4 source 192.168.100.1 routing-instance R1               
traceroute to 192.168.100.4 (192.168.100.4) from 192.168.100.1, 30 hops max, 40 byte packets
 1  172.20.12.2 (172.20.12.2)  1.779 ms  1.319 ms  1.205 ms
 2  192.168.100.4 (192.168.100.4)  2.819 ms  3.035 ms  2.089 ms

Теперь видно, что трафик пошел правильным маршрутом: R1 — R2 — R4.

Настройка virtual-link

  • Разорвите OSPF-соседство между R1 и R9. Доступна ли area 30 из других сетей?
  • Восстановите разорванное соседство и настройте virtual-link для area 20 и area 30
  • Проверьте работоспособность сети в случае обрыва

Отключаем OSPF между R1 и R9, деактивируя интерфейс ge-0/0/5.19 на R1:

[edit]
root@VR-Device-1# edit routing-instances R1 protocols ospf area 30            

[edit routing-instances R1 protocols ospf area 0.0.0.30]
root@VR-Device-1# set interface ge-0/0/5.19 disable 

[edit routing-instances R1 protocols ospf area 0.0.0.30]
root@VR-Device-1# commit 
commit complete

Проверим маршрут до Loopback-адреса R1 на R1, R2 и R3:

root@VR-Device-1> show route 192.168.100.0/24 table R1.inet.0
R1.inet.0: 26 destinations, 26 routes (26 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

192.168.100.1/32   *[Direct/0] 01:25:25
                    > via lo0.1
192.168.100.2/32   *[OSPF/10] 01:23:26, metric 1
                    > to 172.20.12.2 via ge-0/0/3.12
192.168.100.3/32   *[OSPF/10] 01:23:21, metric 2
                    > to 172.20.12.2 via ge-0/0/3.12
192.168.100.4/32   *[OSPF/10] 00:03:47, metric 1
                    > to 172.20.14.2 via ge-0/0/5.14
192.168.100.5/32   *[OSPF/10] 00:23:17, metric 1
                    > to 172.20.15.2 via ge-0/0/3.15
192.168.100.6/32   *[OSPF/10] 01:23:05, metric 3
                    > to 172.20.12.2 via ge-0/0/3.12
192.168.100.7/32   *[OSPF/10] 01:23:11, metric 3
                    > to 172.20.12.2 via ge-0/0/3.12
192.168.100.10/32  *[OSPF/10] 01:23:05, metric 4
                    > to 172.20.12.2 via ge-0/0/3.12
192.168.100.11/32  *[OSPF/150] 01:23:05, metric 2, tag 0
                    > to 172.20.12.2 via ge-0/0/3.12
root@VR-Device-2> show route 192.168.100.0/24 table R2.inet.0
R2.inet.0: 25 destinations, 25 routes (25 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

192.168.100.1/32   *[OSPF/10] 01:23:52, metric 1
                    > to 172.20.12.1 via ge-0/0/3.12
192.168.100.2/32   *[Direct/0] 01:24:49
                    > via lo0.2
192.168.100.3/32   *[OSPF/10] 01:23:52, metric 1
                    > to 172.20.23.1 via ge-0/0/4.23
192.168.100.4/32   *[OSPF/10] 01:23:52, metric 1
                    > to 172.20.24.1 via ge-0/0/3.24
192.168.100.5/32   *[OSPF/10] 01:23:42, metric 1
                    > to 172.20.25.2 via ge-0/0/5.25
192.168.100.6/32   *[OSPF/10] 01:23:31, metric 2
                    > to 172.20.23.1 via ge-0/0/4.23
192.168.100.7/32   *[OSPF/10] 01:23:36, metric 2
                    > to 172.20.23.1 via ge-0/0/4.23
192.168.100.10/32  *[OSPF/10] 01:23:31, metric 3
                    > to 172.20.23.1 via ge-0/0/4.23
192.168.100.11/32  *[OSPF/150] 01:23:31, metric 2, tag 0
                    > to 172.20.23.1 via ge-0/0/4.23
root@VR-Device-3> show route 192.168.100.0/24 table R3.inet.0
R3.inet.0: 26 destinations, 26 routes (26 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

192.168.100.1/32   *[OSPF/10] 01:24:05, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.2/32   *[OSPF/10] 01:24:05, metric 1
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.3/32   *[Direct/0] 01:25:03
                    > via lo0.3
192.168.100.4/32   *[OSPF/10] 01:24:05, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.5/32   *[OSPF/10] 01:23:55, metric 2
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.6/32   *[OSPF/10] 01:23:55, metric 1
                    > to 172.20.36.2 via ge-0/0/5.36
192.168.100.7/32   *[OSPF/10] 01:24:00, metric 1
                    > to 172.20.37.2 via ge-0/0/5.37
192.168.100.10/32  *[OSPF/10] 01:23:55, metric 2
                    > to 172.20.36.2 via ge-0/0/5.36
192.168.100.11/32  *[OSPF/150] 01:23:55, metric 2, tag 0
                    > to 172.20.36.2 via ge-0/0/5.36

Как видно выше, ни на одном из магистральных роутеров маршрут до сети 192.168.100.9/32 не был обнаружен, даже несмотря на то, что R3 находится в ospf area 20, которая соседствует с area 30, хотя в LSDB R3 эта сеть присутствует в area 20:

root@VR-Device-3> show ospf database instance R3
  OSPF database, Area 0.0.0.0
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router   192.168.100.1    192.168.100.1    0x80000008  1319  0x22 0x18fa  48
Router   192.168.100.2    192.168.100.2    0x80000008  1838  0x22 0xb893  60
Router  *192.168.100.3    192.168.100.3    0x80000007  2026  0x22 0x1fd6  48
Network  172.20.12.1      192.168.100.1    0x80000003  1684  0x22 0xf50a  32
Network *172.20.23.1      192.168.100.3    0x80000003  1967  0x22 0x846c  32
Summary  172.20.14.0      192.168.100.1    0x80000004   443  0x22 0x5a44  28
Summary  172.20.14.0      192.168.100.2    0x80000005   442  0x22 0x5c3f  28
Summary  172.20.15.0      192.168.100.1    0x80000003  1612  0x22 0x514d  28
Summary  172.20.15.0      192.168.100.2    0x80000006  1541  0x22 0x4f4a  28
Summary  172.20.24.0      192.168.100.1    0x80000003   443  0x22 0xf79c  28
Summary  172.20.24.0      192.168.100.2    0x80000006  1958  0x22 0xe1af  28
Summary  172.20.25.0      192.168.100.1    0x80000002  1542  0x22 0xeea5  28
Summary  172.20.25.0      192.168.100.2    0x80000007    39  0x22 0xd4ba  28
Summary *172.20.36.0      192.168.100.3    0x80000004  2257  0x22 0x5b2b  28
Summary *172.20.37.0      192.168.100.3    0x80000005   261  0x22 0x4e36  28
Summary *172.20.78.0      192.168.100.3    0x80000003   496  0x22 0x97c4  28
Summary *172.20.106.0     192.168.100.3    0x80000002  2746  0x22 0x64dc  28
Summary  192.168.100.4    192.168.100.1    0x80000003   443  0x22 0x9405  28
Summary  192.168.100.4    192.168.100.2    0x80000003  1358  0x22 0x8e0a  28
Summary  192.168.100.5    192.168.100.1    0x80000001  1612  0x22 0x8e0c  28
Summary  192.168.100.5    192.168.100.2    0x80000004   159  0x22 0x8214  28
Summary *192.168.100.6    192.168.100.3    0x80000002  2529  0x22 0x7620  28
Summary *192.168.100.7    192.168.100.3    0x80000003   379  0x22 0x6a2a  28
Summary *192.168.100.10   192.168.100.3    0x80000002  2420  0x22 0x5839  28

    OSPF database, Area 0.0.0.20
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router  *192.168.100.3    192.168.100.3    0x80000005   555  0x22 0xf8c2  36
Router   192.168.100.7    192.168.100.7    0x80000006  2212  0x22 0x5e40  60
Router   192.168.100.8    192.168.100.8    0x80000005   567  0x22 0x3a26  36
Network  172.20.37.2      192.168.100.7    0x80000002  2216  0x22 0xffd9  32
Network  172.20.78.2      192.168.100.8    0x80000003   295  0x22 0x7534  32
Summary *172.20.12.0      192.168.100.3    0x80000003  1732  0x22 0x702e  28
Summary *172.20.14.0      192.168.100.3    0x80000005   441  0x22 0x6039  28
Summary *172.20.15.0      192.168.100.3    0x80000004  1619  0x22 0x5742  28
Summary  172.20.19.0      192.168.100.8    0x80000004   356  0x22 0x38e   28
Summary *172.20.23.0      192.168.100.3    0x80000004  1849  0x22 0xeaa8  28
Summary *172.20.24.0      192.168.100.3    0x80000003  1496  0x22 0xeba6  28
Summary *172.20.25.0      192.168.100.3    0x80000005    26  0x22 0xdcb2  28
Summary *172.20.36.0      192.168.100.3    0x80000004  2203  0x22 0x5b2b  28
Summary  172.20.89.0      192.168.100.8    0x80000005  1385  0x22 0xf159  28
Summary *172.20.106.0     192.168.100.3    0x80000002  2692  0x22 0x64dc  28
Summary *192.168.100.1    192.168.100.3    0x80000003  1261  0x22 0xb0e8  28
Summary *192.168.100.2    192.168.100.3    0x80000003  1143  0x22 0x9cfc  28
Summary *192.168.100.3    192.168.100.3    0x80000003  2144  0x22 0x8811  28
Summary *192.168.100.4    192.168.100.3    0x80000003  1026  0x22 0x9204  28
Summary *192.168.100.5    192.168.100.3    0x80000003  2638  0x22 0x880d  28
Summary *192.168.100.6    192.168.100.3    0x80000002  2475  0x22 0x7620  28
Summary  192.168.100.8    192.168.100.8    0x80000003  1930  0x22 0x3857  28
Summary  192.168.100.9    192.168.100.8    0x80000003   840  0x22 0x3855  28
Summary *192.168.100.10   192.168.100.3    0x80000002  2366  0x22 0x5839  28

    OSPF database, Area 0.0.0.40
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Router  *192.168.100.3    192.168.100.3    0x80000005   143  0x20 0x1be   36
Router   192.168.100.6    192.168.100.6    0x80000007  2207  0x20 0xa4c7  60
Router   192.168.100.10   192.168.100.10   0x80000006  2676  0x20 0xa794  48
Network  172.20.36.2      192.168.100.6    0x80000002  2207  0x20 0x25b9  32
Network  172.20.106.2     192.168.100.10   0x80000002  2215  0x20 0x5a33  32
Summary *172.20.12.0      192.168.100.3    0x80000003  1673  0x20 0x8e12  28
Summary *172.20.14.0      192.168.100.3    0x80000005   441  0x20 0x7e1d  28
Summary *172.20.15.0      192.168.100.3    0x80000004  1619  0x20 0x7526  28
Summary *172.20.23.0      192.168.100.3    0x80000004  1791  0x20 0x98c   28
Summary *172.20.24.0      192.168.100.3    0x80000003  1438  0x20 0xa8a   28
Summary *172.20.25.0      192.168.100.3    0x80000004  2801  0x20 0xfc95  28
Summary *172.20.37.0      192.168.100.3    0x80000005   202  0x20 0x6c1a  28
Summary *172.20.78.0      192.168.100.3    0x80000003   438  0x20 0xb5a8  28
Summary *192.168.100.1    192.168.100.3    0x80000003  1202  0x20 0xcecc  28
Summary *192.168.100.2    192.168.100.3    0x80000003  1085  0x20 0xbae0  28
Summary *192.168.100.3    192.168.100.3    0x80000003  2085  0x20 0xa6f4  28
Summary *192.168.100.4    192.168.100.3    0x80000003   849  0x20 0xb0e7  28
Summary *192.168.100.5    192.168.100.3    0x80000003  2583  0x20 0xa6f0  28
Summary *192.168.100.7    192.168.100.3    0x80000003   320  0x20 0x880e  28
NSSA    *0.0.0.0          192.168.100.3    0x80000003  1908  0x20 0xc14e  36
NSSA     20.20.0.0        192.168.100.10   0x80000003  1707  0x28 0x735b  36
NSSA     20.20.1.0        192.168.100.10   0x80000003  1209  0x28 0x6865  36
NSSA     20.20.2.0        192.168.100.10   0x80000003   711  0x28 0x5d6f  36
NSSA     192.168.100.11   192.168.100.10   0x80000003   212  0x28 0xf825  36
    OSPF AS SCOPE link state database
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
Extern  *20.20.2.0        192.168.100.3    0x80000003    85  0x22 0xfddd  36
Extern  *192.168.100.11   192.168.100.3    0x80000002  2312  0x22 0x9b92  36

Но вот в таблице маршрутизации R7 данный маршрут присутствует и даже отвечает на icmp-запросы

root@VR-Device-3> show route 192.168.100.0/24 table R7.inet.0 

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

192.168.100.1/32   *[OSPF/10] 01:28:42, metric 3
                    > to 172.20.37.1 via ge-0/0/6.37
192.168.100.2/32   *[OSPF/10] 01:28:42, metric 2
                    > to 172.20.37.1 via ge-0/0/6.37
192.168.100.3/32   *[OSPF/10] 01:28:42, metric 1
                    > to 172.20.37.1 via ge-0/0/6.37
192.168.100.4/32   *[OSPF/10] 01:28:42, metric 3
                    > to 172.20.37.1 via ge-0/0/6.37
192.168.100.5/32   *[OSPF/10] 01:28:37, metric 3
                    > to 172.20.37.1 via ge-0/0/6.37
192.168.100.6/32   *[OSPF/10] 01:28:37, metric 2
                    > to 172.20.37.1 via ge-0/0/6.37
192.168.100.7/32   *[Direct/0] 01:29:49
                    > via lo0.7
192.168.100.8/32   *[OSPF/10] 01:28:48, metric 1
                    > to 172.20.78.2 via ge-0/0/4.78
192.168.100.9/32   *[OSPF/10] 01:28:48, metric 2
                    > to 172.20.78.2 via ge-0/0/4.78
192.168.100.10/32  *[OSPF/10] 01:28:37, metric 3
                    > to 172.20.37.1 via ge-0/0/6.37
192.168.100.11/32  *[OSPF/150] 01:28:37, metric 2, tag 0
                    > to 172.20.37.1 via ge-0/0/6.37

root@VR-Device-3> ping 192.168.100.9 routing-instance R7 
PING 192.168.100.9 (192.168.100.9): 56 data bytes
64 bytes from 192.168.100.9: icmp_seq=0 ttl=63 time=3.156 ms
64 bytes from 192.168.100.9: icmp_seq=1 ttl=63 time=58.835 ms
^C
--- 192.168.100.9 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 3.156/30.995/58.835/27.840 ms

Это связано с тем, что только ABR может импортировать маршруты из одной ospf-области в другую. А для area 30 ABR является R1 и R9. Но для полноценной работы R9 в качестве ABR необходимо соединить R9 с магистральной (нулевой) областью. Делается это при помощи virtual-link. Общий синтаксис таков:

[edit protocols ospf area 0.0.0.0]
root@router# set virtual-link transit-area <TRANSIT-AREA-ID>  
root@router# set virtual-link neighbor-id <NEIGHBOR-ID>  

где <TRANSIT-AREA-ID> — номер области, через которую будет проходить virtual-link
<NEIGHBOR-ID> — IP-адрес роутера ABR, до которого мы будем строить virtual-link

Вернем OSPF-соседство между R1 и R9:

root@VR-Device-1# edit routing-instances R1 protocols ospf area 30 

[edit routing-instances R1 protocols ospf area 0.0.0.30]
root@VR-Device-1# delete interface ge-0/0/5.19 disable 

[edit routing-instances R1 protocols ospf area 0.0.0.30]
root@VR-Device-1# commit and-quit 
commit complete
Exiting configuration mode

root@VR-Device-1> show ospf neighbor instance R1  
Address          Interface              State     ID               Pri  Dead
172.20.12.2      ge-0/0/3.12            Full      192.168.100.2    128    11
  Area 0.0.0.0
172.20.12.2      ge-0/0/3.12            Full      192.168.100.2    128    31
  Area 0.0.0.10
172.20.15.2      ge-0/0/3.15            Full      192.168.100.5    128    19
  Area 0.0.0.10
172.20.14.2      ge-0/0/5.14            Full      192.168.100.4    128    15
  Area 0.0.0.10
172.20.19.2      ge-0/0/5.19            Full      192.168.100.9    128    16
  Area 0.0.0.30

Теперь построим virtual-link между R1 и R8.

Конфигурация на R1:
[edit]
root@VR-Device-1# edit routing-instances R1 protocols ospf area 0    

[edit routing-instances R1 protocols ospf area 0.0.0.0]
root@VR-Device-1# set virtual-link transit-area 30 neighbor-id 192.168.100.8

[edit routing-instances R1 protocols ospf area 0.0.0.0]
root@VR-Device-1# 

[edit routing-instances R1 protocols ospf area 0.0.0.0]
root@VR-Device-1# commit and-quit 
commit complete
Exiting configuration mode
Конфигурация на R8:
[edit]
root@VR-Device-2# edit routing-instances R8 protocols ospf area 0 

[edit routing-instances R8 protocols ospf area 0.0.0.0]
root@VR-Device-2# set virtual-link transit-area 30 neighbor-id 192.168.100.1

[edit routing-instances R8 protocols ospf area 0.0.0.0]
root@VR-Device-2# commit and-quit 
commit complete
Exiting configuration mode

Проверим OSPF-соседства на R8:

root@VR-Device-2> show ospf neighbor instance R8 
Address          Interface              State     ID               Pri  Dead
172.20.78.1      ge-0/0/4.78            Full      192.168.100.7    128    19
172.20.89.1      ge-0/0/3.89            Full      192.168.100.9    128    16
172.20.19.1      vl-192.168.100.1       Full      192.168.100.1      0    31

Как видим, у нас появилось еще одно установившееся соседство с адресом 172.20.19.1 и ID 192.168.100.1. Причем соседство установлено через интерфейс vl-192.168.100.1 (где vl — virtual-link, а IP — адрес соседа, с кем установлена связность). Глянем более детально информацию об этом интерфейсе:

root@VR-Device-2> show ospf interface detail instance R8 vl-192.168.100.1 
Interface           State   Area            DR ID           BDR ID          Nbrs
vl-192.168.100.1    PtToPt  0.0.0.0         0.0.0.0         0.0.0.0            1
  Type: Virtual, Address: 172.20.89.2, Mask: 0.0.0.0, MTU: 0, Cost: 2
  Transit Area: 0.0.0.30, Destination: 172.20.19.1
  Adj count: 1
  Hello: 10, Dead: 40, ReXmit: 5, Not Stub
  Auth type: None
  Protection type: None, No eligible backup
  Topology default (ID 0) -> Cost: 2

Тип интерфейса virtual говорит нам о том, что это virtual-link, и также у нас установлена p2p-связность. Area 0, как раз то, чего мы и добивались.

Проверим OSPF соседей на R1:

root@VR-Device-1> show ospf neighbor instance R1 
Address          Interface              State     ID               Pri  Dead
172.20.12.2      ge-0/0/3.12            Full      192.168.100.2    128    10
  Area 0.0.0.0
172.20.89.2      vl-192.168.100.8       Full      192.168.100.8      0    31
  Area 0.0.0.0
172.20.12.2      ge-0/0/3.12            Full      192.168.100.2    128    38
  Area 0.0.0.10
172.20.15.2      ge-0/0/3.15            Full      192.168.100.5    128    18
  Area 0.0.0.10
172.20.14.2      ge-0/0/5.14            Full      192.168.100.4    128    19
  Area 0.0.0.10
172.20.19.2      ge-0/0/5.19            Full      192.168.100.9    128    18
  Area 0.0.0.30

Абсолютно аналогичные показатели, новое соседство в area 0 через интерфейс vl-192.168.100.8.

Настроим связность между R8 и R3:

Конфигурация R8:
[edit]
root@VR-Device-2# edit routing-instances R8 protocols ospf area 0 

[edit routing-instances R8 protocols ospf area 0.0.0.0]
root@VR-Device-2# set virtual-link neighbor-id 192.168.100.3 transit-area 20

[edit routing-instances R8 protocols ospf area 0.0.0.0]
root@VR-Device-2# commit and-quit 
commit complete
Exiting configuration mode
Конфигурация R3:

[edit]
root@VR-Device-3# edit routing-instances R3 protocols ospf area 0 

[edit routing-instances R3 protocols ospf area 0.0.0.0]
root@VR-Device-3# set virtual-link neighbor-id 192.168.100.8 transit-area 20

[edit routing-instances R3 protocols ospf area 0.0.0.0]
root@VR-Device-3# commit and-quit 
commit complete
Exiting configuration mode

Проверим соседей на R8:

root@VR-Device-2> show ospf neighbor instance R8 
Address          Interface              State     ID               Pri  Dead
172.20.78.1      ge-0/0/4.78            Full      192.168.100.7    128    18
172.20.89.1      ge-0/0/3.89            Full      192.168.100.9    128    18
172.20.19.1      vl-192.168.100.1       Full      192.168.100.1      0    37
172.20.37.1      vl-192.168.100.3       Full      192.168.100.3      0    31

Отлично, новое соседство установилось. Теперь давайте снова разорвем связность между R1 и R9:

[edit]
root@VR-Device-1# set interfaces ge-0/0/5 unit 19 disable 

[edit]
root@VR-Device-1# commit and-quit 
commit complete
Exiting configuration mode

И проверим на R1 наличие маршрута к R9:

root@VR-Device-1> show route 192.168.100.9 table R1.inet.0    

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

192.168.100.9/32   *[OSPF/10] 00:01:35, metric 5
                    > to 172.20.12.2 via ge-0/0/3.12

Маршрут есть и прилетает от R2. Проверим R3:

root@VR-Device-3> show route 192.168.100.9 table R3.inet.0 

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

192.168.100.9/32   *[OSPF/10] 00:02:08, metric 3
                    > to 172.20.37.2 via ge-0/0/5.37

И здесь все прекрасно. Маршрут прилетел от R7. Как видим, резерв работает.

Вернем связность R1-R9 и отключим R3-R7:

root@VR-Device-1> configure 
Entering configuration mode

[edit]
root@VR-Device-1# delete interfaces ge-0/0/5 unit 19 disable 

[edit]
root@VR-Device-1# commit and-quit 
commit complete
Exiting configuration mode

Убедимся, что на R3 маршрут к 192.168.100.7 (R7) прилетает напрямую от R7:

root@VR-Device-3> show route 192.168.100.7 table R3    

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

192.168.100.7/32   *[OSPF/10] 00:00:22, metric 1
                    > to 172.20.37.2 via ge-0/0/5.37

Отлично, так и есть. Отключаем на R3 интерфейс ge-0/0/5.37 (между R3 и R7)

root@VR-Device-3> configure 
Entering configuration mode

[edit]
root@VR-Device-3# set interfaces ge-0/0/5 unit 37 disable 

[edit]
root@VR-Device-3# commit and-quit 
commit complete
Exiting configuration mode

Снова проверим маршрут:


root@VR-Device-3> show route 192.168.100.7 table R3    

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

192.168.100.7/32   *[OSPF/10] 00:00:06, metric 5
                    > to 172.20.23.2 via ge-0/0/4.23

Как и ожидалось, получаем его от R2. Выполним трассировку:

root@VR-Device-3> traceroute 192.168.100.7 source 192.168.100.3 routing-instance R3               
traceroute to 192.168.100.7 (192.168.100.7) from 192.168.100.3, 30 hops max, 40 byte packets
 1  172.20.23.2 (172.20.23.2)  10.857 ms  1.829 ms  1.086 ms
 2  172.20.12.1 (172.20.12.1)  6.584 ms  2.343 ms  1.878 ms
 3  172.20.19.2 (172.20.19.2)  3.111 ms  2.943 ms  3.459 ms
 4  172.20.89.2 (172.20.89.2)  5.045 ms  4.419 ms  5.199 ms
 5  192.168.100.7 (192.168.100.7)  5.096 ms  5.112 ms  4.605 ms

Из результатов видно, что маршрут к R7 такой: R3 — R2 — R1 — R9 — R8 — R7. Чего мы, собственно, и добивались.

Перейдем к заключительной части лабы:

Управление метриками

  • На всех узлах стройте reference-bandwidth на значение 10g
  • В area 10 сделайте так, чтобы трафик от R4 шел через узел R2, а трафик с R5 — через R1
  • Настройте метрики virtual-link таким образом, чтобы трафик через него шел только в случае обрыва основного линка до AREA 0
  • На R2 настройте OSPF с функцией OVERLOAD. Проследите изменения в таблице маршрутизации

Перед настройкой reference-bandwidth глянем таблицы маршрутизации R1 и R2, а конкретно маршруты до loopback-адресов этих роутеров:

root@VR-Device-1> show route 192.168.100.2 table R1.inet.0

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

192.168.100.2/32   *[OSPF/10] 00:44:06, metric 1
                    > to 172.20.12.2 via ge-0/0/3.12
root@VR-Device-2> show route 192.168.100.1 table R2.inet.0
R2.inet.0: 29 destinations, 29 routes (29 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

192.168.100.1/32   *[OSPF/10] 00:44:24, metric 1
                    > to 172.20.12.1 via ge-0/0/3.12

В обоих случаях маршруты имеют параметр metric = 1. Этот параметр как раз и высчитывает на основе reference-bandwidth, который высчитывается по формуле metric (или cost) = reference-bandwidth / interface-bandwidth. По-умолчанию, в ospf reference-bandwitdh равен значению 1G (или 1 000 000 000 b). А поскольку мы используем гигабитные интерфейсы, то на всех портах метрика будет равна единице. В нашем случае это может быть и достаточно, но reference-bandwidth рекомендуется выставлять равному максимальной пропускной способности интерфейса * 10. Мало ли, сеть в дальнейшем будет расширяться, будут собираться LAG, вставляться новые платы с более скоростными портами. Выставим reference-bandwidth = 10G на R1 и R2. Делается это в контексте настройки ospf:

R1
root@VR-Device-1> configure 
Entering configuration mode

[edit]
root@VR-Device-1# edit routing-instances R1 protocols ospf 

[edit routing-instances R1 protocols ospf]
root@VR-Device-1# set reference-bandwidth 10g 

[edit routing-instances R1 protocols ospf]
root@VR-Device-1# commit and-quit 
commit complete
Exiting configuration mode
R2
root@VR-Device-2> configure 
Entering configuration mode

[edit]
root@VR-Device-2# edit routing-instances R2 protocols ospf 

[edit routing-instances R2 protocols ospf]
root@VR-Device-2# set reference-bandwidth 10g 

[edit routing-instances R2 protocols ospf]
root@VR-Device-2# commit and-quit 
commit complete
Exiting configuration mode

Снова проверим маршруты между R1 и R2:

root@VR-Device-1> show route 192.168.100.2 table R1.inet.0

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

192.168.100.2/32   *[OSPF/10] 00:01:11, metric 10
                    > to 172.20.12.2 via ge-0/0/3.12
root@VR-Device-2> show route 192.168.100.1 table R2.inet.0
R2.inet.0: 29 destinations, 29 routes (29 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

192.168.100.1/32   *[OSPF/10] 00:01:14, metric 10
                    > to 172.20.12.1 via ge-0/0/3.12

Теперь значение метрики = 10, поскольку метрика посчиталась по вышеупомянутой формуле (10G / 1G = 10). Выполним аналогичные настройки на всех OSPF-роутерах:

VR-Device-1
root@VR-Device-1> configure 
Entering configuration mode

[edit]
root@VR-Device-1# edit routing-instances R4 protocols ospf 

[edit routing-instances R4 protocols ospf]
root@VR-Device-1# set reference-bandwidth 10g 

[edit routing-instances R4 protocols ospf]
root@VR-Device-1# top 

[edit]
root@VR-Device-1# edit routing-instances R9 protocols ospf    

[edit routing-instances R9 protocols ospf]
root@VR-Device-1# set reference-bandwidth 10g                 

[edit routing-instances R9 protocols ospf]
root@VR-Device-1# commit and-quit 
commit complete
Exiting configuration mode
VR-Device-2

root@VR-Device-2> configure 
Entering configuration mode

[edit]
root@VR-Device-2# edit routing-instances R8 protocols ospf 

[edit routing-instances R8 protocols ospf]
root@VR-Device-2# set reference-bandwidth 10g 

[edit routing-instances R8 protocols ospf]
root@VR-Device-2# top 

[edit]
root@VR-Device-2# edit routing-instances R5 protocols ospf 

[edit routing-instances R5 protocols ospf]
root@VR-Device-2# set reference-bandwidth 10g                 

[edit routing-instances R5 protocols ospf]
root@VR-Device-2# top                                         

[edit]
root@VR-Device-2# edit routing-instances R10 protocols ospf   

[edit routing-instances R10 protocols ospf]
root@VR-Device-2# set reference-bandwidth 10g                  

[edit routing-instances R10 protocols ospf]
root@VR-Device-2# commit and-quit 
commit complete
VR-Device-3
root@VR-Device-3> configure 
Entering configuration mode

[edit]
root@VR-Device-3# edit routing-instances R7 protocols ospf    

[edit routing-instances R7 protocols ospf]
root@VR-Device-3# set reference-bandwidth 10g 

[edit routing-instances R7 protocols ospf]
root@VR-Device-3# top 

[edit]
root@VR-Device-3# edit routing-instances R6 protocols ospf    

[edit routing-instances R6 protocols ospf]
root@VR-Device-3# set reference-bandwidth 10g                 

[edit routing-instances R6 protocols ospf]
root@VR-Device-3# commit and-quit 
commit complete
Exiting configuration mode

Убедимся, что изменения применились:

root@VR-Device-2> show route protocol ospf table R2.inet.0

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

20.20.2.0/24       *[OSPF/150] 00:58:26, metric 2, tag 0
                    > to 172.20.23.1 via ge-0/0/4.23
172.20.14.0/30     *[OSPF/10] 00:03:12, metric 20
                      to 172.20.12.1 via ge-0/0/3.12
                    > to 172.20.24.1 via ge-0/0/3.24
172.20.15.0/30     *[OSPF/10] 00:02:01, metric 20
                      to 172.20.12.1 via ge-0/0/3.12
                    > to 172.20.25.2 via ge-0/0/5.25
172.20.19.0/30     *[OSPF/10] 00:07:20, metric 20
                    > to 172.20.12.1 via ge-0/0/3.12
172.20.36.0/30     *[OSPF/10] 00:07:20, metric 11
                    > to 172.20.23.1 via ge-0/0/4.23
172.20.37.0/30     *[OSPF/10] 00:01:16, metric 50
                    > to 172.20.12.1 via ge-0/0/3.12
172.20.78.0/30     *[OSPF/10] 00:02:01, metric 40
                    > to 172.20.12.1 via ge-0/0/3.12
172.20.89.0/30     *[OSPF/10] 00:03:12, metric 30
                    > to 172.20.12.1 via ge-0/0/3.12
172.20.106.0/30    *[OSPF/10] 00:01:16, metric 21
                    > to 172.20.23.1 via ge-0/0/4.23
192.168.100.1/32   *[OSPF/10] 00:07:20, metric 10
                    > to 172.20.12.1 via ge-0/0/3.12
192.168.100.3/32   *[OSPF/10] 00:07:20, metric 10
                    > to 172.20.23.1 via ge-0/0/4.23
192.168.100.4/32   *[OSPF/10] 00:07:20, metric 10
                    > to 172.20.24.1 via ge-0/0/3.24
192.168.100.5/32   *[OSPF/10] 00:07:20, metric 10
                    > to 172.20.25.2 via ge-0/0/5.25
192.168.100.6/32   *[OSPF/10] 00:07:20, metric 11
                    > to 172.20.23.1 via ge-0/0/4.23
192.168.100.7/32   *[OSPF/10] 00:02:01, metric 40
                    > to 172.20.12.1 via ge-0/0/3.12
192.168.100.8/32   *[OSPF/10] 00:03:12, metric 30
                    > to 172.20.12.1 via ge-0/0/3.12
192.168.100.9/32   *[OSPF/10] 00:07:20, metric 20
                    > to 172.20.12.1 via ge-0/0/3.12
192.168.100.10/32  *[OSPF/10] 00:01:16, metric 21
                    > to 172.20.23.1 via ge-0/0/4.23
192.168.100.11/32  *[OSPF/150] 00:58:26, metric 2, tag 0
                    > to 172.20.23.1 via ge-0/0/4.23
224.0.0.5/32       *[OSPF/10] 00:59:53, metric 1
                      MultiRecv
root@VR-Device-1> show route protocol ospf table R9.inet.0

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

20.20.2.0/24       *[OSPF/150] 00:27:43, metric 2, tag 0
                    > to 172.20.19.1 via ge-0/0/6.19
172.20.12.0/30     *[OSPF/10] 00:04:06, metric 20
                    > to 172.20.19.1 via ge-0/0/6.19
172.20.14.0/30     *[OSPF/10] 00:04:06, metric 20
                    > to 172.20.19.1 via ge-0/0/6.19
172.20.15.0/30     *[OSPF/10] 00:04:06, metric 20
                    > to 172.20.19.1 via ge-0/0/6.19
172.20.23.0/30     *[OSPF/10] 00:04:06, metric 30
                    > to 172.20.19.1 via ge-0/0/6.19
172.20.24.0/30     *[OSPF/10] 00:04:05, metric 30
                    > to 172.20.19.1 via ge-0/0/6.19
172.20.25.0/30     *[OSPF/10] 00:02:54, metric 30
                    > to 172.20.19.1 via ge-0/0/6.19
172.20.36.0/30     *[OSPF/10] 00:04:06, metric 31
                    > to 172.20.19.1 via ge-0/0/6.19
172.20.37.0/30     *[OSPF/10] 00:02:10, metric 30
                    > to 172.20.89.2 via ge-0/0/3.89
172.20.78.0/30     *[OSPF/10] 00:02:55, metric 20
                    > to 172.20.89.2 via ge-0/0/3.89
172.20.106.0/30    *[OSPF/10] 00:02:10, metric 41
                    > to 172.20.19.1 via ge-0/0/6.19
192.168.100.1/32   *[OSPF/10] 00:04:06, metric 10
                    > to 172.20.19.1 via ge-0/0/6.19
192.168.100.2/32   *[OSPF/10] 00:04:06, metric 20
                    > to 172.20.19.1 via ge-0/0/6.19
192.168.100.3/32   *[OSPF/10] 00:04:06, metric 30
                    > to 172.20.19.1 via ge-0/0/6.19
192.168.100.4/32   *[OSPF/10] 00:04:06, metric 20
                    > to 172.20.19.1 via ge-0/0/6.19
192.168.100.5/32   *[OSPF/10] 00:04:06, metric 20
                    > to 172.20.19.1 via ge-0/0/6.19
192.168.100.6/32   *[OSPF/10] 00:04:06, metric 31
                    > to 172.20.19.1 via ge-0/0/6.19
192.168.100.7/32   *[OSPF/10] 00:02:55, metric 20
                    > to 172.20.89.2 via ge-0/0/3.89
192.168.100.8/32   *[OSPF/10] 00:04:06, metric 10
                    > to 172.20.89.2 via ge-0/0/3.89
192.168.100.10/32  *[OSPF/10] 00:02:10, metric 41
                    > to 172.20.19.1 via ge-0/0/6.19
192.168.100.11/32  *[OSPF/150] 00:27:43, metric 2, tag 0
                    > to 172.20.19.1 via ge-0/0/6.19
224.0.0.5/32       *[OSPF/10] 01:00:47, metric 1
                      MultiRecv

Отлично, в таблицах маршрутизации нет метрик меньше 10, что означает корректность конфигурации. Все метрики автоматически были посчитаны и занесены в таблицу маршрутизации.

Помимо автоматического подсчета метрик их можно выставить принудительно на отдельном интерфейсе. Делается это в режиме конфигурации ospf-интерфейса. Перейдем к следующей части задания:

  • В area 10 сделайте так, чтобы трафик от R4 шел через узел R2, а трафик с R5 — через R1

Поскольку у нас теперь дефолтная метрика равна 10, между узлами R1-R4 и R2-R5 метрику нужно сделать еще больше. Фактически, между R1 и R4 стоимость маршрута должна быть больше 20, поскольку альтернативный маршрут от R4 к R1 будет идти по маршруту R4-R2-R1, где суммарная метрика будет равна 20 (сумма метрик между роутерами). Следовательно, чтобы трафик к R1 шел через R2, надо метрику сделать выше 20. Возьмем 30:

Конфигурация R1:
root@VR-Device-1> configure 
Entering configuration mode

[edit]
root@VR-Device-1# edit routing-instances R1 protocols ospf area 10 

[edit routing-instances R1 protocols ospf area 0.0.0.10]
root@VR-Device-1# set interface ge-0/0/5.14 metric 30 

[edit routing-instances R1 protocols ospf area 0.0.0.10]
root@VR-Device-1# commit and-quit 
commit complete
Конфигурация R4:
root@VR-Device-1# edit routing-instances R4 protocols ospf area 10 

[edit routing-instances R4 protocols ospf area 0.0.0.10]
root@VR-Device-1# set interface ge-0/0/6.14 metric 30 

[edit routing-instances R4 protocols ospf area 0.0.0.10]
root@VR-Device-1# commit and-quit 
commit complete
Exiting configuration mode

Маршрут до R1 с R4 теперь выглядит так:

root@VR-Device-1> show route 192.168.100.1 table R4.inet.0 

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

192.168.100.1/32   *[OSPF/10] 00:01:14, metric 20
                    > to 172.20.24.2 via ge-0/0/3.24

И, соответственно, трассировка:

root@VR-Device-1> traceroute 192.168.100.1 routing-instance R4 
traceroute to 192.168.100.1 (192.168.100.1), 30 hops max, 40 byte packets
 1  172.20.24.2 (172.20.24.2)  2.179 ms  1.735 ms  1.109 ms
 2  192.168.100.1 (192.168.100.1)  2.359 ms  3.421 ms  2.640 ms

Выполним аналогичные действия между R2 и R5:

Конфигурация R2
root@VR-Device-2> configure 
Entering configuration mode

[edit]
root@VR-Device-2# edit routing-instances R2 protocols ospf area 10 

[edit routing-instances R2 protocols ospf area 0.0.0.10]
root@VR-Device-2# set interface ge-0/0/5.25 metric 30 

[edit routing-instances R2 protocols ospf area 0.0.0.10]
root@VR-Device-2# commit and-quit 
commit complete
Exiting configuration mode
Конфигурация R5

root@VR-Device-2> configure 
Entering configuration mode

[edit]
root@VR-Device-2# edit routing-instances R5 protocols ospf area 10 

[edit routing-instances R5 protocols ospf area 0.0.0.10]
root@VR-Device-2# set interface ge-0/0/6.25 metric 30 

[edit routing-instances R5 protocols ospf area 0.0.0.10]
root@VR-Device-2# commit and-quit 
commit complete

Проверим трейсы и маршрут с R5:

root@VR-Device-2> show route 192.168.100.2 table R5 

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

192.168.100.2/32   *[OSPF/10] 00:00:29, metric 20
                    > to 172.20.15.1 via ge-0/0/3.15

root@VR-Device-2> traceroute 192.168.100.2 routing-instance R5    
traceroute to 192.168.100.2 (192.168.100.2), 30 hops max, 40 byte packets
 1  172.20.15.1 (172.20.15.1)  1.522 ms  1.257 ms  1.770 ms

Готово. Аналогично можно сконфигурировать метрики через virtual-link. Настроим metric = 50 для созданных нами virtual-link:

R1
[edit]
root@VR-Device-1# edit routing-instances R1 protocols ospf area 30

[edit routing-instances R1 protocols ospf area 0.0.0.30]
root@VR-Device-1# set interface ge-0/0/5.19 metric 50 

[edit routing-instances R1 protocols ospf area 0.0.0.0]
root@VR-Device-1# commit and-quit 
commit complete
Exiting configuration mode
R8
[edit]
root@VR-Device-2# edit routing-instances R8 protocols ospf area 30    

[edit routing-instances R8 protocols ospf area 0.0.0.30]
root@VR-Device-2# set interface ge-0/0/3.89 metric 50 

[edit routing-instances R8 protocols ospf area 0.0.0.30]
root@VR-Device-2# commit and-quit 
commit complete
Exiting configuration mode

Проверим маршрут до R1 с R8:

root@VR-Device-2> show route 192.168.100.1 table R8.inet.0 

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

192.168.100.1/32   *[OSPF/10] 00:02:05, metric 31
                    > to 172.20.78.1 via ge-0/0/4.78

Маршрути прилетел от R7 с метрикой 31.

Теперь настроим на R2 ospf overload:

[edit]
root@VR-Device-2# edit routing-instances R2 protocols ospf 

[edit routing-instances R2 protocols ospf]
root@VR-Device-2# set overload 

[edit routing-instances R2 protocols ospf]
root@VR-Device-2# commit and-quit 
commit complete
Exiting configuration mode

Проверим таблицу маршрутизации R1, R2 и R3:

root@VR-Device-1> show route protocol ospf table R1.inet.0
R1.inet.0: 29 destinations, 29 routes (29 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

20.20.2.0/24       *[OSPF/150] 00:01:14, metric 2, tag 0
                    > to 172.20.19.2 via ge-0/0/5.19
172.20.23.0/30     *[OSPF/10] 00:01:14, metric 81
                    > to 172.20.19.2 via ge-0/0/5.19
172.20.24.0/30     *[OSPF/10] 00:01:14, metric 40
                    > to 172.20.14.2 via ge-0/0/5.14
172.20.25.0/30     *[OSPF/10] 00:01:14, metric 40
                    > to 172.20.15.2 via ge-0/0/3.15
172.20.36.0/30     *[OSPF/10] 00:01:14, metric 81
                    > to 172.20.19.2 via ge-0/0/5.19
172.20.37.0/30     *[OSPF/10] 00:01:14, metric 80
                    > to 172.20.19.2 via ge-0/0/5.19
172.20.78.0/30     *[OSPF/10] 00:01:14, metric 70
                    > to 172.20.19.2 via ge-0/0/5.19
172.20.89.0/30     *[OSPF/10] 00:23:02, metric 60
                    > to 172.20.19.2 via ge-0/0/5.19
172.20.106.0/30    *[OSPF/10] 00:01:14, metric 91
                    > to 172.20.19.2 via ge-0/0/5.19
192.168.100.2/32   *[OSPF/10] 00:50:10, metric 10
                    > to 172.20.12.2 via ge-0/0/3.12
192.168.100.3/32   *[OSPF/10] 00:01:14, metric 80
                    > to 172.20.19.2 via ge-0/0/5.19
192.168.100.4/32   *[OSPF/10] 00:01:14, metric 30
                    > to 172.20.14.2 via ge-0/0/5.14
192.168.100.5/32   *[OSPF/10] 00:50:10, metric 10
                    > to 172.20.15.2 via ge-0/0/3.15
192.168.100.6/32   *[OSPF/10] 00:01:14, metric 81
                    > to 172.20.19.2 via ge-0/0/5.19
192.168.100.7/32   *[OSPF/10] 00:01:14, metric 70
                    > to 172.20.19.2 via ge-0/0/5.19
192.168.100.8/32   *[OSPF/10] 00:23:02, metric 60
                    > to 172.20.19.2 via ge-0/0/5.19
192.168.100.9/32   *[OSPF/10] 00:23:02, metric 50
                    > to 172.20.19.2 via ge-0/0/5.19
192.168.100.10/32  *[OSPF/10] 00:01:14, metric 91
                    > to 172.20.19.2 via ge-0/0/5.19
192.168.100.11/32  *[OSPF/150] 00:01:14, metric 2, tag 0
                    > to 172.20.19.2 via ge-0/0/5.19
224.0.0.5/32       *[OSPF/10] 01:42:27, metric 1
                      MultiRecv
root@VR-Device-2> show route protocol ospf table R2.inet.0
R2.inet.0: 29 destinations, 29 routes (29 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

20.20.2.0/24       *[OSPF/150] 01:42:24, metric 2, tag 0
                    > to 172.20.23.1 via ge-0/0/4.23
172.20.14.0/30     *[OSPF/10] 00:02:38, metric 65565
                      to 172.20.12.1 via ge-0/0/3.12
                    > to 172.20.24.1 via ge-0/0/3.24
172.20.15.0/30     *[OSPF/10] 00:02:38, metric 65545
                      to 172.20.12.1 via ge-0/0/3.12
                    > to 172.20.25.2 via ge-0/0/5.25
172.20.19.0/30     *[OSPF/10] 00:02:38, metric 65585
                    > to 172.20.12.1 via ge-0/0/3.12
172.20.36.0/30     *[OSPF/10] 00:02:38, metric 65536
                    > to 172.20.23.1 via ge-0/0/4.23
172.20.37.0/30     *[OSPF/10] 00:02:38, metric 65536
                    > to 172.20.23.1 via ge-0/0/4.23
172.20.78.0/30     *[OSPF/10] 00:02:38, metric 65546
                    > to 172.20.23.1 via ge-0/0/4.23
172.20.89.0/30     *[OSPF/10] 00:02:38, metric 65595
                    > to 172.20.12.1 via ge-0/0/3.12
172.20.106.0/30    *[OSPF/10] 00:02:38, metric 65546
                    > to 172.20.23.1 via ge-0/0/4.23
192.168.100.1/32   *[OSPF/10] 00:02:38, metric 65535
                    > to 172.20.12.1 via ge-0/0/3.12
192.168.100.3/32   *[OSPF/10] 00:02:38, metric 65535
                    > to 172.20.23.1 via ge-0/0/4.23
192.168.100.4/32   *[OSPF/10] 00:02:38, metric 65535
                    > to 172.20.24.1 via ge-0/0/3.24
192.168.100.5/32   *[OSPF/10] 00:02:38, metric 65535
                    > to 172.20.25.2 via ge-0/0/5.25
192.168.100.6/32   *[OSPF/10] 00:02:38, metric 65536
                    > to 172.20.23.1 via ge-0/0/4.23
192.168.100.7/32   *[OSPF/10] 00:02:38, metric 65536
                    > to 172.20.23.1 via ge-0/0/4.23
192.168.100.8/32   *[OSPF/10] 00:02:38, metric 65546
                    > to 172.20.23.1 via ge-0/0/4.23
192.168.100.9/32   *[OSPF/10] 00:02:38, metric 65585
                    > to 172.20.12.1 via ge-0/0/3.12
192.168.100.10/32  *[OSPF/10] 00:02:38, metric 65546
                    > to 172.20.23.1 via ge-0/0/4.23
192.168.100.11/32  *[OSPF/150] 01:42:24, metric 2, tag 0
                    > to 172.20.23.1 via ge-0/0/4.23
224.0.0.5/32       *[OSPF/10] 01:43:51, metric 1
                      MultiRecv
root@VR-Device-3> show route protocol ospf table R3.inet.0
R3.inet.0: 30 destinations, 30 routes (30 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

20.20.0.0/24       *[OSPF/150] 01:42:54, metric 2, tag 0
                    > to 172.20.36.2 via ge-0/0/5.36
20.20.1.0/24       *[OSPF/150] 01:42:54, metric 2, tag 0
                    > to 172.20.36.2 via ge-0/0/5.36
20.20.2.0/24       *[OSPF/150] 01:42:54, metric 2, tag 0
                    > to 172.20.36.2 via ge-0/0/5.36
172.20.12.0/30     *[OSPF/10] 00:03:00, metric 81
                    > to 172.20.37.2 via ge-0/0/5.37
172.20.14.0/30     *[OSPF/10] 00:03:00, metric 101
                    > to 172.20.37.2 via ge-0/0/5.37
172.20.15.0/30     *[OSPF/10] 00:03:00, metric 81
                    > to 172.20.37.2 via ge-0/0/5.37
172.20.19.0/30     *[OSPF/10] 00:03:01, metric 71
                    > to 172.20.37.2 via ge-0/0/5.37
172.20.24.0/30     *[OSPF/10] 00:03:00, metric 111
                    > to 172.20.37.2 via ge-0/0/5.37
172.20.25.0/30     *[OSPF/10] 00:03:00, metric 111
                    > to 172.20.37.2 via ge-0/0/5.37
172.20.78.0/30     *[OSPF/10] 00:09:17, metric 11
                    > to 172.20.37.2 via ge-0/0/5.37
172.20.89.0/30     *[OSPF/10] 00:09:17, metric 61
                    > to 172.20.37.2 via ge-0/0/5.37
172.20.106.0/30    *[OSPF/10] 00:45:38, metric 11
                    > to 172.20.36.2 via ge-0/0/5.36
192.168.100.1/32   *[OSPF/10] 00:03:00, metric 71
                    > to 172.20.37.2 via ge-0/0/5.37
192.168.100.2/32   *[OSPF/10] 01:43:10, metric 1
                    > to 172.20.23.2 via ge-0/0/4.23
192.168.100.4/32   *[OSPF/10] 00:03:00, metric 101
                    > to 172.20.37.2 via ge-0/0/5.37
192.168.100.5/32   *[OSPF/10] 00:03:00, metric 81
                    > to 172.20.37.2 via ge-0/0/5.37
192.168.100.6/32   *[OSPF/10] 01:42:54, metric 1
                    > to 172.20.36.2 via ge-0/0/5.36
192.168.100.7/32   *[OSPF/10] 00:09:17, metric 1
                    > to 172.20.37.2 via ge-0/0/5.37
192.168.100.8/32   *[OSPF/10] 00:09:17, metric 11
                    > to 172.20.37.2 via ge-0/0/5.37
192.168.100.9/32   *[OSPF/10] 00:03:01, metric 61
                    > to 172.20.37.2 via ge-0/0/5.37
192.168.100.10/32  *[OSPF/10] 00:45:38, metric 11
                    > to 172.20.36.2 via ge-0/0/5.36
192.168.100.11/32  *[OSPF/150] 01:42:54, metric 2, tag 0
                    > to 172.20.36.2 via ge-0/0/5.36
224.0.0.5/32       *[OSPF/10] 01:44:13, metric 1
                      MultiRecv

После настройки OVERLOAD на R2 все префиксы в таблице маршрутизации R2 стали иметь значение metric = 65536, а маршруты на R1 и R3 стали вместо использования узла R2 в качестве транзитного использовать узлы R9 и R7, соответственно. Функция overload нужна для того, чтобы увести весь транзитный трафик с роутера с целью проведения каких-либо работ, которые могли бы повлиять на прохождение трафика через него.

Выполним трассировку от R6 до R5:

root@VR-Device-3> traceroute 192.168.100.5 routing-instance R6
traceroute to 192.168.100.5 (192.168.100.5), 30 hops max, 40 byte packets
 1  172.20.36.1 (172.20.36.1)  5.660 ms  1.272 ms  1.785 ms
 2  172.20.37.2 (172.20.37.2)  2.893 ms  2.985 ms  2.614 ms
 3  172.20.78.2 (172.20.78.2)  4.913 ms  4.123 ms  4.460 ms
 4  172.20.89.1 (172.20.89.1)  5.766 ms  5.889 ms  4.863 ms
 5  172.20.19.1 (172.20.19.1)  7.770 ms  6.580 ms  6.955 ms
 6  192.168.100.5 (192.168.100.5)  8.132 ms  8.951 ms  7.141 ms

Поскольку на R2 все метрики оказались завышены, весь трафик теперь ходит, минуя R2. Но сам R2 по-прежнему остается доступен по кратчайшему пути:

root@VR-Device-3> traceroute 192.168.100.2 routing-instance R6
traceroute to 192.168.100.2 (192.168.100.2), 30 hops max, 40 byte packets
 1  172.20.36.1 (172.20.36.1)  2.614 ms  1.692 ms  1.991 ms
 2  192.168.100.2 (192.168.100.2)  4.022 ms  3.078 ms  2.630 ms

На этом лабораторная работа окончена. Если остались какие-то вопросы или пожелания, пишите в комментарии. Обязательно отвечу и приму во внимание

One thought on “Juniper. Лабораторная работа по OSPF уровня professional. Пошаговое решение. Часть 2.”

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Этот сайт использует Akismet для борьбы со спамом. Узнайте как обрабатываются ваши данные комментариев.