说明:AR1-AR5为IBGP关系,AS号100。AR1、AR2、AR3、AR4使用OSPF进行IGP互联,使用mpls ldp进行动态标签分发。其中AR1的lo0口和AR5的lo0口进行IBGP互联,分别把自己的lo1口发布到BGP中。
实验目的:通过MPLS最终可以使AR1的lo1口PING通AR4的lo1口。
主要说明AR1和AR4的配置如下:
AR1:
#
sysname AR1
#
mpls lsr-id 1.1.1.1
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/0
ip address 10.0.12.1 255.255.255.0
mpls
mpls ldp
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
interface LoopBack1
ip address 11.11.11.11 255.255.255.255
#
bgp 100
peer 4.4.4.4 as-number 100
peer 4.4.4.4 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
network 11.11.11.11 255.255.255.255
peer 4.4.4.4 enable
#
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.0.12.1 0.0.0.0
#
route recursive-lookup tunnel
#
AR4:
#
sysname AR4
#
mpls lsr-id 4.4.4.4
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/0
ip address 10.0.34.4 255.255.255.0
mpls
mpls ldp
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
#
interface LoopBack1
ip address 44.44.44.44 255.255.255.255
#
bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
network 44.44.44.44 255.255.255.255
peer 1.1.1.1 enable
#
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 10.0.34.4 0.0.0.0
#
route recursive-lookup tunnel
#
这里重点说明一下,LDP不会给BGP路由进行标签分配,华为中需要使用隧道迭代进行为BGP路由分配标签:
route recursive-lookup tunnel
实验结果:AR1的lo1口可以和AR4的lo1口进行互通