锐捷MPLS跨域方案A、B实验配置
创始人
2024-02-13 07:21:46
0

目录

MPLS域内配置

MPLS域1配置

MPLS域2配置

域间方式A配置

域间方式B配置


MPLS隧道——跨域解决方案A、B讲解_静下心来敲木鱼的博客-CSDN博客_跨域a方案icon-default.png?t=M85Bhttps://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配置

方式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配置

ASBR1和ASBR2创建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

ASBR1和ASBR2建立基于实例的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之间可以互通

相关内容

热门资讯

喜欢穿一身黑的男生性格(喜欢穿... 今天百科达人给各位分享喜欢穿一身黑的男生性格的知识,其中也会对喜欢穿一身黑衣服的男人人好相处吗进行解...
发春是什么意思(思春和发春是什... 本篇文章极速百科给大家谈谈发春是什么意思,以及思春和发春是什么意思对应的知识点,希望对各位有所帮助,...
网络用语zl是什么意思(zl是... 今天给各位分享网络用语zl是什么意思的知识,其中也会对zl是啥意思是什么网络用语进行解释,如果能碰巧...
为什么酷狗音乐自己唱的歌不能下... 本篇文章极速百科小编给大家谈谈为什么酷狗音乐自己唱的歌不能下载到本地?,以及为什么酷狗下载的歌曲不是...
家里可以做假山养金鱼吗(假山能... 今天百科达人给各位分享家里可以做假山养金鱼吗的知识,其中也会对假山能放鱼缸里吗进行解释,如果能碰巧解...
华为下载未安装的文件去哪找(华... 今天百科达人给各位分享华为下载未安装的文件去哪找的知识,其中也会对华为下载未安装的文件去哪找到进行解...
四分五裂是什么生肖什么动物(四... 本篇文章极速百科小编给大家谈谈四分五裂是什么生肖什么动物,以及四分五裂打一生肖是什么对应的知识点,希...
怎么往应用助手里添加应用(应用... 今天百科达人给各位分享怎么往应用助手里添加应用的知识,其中也会对应用助手怎么添加微信进行解释,如果能...
客厅放八骏马摆件可以吗(家里摆... 今天给各位分享客厅放八骏马摆件可以吗的知识,其中也会对家里摆八骏马摆件好吗进行解释,如果能碰巧解决你...
美团联名卡审核成功待激活(美团... 今天百科达人给各位分享美团联名卡审核成功待激活的知识,其中也会对美团联名卡审核未通过进行解释,如果能...