...
Рисунок Рисунок 1 - Схема сети
1) OSPF Domain Identifier Extended Communities Attribute
...
При данной конфигурации устройства R1, R2 и R3 относятся к NULL-домену. Полученные VPNv4-маршруты с типами 0x01, 0x02 и 0x03 обрабатываются как Inter-Area маршруты.
| Блок кода | ||
|---|---|---|
| title | 0/ME5200S: | R6# show route ospf0/ME5200S:R3# show bgp vpnv4 unicast rd 172.27.72.228:65100 172.27.72.229/32 Tue Aug 25 22:57:50 2026 BGP router identifier 172.27.72.230, local AS number 65100 BGP routing table entry for 172.27.72.229/32 Path #0 AS path: RD 172.27.72.228:65100, 172.27.72.228 from 172.27.72.228 (172.27.72.228), Source VRF: shamospf Received/Local Label: 16/50 Origin incomplete, metric 3, local-pref 100, weight 0, not-tracked, internal, best Address family: ipv4/vpn NLRI pathID: 0 Aggregator AS: 0, Address: 0.0.0.0, Atomic aggregate: absent Extended Community: RT 65100:123 (0.0.0.123), ospf-router-id 172.20.25.7, ospf-route-type area: 0.0.0.0, route-type: 0x2, metric-type: n/a Is not stale, is not history Route flap penalty: 0, flap count 0, is not suppressed Route flap time left: 00:00:00, time start: never Route is not ECMP Total entries: 1 0/ME5200S:R3# show bgp vpnv4 unicast rd 172.27.72.226:65100 172.27.72.227/32 Tue Aug 25 22:58:01 2026 BGP router identifier 172.27.72.230, local AS number 65100 BGP routing table entry for 172.27.72.227/32 Path #0 AS path: RD 172.27.72.226:65100, 172.27.72.226 from 172.27.72.228 (172.27.72.228), Source VRF: shamospf Received/Local Label: 40/74 Origin incomplete, metric 3, local-pref 100, weight 0, not-tracked, internal, best Address family: ipv4/vpn NLRI pathID: 0 Aggregator AS: 0, Address: 0.0.0.0, Atomic aggregate: absent Extended Community: RT 65100:123 (0.0.0.123), ospf-router-id 172.20.25.9, ospf-route-type area: 0.0.0.1, route-type: 0x2, metric-type: n/a Cluster List: 172.27.72.228 Originator ID: 172.27.72.226 Is not stale, is not history Route flap penalty: 0, flap count 0, is not suppressed Route flap time left: 00:00:00, time start: never Route is not ECMP Total entries: 1 0/ME5200S:R6#show route ospf Wed Aug 26 08:35:52 2026 Codes: IA - OSPF inter area, EA - OSPF intra area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 O IA 172.27.72.227/32 via 172.28.71.21 [30/1], 00h00m44s, te0/0/2 O IA 172.27.72.229/32 via 172.28.71.21 [30/1], 03h29m23s, te0/0/2 |
Далее отнесем R3 и R1 к одному OSPF domain-id и проверим как изменится тип маршрутов для 172.27.72.227, 172.27.72.134 и 172.27.72.229 на R6
| Блок кода | ||
|---|---|---|
| ||
0/ME5200S:R3#show running-config router ospfv2
router ospfv2 0
vrf ospf
area 0.0.0.1
interface tengigabitethernet 0/0/3
bfd fast-detect
network point-to-point
exit
exit
domain-id type-0005 value 000000000001 <<< данной командой мы добавляем атрибут ospf-domain к VPNv4 маршрутам
redistribution bgp ospf
exit
exit
exit
0/ME5200S:R1#show running-config router ospfv2
router ospfv2 0
vrf ospf
area 0.0.0.1
interface tengigabitethernet 0/0/1
bfd fast-detect
network point-to-point
exit
exit
domain-id type-0005 value 000000000001 <<< данной командой мы добавляем атрибут ospf-domain к VPNv4 маршрутам
redistribution bgp ospf
exit
exit
exit |
| Блок кода | title | show runnung router ospfv2
|---|
0/ME5200S:R3# show bgp vpnv4 unicast rd 172.27.72.226:65100 172.27.72.227/32
Tue Aug 25 21:32:00 2026
BGP router identifier 172.27.72.230, local AS number 65100
BGP routing table entry for 172.27.72.227/32
Path #0
AS path:
RD 172.27.72.226:65100, 172.27.72.226 from 172.27.72.228 (172.27.72.228), Source VRF: ospf
Received/Local Label: 40/74
Origin incomplete, metric 3, local-pref 100, weight 0, not-tracked, internal, best
Address family: ipv4/vpn
NLRI pathID: 0
Aggregator AS: 0, Address: 0.0.0.0, Atomic aggregate: absent
Extended Community: RT 65100:123 (0.0.0.123), ospf-domain 0x5:0x000000000001 <<, ospf-route-type area: 0.0.0.1, route-type: 0x2, metric-type: n/a, ospf-router-id 172.20.25.9
Cluster List: 172.27.72.228
Originator ID: 172.27.72.226
Is not stale, is not history
Route flap penalty: 0, flap count 0, is not suppressed
Route flap time left: 00:00:00, time start: never
Route is not ECMP
Total entries: 1
0/ME5200S:R3# show bgp vpnv4 unicast rd 172.27.72.228:65100 172.27.72.229/32
Tue Aug 25 21:32:03 2026
BGP router identifier 172.27.72.230, local AS number 65100
BGP routing table entry for 172.27.72.229/32
Path #0
AS path:
RD 172.27.72.228:65100, 172.27.72.228 from 172.27.72.228 (172.27.72.228), Source VRF: ospf
Received/Local Label: 16/50
Origin incomplete, metric 3, local-pref 100, weight 0, not-tracked, internal, best
Address family: ipv4/vpn
NLRI pathID: 0
Aggregator AS: 0, Address: 0.0.0.0, Atomic aggregate: absent
Extended Community: RT 65100:123 (0.0.0.123), ospf-router-id 172.27.72.228, ospf-route-type area: 0.0.0.0, route-type: 0x2, metric-type: n/a
Is not stale, is not history
Route flap penalty: 0, flap count 0, is not suppressed
Route flap time left: 00:00:00, time start: never
Route is not ECMP
Total entries: 1
Мы видим, что к VPNv4 маршруту 172.27.72.227/32 добавился ospf-domain атрибут, тогда как у 172.27.72.229/32 его нет. Проверим как это сказалось на обработке маршрута на R4
0/ME5200S:R6# show route ospf
Wed Aug 26 09:30:51 2026
Codes: IA - OSPF inter area, EA - OSPF intra area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
O IA 172.27.72.227/32 via 172.28.71.21 [30/1], 00h55m43s, te0/0/2 <<< При совпадении ospf-domain маршрут установился как inter-area
O E2 172.27.72.229/32 via 172.28.71.21 [110/0], 00h50m35s, te0/0/2 <<< При несовпадении ospf-domain маршрут установился как AS-External |
...
| Блок кода | ||
|---|---|---|
| ||
0/ME5200S:R3# show bgp vpnv4 unicast rd 172.27.72.230:65100 172.27.76.134/32
Tue Aug 25 22:43:21 2026
BGP router identifier 172.27.72.230, local AS number 65100
BGP routing table entry for 172.27.76.134/32
Path #0
AS path:
RD 172.27.72.230:65100 (172.27.72.230), Source VRF: ospf
Received/Local Label: -/21
Origin incomplete, metric 3, local-pref 100, weight 32768, not-tracked, best
Address family: ipv4/vpn
NLRI pathID: 0
Aggregator AS: 0, Address: 0.0.0.0, Atomic aggregate: absent
Extended Community: RT 65100:123 (0.0.0.123), ospf-domain 0x5:0x000000000001, ospf-route-type area: 0.0.0.1, route-type: 0x2, metric-type: n/a, ospf-router-id 172.20.25.5
Is not stale, is not history
Route flap penalty: 0, flap count 0, is not suppressed
Route flap time left: 00:00:00, time start: never
Route is not ECMP
Total entries: 1
Route Type Extended Community заполнились следующим образом:
1) ospf-route-type area: 0.0.0.1
2) route-type: 0x2, что соответствует intra-area маршруту
3) metric-type: n/a, так как маршрут intra-area
OSPF Router ID Extended Community соответствует 172.20.25.5 - маршрутизатору сгенерировавшему данный маршрут
0/ME5200S:US-STN-ILCH-PE11# show bgp vpnv4 unicast rd 172.27.72.230:65100 172.28.71.22/32 <<< маршрут полученный путем редистрибуции на R6 из таблицы local в ospf:
Tue Aug 25 22:43:16 2026
BGP router identifier 172.27.72.230, local AS number 65100
BGP routing table entry for 172.28.71.22/32
Path #0
AS path:
RD 172.27.72.230:65100 (172.27.72.230), Source VRF: ospf
Received/Local Label: -/21
Origin incomplete, metric 1, local-pref 100, weight 32768, not-tracked, best
Address family: ipv4/vpn
NLRI pathID: 0
Aggregator AS: 0, Address: 0.0.0.0, Atomic aggregate: absent
Extended Community: RT 65100:123 (0.0.0.123), ospf-domain 0x5:0x000000000001, ospf-route-type area: 0.0.0.0, route-type: 0x5, metric-type: E2, ospf-router-id 172.20.25.5
Is not stale, is not history
Route flap penalty: 0, flap count 0, is not suppressed
Route flap time left: 00:00:00, time start: never
Route is not ECMP
Total entries: 1
Route Type Extended Community заполнились следующим образом:
1) ospf-route-type area: 0.0.0.0
2) route-type: 0x5, что соответствует AS-External маршруту
3) metric-type: E2
OSPF Router ID Extended Community соответствует 172.20.25.5 - маршрутизатору сгенерировавшему данный маршрут |
...
