Specify RD, RT, VE-ID, VPN-ID according to the network scheme and activate the service:
PE1(config-l2vpn-vpls)# autodiscovery bgp
PE1(config-bgp)# rd 65500:100
PE1(config-bgp)# route-target import 65500:100
PE1(config-bgp)# route-target export 65500:100
PE1(config-bgp)# ve id 1
PE1(config-bgp)# vpn id 1
PE1(config-bgp)# exit
PE1(config-l2vpn-vpls)# enable
After activating the service, check that route information appeared in the l2vpn table, and it is advertised on RR:
PE1# sh ip bgp l2vpn vpls all
Status codes: * - valid, > - best, i - internal, S - stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Codes Route Distinguisher VID VBO VBS Next hop Metric LocPrf Weight Path
----- --------------------- ----- ----- ----- --------------- ---------- ---------- ------
-------------------
*> 65500:100 1 1 10 -- -- -- --
PE1# sh ip bgp l2vpn vpls all neighbor 10.10.0.4 advertise-routes
Origin codes: i - IGP, e - EGP, ? - incomplete
Route Distinguisher VID VBO VBS Next hop Metric LocPrf Path
--------------------- ----- ----- ----- --------------- ---------- ----------
----------------------
65500:100 1 1 10 10.10.0.1 -- 100 i
* Подробный вывод анонсируемого маршрута *
PE1# sh ip bgp l2vpn vpls all neighbor 10.10.0.4 advertise-routes ve-id 1 block
-offset 1
BGP routing table entry for 65500:100 VE ID 1 VE Block Offset 1
VE Block Size: 10
Label Base: 86
Next hop: 10.10.0.1
AS path: --
Origin: IGP
Local preference: 100
Extended Community: RT:65500:100
Layer2-info: encaps (VPLS), control flags(0x00), MTU (1500)
In some cases you can skip entering such parameters as RD and RT: if you specify only VPN ID, they
will be formed as follows: <AS number> : <vpn-id>.
For example, we have an AS 65550 autonomous system number, vpn-id is 10, then the following
parameters will be generated:
RD - 65550: 10.
RT import/export - 65550:10.