Configuring BGP VPNv4 route control

BGP VPNv4 route control is configured similarly with BGP route control, except that it is configured in BGP VPNv4 address family view. For more information about BGP route control, see Layer 3—IP Routing Configuration Guide.

To configure BGP VPNv4 route control:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter BGP instance view.

bgp as-number [ instance instance-name ] [ multi-session-thread ]

N/A

3. Enter BGP VPNv4 address family view.

address-family vpnv4

N/A

4. Configure filtering of advertised routes.

filter-policy { ipv4-acl-number | prefix-list prefix-list-name } export [ protocol process-id ]

By default, BGP does not filter advertised routes.

5. Configure filtering of received routes.

filter-policy { ipv4-acl-number | prefix-list prefix-list-name } import

By default, BGP does not filter received routes.

6. Advertise the COMMUNITY attribute to a peer or peer group.

peer { group-name | ipv4-address [ mask-length ] } advertise-community

By default, BGP does not advertise the COMMUNITY attribute to any peers or peer groups.

7. Allow the local AS number to appear in the AS_PATH attribute of routes received from the peer, and set the maximum number of repetitions.

peer { group-name | ipv4-address [ mask-length ] } allow-as-loop [ number ]

By default, BGP discards route updates that contain the local AS number.

8. Filter routes received from or advertised to a peer or peer group based on an AS_PATH list.

peer { group-name | ipv4-address [ mask-length ] } as-path-acl as-path-acl-number { export | import }

By default, no AS filtering list is applied to a peer or peer group.

9. Advertise a default VPN route to a peer or peer group.

peer { group-name | ipv4-address [ mask-length ] } default-route-advertise vpn-instance vpn-instance-name

By default, no default VPN route is advertised to a peer or peer group.

10. Apply an ACL to filter routes received from or advertised to a peer or peer group.

peer { group-name | ipv4-address [ mask-length ] } filter-policy ipv4-acl-number { export | import }

By default, no ACL-based filtering is configured.

11. Save all route updates from a peer or peer group.

peer { group-name | ip-address [ mask-length ] } keep-all-routes

By default, BGP does not save route updates from any peer.

12. Specify the device as the next hop of routes sent to a peer or peer group.

peer { group-name | ipv4-address [ mask-length ] } next-hop-local

By default, the device sets itself as the next hop for routes sent to a peer or peer group.

13. Configure BGP to not change the next hop of routes sent to a peer or peer group.

peer { group-name | ipv4-address [ mask-length ] } next-hop-invariable

By default, the device sets itself as the next hop for routes sent to a peer or peer group.

In an inter-AS option C network where an RR is used to advertise VPNv4 routes, configure this command on the RR so the RR does not change the next hop of routes sent to BGP peers and clients.

14. Set a preferred value for routes received from a peer or peer group.

peer { group-name | ipv4-address [ mask-length ] } preferred-value value

By default, the preferred value is 0.

15. Apply a prefix list to filter routes received from or advertised to a peer or peer group.

peer { group-name | ipv4-address [ mask-length ] } prefix-list prefix-list-name { export | import }

By default, no prefix list based filtering is configured.

16. Configure BGP updates advertised to an EBGP peer or peer group to carry only public AS numbers.

peer { group-name | ipv4-address [ mask-length ] } public-as-only

By default, BGP route updates advertised to an EBGP peer or peer group can carry both public and private AS numbers.

17. Configure the device as an RR and specify a peer or peer group as its client.

peer { group-name | ipv4-address [ mask-length ] } reflect-client

By default, no RR is configured.

18. Set the maximum number of routes BGP can receive from a peer or peer group.

peer { group-name | ipv4-address [ mask-length ] } route-limit prefix-number [ { alert-only | discard | reconnect reconnect-time } | percentage-value ] *

By default, the number of routes that BGP can receive from a peer or peer group is not limited.

19. Apply a routing policy to a peer or peer group.

peer { group-name | ipv4-address [ mask-length ] } route-policy route-policy-name { export | import }

By default, no routing policy is applied to a peer or peer group.

20. Enable route target filtering of received VPNv4 routes.

policy vpn-target

By default, route target filtering is enabled for received VPNv4 routes. Only VPNv4 routes whose export route target attribute matches local import route target attribute are added to the routing table.

21. Enable route reflection between clients.

reflect between-clients

By default, route reflection between clients is enabled on the RR.

22. Configure a cluster ID for the RR.

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

By default, the RR uses its own router ID as the cluster ID.

23. Configure filtering of reflected routes.

rr-filter ext-comm-list-number

By default, the RR does not filter reflected routes.

24. Configure the SoO attribute for a BGP peer or peer group.

peer { group-name | ipv4-address [ mask-length ] } soo site-of-origin

By default, the SoO attribute is not configured.