BGP EVPN方式VXLAN实验( 二 )


peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack0
peer 4.4.4.4 as-number 100
peer 4.4.4.4 connect-interface LoopBack0
peer 5.5.5.5 as-number 100
peer 5.5.5.5 connect-interface LoopBack0
peer 6.6.6.6 as-number 100
peer 6.6.6.6 connect-interface LoopBack0
#
ipv4-family unicast
undo peer 1.1.1.1 enable
undo peer 3.3.3.3 enable
undo peer 4.4.4.4 enable
undo peer 5.5.5.5 enable
undo peer 6.6.6.6 enable
#
l2vpn-family evpn
undo policy vpn-target
peer 1.1.1.1 enable
peer 1.1.1.1 advertise irb
peer 1.1.1.1 reflect-client
peer 3.3.3.3 enable
peer 3.3.3.3 advertise irb
peer 3.3.3.3 reflect-client
peer 4.4.4.4 enable
peer 4.4.4.4 advertise irb
peer 4.4.4.4 reflect-client
peer 5.5.5.5 enable
peer 5.5.5.5 advertise irb
peer 5.5.5.5 reflect-client
peer 6.6.6.6 enable
peer 6.6.6.6 advertise irb
peer 6.6.6.6 reflect-client
#
ospf 1
area 0.0.0.0

  • Leaf1配置
sysname leaf1
#
evpn-overlay enable
#
ip vpn-instance vpna
ipv4-family
route-distinguisher 1111:1111
vpn-target 1111:1111 export-extcommunity evpn
vpn-target 1111:1111 import-extcommunity evpn
vxlan vni 5010
#
bridge-domain 10
vxlan vni 10
evpn
route-distinguisher 10:10
vpn-target 1111:1111 export-extcommunity
vpn-target 10:10 import-extcommunity
arp broadcast-suppress mismatch-discard enable
#
#
interface Vbdif10
ip address 10.1.1.1 255.255.255.0
mac-address 00e0-1010-0001
vxlan anycast-gateway enable
arp collect host enable
#
#
interface GE1/0/0
undo portswitch
undo shutdown
ip address 10.1.13.3 255.255.255.0
ospf network-type p2p
ospf enable 1 area 0.0.0.0
#
interface GE1/0/1
undo portswitch
undo shutdown
ip address 10.1.23.3 255.255.255.0
【BGP EVPN方式VXLAN实验】ospf network-type p2p
ospf enable 1 area 0.0.0.0
#
interface GE1/0/3.10 mode l2
encapsulation dot1q vid 10
bridge-domain 10
#
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
ospf enable 1 area 0.0.0.0
#
interface Nve1
source 3.3.3.3
vni 10 head-end peer-list protocol bgp
#
interface NULL0
#
bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack0
peer 2.2.2.2 as-number 100
peer 2.2.2.2 connect-interface LoopBack0
#
ipv4-family unicast
undo peer 1.1.1.1 enable
undo peer 2.2.2.2 enable
#
l2vpn-family evpn
policy vpn-target
peer 1.1.1.1 enable
peer 1.1.1.1 advertise irb
peer 2.2.2.2 enable
peer 2.2.2.2 advertise irb
#
ospf 1
area 0.0.0.0
#
  • Leaf2 配置
#
sysname leaf2
#
evpn-overlay enable
#
ip vpn-instance vpna
ipv4-family
route-distinguisher 1111:1111
vpn-target 1111:1111 export-extcommunity evpn
vpn-target 1111:1111 import-extcommunity
vpn-target 1111:1111 import-extcommunity evpn
vxlan vni 5010
#
ip vpn-instance vpnb
ipv4-family
route-distinguisher 2222:2222
vpn-target 2222:2222 export-extcommunity evpn
vpn-target 2222:2222 import-extcommunity evpn
vxlan vni 5020
#
bridge-domain 20
vxlan vni 20
evpn
route-distinguisher 20:20
vpn-target 20:20 export-extcommunity
vpn-target 1111:1111 export-extcommunity
vpn-target 20:20 import-extcommunity
arp broadcast-suppress mismatch-discard enable
#
bridge-domain 30
vxlan vni 30
evpn
route-distinguisher 30:30
vpn-target 30:30 export-extcommunity
vpn-target 1111:1111 export-extcommunity
vpn-target 30:30 import-extcommunity
arp broadcast-suppress mismatch-discard enable
#
#
interface Vbdif20
ip binding vpn-instance vpna
ip address 20.1.1.1 255.255.255.0
mac-address 00e0-2020-0001
vxlan anycast-gateway enable
arp collect host enable
#
interface Vbdif30
ip binding vpn-instance vpnb
ip address 30.1.1.1 255.255.255.0
mac-address 00e0-3030-0001
vxlan anycast-gateway enable
arp collect host enable
#
interface GE1/0/0
undo portswitch
undo shutdown
ip address 10.1.14.4 255.255.255.0
ospf network-type p2p
ospf enable 1 area 0.0.0.0
#
interface GE1/0/1
undo portswitch
undo shutdown
ip address 10.1.24.4 255.255.255.0
ospf network-type p2p
ospf enable 1 area 0.0.0.0
#
#


推荐阅读