以下是一个配置MPLS的示例代码:

创建MPLS实例

mpls

配置MPLS标签范围

mpls label range 1000 2000

配置MPLS LDP协议

mpls ldp

配置MPLS TE协议

mpls te

配置MPLS VPN

mpls l3vpn

配置MPLS VPN路由

mpls l3vpn route-distinguisher 10.10.10.1:100 mpls l3vpn vpn-target 100:100 export-extcommunity mpls l3vpn vpn-target 100:100 import-extcommunity mpls l3vpn vpn-target 100:200 export-extcommunity mpls l3vpn vpn-target 100:200 import-extcommunity

配置MPLS VPN接口

interface GigabitEthernet0/0/1 mpls l3vpn mpls l3vpn vpn-instance vpn1 mpls l3vpn export-extcommunity mpls l3vpn import-extcommunity

配置MPLS VPN路由映射

mpls l3vpn route-target-filter 100:100 export mpls l3vpn route-target-filter 100:200 import

配置MPLS VPN静态路由

mpls l3vpn static-route 192.168.1.0 24 next-hop 10.10.10.2 vpn-instance vpn1 mpls l3vpn static-route 192.168.2.0 24 next-hop 10.10.10.3 vpn-instance vpn


原文地址: https://www.cveoy.top/t/topic/dnD7 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录