mpls静态标签分配配置案例
R1
mpls lsr-id 1.1.1.1
mpls
interface GigabitEthernet0/0/0
ip address 10.0.12.1 255.255.255.0
mpls
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.0.12.1 0.0.0.0
static-lsp ingress lsp1 destination 3.3.3.3 32 nexthop 10.0.12.2 out-label 20 //去
static-lsp egress lsp2 incoming-interface GigabitEthernet0/0/0 in-label 60 //回
//lsp1为自定义名字,本地唯一就行了不用和其它设备一样
R2:
mpls lsr-id 2.2.2.2
mpls
interface GigabitEthernet0/0/0
ip address 10.0.12.2 255.255.255.0
mpls
interface GigabitEthernet0/0/1
ip address 10.0.23.2 255.255.255.0
mpls
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.0.12.2 0.0.0.0
network 10.0.23.2 0.0.0.0
static-lsp transit lsp1 incoming-interface GigabitEthernet0/0/0 in-label 20 next
hop 10.0.23.3 out-label 40
static-lsp transit lsp2 incoming-interface GigabitEthernet0/0/1 in-label 30 next
hop 10.0.12.1 out-label 60
R3:
mpls lsr-id 3.3.3.3
mpls
interface GigabitEthernet0/0/0
ip address 10.0.23.3 255.255.255.0
mpls
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.0.23.3 0.0.0.0
static-lsp egress lsp1 incoming-interface GigabitEthernet0/0/0 in-label 40
static-lsp ingress lsp2 destination 1.1.1.1 32 nexthop 10.0.23.2 out-label 30
r1和r3上面互ping(要ospf发布互通的些网段才行,意思是要IP互通先)
R2上看
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!