evpn配置入门_evpn

通过在NE1和NE3上建立EVPN,实现PC1和PC2互通

配置步骤:

1.要首先关闭dcn功能

2.配置接口IP

2.配置OSPF实现NE1,NE2和NE3的IGP互通,并配置LDP协议

3.配置NE1和NE3 EVPN邻居关系,并指定EVPN源地址evpn source-address 11.1.1.1

4.配置如下

<PE1>display saved-configuration 
#
sysname PE1
#
router id 11.1.1.1
#
evpn vpn-instance leqi
 route-distinguisher 100:1
 vpn-target 1:1 export-extcommunity
 vpn-target 1:1 import-extcommunity
#
mpls lsr-id 11.1.1.1
#
mpls
#
mpls ldp
#
interface Ethernet1/0/0
 undo shutdown
 ip address 10.1.12.1 255.255.255.0
 mpls
 mpls ldp
 undo dcn
 undo dcn mode vlan
#
interface Ethernet1/0/9
 undo shutdown
 evpn binding vpn-instance leqi
 undo dcn mode vlan
#
interface LoopBack0
 ip address 11.1.1.1 255.255.255.255
#
bgp 100
 undo default ipv4-unicast
 peer 33.1.1.1 as-number 100
 peer 33.1.1.1 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  undo peer 33.1.1.1 enable
 #
 l2vpn-family evpn
  undo policy vpn-target
  peer 33.1.1.1 enable
#
ospf 1
 area 0.0.0.0
  network 10.1.12.0 0.0.0.255
  network 11.1.1.1 0.0.0.0
#
undo dcn
#
evpn source-address 11.1.1.1
#