首页 科技问答 刘嘉福,EVPN 引入不同VPN的5类路由

刘嘉福,EVPN 引入不同VPN的5类路由

科技问答 239
1676541170,

组网及说明


虚拟机 VM 1 属于 VXLAN 10 、位于 VPN 实例 vpna VM 2 属于 VXLAN 20 、位于 VPN 实例 vpnb 。客户有需求需要两个VPN的部分流量可以互访。

配置步骤

可以通过发送扩展RT属性来实现,参考配置如下。

RTA 配置:

#

ip vpn-instance vpn1

 route-distinguisher 1:1

 #

 address-family ipv4

  vpn-target 1:1 3:3 import-extcommunity

  vpn-target 1:1 export-extcommunity

 #

 address-family evpn

  vpn-target 1:1 3:3 import-extcommunity

  vpn-target 1:1 export-extcommunity

#

bgp 200

 peer 4.4.4.4 as-number 200

 peer 4.4.4.4 connect-interface LoopBack0

 #

 address-family ipv4 unicast

 #

 address-family l2vpn evpn

  peer 4.4.4.4 enable

  peer 4.4.4.4 route-policy test export

#

route-policy test permit node 10

 if-match ip address prefix-list test

 apply extcommunity rt 2:2

#

route-policy test permit node 20

#

 ip prefix-list test index 10 permit 10.1.1.0 24

#

 

RTB 配置:

#

ip vpn-instance vpn1

 route-distinguisher 2:2

 #

 address-family ipv4

  vpn-target 2:2 3:3 import-extcommunity

  vpn-target 2:2 export-extcommunity

 #

 address-family evpn

  vpn-target 2:2 3:3 import-extcommunity

  vpn-target 2:2 export-extcommunity

#

bgp 200

 peer 4.4.4.4 as-number 200

 peer 4.4.4.4 connect-interface LoopBack0

 #

 address-family l2vpn evpn

  peer 4.4.4.4 enable

  peer 4.4.4.4 route-policy test export

#

route-policy test permit node 10

 if-match ip address prefix-list test

 apply extcommunity rt 1:1 additive

#

route-policy test permit node 100

#

 ip prefix-list test index 10 permit 10.1.2.0 24

#

配置后,可以学习到不同VPN的路由:

[RTA]dis ip routing-table vpn-instance vpn1 protocol bgp

 

Summary count : 3

 

BGP Routing table status : <Active>

Summary count : 3

 

Destination/Mask   Proto   Pre Cost        NextHop         Interface

10.1.2.0/24        BGP     255 0           2.2.2.2         Vsi3

10.1.3.0/24        BGP     255 0           3.3.3.3         Vsi4

10.1.3.10/32       BGP     255 0           3.3.3.3         Vsi4

 

 

[RTB]dis ip routing-table vpn-instance vpn1 protocol bgp

 

Summary count : 3

 

BGP Routing table status : <Active>

Summary count : 3

 

Destination/Mask   Proto   Pre Cost        NextHop         Interface

10.1.1.0/24        BGP     255 0           1.1.1.1         Vsi2

10.1.3.0/24        BGP     255 0           3.3.3.3         Vsi4

10.1.3.10/32       BGP     255 0           3.3.3.3         Vsi4


CRM论坛(CRMbbs.com)——一个让用户更懂CRM的垂直性行业内容平台,CRM论坛致力于互联网、客户管理、销售管理、SCRM私域流量内容输出5年。 如果您有好的内容,欢迎向我们投稿,共建CRM多元化生态体系,创建CRM客户管理一体化生态解决方案。本文来源:知了社区基于知识共享署名-相同方式共享3.0中国大陆许可协议,EVPN 引入不同VPN的5类路由