锐捷MPLS跨域方案A、B实验配置

目录

MPLS域内配置

MPLS域1配置

MPLS域2配置

域间方式A配置

域间方式B配置


MPLS隧道——跨域解决方案A、B讲解_静下心来敲木鱼的博客-CSDN博客_跨域a方案https://blog.csdn.net/m0_49864110/article/details/127601807?spm=1001.2014.3001.5501


MPLS域内配置

MPLS域内配置同MPLS单域配置

MPLS域1配置

PE1配置

配置接口IP地址和IGP协议

int g0/0

no switchport

ip add 1.0.18.1 24

int g0/1

no switchport

ip add 1.0.12.1 24

int loop 0

ip add 1.1.1.1 32

router isis 1

net 49.0001.0000.0000.0001.00

int g0/1

ip router isis 1

int loop 0

ip router isis 1

配置LDP协议

mpls ip

 mpls router ldp

 ldp router-id interface loop 0 force

int g0/1

 label-switching

 mpls ip

配置Vpnv4的IBGP邻居

router bgp 100

bgp router-id 1.1.1.1

neighbor 3.3.3.3 remote-as 100

neighbor 3.3.3.3 update-source loop 0

address-family vpnv4 unicast

 neighbor 3.3.3.3 activate

 neighbor 3.3.3.3 send-community extended

address-family ipv4 unicast

  no neighbor 3.3.3.3 activate

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

ip vrf VPN-1

 rd 100:1

 route-target export 200:1

 route-target import 100:1

int g0/0

ip vrf forwarding VPN-1

ip add 1.0.18.1 24

route ospf 1 vrf VPN-1

area 0

network 1.0.18.0 0.0.0.255 area 0

将CE路由引入到BGP中

router bgp 100

address-family ipv4 vrf VPN-1

redistribute ospf 1 match internal external

将BGP路由引入到CE中

router ospf 1 vrf VPN-1

 redistribute bgp subnets

P2配置

配置接口IP地址和IGP协议

int g0/1

no switchport

ip add 1.0.12.2 24

int g0/0

no switchport

ip add 1.0.23.2 24

int loop 0

ip add 2.2.2.2 32

router isis 1

net 49.0001.0000.0000.0002.00

int g0/1

ip router isis 1

int g0/0

ip router isis 1

int loop 0

ip router isis 1

配置LDP协议

mpls ip

mpls router ldp

 ldp router-id interface loop 0 force

int g0/1

 label-switching

 mpls ip

int g0/0

 label-switching

 mpls ip

ASBR3配置

配置接口IP地址和IGP协议

int g0/1

no switchport

ip add 1.0.34.3 24

int g0/0

no switchport

ip add 1.0.23.3 24

int loop 0

ip add 3.3.3.3 32

router isis 1

net 49.0001.0000.0000.0003.00

int g0/0

ip router isis 1

int loop 0

ip router isis 1

配置LDP协议

mpls ip

mpls router ldp

 ldp router-id interface loop 0 force

int g0/0

 label-switching

 mpls ip

配置Vpnv4的IBGP邻居

router bgp 100

bgp router-id 3.3.3.3

neighbor 1.1.1.1 remote-as 100

neighbor 1.1.1.1 update-source loop 0

address-family vpnv4 unicast

 neighbor 1.1.1.1 activate

 neighbor 1.1.1.1 send-community extended

address-family ipv4 unicast

  no neighbor 1.1.1.1 activate

CE8配置

配置接口IP地址

int g0/0

no switchport

ip add 1.0.18.8 24

int loop 0

ip add 8.8.8.8 32

配置与PE对接的路由协议

router ospf 1

area 0

network 8.8.8.8 0.0.0.0 area 0

network 1.0.18.8 0.0.0.0 area 0

MPLS域2配置

PE6配置

配置接口IP地址和IGP协议

int g0/0

no switchport

ip add 1.0.67.6 24

int g0/1

no switchport

ip add 1.0.56.6 24

int loop 0

ip add 6.6.6.6 32

router isis 10

net 49.0002.0000.0000.0006.00

int g0/1

ip router isis 10

int loop 0

ip router isis 10

配置LDP协议

mpls ip

 mpls router ldp

 ldp router-id interface loop 0 force

int g0/1

 label-switching

 mpls ip

配置Vpnv4的IBGP邻居

router bgp 200

bgp router-id 6.6.6.6

neighbor 4.4.4.4 remote-as 200

neighbor 4.4.4.4 update-source loop 0

address-family vpnv4 unicast

 neighbor 4.4.4.4 activate

 neighbor 4.4.4.4 send-community extended

address-family ipv4 unicast

  no neighbor 4.4.4.4 activate

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

ip vrf VPN-2

 rd 200:1

 route-target export 100:1

 route-target import 200:1

int g0/0

ip vrf forwarding VPN-2

ip add 1.0.67.6 24

route ospf 1 vrf VPN-2

area 0

network 1.0.67.0 0.0.0.255 area 0

将CE路由引入到BGP中

router bgp 200

address-family ipv4 vrf VPN-2

redistribute ospf 1 match internal external

将BGP路由引入到CE中

router ospf 1 vrf VPN-2

 redistribute bgp subnets

P5配置

配置接口IP地址和IGP协议

int g0/1

no switchport

ip add 1.0.56.5 24

int g0/0

no switchport

ip add 1.0.45.5 24

int loop 0

ip add 5.5.5.5 32

router isis 10

net 49.0002.0000.0000.0005.00

int g0/1

ip router isis 10

int g0/0

ip router isis 10

int loop 0

ip router isis 10

配置LDP协议

mpls ip

mpls router ldp

 ldp router-id interface loop 0 force

int g0/1

 label-switching

 mpls ip

int g0/0

 label-switching

 mpls ip

ASBR4配置

配置接口IP地址和IGP协议

int g0/1

no switchport

ip add 1.0.34.4 24

int g0/0

no switchport

ip add 1.0.45.4 24

int loop 0

ip add 4.4.4.4 32

router isis 10

net 49.0002.0000.0000.0004.00

int g0/0

ip router isis 10

int loop 0

ip router isis 10

配置LDP协议

mpls ip

mpls router ldp

 ldp router-id interface loop 0 force

int g0/0

 label-switching

 mpls ip

配置Vpnv4的IBGP邻居

router bgp 200

bgp router-id 4.4.4.4

neighbor 6.6.6.6 remote-as 200

neighbor 6.6.6.6 update-source loop 0

address-family vpnv4 unicast

 neighbor 6.6.6.6 activate

 neighbor 6.6.6.6 send-community extended

address-family ipv4 unicast

  no neighbor 6.6.6.6 activate

CE7配置

配置接口IP地址

int g0/0

no switchport

ip add 1.0.67.7 24

int loop 0

ip add 7.7.7.7 32

配置与PE对接的路由协议

router ospf 1

area 0

network 7.7.7.7 0.0.0.0 area 0

network 1.0.67.7 0.0.0.0 area 0


域间方式A配置

MPLS隧道——跨域解决方案A、B讲解_mpls 跨域_静下心来敲木鱼的博客-CSDN博客icon-default.png?t=MBR7https://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:在ASBR3和ASBR4上建立基于实例的EBGP邻居,将Vpnv4路由转为IPv4路由传递到其它域中

PE1-CE8对应的实例:              export 200:1   import 100:1

ASBR1-ASBR2对应的实例:      export 100:1   import 200:1

ASBR2-ASBR1对应的实例:      export 200:1   import 100:1

PE6-CE7对应的实例:              export 100:1   import 200:1

蓝色为ASBR3配置、紫色为ASBR4配置

ASBR3和ASBR4创建VPN实例

对于ASBR3来说,其im值需要与CE1的ex值匹配,其ex值需要与ASBR4的im值匹配

ip vrf VPN-3

  rd 300:1

route-target export 100:1

  route-target import 200:1

int g0/1

ip vrf forwarding VPN-3

ip add 1.0.34.3 24

ip vrf VPN-4

 rd 400:1

 route-target export 200:1

 route-target import 100:1

int g0/1

ip vrf forwarding VPN-4

ip add 1.0.34.4 24

ASBR3和ASBR4建立基于实例的EBGP邻居

router bgp 100

address-family ipv4 vrf VPN-3

neighbor 1.0.34.4 remote-as 200

neighbor 1.0.34.4 activate

router bgp 200

address-family ipv4 vrf VPN-4

neighbor 1.0.34.3 remote-as 100

neighbor 1.0.34.3 activate

Show ip bgp vrf VPN-3 summary此时ASBR的实例邻居已经建立成功

Show ip bgp vrf VPN-3此时ASBR已经获得了CE路由

此时CE7和CE8可以互相访问了


域间方式B配置

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

PE1-CE8对应的实例:              export 200:1   import 100:1

PE6-CE7对应的实例:              export 100:1   import 200:1

蓝色为ASBR3配置、紫色为ASBR4配置

ASBR相连接口之间开启MPLS

int g0/1

 label-switching

 mpls ip

int g0/1

 label-switching

 mpls ip

ASBR建立Vpnv4的EBGP邻居

router bgp 100

neighbor 1.0.34.4 remote-as 200

address-family ipv4

no neighbor 1.0.34.4 activate

address-family vpnv4 unicast

neighbor 1.0.34.4 activate

router bgp 200

neighbor 1.0.34.3 remote-as 100

address-family ipv4

no neighbor 1.0.34.3 activate

address-family vpnv4 unicast

neighbor 1.0.34.3 activate

配置取消RT值检测

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

router bgp 200

address-family vpnv4 unicast

no bgp default route-target filter

router bgp 200

address-family vpnv4 unicast

no bgp default route-target filter

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

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

例如:对于ASBR4从ASBR3学到的路由传递给PE6时,PE6收到的关于站点1的路由下一跳为ASBR3,对于PE6来说路由下一跳不可达,不会传递给CE7

此时就需要在ASBR上配置向IBGP邻居PE传递路由时将下一跳更改为自身(或者直接将ASBR的路由引入到BGP中传递给PE,不推荐)

router bgp 200

address-family vpnv4 unicast

neighbor 1.1.1.1 next-hop-self

router bgp 200

address-family vpnv4 unicast

neighbor 6.6.6.6 next-hop-self

此时CE之间可以互通

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

静下心来敲木鱼

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

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

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

打赏作者

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

抵扣说明:

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

余额充值