华为MPLS跨域——后门链路实验配置

目录

配置PE与CE设备对接命令(通过OSPF对接)

配置后门链路


可以使用任意方式来跑跨域MPLS(A、B、C1、C2都可以),不过关于传递Vpnv4路由的配置此处不做介绍;此处只介绍关于PE和CE对接的配置和关于后门链路的配置

配置PE与CE设备对接命令(通过OSPF对接)

PE2与CE1对接

PE2

创建实例

ip vpn-instance CE1

 ipv4-family

  route-distinguisher 12:1                    配置RD值

  vpn-target 200:1 export-extcommunity       配置入RT值

  vpn-target 100:1 import-extcommunity       配置出RT值

接口绑定实例

int g0/0/1

 ip bind vpn-instance CE1

 ip add 100.0.12.2 24

OSPF绑定实例

ospf 1 vpn-instance CE1

 area 0

  net 100.0.12.2 0.0.0.0

将CE路由重发布进BGP

bgp 100

 ipv4-family vpn-instance CE1

  import-route ospf 1

将BGP路由重发布到CE中

ospf 1

 import-route bgp

CE1

int g0/0/0

 ip add 100.0.12.1 24

int g0/0/1

 ip add 172.16.1.254 24

ospf 1

 area 0

  net 100.0.12.1 0.0.0.0

  net 172.16.1.0 0.0.0.255

PE7与CE8对接

PE7

创建实例

ip vpn-instance CE8

 ipv4-family

  route-distinguisher 78:1

  vpn-target 100:1 export-extcommunity

  vpn-target 200:1 import-extcommunity

接口绑定实例

int g0/0/1

 ip bind vpn-instance CE8

 ip add 100.0.78.7 24

OSPF绑定实例

ospf 1 vpn-instance CE8

 area 0

  net 100.0.78.7 0.0.0.0

将CE路由重发布进BGP

bgp 200

 ipv4-family vpn-instance CE8

  import-route ospf 1

将BGP路由重发布到CE中

ospf 1

 import-route bgp

CE8

int g0/0/0

 ip add 100.0.78.8 24

int g0/0/1

 ip add 192.168.1.254 24

ospf 1

 area 0

  net 100.0.78.8 0.0.0.0

  net 192.168.1.0 0.0.0.255


配置后门链路

在CE设备上将后门链路宣告进OSPF中

CE1

ospf 1

 area 0.0.0.0

  network 100.0.18.1 0.0.0.0

CE2

ospf 1

 area 0.0.0.0

  network 100.0.18.8 0.0.0.0

此时关于对端CE的邻居会直接从此后门链路学习到,全部流量走后门链路(从CE1/CE2后门链路学到的路由类型为1/2类LSA,优于从PE1/PE2学到的3/5类LSA)

此时需要在PE上配置Sham-link来解决此问题(不会因为Domain ID将从PE学来的路由转换为3类/5类LSA)

在PE上配置建立Sham-Link的地址并通过Vpnv4路由传递到对端

PE1

interface LoopBack1                          配置建立后门链路的IP地址并绑定实例

 ip binding vpn-instance CE1           

 ip address 22.22.22.22 255.255.255.255

ospf 1 vpn-instance CE1                    建立后门链路

 area 0.0.0.0

  sham-link 22.22.22.22 77.77.77.77

bgp 100                                              将本端的后门链路地址传递给对端

ipv4-family vpn-instance CE1

  import-route direct

PE2

interface LoopBack1                         

 ip binding vpn-instance CE8           

 ip address 77.77.77.77 255.255.255.255

ospf 1 vpn-instance CE1                   

 area 0.0.0.0

  sham-link 77.77.77.77 22.22.22.22

bgp 200                                             

ipv4-family vpn-instance CE8

  import-route direct

在CE上将后门链路的开销增大

CE1

interface GigabitEthernet0/0/2

 ospf cost 10

CE2

interface GigabitEthernet0/0/2

 ospf cost 10

猜你喜欢

转载自blog.csdn.net/m0_49864110/article/details/130512441