EVE-NG推广
查看: 1887|回复: 5

BGP EVPN和MPLS L3VPN路由互相引入问题

12

主题

81

回帖

1771

积分

高级会员

Rank: 4

积分
1771
本帖最后由 cfplzjc 于 2022-1-14 18:13 编辑

1、网络拓扑
   如下图所示,双数据中心A和B,数据中心内部跑分布式BGP EVPN,数据中心之间通过跨域Opiton-B互通。数据中心的边界Border Leaf同时充当PE角色,希望通过BGP EVPN和MPL3 VPN互相引入路由实现,结果路由无法传递给ASBR,哪位老板,帮忙看下是什么原因。
-------------------DC1-FW1、DC2-FW1、QZ-AR1属于外网访问打通,不涉及。
a1.png

2、相关配置
(1)数据中心A的配置
DC1-ASBR1
#
sysname DC1-ASBR1

#
mpls lsr-id 100.1.1.2
mpls
#
mpls ldp

#
isis 100
is-level level-2
network-entity 49.0001.0000.0000.1002.00
                              
#
interface GigabitEthernet0/0/0
ip address 100.100.1.2 255.255.255.252
isis enable 100
isis circuit-type p2p
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
ip address 100.100.2.1 255.255.255.252
mpls

#
interface LoopBack0
ip address 100.1.1.2 255.255.255.255
isis enable 100
#
bgp 100
undo default ipv4-unicast
peer 100.1.1.1 as-number 100
peer 100.1.1.1 connect-interface LoopBack0
peer 200.1.1.2 as-number 200
peer 200.1.1.2 ebgp-max-hop 2
peer 200.1.1.2 connect-interface LoopBack0
#
ipv4-family unicast
  undo synchronization
  undo peer 100.1.1.1 enable
  undo peer 200.1.1.2 enable
#
ipv4-family vpnv4
  undo policy vpn-target
  peer 100.1.1.1 enable
  peer 200.1.1.2 enable
#
ip route-static 200.1.1.2 255.255.255.255 100.100.2.2

------------------------------------------------------------------
DC1-BL01
#
sysname DC1-BL01
#
evpn-overlay enable
#
ip vpn-instance gw_vpna
ipv4-family
  route-distinguisher 1:1
vxlan vni 1000
#
ip vpn-instance gw_vpnb
ipv4-family
  route-distinguisher 1:2
vxlan vni 2000
#
ip vpn-instance vpna
ipv4-family
  route-distinguisher 1:100
  vpn-target 1:100 export-extcommunity
  vpn-target 1:101 export-extcommunity evpn
  vpn-target 1:100 import-extcommunity
  vpn-target 1:101 import-extcommunity evpn
vxlan vni 100
#
ip vpn-instance vpnb
ipv4-family
  route-distinguisher 1:200
  vpn-target 1:200 export-extcommunity
  vpn-target 1:201 export-extcommunity evpn
  vpn-target 1:200 import-extcommunity
  vpn-target 1:201 import-extcommunity evpn
vxlan vni 200
#
mpls lsr-id 100.1.1.1
#
mpls

#
mpls ldp

#
bridge-domain 10
vxlan vni 10
evpn
  route-distinguisher 1:10
  vpn-target 1:10 export-extcommunity
  vpn-target 1:101 export-extcommunity
  vpn-target 1:10 import-extcommunity
arp broadcast-suppress enable
#
bridge-domain 20
vxlan vni 20
evpn
  route-distinguisher 1:20
  vpn-target 1:20 export-extcommunity
  vpn-target 1:201 export-extcommunity
  vpn-target 1:20 import-extcommunity
arp broadcast-suppress enable

#
isis 100
is-level level-2
network-entity 49.0001.0000.0000.1001.00
#
interface GE1/0/0
undo portswitch
undo shutdown
#
interface GE1/0/0.1
ip binding vpn-instance gw_vpna
ip address 200.200.11.2 255.255.255.252
dot1q termination vid 11
ospf network-type p2p
#
interface GE1/0/0.2
ip binding vpn-instance gw_vpnb
ip address 200.200.12.2 255.255.255.252
dot1q termination vid 12
ospf network-type p2p
#
interface GE1/0/1
undo portswitch
undo shutdown
ip address 100.100.1.1 255.255.255.252
isis enable 100
isis circuit-type p2p
mpls
mpls ldp
#
interface GE1/0/2
undo portswitch
undo shutdown
ip address 172.16.11.1 255.255.255.252
ospf network-type p2p
#
interface GE1/0/3
undo portswitch
undo shutdown
#
interface GE1/0/3.11
ip binding vpn-instance vpna
ip address 172.1.11.1 255.255.255.252
dot1q termination vid 11
#
interface GE1/0/3.12
ip binding vpn-instance gw_vpna
ip address 172.1.12.1 255.255.255.252
dot1q termination vid 12
#
interface GE1/0/3.21
ip binding vpn-instance vpnb
ip address 172.1.21.1 255.255.255.252
dot1q termination vid 21

#
interface GE1/0/3.22
ip binding vpn-instance gw_vpnb
ip address 172.1.22.1 255.255.255.252
dot1q termination vid 22

#
interface LoopBack0
ip address 100.1.1.1 255.255.255.255
isis enable 100
#
interface Nve1
  
source 100.1.1.1
vni 10 head-end peer-list protocol bgp
vni 20 head-end peer-list protocol bgp
#
bgp 100
undo default ipv4-unicast
peer 10.1.1.1 as-number 100
peer 10.1.1.1 connect-interface LoopBack0
peer 100.1.1.2 as-number 100
peer 100.1.1.2 connect-interface LoopBack0
#
ipv4-family unicast
  undo peer 10.1.1.1 enable
  undo peer 100.1.1.2 enable
#
ipv4-family vpnv4
  policy vpn-target
  peer 100.1.1.2 enable
  y
  peer 100.1.1.2 ip-prefix PC export
#
ipv4-family vpn-instance vpna
  default-route imported
  import-route static
  maximum load-balancing 32  
  advertise l2vpn evpn
#
ipv4-family vpn-instance vpnb
  default-route imported
  import-route static
  maximum load-balancing 32  
  advertise l2vpn evpn
#
l2vpn-family evpn
  policy vpn-target
  peer 10.1.1.1 enable
  y
  peer 10.1.1.1 advertise irb
  peer 10.1.1.1 advertise irbv6
#
ospf 11 router-id 100.1.1.1 vpn-instance gw_vpna
area 0.0.0.0
  network 200.200.11.2 0.0.0.0
#
ospf 12 router-id 100.1.1.1 vpn-instance gw_vpnb
area 0.0.0.0

  network 200.200.12.2 0.0.0.0
#
ospf 100 router-id 100.1.1.1
area 0.0.0.0
  network 100.1.1.1 0.0.0.0
  network 172.16.11.1 0.0.0.0
#
ip ip-prefix PC index 10 permit 192.168.0.0 16 greater-equal 32 less-equal 32
#
ip route-static vpn-instance vpna 0.0.0.0 0.0.0.0 172.1.11.2
ip route-static vpn-instance vpnb 0.0.0.0 0.0.0.0 172.1.21.2

------------------------------------------------------------------------------------
DC1-SP01
#
sysname DC1-SP01
#
interface GE1/0/0
undo portswitch
undo shutdown
ip address 172.16.11.2 255.255.255.252
ospf network-type p2p
#
interface GE1/0/1
undo portswitch
undo shutdown
ip address 172.16.12.1 255.255.255.252
ospf network-type p2p
#
interface GE1/0/2
undo portswitch
undo shutdown
ip address 172.16.13.1 255.255.255.252
ospf network-type p2p

#
interface LoopBack0
ip address 10.1.1.1 255.255.255.255
#
           
bgp 100
undo default ipv4-unicast
group leaf internal
peer leaf connect-interface LoopBack0
peer 1.1.1.1 as-number 100
peer 1.1.1.1 group leaf
peer 1.1.1.2 as-number 100
peer 1.1.1.2 group leaf
peer 100.1.1.1 as-number 100
peer 100.1.1.1 group leaf
#
ipv4-family unicast
  undo peer leaf enable
  undo peer 1.1.1.1 enable
  undo peer 1.1.1.2 enable
  undo peer 100.1.1.1 enable
#
l2vpn-family evpn
  undo policy vpn-target
  peer leaf enable
  peer leaf advertise irb
  peer leaf advertise irbv6
  peer leaf reflect-client
  peer 1.1.1.1 group leaf
  y
  peer 1.1.1.2 group leaf
  y
  peer 100.1.1.1 group leaf
  y
#
ospf 100 router-id 10.1.1.1
area 0.0.0.0
  network 10.1.1.1 0.0.0.0
  network 172.16.11.2 0.0.0.0
  network 172.16.12.1 0.0.0.0
  network 172.16.13.1 0.0.0.0
----------------------------------------------------------
DC1-SL01
#
sysname DC1-SL01
#
evpn-overlay enable
#
evpn
#
ip vpn-instance vpna
ipv4-family
  route-distinguisher 1:100
  vpn-target 1:100 export-extcommunity
  vpn-target 1:101 export-extcommunity evpn
  vpn-target 1:100 import-extcommunity
  vpn-target 1:101 import-extcommunity evpn
vxlan vni 100
#
ip vpn-instance vpnb
ipv4-family

  route-distinguisher 1:200
  vpn-target 1:200 export-extcommunity
  vpn-target 1:201 export-extcommunity evpn
  vpn-target 1:200 import-extcommunity
  vpn-target 1:201 import-extcommunity evpn
vxlan vni 200
#
bridge-domain 10
vxlan vni 10
evpn
  route-distinguisher 1:10
  vpn-target 1:10 export-extcommunity
  vpn-target 1:101 export-extcommunity
  vpn-target 1:10 import-extcommunity
arp broadcast-suppress enable
#
bridge-domain 20
vxlan vni 20
evpn
  route-distinguisher 1:20
  vpn-target 1:20 export-extcommunity
  vpn-target 1:201 export-extcommunity
  vpn-target 1:20 import-extcommunity
arp broadcast-suppress enable

#
interface Vbdif10
ip binding vpn-instance vpna
ip address 192.168.1.1 255.255.255.0
mac-address 0000-5e00-1111
vxlan anycast-gateway enable
arp collect host enable
#
interface Vbdif20
ip binding vpn-instance vpnb
ip address 192.168.2.1 255.255.255.0
mac-address 0000-5e00-1111
vxlan anycast-gateway enable
arp collect host enable
#
interface GE1/0/0
undo portswitch
undo shutdown
ip address 172.16.12.2 255.255.255.252
ospf network-type p2p
#
interface GE1/0/1
undo shutdown
#
interface GE1/0/1.1 mode l2
encapsulation dot1q vid 11
bridge-domain 10
#
interface GE1/0/1.2 mode l2
encapsulation dot1q vid 21
bridge-domain 20

#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
interface Nve1
source 1.1.1.1
vni 10 head-end peer-list protocol bgp
vni 20 head-end peer-list protocol bgp
#
bgp 100
undo default ipv4-unicast
peer 10.1.1.1 as-number 100
peer 10.1.1.1 connect-interface LoopBack0
#
ipv4-family unicast
  undo peer 10.1.1.1 enable
#
l2vpn-family evpn
  policy vpn-target
  peer 10.1.1.1 enable
  y
  peer 10.1.1.1 advertise irb
  peer 10.1.1.1 advertise irbv6
#
ospf 100 router-id 1.1.1.1
area 0.0.0.0
  network 1.1.1.1 0.0.0.0
  network 172.16.12.2 0.0.0.0
---------------------------------------------------------
DC1-SL02
#
sysname DC1-SL02
#
evpn-overlay enable
#
ip vpn-instance vpna
ipv4-family
  route-distinguisher 1:100
  vpn-target 1:100 export-extcommunity
  vpn-target 1:101 export-extcommunity evpn
  vpn-target 1:100 import-extcommunity
  vpn-target 1:101 import-extcommunity evpn
vxlan vni 100
#
ip vpn-instance vpnb
ipv4-family
  route-distinguisher 1:200
  vpn-target 1:200 export-extcommunity
  vpn-target 1:201 export-extcommunity evpn
  vpn-target 1:200 import-extcommunity
  vpn-target 1:201 import-extcommunity evpn
vxlan vni 200
#
bridge-domain 10
vxlan vni 10
evpn
  route-distinguisher 1:10
  vpn-target 1:10 export-extcommunity
  vpn-target 1:101 export-extcommunity
  vpn-target 1:10 import-extcommunity
arp broadcast-suppress enable
#
bridge-domain 20
vxlan vni 20
evpn
  route-distinguisher 1:20
  vpn-target 1:20 export-extcommunity
  vpn-target 1:201 export-extcommunity
  vpn-target 1:20 import-extcommunity
arp broadcast-suppress enable

#
interface Vbdif10
ip binding vpn-instance vpna
ip address 192.168.1.1 255.255.255.0
mac-address 0000-5e00-1111
vxlan anycast-gateway enable
arp collect host enable
#
interface Vbdif20
ip binding vpn-instance vpnb
ip address 192.168.2.1 255.255.255.0
mac-address 0000-5e00-1111
vxlan anycast-gateway enable
arp collect host enable
#
interface GE1/0/0
undo portswitch
undo shutdown
ip address 172.16.13.2 255.255.255.252
ospf network-type p2p
#
interface GE1/0/1
undo shutdown
#
interface GE1/0/1.1 mode l2
encapsulation dot1q vid 12
bridge-domain 10
#
interface GE1/0/1.2 mode l2
encapsulation dot1q vid 22
bridge-domain 20

#
interface LoopBack0
ip address 1.1.1.2 255.255.255.255
#
interface Nve1
source 1.1.1.2
vni 10 head-end peer-list protocol bgp
vni 20 head-end peer-list protocol bgp
#
bgp 100
undo default ipv4-unicast
peer 10.1.1.1 as-number 100
peer 10.1.1.1 connect-interface LoopBack0
#
ipv4-family unicast
  undo peer 10.1.1.1 enable
#
l2vpn-family evpn
  policy vpn-target
  peer 10.1.1.1 enable
  y
  peer 10.1.1.1 advertise irb
#
ospf 100 router-id 1.1.1.2
area 0.0.0.0
  network 1.1.1.2 0.0.0.0
  network 172.16.13.2 0.0.0.0
(2)数据中心B配置
DC2-ASBR1
#
sysname DC2-ASBR1

#
mpls lsr-id 200.1.1.2
mpls
#
mpls ldp

#
isis 200
is-level level-2
network-entity 49.0001.0000.0000.2002.00
                              
#
interface GigabitEthernet0/0/0
ip address 100.100.3.1 255.255.255.252
isis enable 200
isis circuit-type p2p
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
ip address 100.100.2.2 255.255.255.252
mpls

#
interface LoopBack0
ip address 200.1.1.2 255.255.255.255
isis enable 200
#
bgp 200
undo default ipv4-unicast
peer 100.1.1.2 as-number 100
peer 100.1.1.2 ebgp-max-hop 2
peer 100.1.1.2 connect-interface LoopBack0
peer 200.1.1.1 as-number 200
peer 200.1.1.1 connect-interface LoopBack0
#
ipv4-family unicast
  undo synchronization
  undo peer 100.1.1.2 enable
  undo peer 200.1.1.1 enable
#
ipv4-family vpnv4
  undo policy vpn-target
  peer 100.1.1.2 enable
  peer 200.1.1.1 enable
#
ip route-static 100.1.1.2 255.255.255.255 100.100.2.1

-----------------------------------------------------------------------
DC2-BL01
#
sysname DC2-BL01
#
evpn-overlay enable
#
ip vpn-instance gw_vpna
ipv4-family
  route-distinguisher 1:1
vxlan vni 1001
#
ip vpn-instance gw_vpnb
ipv4-family
  route-distinguisher 1:2
vxlan vni 2001
#
ip vpn-instance vpna
ipv4-family
  route-distinguisher 1:101
  vpn-target 1:100 export-extcommunity
  vpn-target 1:101 export-extcommunity evpn
  vpn-target 1:100 import-extcommunity
  vpn-target 1:101 import-extcommunity evpn
vxlan vni 101
#
ip vpn-instance vpnb
ipv4-family
  route-distinguisher 1:201
  vpn-target 1:200 export-extcommunity
  vpn-target 1:201 export-extcommunity evpn
  vpn-target 1:200 import-extcommunity
  vpn-target 1:201 import-extcommunity evpn
vxlan vni 201
#
mpls lsr-id 200.1.1.1
#
mpls

#
mpls ldp

#
isis 200
is-level level-2
network-entity 49.0001.0000.0000.2001.00
#
interface GE1/0/0
undo portswitch
undo shutdown
#
interface GE1/0/0.1
ip binding vpn-instance gw_vpna
ip address 200.200.21.2 255.255.255.252
dot1q termination vid 11
ospf network-type p2p
#
interface GE1/0/0.2
ip binding vpn-instance gw_vpnb
ip address 200.200.22.2 255.255.255.252
dot1q termination vid 12
ospf network-type p2p
#
interface GE1/0/1
undo portswitch
undo shutdown
ip address 100.100.3.2 255.255.255.252
isis enable 200
isis circuit-type p2p
mpls
mpls ldp
#
interface GE1/0/2
undo portswitch
undo shutdown
ip address 172.16.21.1 255.255.255.252
ospf network-type p2p
#
interface GE1/0/3
undo portswitch
undo shutdown
#
interface GE1/0/3.11
ip binding vpn-instance vpna
ip address 172.2.11.1 255.255.255.252
dot1q termination vid 11
#
interface GE1/0/3.12
ip binding vpn-instance gw_vpna
ip address 172.2.12.1 255.255.255.252
dot1q termination vid 12
#
interface GE1/0/3.21
ip binding vpn-instance vpnb
ip address 172.2.21.1 255.255.255.252
dot1q termination vid 21

#
interface GE1/0/3.22
ip binding vpn-instance gw_vpnb
ip address 172.2.22.1 255.255.255.252
dot1q termination vid 22

#
interface LoopBack0
ip address 200.1.1.1 255.255.255.255
isis enable 200
#
interface Nve1
  
source 200.1.1.1
vni 11 head-end peer-list protocol bgp
vni 21 head-end peer-list protocol bgp
#
bgp 200
undo default ipv4-unicast
peer 20.1.1.1 as-number 200
peer 20.1.1.1 connect-interface LoopBack0
peer 200.1.1.2 as-number 200
peer 200.1.1.2 connect-interface LoopBack0
#
ipv4-family unicast
  import-route direct
  undo peer 20.1.1.1 enable
  undo peer 200.1.1.2 enable
#
ipv4-family vpnv4
  policy vpn-target
  peer 200.1.1.2 enable
y
  peer 200.1.1.2 ip-prefix PC export
#
            
ipv4-family vpn-instance vpna
  default-route imported
  network 192.168.1.30 255.255.255.255
  import-route static
  maximum load-balancing 32  
  advertise l2vpn evpn
#
ipv4-family vpn-instance vpnb
  default-route imported
  network 192.168.2.30 255.255.255.255
  import-route static
  maximum load-balancing 32  
  advertise l2vpn evpn
#
l2vpn-family evpn
  policy vpn-target
  peer 20.1.1.1 enable
  y
  peer 20.1.1.1 advertise irb
  peer 20.1.1.1 advertise irbv6
#
ospf 11 router-id 100.1.1.3 vpn-instance gw_vpna
area 0.0.0.0
  network 200.200.21.2 0.0.0.0
#
ospf 12 router-id 100.1.1.3 vpn-instance gw_vpnb
area 0.0.0.0
  network 200.200.22.2 0.0.0.0
#
ospf 100 router-id 100.1.1.3
area 0.0.0.0
  network 172.16.21.1 0.0.0.0
  network 200.1.1.1 0.0.0.0
#
ip ip-prefix PC index 10 permit 192.168.0.0 16 greater-equal 32 less-equal 32
#
ip route-static vpn-instance vpna 0.0.0.0 0.0.0.0 172.2.11.2
ip route-static vpn-instance vpnb 0.0.0.0 0.0.0.0 172.2.21.2

------------------------------------------------------------------------------------
DC2-SP01
#
sysname DC2-SP01
#
evpn-overlay enable
#
interface GE1/0/0
undo portswitch
undo shutdown
ip address 172.16.21.2 255.255.255.252
ospf network-type p2p
#
interface GE1/0/1
undo portswitch
undo shutdown
ip address 172.16.22.1 255.255.255.252
ospf network-type p2p
#
interface GE1/0/2
undo portswitch
undo shutdown
ip address 172.16.23.1 255.255.255.252
ospf network-type p2p

#
interface LoopBack0
ip address 20.1.1.1 255.255.255.255
#
           
bgp 200
undo default ipv4-unicast
group leaf internal
peer leaf connect-interface LoopBack0
peer 2.1.1.1 as-number 200
peer 2.1.1.1 group leaf
peer 2.1.1.2 as-number 200
peer 2.1.1.2 group leaf
peer 200.1.1.1 as-number 200
peer 200.1.1.1 group leaf
#
ipv4-family unicast
  undo peer leaf enable
  undo peer 2.1.1.1 enable
  undo peer 2.1.1.2 enable
  undo peer 200.1.1.1 enable
#
l2vpn-family evpn
  undo policy vpn-target
  peer leaf enable
  peer leaf advertise irb
  peer leaf advertise irbv6
  peer leaf reflect-client
  peer 2.1.1.1 group leaf
  y
  peer 2.1.1.2 group leaf
  y
  peer 200.1.1.1 group leaf
  y
#
ospf 100 router-id 20.1.1.1
area 0.0.0.0
  network 20.1.1.1 0.0.0.0
  network 172.16.21.2 0.0.0.0
  network 172.16.22.1 0.0.0.0
  network 172.16.23.1 0.0.0.0
------------------------------------------------------
DC2-SL01
#
sysname DC2-SL01
#
evpn-overlay enable
#
ip vpn-instance vpna
ipv4-family
  route-distinguisher 1:101
  vpn-target 1:100 export-extcommunity
  vpn-target 1:101 export-extcommunity evpn
  vpn-target 1:100 import-extcommunity
  vpn-target 1:101 import-extcommunity evpn
vxlan vni 101
#
ip vpn-instance vpnb
ipv4-family
  route-distinguisher 1:201
  vpn-target 1:200 export-extcommunity
  vpn-target 1:201 export-extcommunity evpn
  vpn-target 1:200 import-extcommunity
  vpn-target 1:201 import-extcommunity evpn
vxlan vni 201
#
bridge-domain 11
vxlan vni 11
evpn
  route-distinguisher 1:11
  vpn-target 1:11 export-extcommunity
  vpn-target 1:101 export-extcommunity
  vpn-target 1:11 import-extcommunity
arp broadcast-suppress enable
#
bridge-domain 21
vxlan vni 21
evpn
  route-distinguisher 1:21
  vpn-target 1:21 export-extcommunity
  vpn-target 1:201 export-extcommunity
  vpn-target 1:21 import-extcommunity
arp broadcast-suppress enable

#
interface Vbdif11
ip binding vpn-instance vpna
ip address 192.168.1.1 255.255.255.0
mac-address 0000-5e00-1111
vxlan anycast-gateway enable
arp collect host enable
#
interface Vbdif21
ip binding vpn-instance vpnb
ip address 192.168.2.1 255.255.255.0
mac-address 0000-5e00-1111
vxlan anycast-gateway enable
arp collect host enable
#
interface GE1/0/0
undo portswitch
undo shutdown
ip address 172.16.22.2 255.255.255.252
ospf network-type p2p
#
interface GE1/0/1
undo shutdown
#
interface GE1/0/1.1 mode l2
encapsulation dot1q vid 13
bridge-domain 11
#
interface GE1/0/1.2 mode l2
encapsulation dot1q vid 23
bridge-domain 21

#
interface LoopBack0
ip address 2.1.1.1 255.255.255.255
#
interface Nve1
source 2.1.1.1
vni 11 head-end peer-list protocol bgp
vni 21 head-end peer-list protocol bgp
#
bgp 200
undo default ipv4-unicast
peer 20.1.1.1 as-number 200
peer 20.1.1.1 connect-interface LoopBack0
#
ipv4-family unicast
  undo peer 20.1.1.1 enable
#
l2vpn-family evpn
  policy vpn-target
  peer 20.1.1.1 enable
  y
  peer 20.1.1.1 advertise irb
  peer 20.1.1.1 advertise irbv6
#
ospf 100 router-id 2.1.1.1
area 0.0.0.0
  network 2.1.1.1 0.0.0.0
  network 172.16.22.2 0.0.0.0
------------------------------------------------
DC2-SL02
#
sysname DC2-SL02
#
evpn-overlay enable
#
ip vpn-instance vpna
ipv4-family
  route-distinguisher 1:101
  vpn-target 1:100 export-extcommunity
  vpn-target 1:101 export-extcommunity evpn
  vpn-target 1:100 import-extcommunity
  vpn-target 1:101 import-extcommunity evpn
vxlan vni 101
#
ip vpn-instance vpnb
ipv4-family
  route-distinguisher 1:201
  vpn-target 1:200 export-extcommunity
  vpn-target 1:201 export-extcommunity evpn
  vpn-target 1:200 import-extcommunity
  vpn-target 1:201 import-extcommunity evpn
vxlan vni 201
#
bridge-domain 11
vxlan vni 11
evpn
  route-distinguisher 1:11
  vpn-target 1:11 export-extcommunity
  vpn-target 1:101 export-extcommunity
  vpn-target 1:11 import-extcommunity
arp broadcast-suppress enable
#
bridge-domain 21
vxlan vni 21
evpn
  route-distinguisher 1:21
  vpn-target 1:21 export-extcommunity
  vpn-target 1:201 export-extcommunity
  vpn-target 1:21 import-extcommunity
arp broadcast-suppress enable

#
interface Vbdif11
ip binding vpn-instance vpna
ip address 192.168.1.1 255.255.255.0
mac-address 0000-5e00-1111
vxlan anycast-gateway enable
arp collect host enable
#
interface Vbdif21
ip binding vpn-instance vpnb
ip address 192.168.2.1 255.255.255.0
mac-address 0000-5e00-1111
vxlan anycast-gateway enable
arp collect host enable
#
interface GE1/0/0
undo portswitch
undo shutdown
ip address 172.16.23.2 255.255.255.252
ospf network-type p2p
#
interface GE1/0/1
undo shutdown
#
interface GE1/0/1.1 mode l2
encapsulation dot1q vid 14
bridge-domain 11
#
interface GE1/0/1.2 mode l2
encapsulation dot1q vid 24
bridge-domain 21

#
interface LoopBack0
ip address 2.1.1.2 255.255.255.255
#
interface Nve1
source 2.1.1.2
vni 11 head-end peer-list protocol bgp
vni 21 head-end peer-list protocol bgp
#
bgp 200
undo default ipv4-unicast
peer 20.1.1.1 as-number 200
peer 20.1.1.1 connect-interface LoopBack0
#
ipv4-family unicast
  undo peer 20.1.1.1 enable
#
l2vpn-family evpn
  policy vpn-target
  peer 20.1.1.1 enable
  y
  peer 20.1.1.1 advertise irb
  peer 20.1.1.1 advertise irbv6
#
ospf 100 router-id 2.1.1.2
area 0.0.0.0
  network 2.1.1.2 0.0.0.0
  network 172.16.23.2 0.0.0.0

3、实验结果
(1)DC1-BL01和DC2-BL01都能学习到SL下面的主机路由,并且放入VPNV4路由表
a1.png a2.png
------------------------------------------------------------------------------------------------------------------------
a3.png a4.png

(2)问题点:DC1-ASBR1和DC2-ASBR1均不能学习到PE学习到的路由
a5.png a6.png

_Exports_unetlab_export-20220111-030555.zip

8.01 KB, 下载次数: 15

网络拓扑

回复

使用道具 举报

13

主题

106

回帖

3万

积分

版主

Rank: 7Rank: 7Rank: 7

积分
38520
发表于 2022-1-10 23:18:03 | 显示全部楼层
可以把拓扑导出来一下吗?我看看

点评

接入交换机和PC的配置比较简单,我就没贴出来了。就是基础的透一下vlan。  发表于 2022-1-11 02:09
回复

使用道具 举报

12

主题

81

回帖

1771

积分

高级会员

Rank: 4

积分
1771
 楼主| 发表于 2022-1-11 02:08:04 | 显示全部楼层
huyushao520 发表于 2022-1-10 23:18
可以把拓扑导出来一下吗?我看看

拓扑我传了,由于是华为设备不支持导出,配置只能自己贴了。
回复

使用道具 举报

7

主题

136

回帖

3万

积分

富可敌国

积分
31796
发表于 2022-1-12 23:06:01 | 显示全部楼层
非常感谢   配置命令学习很多   感谢  希望多多发帖类似这样的。
回复

使用道具 举报

12

主题

81

回帖

1771

积分

高级会员

Rank: 4

积分
1771
 楼主| 发表于 2022-1-14 18:39:57 | 显示全部楼层
查到命令,NE40E支持,CE12800貌似不支持。
命令配置工具.png

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则


Copyright   ©2015-2024  EmulatedLab  Powered by Discuz!©   ( 浙ICP备2021010423号-1 )
快速回复 返回列表 返回顶部