第一篇:VxLAN+EVPN基本配置
配置文件
•Device1的配置文件
#
sysname Device1
#
assign forward nvo3 acl extend enable //仅CE12800需要配置此步骤
#
evpn-overlay enable
#
bridge-domain 20
vxlan vni 5020
evpn
route-distinguisher 10:1
vpn-target 100:5020 export-extcommunity
vpn-target 100:5020 import-extcommunity
#
interface 10GE1/0/1
undo portswitch
ip address 192.168.1.1 255.255.255.0
#
interface 10GE1/0/2.1 mode l2
encapsulation dot1q vid 30
bridge-domain 20
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
interface Nve1
source 2.2.2.2
vni 5020 head-end peer-list protocol bgp
#
bgp 100
peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack1
#
ipv4-family unicast
peer 3.3.3.3 enable
#
l2vpn-family evpn
policy vpn-target
peer 3.3.3.3 enable
#
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
#
return
•Device2的配置文件
#
sysname Device2
#
evpn-overlay enable
#
interface 10GE1/0/1
undo portswitch
ip address 192.168.1.2 255.255.255.0
#
interface 10GE1/0/2
undo portswitch
ip address 192.168.2.1 255.255.255.0
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
bgp 100
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
#
ipv4-family unicast
peer 2.2.2.2 enable
peer 4.4.4.4 enable
#
l2vpn-family evpn
undo policy vpn-target
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
#
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
#
return
•Device3的配置文件
#
sysname Device3
#
assign forward nvo3 acl extend enable //仅CE12800需要配置此步骤
#
evpn-overlay enable
#
bridge-domain 20
vxlan vni 5020
evpn
route-distinguisher 10:3
vpn-target 100:5020 export-extcommunity
vpn-target 100:5020 import-extcommunity
#
interface 10GE1/0/1
undo portswitch
ip address 192.168.2.2 255.255.255.0
#
interface 10GE1/0/2.1 mode l2
encapsulation dot1q vid 20
bridge-domain 20
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
#
interface Nve1
source 4.4.4.4
vni 5020 head-end peer-list protocol bgp
#
bgp 100
peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack1
#
ipv4-family unicast
peer 3.3.3.3 enable
#
l2vpn-family evpn
policy vpn-target
peer 3.3.3.3 enable
#
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
#
return