端到端Vxlan方式使DCI互访实验配置

CE1和CE4建立Vxlan隧道有两种方式

  1. CE1和CE4直接建立EVPN对等体,建立Vxlan隧道
  2. CE1和CE4不直接建立EVPN对等体,通过和CE2、CE3建立EVPN对等体传递EVPN路由使得CE1与CE4建立Vxlan隧道(CE2、CE3传递时不修改路由的下一跳地址)

注:本次实验做的是跨子网互访的实验

命令的含义在DCN内建立Vxlan隧道时已经讲解,本次只书写实验思路与命令

端到端方式与分段式方式的配置有类似的地方,可以互相对比一下

(端到端方式是CE1与CE4直接建立Vxlan隧道,要求中途传递路由时不能修改下一跳,分段式是分段建立Vxlan隧道,中途要求修改下一跳地址)这大概就是配置上的差距了

目录

基本配置

配置LSW1、LSW2的Vlan

配置CE设备的IP地址并使得CE1、CE4的VTEP地址可达

配置EVPN对等体

配置L3VPN实例与三层VNI

CE1与CE4建立Vxlan隧道

配置BD域与二层VNI

配置VTEP接口

配置Vbdif接口

配置Vxlan业务接入


基本配置

配置LSW1、LSW2的Vlan

LSW1

vlan 10

interface GigabitEthernet0/0/1

 port link-type access

 port default vlan 10

interface GigabitEthernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 10

LSW2

vlan 20

interface GigabitEthernet0/0/1

 port link-type access

 port default vlan 20

interface GigabitEthernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 20

配置CE设备的IP地址并使得CE1、CE4的VTEP地址可达

CE1

interface GE1/0/0

 undo portswitch

 undo shutdown

 ip address 10.0.12.1 255.255.255.0

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

ospf 1

 area 0.0.0.0

  network 1.1.1.1 0.0.0.0

  network 10.0.12.0 0.0.0.255

CE2

interface GE1/0/0

 undo portswitch

 undo shutdown

 ip address 10.0.12.2 255.255.255.0

interface GE1/0/1

 undo portswitch

 undo shutdown

 ip address 10.0.25.2 255.255.255.0

interface LoopBack0

 ip address 2.2.2.2 255.255.255.255

ospf 1

 default-route-advertise always

 area 0.0.0.0

  network 2.2.2.2 0.0.0.0

  network 10.0.12.0 0.0.0.255

ip route-static 0.0.0.0 0.0.0.0 10.0.25.5

CE3

interface GE1/0/0

 undo portswitch

 undo shutdown

 ip address 10.0.34.3 255.255.255.0

interface GE1/0/1

 undo portswitch

 undo shutdown

 ip address 10.0.35.3 255.255.255.0

interface LoopBack0

 ip address 3.3.3.3 255.255.255.255

ospf 1

 default-route-advertise always

 area 0.0.0.0

  network 3.3.3.3 0.0.0.0

  network 10.0.34.0 0.0.0.255

ip route-static 0.0.0.0 0.0.0.0 10.0.35.5

CE4

interface GE1/0/1

 undo portswitch

 undo shutdown

 ip address 10.0.34.4 255.255.255.0

interface LoopBack0

 ip address 4.4.4.4 255.255.255.255

ospf 1

 area 0.0.0.0

  network 4.4.4.4 0.0.0.0

  network 10.0.34.0 0.0.0.255

AR1

int g0/0/1

 ip add 10.0.25.5 24

int g0/0/0

 ip add 10.0.35.5 24

ip route-static 1.1.1.1 32 10.0.25.2

ip route-static 4.4.4.4 32 10.0.35.3


配置EVPN对等体

CE1与CE2、CE2与CE3、CE3与CE4建立EVPN对等体

evpn-overlay enable

CE1

bgp 100

 peer 2.2.2.2 as-number 100

 peer 2.2.2.2 connect-interface LoopBack0

 ipv4-family unicast

  peer 2.2.2.2 enable

 l2vpn-family evpn

  policy vpn-target

  peer 2.2.2.2 enable

  peer 2.2.2.2 advertise irb

CE2

bgp 100

 peer 1.1.1.1 as-number 100

 peer 1.1.1.1 connect-interface LoopBack0

 peer 10.0.35.3 as-number 200

 peer 10.0.35.3 ebgp-max-hop 10

ipv4-family unicast

  peer 1.1.1.1 enable

  peer 10.0.35.3 enable

l2vpn-family evpn

  policy vpn-target

  peer 1.1.1.1 enable

  peer 1.1.1.1 advertise irb

  peer 1.1.1.1 next-hop-invariable

  传递EVPN路由时不更改路由下一跳(保证了是1.1.1.1与4.4.4.4建立隧道)

  peer 10.0.35.3 enable   

  peer 10.0.35.3 advertise irb

  peer 10.0.35.3 next-hop-invariable

CE3

bgp 200

 peer 4.4.4.4 as-number 200

 peer 4.4.4.4 connect-interface LoopBack0

 peer 10.0.25.2 as-number 100

 peer 10.0.25.2 ebgp-max-hop 10

 ipv4-family unicast

  peer 4.4.4.4 enable

  peer 10.0.25.2 enable

 l2vpn-family evpn

  policy vpn-target

  peer 4.4.4.4 enable

  peer 4.4.4.4 advertise irb

  peer 4.4.4.4 next-hop-invariable    

  peer 10.0.25.2 enable

  peer 10.0.25.2 advertise irb

  peer 10.0.25.2 next-hop-invariable

CE4

bgp 200

 peer 3.3.3.3 as-number 200

 peer 3.3.3.3 connect-interface LoopBack0

 ipv4-family unicast

  peer 3.3.3.3 enable

 l2vpn-family evpn

  policy vpn-target

  peer 3.3.3.3 enable

  peer 3.3.3.3 advertise irb


配置L3VPN实例与三层VNI

配置L3VPN实例用来传递EVPN路由(CE1、CE2、CE3、CE4配置相同)

ip vpn-instance A

 ipv4-family

  route-distinguisher 1:100

  vpn-target 1:100 export-extcommunity evpn

  vpn-target 1:100 import-extcommunity evpn

 vxlan vni 100


CE1与CE4建立Vxlan隧道

蓝色CE1配置绿色CE4配置

配置BD域与二层VNI

bridge-domain 10

 vxlan vni 10

 evpn

  route-distinguisher 1:10

  vpn-target 1:10 export-extcommunity

  vpn-target 1:100 export-extcommunity

  vpn-target 1:10 import-extcommunity

bridge-domain 20

 vxlan vni 20

 evpn

  route-distinguisher 1:20

  vpn-target 1:20 export-extcommunity

  vpn-target 1:100 export-extcommunity

  vpn-target 1:20 import-extcommunity

  vpn-target 1:100 import-extcommunity

配置VTEP接口

interface Nve1

 source 1.1.1.1

interface Nve1

 source 4.4.4.4

配置Vbdif接口

interface Vbdif10

 ip binding vpn-instance A

 ip address 192.168.1.254 255.255.255.0

 vxlan anycast-gateway enable

 arp collect host enable

interface Vbdif20

 ip binding vpn-instance A

 ip address 192.168.2.254 255.255.255.0

 vxlan anycast-gateway enable

 arp collect host enable

配置Vxlan业务接入

interface GE1/0/1.10 mode l2

 encapsulation dot1q vid 10

 bridge-domain 10

interface GE1/0/0.10 mode l2

 encapsulation dot1q vid 20

 bridge-domain 20

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

静下心来敲木鱼

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

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

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

打赏作者

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

抵扣说明:

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

余额充值