BGP EVPN(同VXLAN互访)

 CE1和AR2和CE3 三层互联 彼此环回口可通信

划分VLAN对CE交换机进行trunk接口

evpn-overlay enable 开启evpn功能并在BGP中指邻居

CE1:bgp 100 
 peer 10.1.3.3 as-number 100
 peer 10.1.3.3 connect-interface LoopBack0

 l2vpn-family evpn
  policy vpn-target
  peer 10.1.3.3 enable

  CE3:bgp 100
 peer 10.1.1.1 as-number 100
 peer 10.1.1.1 connect-interface LoopBack0

 l2vpn-family evpn
  policy vpn-target
  peer 10.1.1.1 enable

CE1:bridge-domain 10 配置BD域并配置RT和RD值
 vxlan vni 10
 evpn
  route-distinguisher 100:1
  vpn-target 100:1 export-extcommunity
  vpn-target 100:1 import-extcommunity

bridge-domain 20
 vxlan vni 20
 evpn
  route-distinguisher 100:2
  vpn-target 100:2 export-extcommunity
  vpn-target 100:2 import-extcommunity

CE3:bridge-domain 10
 vxlan vni 10
 evpn
  route-distinguisher 100:1
  vpn-target 100:1 export-extcommunity
  vpn-target 100:1 import-extcommunity
bridge-domain 20
 vxlan vni 20
 evpn
  route-distinguisher 100:2
  vpn-target 100:2 export-extcommunity
  vpn-target 100:2 import-extcommunity

CE1:interface GE1/0/0.10 mode l2 在接口上进行封装并绑定BD域
 encapsulation dot1q vid 10
 bridge-domain 10

interface GE1/0/0.20 mode l2
 encapsulation dot1q vid 20
 bridge-domain 20

CE3:interface GE1/0/1.10 mode l2
 encapsulation dot1q vid 30
 bridge-domain 10

interface GE1/0/1.20 mode l2
 encapsulation dot1q vid 40
 bridge-domain 20

CE1:interface Nve1 配置NVE并使用BGP的方式指邻居
 source 10.1.1.1
 vni 10 head-end peer-list protocol bgp
 vni 20 head-end peer-list protocol bgp

CE3:interface Nve1
 source 10.1.3.3
 vni 10 head-end peer-list protocol bgp
 vni 20 head-end peer-list protocol bgp

使用集中式网关进行不同VXLAN互访

在原有配置基础

CE1:bgp 100  只值RR
 peer 10.1.2.2 as-number 100
 peer 10.1.2.2 connect-interface LoopBack0

 l2vpn-family evpn
  policy vpn-target
  peer 10.1.2.2 enable

CE3:bgp 100
 peer 10.1.2.2 as-number 100
 peer 10.1.2.2 connect-interface LoopBack0

 l2vpn-family evpn
  policy vpn-target
  peer 10.1.2.2 enable

CE2:bridge-domain 10
 vxlan vni 10
 evpn
  route-distinguisher 100:1
  vpn-target 100:1 export-extcommunity
  vpn-target 100:1 import-extcommunity

bridge-domain 20
 vxlan vni 20
 evpn
  route-distinguisher 100:2
  vpn-target 100:2 export-extcommunity
  vpn-target 100:2 import-extcommunity

interface Vbdif10
 ip address 10.1.10.254 255.255.255.0
#
interface Vbdif20
 ip address 10.1.20.254 255.255.255.0
 

 interface Nve1
 source 10.1.2.2
 vni 10 head-end peer-list protocol bgp
 vni 20 head-end peer-list protocol bgp

bgp 100 配置RR
 peer 10.1.1.1 as-number 100
 peer 10.1.1.1 connect-interface LoopBack0
 peer 10.1.3.3 as-number 100
 peer 10.1.3.3 connect-interface LoopBack0

 l2vpn-family evpn
  policy vpn-target
  peer 10.1.1.1 enable
  peer 10.1.1.1 reflect-client
  peer 10.1.3.3 enable
  peer 10.1.3.3 reflect-client

到对面就会变成20的vni

 

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值