EVPN-VXLAN 网络中的 VRF 路由泄漏
总结 虚拟转发和路由 (VRF) 实例之间的路由泄漏允许您在路由表之间共享特定的路由信息。
使用第 3 层 VRF 配置路由泄漏。
路由信息存储在表或路由信息库 (RIB) 中。多个表可以同时与 rib 组一起使用。使用 rib 组泄漏 VRF 实例之间的路由。
注意:
ACX7100 系列路由器支持 multipath
Junos OS 和 Junos OS 演化版 23.3R1 及更高版本中层次结构下的 [edit routing-instances instance-name routing-options]
语句。
配置第一个第 3 层 VRF,我们称之为灰色。此 VRF 将使用采用 VXLAN 封装的 EVPN 协议。
set routing-instances VRF_Grey instance-type vrf set routing-instances VRF_Grey routing-options router-id router-id set routing-instances VRF_Grey routing-options static route route discard set routing-instances VRF_Grey routing-options multipath set routing-instances VRF_Grey protocols evpn ip-prefix-routes advertise direct-nexthop set routing-instances VRF_Grey protocols evpn ip-prefix-routes encapsulation vxlan set routing-instances VRF_Grey protocols evpn ip-prefix-routes vni vni set routing-instances VRF_Grey interface irb.unit set routing-instances VRF_Grey interface irb.unit set routing-instances VRF_Grey interface lo0.1 set routing-instances VRF_Grey route-distinguisher route-distinguisher set routing-instances VRF_Grey vrf-target target
配置第二个第 3 层 VRF,我们将其称为橙色。此 VRF 还将使用采用 VXLAN 封装的 EVPN 协议。
set routing-instances VRF_Orange instance-type vrf set routing-instances VRF_Orange routing-options router-id router-id set routing-instances VRF_Orange routing-options static route route discard set routing-instances VRF_Orange routing-options multipath set routing-instances VRF_Orange protocols evpn ip-prefix-routes advertise direct-nexthop set routing-instances VRF_Orange protocols evpn ip-prefix-routes encapsulation vxlan set routing-instances VRF_Orange protocols evpn ip-prefix-routes vni vni set routing-instances VRF_Orange interface irb.unit set routing-instances VRF_Orange interface irb.unit set routing-instances VRF_Orange interface lo0.2 set routing-instances VRF_Orange route-distinguisher route-distinguisher set routing-instances VRF_Orange vrf-target target
为 VRF Grey 配置路由策略,以将路由泄漏到 VRF Orange 中。
set routing-options rib-groups grey-to-orange-v4 import-rib VRF_Grey.inet.0 set routing-options rib-groups grey-to-orange-v4 import-rib VRF_Orange.inet.0 set routing-options rib-groups grey-to-orange-v6 import-rib VRF_Grey.inet6.0 set routing-options rib-groups grey-to-orange-v6 import-rib VRF_Orange.inet6.0
为 VRF Orange 配置路由策略,以将路由泄漏到 VRF Grey 中。
set routing-options rib-groups orange-to-grey-v4 import-rib VRF_Orange.inet.0 set routing-options rib-groups orange-to-grey-v4 import-rib VRF_Grey.inet.0 set routing-options rib-groups orange-to-grey-v6 import-rib VRF_Orange.inet6.0 set routing-options rib-groups orange-to-grey-v6 import-rib VRF_Grey.inet6.0
将策略应用于每个 VRF。
VRF Grey set routing-instances VRF_Grey routing-options rib VRF_Grey.inet6.0 multipath set routing-instances VRF_Grey routing-options interface-routes rib-group inet grey-to-orange-v4 set routing-instances VRF_Grey routing-options interface-routes rib-group inet6 grey-to-orange-v6 VRF Orange set routing-instances VRF_Orange routing-options rib VRF_Orange.inet6.0 multipath set routing-instances VRF_Orange routing-options interface-routes rib-group inet orange-to-grey-v4 set routing-instances VRF_Orange routing-options interface-routes rib-group inet6 orange-to-grey-v6