mpls 静态LSP示例

一个简单的静态mpls的配置拓扑如下:

其中AR1-AR4,分别建立lo0来表示背后所带网络分别为:AR1-Lo0=1.1.1.1/32 AR4-Lo0=4.4.4.4/32,中间使用mpls标签转发,AR2、AR3中并没有1.1.1.1和4.4.4.4的相关路由信息。

配置如下:

AR1:

#
 sysname AR1
#
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 
#
ip route-static 4.4.4.4 255.255.255.255 10.0.12.2
#
static-lsp ingress R1-R4 destination 4.4.4.4 32 nexthop 10.0.12.2 out-label 102
static-lsp egress R4-R1 incoming-interface GigabitEthernet0/0/0 in-label 201
#
return

AR2:

#
 sysname AR2
#
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
#
static-lsp transit R1-R4 incoming-interface GigabitEthernet0/0/0 in-label 102 ne
xthop 10.0.23.3 out-label 203
static-lsp transit R4-R1 incoming-interface GigabitEthernet0/0/1 in-label 302 ne
xthop 10.0.12.1 out-label 201
#
return

AR3:

#
 sysname AR3
#
mpls lsr-id 3.3.3.3
mpls
#
interface GigabitEthernet0/0/0
 ip address 10.0.23.3 255.255.255.0 
 mpls
#
interface GigabitEthernet0/0/1
 ip address 10.0.34.3 255.255.255.0 
 mpls
#
static-lsp transit R1-R4 incoming-interface GigabitEthernet0/0/0 in-label 203 ne
xthop 10.0.34.4 out-label 304
static-lsp transit R4-R1 incoming-interface GigabitEthernet0/0/1 in-label 403 ne
xthop 10.0.23.2 out-label 302

return

AR4:

#
 sysname AR4
#
mpls lsr-id 4.4.4.4
mpls
#
interface GigabitEthernet0/0/0
 ip address 10.0.34.4 255.255.255.0 
 mpls
#
interface LoopBack0
 ip address 4.4.4.4 255.255.255.255 
#
ip route-static 1.1.1.1 255.255.255.255 10.0.34.3
#
static-lsp egress R1-R4 incoming-interface GigabitEthernet0/0/0 in-label 304
static-lsp ingress R4-R1 destination 1.1.1.1 32 nexthop 10.0.34.3 out-label 403
#
return

配置结果:使用带源的Ping -a 1.1.1.1 4.4.4.4 可以与AR4进行通讯,在AR2或AR3上抓包可以看到mpls的标签内容

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据