华为VXLAN集中式网关部署实验——BGP 动态方式
¥249
更多
文章目录
实现拓扑图
步骤一:实验前准备
步骤二:设备配置
步骤三:配置验证
实现拓扑图
步骤一:实验前准备
本实验使用的是eNSP v1.2.00.500,CE12800系统版本Version 8.130 (CE12800 V800R013C00SPC560B560),这个版本我已经测试可成功做VXLAN实验,其它版本做VXLAN可能会出现Ping不通的BUG,如果需要下载本实验所用eNSP版本,请关注微信公众号“IT后院”回复“B500”获取下载链接。
步骤二:设备配置
<Spine>
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
interface GE1/0/1
undo portswitch
undo shutdown
ip address 192.168.1.2 255.255.255.0
#
interface GE1/0/2
undo portswitch
undo shutdown
ip address 192.168.2.1 255.255.255.0
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
#
evp enable
#
commit //注意,华为CE12800需要输入commit 配置才会生效
#
bgp 100 instance e1
peer 2.2.2.2 as-number 100
peer 2.2.2.2 connect-interface LoopBack1
peer 4.4.4.4 as-number 100
peer 4.4.4.4 connect-interface LoopBack1
#
l2 evp
undo policy vp
peer 2.2.2.2 enable
peer 2.2.2.2 reflect-client
peer 4.4.4.4 enable
peer 4.4.4.4 reflect-client
#
interface Nve1
source 3.3.3.3
vni 10 head-end peer-list protocol bgp
vni 20 head-end peer-list protocol bgp
#
bridge-domain 10
vxlan vni 10
evp
arp broadcast-suppress enable
route-distinguisher 10:1
vp 10:1 export-extcommunity
vp 10:1 import-extcommunity
#
bridge-domain 20
vxlan vni 20
evp
arp broadcast-suppress enable
route-distinguisher 20:1
vp 20:1 export-extcommunity
vp 20:1 import-extcommunity
#
interface Vbdif10
ip address 192.168.10.254 255.255.255.0
#
interface Vbdif20
ip address 192.168.20.254 255.255.255.0
<Leaf1>
vlan batch 10 20 30
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
interface GE1/0/1
undo portswitch
undo shutdown
ip address 192.168.1.1 255.255.255.0
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 192.168.1.0 0.0.0.255
#
evp enable
commit
#
bgp 100 instance e1
peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack1
#
l2 evp
policy vp
peer 3.3.3.3 enable
#
interface Nve1
source 2.2.2.2
vni 10 head-end peer-list protocol bgp
vni 20 head-end peer-list protocol bgp
#
interface GE1/0/3
undo shutdown
#
interface GE1/0/3.1 mode l2
encapsulation dot1q vid 10
bridge-domain 10
#
interface GE1/0/3.2 mode l2
encapsulation dot1q vid 20
bridge-domain 20
#
bridge-domain 10
vxlan vni 10
evp
arp broadcast-suppress enable
route-distinguisher 10:1
vp 10:1 export-extcommunity
vp 10:1 import-extcommunity
#
bridge-domain 20
vxlan vni 20
evp
arp broadcast-suppress enable
route-distinguisher 20:1
vp 20:1 export-extcommunity
vp 20:1 import-extcommunity
<Leaf2>
vlan batch 10 20 30
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
#
interface GE1/0/1
undo portswitch
undo shutdown
ip address 192.168.2.2 255.255.255.0
#
ospf 1
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 192.168.2.0 0.0.0.255
#
evp enable
commit
#
bgp 100 instance e1
peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack1
#
l2 evp
policy vp
peer 3.3.3.3 enable
#
interface Nve1
source 4.4.4.4
vni 20 head-end peer-list protocol bgp
#
interface GE1/0/3
undo shutdown
#
interface GE1/0/3.1 mode l2
encapsulation dot1q vid 20
bridge-domain 20
#
bridge-domain 20
vxlan vni 20
evp
arp broadcast-suppress enable
route-distinguisher 20:1
vp 20:1 export-extcommunity
vp 20:1 import-extcommunity
<SW1>
vlan batch 10 20 30
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 20
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20
<SW2>
vlan batch 20
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 20
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 20
步骤三:配置验证