Перейти к основному содержимому

Редистрибьюция маршрутов в OSPFv3

В этом примере маршруты BGP импортируются в таблицу маршрутизации OSPF и анонсируются как внешние LSA типа 5 в area 0.

Топология

Image

Рисунок 5-75: Редистрибьюция маршрутов в OSPFv3

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

SW1

#configure terminalПерейти в режим конфигурации.
(config)#router ipv6 ospfСоздать instance маршрутизации OSPFv3.
(config-router)#router-id 10.10.10.10Указать идентификатор маршрутизатора (10.10.10.10) для процесса маршрутизации OSPFv3.
(config-router)#redistribute bgpУказать редистрибьюцию маршрутов из другого протокола маршрутизации (BGP) в OSPFv3.
(config-router)#exitВыйти из режима маршрутизатора OSPF.
(config)#interface eth1Перейти в режим интерфейса.
(config-if)#ipv6 router ospf area 0Включить маршрутизацию OSPFv3 на интерфейсе и назначить идентификатор area (0).
Проверка

SW2

SW2#show ipv6 ospf neighbor
OSPFv3 Process (*null*)
Neighbor ID     Pri   State                Dead Time   Interface  Instance ID
10.10.10.10       1   Full/DR             00:00:40         eth1       0
10.10.10.12       1   Full/DROther    00:00:40         eth1       0
10.10.10.13       1   Full/Backup      00:00:33         eth2       0
SW2#show ipv6 ospf database
OSPFv3 Router with ID (10.10.10.11) (Process *null*)
Link-LSA (Interface eth1)
Link State ID   ADV Router      Age       Seq#               CkSum    Prefix
0.0.0.3            10.10.10.10      364       0x80000002    0x21a3      1
0.0.0.3            10.10.10.11     1046       0x80000001   0xa3f6       1
0.0.0.3            10.10.10.12     1018       0x80000001   0xd00e      1
Link-LSA (Interface eth2)
Link State ID   ADV Router      Age       Seq#              CkSum     Prefix
0.0.0.4            10.10.10.11     1046       0x80000001   0xc0b0      1
0.0.0.3            10.10.10.13      985       0x80000001   0x61e4      1
Router-LSA (Area 0.0.0.0)
Link State ID   ADV Router      Age       Seq#               CkSum    Link
0.0.0.0            10.10.10.10     1007       0x80000005   0x9709      1
0.0.0.0            10.10.10.11     1003       0x80000004   0x8d15      1
0.0.0.0            10.10.10.12     1002       0x80000004   0x841e      1
Network-LSA (Area 0.0.0.0)
Link State ID   ADV Router      Age       Seq#               CkSum
0.0.0.3            10.10.10.10     1007       0x80000002   0xc497
Inter-Area-Prefix-LSA (Area 0.0.0.0)
Link State ID   ADV Router      Age       Seq#              CkSum
0.0.0.1            10.10.10.10      355       0x80000003   0x511b
0.0.0.1            10.10.10.11      1041     0x80000002   0x9cdf
Intra-Area-Prefix-LSA (Area 0.0.0.0)
Link State ID   ADV Router      Age       Seq#             CkSum    Prefix  Reference
0.0.0.2            10.10.10.10     1006       0x80000002 0x56da      1
Network-LSA
Intra-Area-Te-LSA (Area 0.0.0.0)
Link State ID   ADV Router      Age       Seq#                  CkSum
0.0.0.3           10.10.10.10      1007      0x80000003      0xc881
0.0.0.3           10.10.10.11      1003      0x80000003      0xf453
0.0.0.3           10.10.10.12      1002      0x80000003      0x2125
Router-LSA (Area 0.0.0.1)
Link State ID   ADV Router      Age       Seq#              CkSum     Link
0.0.0.0            10.10.10.11      973       0x80000004   0xc3db      1
0.0.0.0            10.10.10.13      973       0x80000003   0xa8f7       1
Network-LSA (Area 0.0.0.1)
Link State ID   ADV Router      Age       Seq#                 CkSum
0.0.0.4            10.10.10.11      973       0x80000001     0x1a6c
Inter-Area-Prefix-LSA (Area 0.0.0.1)
Link State ID   ADV Router      Age       Seq#                CkSum
0.0.0.1            10.10.10.11     1041      0x80000002     0xeba0
0.0.0.2            10.10.10.11      969       0x80000002     0x4921
Inter-Area-Router-LSA (Area 0.0.0.1)
Link State ID   ADV Router      Age       Seq#               CkSum
0.0.0.1            10.10.10.11     1019      0x80000001    0x9c16
Intra-Area-Prefix-LSA (Area 0.0.0.1)
Link State ID   ADV Router      Age       Seq#              CkSum    Prefix
Reference
0.0.0.2            10.10.10.11      972       0x80000001  0x9b83      1
Network-LSA
Intra-Area-Te-LSA (Area 0.0.0.1)
Link State ID   ADV Router      Age       Seq#               CkSum
0.0.0.4            10.10.10.11      973       0x80000002    0x47ee
0.0.0.3            10.10.10.13      973       0x80000002    0xa989
SW2#show ipv6 ospfv3 topology
OSPFv3 Process (*null*)
OSPFv3 paths to Area (0.0.0.0) routers
Router ID        Bits  Metric     Next-Hop             Interface
10.10.10.10        EB  1          10.10.10.10          eth1
10.10.10.11         B  --
10.10.10.12         1               10.10.10.12          eth1
OSPFv3 paths to Area (0.0.0.1) routers
Router ID        Bits  Metric     Next-Hop             Interface
10.10.10.11         B  --
10.10.10.13         1                 10.10.10.13          eth2
SW2#show ipv6 ospf route
OSPFv3 Process (*null*)
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
Destination                                   Metric
Next-hop
C  3ffe::/64                                          1      directly connected, eth1, Area 0.0.0.0
C  4ffe::/64                                          1      directly connected, eth2, Area 0.0.0.1
IA 5ffe::/64                                          2      via fe80::5054:ff:fe58:fc20, eth1, Area 0.0.0.0
SW2#show ipv6 route
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, E - EVPN  N1 - OSPF NSSA external type 1,
N2 - OSPF NSSA external type 2, I - IS-IS, B - BGP
Timers: Uptime
IP Route Table for VRF "default"
C      ::1/128 via ::, lo, 00:44:22
C      3ffe::/64 via ::, eth1, 00:18:00
C      4ffe::/64 via ::, eth2, 00:18:00
O IA   5ffe::/64 [110/2] via fe80::5054:ff:fe58:fc20, eth1, 00:17:32
C      fe80::/64 via ::, eth2, 00:44:22

SW3

SW3#show ipv6 ospf neighbor
OSPFv3 Process (*null*)
Neighbor ID     Pri   State               Dead Time   Interface  Instance ID
10.10.10.10       1   Full/DR            00:00:37          eth1       0
10.10.10.11       1   Full/Backup        00:00:34          eth1       0
SW3#show ipv6 ospf database
OSPFv3 Router with ID (10.10.10.12) (Process *null*)
Link-LSA (Interface eth1)
Link State ID   ADV Router      Age        Seq#                CkSum    Prefix
0.0.0.3            10.10.10.10      459        0x80000002     0x21a3      1
0.0.0.3            10.10.10.11     1142        0x80000001     0xa3f6       1
0.0.0.3            10.10.10.12     1111        0x80000001     0xd00e      1
Router-LSA (Area 0.0.0.0)
Link State ID   ADV Router      Age       Seq#                 CkSum    Link
0.0.0.0            10.10.10.10     1103       0x80000005     0x9709      1
0.0.0.0            10.10.10.11     1099       0x80000004     0x8d15      1
0.0.0.0            10.10.10.12     1096       0x80000004     0x841e      1
Network-LSA (Area 0.0.0.0)
Link State ID   ADV Router      Age       Seq#                CkSum
0.0.0.3            10.10.10.10     1103       0x80000002    0xc497
Inter-Area-Prefix-LSA (Area 0.0.0.0)
Link State ID   ADV Router      Age        Seq#                 CkSum
0.0.0.1            10.10.10.10      450        0x80000003     0x511b
0.0.0.1            10.10.10.11     1137        0x80000002     0x9cdf
Intra-Area-Prefix-LSA (Area 0.0.0.0)
Link State ID   ADV Router      Age       Seq#               CkSum  Prefix
Reference
0.0.0.2            10.10.10.10     1101       0x80000002   0x56da      1       Network-LSA
Intra-Area-Te-LSA (Area 0.0.0.0)
Link State ID   ADV Router      Age       Seq#                 CkSum
0.0.0.3            10.10.10.10     1103       0x80000003    0xc881
0.0.0.3            10.10.10.11     1099       0x80000003    0xf453
0.0.0.3            10.10.10.12     1096       0x80000003    0x2125
SW3#show ipv6 ospfv3 topology
OSPFv3 Process (*null*)
OSPFv3 paths to Area (0.0.0.0) routers
Router ID        Bits  Metric     Next-Hop             Interface
10.10.10.10        EB  1          10.10.10.10            eth1
10.10.10.11         B  1          10.10.10.11             eth1
10.10.10.12            --
SW3#show ipv6 ospf route
OSPFv3 Process (*null*)
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
Destination                                   Metric      Next-hop
C  3ffe::/64                                          1      directly connected, eth1, Area 0.0.0.0
IA 4ffe::/64                                          2      via fe80::5054:ff:fe5b:1034, eth1, Area 0.0.0.0
IA 5ffe::/64                                          2      via fe80::5054:ff:fe58:fc20, eth1, Area 0.0.0.0
SW3#show ipv6 route
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, E - EVPN  N1 - OSPF NSSA external type 1,
N2 - OSPF NSSA external type 2, I - IS-IS, B - BGP Timers: Uptime
IP Route Table for VRF "default"
C      ::1/128 via ::, lo, 00:45:05
C      3ffe::/64 via ::, eth1, 00:18:53
O IA   4ffe::/64 [110/2] via fe80::5054:ff:fe5b:1034, eth1, 00:18:39
O IA   5ffe::/64 [110/2] via fe80::5054:ff:fe58:fc20, eth1, 00:18:39
C      fe80::/64 via ::, eth2, 00:45:05