Configuring a BGP PW

To configure a BGP PW, perform the following configurations on PEs:

Configuring BGP to advertise MPLS L2VPN label block information

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enable BGP and enter BGP view.

bgp as-number

By default, BGP is not enabled.

3. Configure the remote PE as a BGP peer.

peer { group-name | ip-address } as-number as-number

By default, no BGP peer is configured.

4. Create a BGP L2VPN address family and enter BGP L2VPN address family view.

address-family l2vpn

By default, no BGP L2VPN address family is created.

5. Enable BGP to exchange BGP L2VPN information with the specified peer or peer group.

peer { group-name | ip-address } enable

By default, BGP cannot exchange BGP L2VPN information with any peer or peer group.

6. Enable BGP to exchange label block information with the specified peer or peer group.

peer { group-name | ip-address } signaling [ non-standard ]

By default, BGP can exchange label block information with a BGP L2VPN peer or peer group by using RFC 4761 MP_REACH_NLRI.

7. (Optional.) Permit the local AS number to appear in routes from the specified peer or peer group and specify the appearance times.

peer { group-name | ip-address } allow-as-loop [ number ]

By default, the local AS number is not allowed in routes from a peer or peer group.

8. (Optional.) Enable route target-based filtering of incoming BGP L2VPN information.

policy vpn-target

By default, route target-based filtering of incoming BGP L2VPN information is enabled.

9. (Optional.) Configure the router as a route reflector and specify a peer or peer group as its client.

peer { group-name | ip-address } reflect-client

By default, no route reflector or client is configured.

10. (Optional.) Enable L2VPN information reflection between clients.

reflect between-clients

By default, L2VPN information reflection is enabled between clients.

11. (Optional.) Configure the cluster ID of the route reflector.

reflector cluster-id { cluster-id | ip-address }

By default, a route reflector uses its own router ID as the cluster ID.

12. (Optional.) Configure the filtering of reflected L2VPN information.

rr-filter extended-community-number

By default, the route reflector does not filter reflected L2VPN information.

13. (Optional.) Return to user view.

return

N/A

14. (Optional.) Soft-reset L2VPN BGP sessions.

refresh bgp { ip-address | all | external | group group-name | internal } { export | import } l2vpn

N/A

15. (Optional.) Reset L2VPN BGP sessions.

reset bgp { as-number | ip-address | all | external | group group-name | internal } l2vpn

N/A

For more information about the peer as-number, peer enable, peer allow-as-loop, peer reflect-client, reflect between-clients, reflector cluster-id, refresh bgp, and reset bgp commands, see Layer 3—IP Routing Command Reference.

Creating a BGP PW

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter cross-connect group view.

xconnect-group group-name

N/A

3. Configure the cross-connect group to automatically discover neighbors and create PWs through BGP and enter auto-discovery cross-connect group view.

auto-discovery bgp

By default, a cross-connect group does not automatically discover neighbors or create PWs through BGP.

4. Configure an RD for the cross-connect group.

route-distinguisher route-distinguisher

By default, no RD is configured for the cross-connect group.

5. Configure route targets for the cross-connect group.

vpn-target vpn-target&<1-8> [ both | export-extcommunity | import-extcommunity ]

By default, no route targets are configured for the cross-connect group.

6. (Optional.) Reference a PW class.

pw-class class-name

By default, no PW class is referenced.

7. (Optional.) Configure an MTU for the PW.

mtu mtu

The default MTU is 1500 bytes.

8. Create a local site and enter site view.

site site-id [ range range-value ] [ default-offset default-offset ]

By default, no local site is created.

9. Create a cross-connect and enter auto-discovery cross-connect view.

connection remote-site-id remote-site-id

By default, no cross-connect is created.

After you execute this command, a PW to the specified remote site is created and is bound to the cross-connect.

10. (Optional.) Reference a tunnel policy.

tunnel-policy tunnel-policy-name

By default, no tunnel policy is referenced.