华为MPLS跨域A、B方案实验配置

目录

MPLS域内配置

MPLS-AS100域内配置

MPLS-AS200域内配置

域间方式A配置

ASBR4和ASBR5配置实例

ASBR之间建立基于实例的EBGP邻居关系

域间方式B配置

ASBR相连接口开启MPLS

ASBR之间建立MP-BGP的EBGP邻居

配置取消RT值检测

配置传递路由时更改下一跳为自身


MPLS域内配置

方案A、B的域内配置就同MPLS单域配置

只不过PE与PE的MP-BGP邻居关系变为PE与ASBR之间的MP-BGP邻居关系

MPLS-AS100域内配置

PE2配置

配置接口IP地址以及IGP协议

int g0/0/0
 ip add 100.0.23.2 24
int g0/0/1
 ip add 100.0.12.2 24
int loop 0
 ip add 2.2.2.2 32


isis 1
 net 49.0001.0000.0002.00
int g0/0/0
 isis enable 1
int loop 0
 isis enable 1

配置LDP协议

mpls lsr-id 2.2.2.2
mpls
mpls ldp

int g0/0/0
 mpls
 mpls ldp

配置MP-BGP邻居(与ASBR4建立IBGP的MP-BGP)

bgp 100
 peer 4.4.4.4 as 100
 peer 4.4.4.4 con loop 0

 ipv4-family unicast
  undo peer 4.4.4.4 enable

 ipv4-family vpnv4
  peer 4.4.4.4 enable

配置与CE对接的实例与路由协议

ip vpn-instance CE1
 ipv4-family
  route-distinguisher 12:1
  vpn-target 200:1 export-extcommunity
  vpn-target 100:1 import-extcommunity

int g0/0/1
 ip bind vpn-instance CE1
 ip add 100.0.12.2 24

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

P3配置

配置接口IP地址以及IGP协议

int g0/0/0
 ip add 100.0.23.3 24
int g0/0/1
 ip add 100.0.34.3 24
int loop 0
 ip add 3.3.3.3 32

isis 1
 net 49.0001.0000.0003.00
int g0/0/0
 isis enable 1
int g0/0/1
 isis enable 1
int loop 0
 isis enable 1

配置LDP协议

mpls lsr-id 3.3.3.3
mpls
mpls ldp

int g0/0/0
 mpls
 mpls ldp
int g0/0/1
 mpls
 mpls ldp

ASBR4配置

配置接口IP地址以及IGP协议

int g0/0/0
 ip add 100.0.34.4 24
int g0/0/1
 ip add 100.0.45.4 24
int loop 0
 ip add 4.4.4.4 32

isis 1
 net 49.0001.0000.0004.00
int g0/0/0
 isis enable 1
int loop 0
 isis enable 1

配置LDP协议

mpls lsr-id 4.4.4.4
mpls
mpls ldp

int g0/0/0
 mpls
 mpls ldp

配置MP-BGP邻居(与PE2建立IBGP的MP-BGP)

bgp 100
 peer 2.2.2.2 as 100
 peer 2.2.2.2 con loop 0

 ipv4-family unicast
  undo peer 2.2.2.2 enable

 ipv4-family vpnv4
  peer 2.2.2.2 enable

此时在PE上可以查看VPNV4路由,发现已经存在本地CE的路由了

但是在ASBR上还没有收到Vpnv4路由(需要在ASBR配置实例,匹配RD值接收Vpnv4路由)

Dis bgp vpnv4 all routing-table 

Dis bgp vpnv4 all peer

MPLS-AS200域内配置

PE7配置

配置接口IP地址以及IGP协议

int g0/0/0
 ip add 100.0.67.7 24
int g0/0/1
 ip add 100.0.78.7 24
int loop 0
 ip add 7.7.7.7 32

isis 1
 net 49.0001.0000.0007.00
int g0/0/0
 isis enable 1
int loop 0
 isis enable 1

配置LDP协议

mpls lsr-id 7.7.7.7
mpls
mpls ldp

int g0/0/0
 mpls
 mpls ldp

配置MP-BGP邻居(与ASBR5建立IBGP的MP-BGP)

bgp 200
 peer 5.5.5.5 as 200
 peer 5.5.5.5 con loop 0

 ipv4-family unicast
  undo peer 5.5.5.5 enable

 ipv4-family vpnv4
  peer 5.5.5.5 enable

配置与CE对接的实例与路由协议

ip vpn-instance CE8
 ipv4-family
  route-distinguisher 78:1
  vpn-target 400:1 export-extcommunity
  vpn-target 300:1 import-extcommunity

int g0/0/1
 ip bind vpn-instance CE8
 ip add 100.0.78.7 24

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

P6配置

配置接口IP地址以及IGP协议

int g0/0/0
 ip add 100.0.67.6 24
int g0/0/1
 ip add 100.0.56.6 24
int loop 0
 ip add 6.6.6.6 32

isis 1
 net 49.0001.0000.0006.00
int g0/0/0
 isis enable 1
int g0/0/1
 isis enable 1
int loop 0
 isis enable 1

配置LDP协议

mpls lsr-id 6.6.6.6
mpls
mpls ldp

int g0/0/0
 mpls
 mpls ldp
int g0/0/1
 mpls
 mpls ldp

ASBR5配置

配置接口IP地址以及IGP协议

int g0/0/0
 ip add 100.0.56.5 24
int g0/0/1
 ip add 100.0.45.5 24
int loop 0
 ip add 5.5.5.5 32

isis 1
 net 49.0001.0000.0005.00
int g0/0/0
 isis enable 1
int loop 0
 isis enable 1

配置LDP协议

mpls lsr-id 5.5.5.5
mpls
mpls ldp

int g0/0/0
 mpls
 mpls ldp

配置MP-BGP邻居(与PE7建立IBGP的MP-BGP)

bgp 200
 peer 7.7.7.7 as 200
 peer 7.7.7.7 con loop 0

 ipv4-family unicast
  undo peer 7.7.7.7 enable

 ipv4-family vpnv4
  peer 7.7.7.7 enable

Dis bgp vpnv4 all routing-table 

Dis bgp vpnv4 all peer


域间方式A配置

MPLS隧道——跨域解决方案A、B讲解_mpls 跨域_静下心来敲木鱼的博客-CSDN博客icon-default.png?t=N7T8https://blog.csdn.net/m0_49864110/article/details/127601807?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522167383860516782425185242%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=167383860516782425185242&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-3-127601807-null-null.blog_rank_default&utm_term=mpls%E8%B7%A8%E5%9F%9F&spm=1018.2226.3001.4450

方式A:在ASBR4和ASBR5上建立基于实例的EBGP邻居,将Vpnv4路由转为IPv4路由传递到其它域中(即将ASBR看作PE来配置)

实例对应关系(PE与ASBR的实例对应)

ASBR4和ASBR5配置实例

ASBR4的实例需要接收CE1的vpnv4路由

ip vpn-instance CE1

 ipv4-family

  route-distinguisher 12:4

  vpn-target 100:1 export-extcommunity

  vpn-target 200:1 import-extcommunity

int g0/0/1

 ip bind vpn-instance CE1

 ip add 100.0.45.4 24

ASBR5的实例需要接收CE8的vpnv4路由

ip vpn-instance CE8

 ipv4-family

  route-distinguisher 78:5

  vpn-target 300:1 export-extcommunity

  vpn-target 400:1 import-extcommunity

int g0/0/1

 ip bind vpn-instance CE8

 ip add 100.0.45.5 24

ASBR之间建立基于实例的EBGP邻居关系

ASBR4

bgp 100

 ipv4-family vpn-instance CE1

  peer 100.0.45.5 as 200

ASBR5

bgp 200

 ipv4-family vpn-instance CE8

  peer 100.0.45.4 as 100

dis bgp vpnv4 vpn-instance CE1 peer 查看实例CE1的BGP邻居

此时在ASBR设备查看Vpnv4路由信息,在CE查看路由信息


域间方式B配置

方式B:在ASBR4和ASBR5上建立VPNV4的EBGP邻居,直接将VPNV4路由传递给对端

基础配置只是PE1与PE7上的的实例有不同,其余都相同(即PE之间的实例需要对应)

绿色为ASBR4配置紫色为ASBR5配置

ASBR相连接口开启MPLS

int g0/0/1

 mpls

int g0/0/1

 mpls

ASBR之间建立MP-BGP的EBGP邻居

bgp 100

 peer 100.0.45.5 as 200

 ipv4-family unicast

  undo peer 100.0.45.5 enable

 ipv4-family vpnv4

  peer 100.0.45.5 enable

bgp 200

 peer 100.0.45.4 as 100

 ipv4-family unicast

  undo peer 100.0.45.4 enable

 ipv4-family vpnv4

  peer 100.0.45.4 enable

配置取消RT值检测

由于ASBR上没有配置实例,所以需要在ASBR上配置取消RT值检测

bgp 100

 ipv4-family vpnv4

  undo policy vpn-target

bgp 200

 ipv4-family vpnv4

  undo policy vpn-target

配置传递路由时更改下一跳为自身

由于从EBGP收到的路由传递给IBGP时,默认不会更改下一跳

bgp 100

 ipv4-family vpnv4

  peer 2.2.2.2 next-hop-local

bgp 200

 ipv4-family vpnv4

  peer 7.7.7.7 next-hop-local

  • 3
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 7
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

静下心来敲木鱼

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值