To enable CEs to communicate, the PEs and CEs must be capable of exchanging routes.
Perform the following steps on the PE:
The system view is displayed.
The BGP view is displayed.
The BGP-VPN instance IPv4 address family view is displayed.
An AS number is configured for the VPN instance IPv4 address family.
To smoothly re-assign a device to another AS or transmit different services in different instances, run the as-number command to configure a different AS number for each VPN instance IPv4 address family.
The AS number configured in the BGP-VPN instance IPv4 address family view must be different from the AS number configured in the BGP view.
After the bgp yang-mode enable command is run, the as-number { as-number-plain | as-number-dot } command cannot be run. To configure a separate AS number for the VPN instance IPv4 address family, run the as-number ipv4 ipv4-as command in the BGP-VPN instance view.
The CE is configured as a VPN peer.
The maximum number of hops allowed for an EBGP connection is configured. This step is mandatory if the PE is not directly connected to the CE.
In most cases, a directly connected physical link must be available between EBGP peers. If you want to establish an EBGP peer relationship between indirectly connected peers, you also need to run the peer ebgp-max-hop command to set the maximum number of hops allowed for an EBGP connection.
If the maximum number of hops is set to 1, the device can establish an EBGP connection with only a directly connected peer.
network ipv4-address [ mask | mask-length ] [ route-policy route-policy-name ]
The PE can automatically learn the direct routes destined for the local CE. The learned routes take precedence over the direct routes advertised from the local CE using EBGP. If this step is not performed, the PE does not use MP-BGP to advertise the direct routes destined for the local CE to the remote PE.
The Site of Origin (SoO) attribute is configured for the CE that has been specified as a VPN peer of the PE.
Several CEs at a VPN site may establish BGP connections with different PEs. The VPN routes advertised from the CEs to the PEs may be re-advertised to the same VPN site after the routes traverse the backbone network. This may cause route loops at the VPN site.
If the SoO attribute is configured for a specified CE, the PE adds the attribute to a route sent from the CE and advertises the route to the remote PE. The remote PE checks the SoO attribute of the route before sending it to its attached CE. If the SoO attribute is the same as the local SoO attribute on the remote PE, the remote PE does not send the route to its attached CE.
Route loops are allowed.
This step is used in hub & spoke networking.
Generally, BGP uses the AS number to detect route loops. On a hub & spoke network, if EBGP runs between a Hub-PE and a Hub-CE at a hub site, the route sent from the Hub-PE to the Hub-CE carries the AS number of the Hub-PE. If the Hub-CE sends a route update message to the Hub-PE, the Hub-PE will deny it because the route update message contains the AS number of the Hub-PE. To ensure proper route transmission on a hub & spoke network, configure all the BGP peers along the path (along which the Hub-CE advertises VPN routes to the Spoke-CE) to accept the routes which have the AS number repeated once.
BGP AS number substitution is enabled.
Perform this step on the PE in a scenario in which CEs at different sites use the same AS number.
Enabling BGP AS number substitution may cause routing loops on a CE multi-homing network.
To configure the device to send only optimal routes in a BGP VPN routing table to a BGP VPNv4 routing table, run the advertise best-route command.
By default, when a local device receives a route (route A) having the same prefix as that of a route (route B) in the local VPN routing table from the remote end but route A and route B have different RDs, route B is also sent to a BGP VPNv4 routing table even if the route selection priority of route B is lower than that of route A. If route B meets BGP VPNv4 route sending conditions, it is also sent to other BGP VPNv4 peers. In this scenario, if you want only optimal BGP VPN routes to be transmitted between BGP VPNv4 peers on the network, run the advertise best-route command on the local device to send only optimal routes in the BGP VPN routing table to the BGP VPNv4 routing table.
To configure the device to send only valid routes in a BGP VPN routing table to a BGP VPNv4 routing table, run the advertise valid-routes command.
By default, the device advertises all routes in the BGP VPN routing table to the BGP VPNv4/VPNv6 routing table. You can run the advertise valid-routes command to configure a device to send only valid routes in a BGP VPN routing table to a BGP VPNv4/VPNv6 routing table.
The configuration is committed.
Perform the following steps on the CE:
The system view is displayed.
The BGP view is displayed.
The PE is configured as a peer.
The maximum number of hops between the CE and its EBGP peer (the PE) is set. This step is mandatory if the PE and CE are not directly connected.
Generally, EBGP peers are directly connected by a physical link. If no direct physical link is available, the peer ebgp-max-hop command must be used to allow EBGP peers to establish a multi-hop TCP connection.
If the maximum number of hops is set to 1, the CE cannot establish an EBGP connection with a peer if they are not directly connected.
Routes of the local site are imported. The type of route imported at this step may vary according to the networking mode.
The configuration is committed.
Perform the following steps on the PE:
The system view is displayed.
The BGP view is displayed.
The BGP-VPN instance IPv4 address family view is displayed.
The CE is configured as a VPN peer.
The PE is enabled to import the direct routes destined for the local CE into the VRF table and advertise the routes to the remote PE.
The PE can automatically learn the direct routes destined for the local CE. The learned routes take precedence over the direct routes advertised from the local CE using IBGP. If this step is not performed, the PE does not use MP-BGP to advertise the direct routes destined for the local CE to the remote PE.
To configure the device to send only optimal routes in a BGP VPN routing table to a BGP VPNv4 routing table, run the advertise best-route command.
By default, when a local device receives a route (route A) having the same prefix as that of a route (route B) in the local VPN routing table from the remote end but route A and route B have different RDs, route B is also sent to a BGP VPNv4 routing table even if the route selection priority of route B is lower than that of route A. If route B meets BGP VPNv4 route sending conditions, it is also sent to other BGP VPNv4 peers. In this scenario, if you want only optimal BGP VPN routes to be transmitted between BGP VPNv4 peers on the network, run the advertise best-route command on the local device to send only optimal routes in the BGP VPN routing table to the BGP VPNv4 routing table.
To configure the device to send only valid routes in a BGP VPN routing table to a BGP VPNv4 routing table, run the advertise valid-routes command.
By default, the device advertises all routes in the BGP VPN routing table to the BGP VPNv4/VPNv6 routing table. You can run the advertise valid-routes command to configure a device to send only valid routes in a BGP VPN routing table to a BGP VPNv4/VPNv6 routing table.
The configuration is committed.
Perform the following steps on the CE:
The system view is displayed.
The BGP view is displayed.
The PE is configured as an IBGP peer.
Routes of the local site are imported. The type of route imported at this step may vary according to the networking mode.
The configuration is committed.
Perform the following steps on the PE. Configuring a static route on the CE is not described here.
For details about how to configure a static route, see "IPv4 Static Route Configuration" in the HUAWEI NetEngine 8000 F Series Router Configuration Guide - IP Routing.
The system view is displayed.
A static route is configured for a specified VPN instance IPv4 address family.
The BGP view is displayed.
The BGP-VPN instance IPv4 address family view is displayed.
The configured static route is added to the VRF table of the BGP-VPN instance IPv4 address family.
A VPN that receives routes outside it from a device other than the PE and advertises the routes to the PE is called a transit VPN. A VPN that receives only routes in it and routes advertised by the PE is called a stub VPN. Generally, a static route is used for route exchange between the CE and PE in a stub VPN only.
To configure the device to send only optimal routes in a BGP VPN routing table to a BGP VPNv4 routing table, run the advertise best-route command.
By default, when a local device receives a route (route A) having the same prefix as that of a route (route B) in the local VPN routing table from the remote end but route A and route B have different RDs, route B is also sent to a BGP VPNv4 routing table even if the route selection priority of route B is lower than that of route A. If route B meets BGP VPNv4 route sending conditions, it is also sent to other BGP VPNv4 peers. In this scenario, if you want only optimal BGP VPN routes to be transmitted between BGP VPNv4 peers on the network, run the advertise best-route command on the local device to send only optimal routes in the BGP VPN routing table to the BGP VPNv4 routing table.
To configure the device to send only valid routes in a BGP VPN routing table to a BGP VPNv4 routing table, run the advertise valid-routes command.
By default, the device advertises all routes in the BGP VPN routing table to the BGP VPNv4/VPNv6 routing table. You can run the advertise valid-routes command to configure a device to send only valid routes in a BGP VPN routing table to a BGP VPNv4/VPNv6 routing table.
The configuration is committed.
Perform the following steps on the PE: Configuring RIPv1 or RIPv2 on the CE is not described here.
For details about how to configure RIP, see "RIP Configuration" in the HUAWEI NetEngine 8000 F Series Router Configuration Guide - IP Routing.
The system view is displayed.
A RIP process is created on the PE.
A RIP process can be bound only to one VPN instance. If a RIP process is not bound to any VPN instance before it is started, this process becomes a public network process and cannot be bound to a VPN instance later.
RIP is enabled on the network segment where the interface bound to the VPN instance resides.
BGP routes are imported into the RIP routing table.
After the import-route bgp command is run in the RIP view, the PE can import the VPNv4 routes learned from the remote PE into the RIP routing table and advertise them to the attached CE.
Return to the system view.
The BGP view is displayed.
The BGP-VPN instance IPv4 address family view is displayed.
RIP routes are imported into the VRF table of the BGP-VPN instance IPv4 address family.
After the import-route rip command is run in the BGP-VPN instance IPv4 address family view, the PE imports the VPN routes learned from the attached CE into the BGP routing table and advertises VPNv4 routes to the remote PE.
To configure the device to send only optimal routes in a BGP VPN routing table to a BGP VPNv4 routing table, run the advertise best-route command.
By default, when a local device receives a route (route A) having the same prefix as that of a route (route B) in the local VPN routing table from the remote end but route A and route B have different RDs, route B is also sent to a BGP VPNv4 routing table even if the route selection priority of route B is lower than that of route A. If route B meets BGP VPNv4 route sending conditions, it is also sent to other BGP VPNv4 peers. In this scenario, if you want only optimal BGP VPN routes to be transmitted between BGP VPNv4 peers on the network, run the advertise best-route command on the local device to send only optimal routes in the BGP VPN routing table to the BGP VPNv4 routing table.
To configure the device to send only valid routes in a BGP VPN routing table to a BGP VPNv4 routing table, run the advertise valid-routes command.
By default, the device advertises all routes in the BGP VPN routing table to the BGP VPNv4/VPNv6 routing table. You can run the advertise valid-routes command to configure a device to send only valid routes in a BGP VPN routing table to a BGP VPNv4/VPNv6 routing table.
The configuration is committed.
Deleting a VPN instance or disabling a VPN instance IPv4 address family will delete all the RIP processes bound to the VPN instance or the VPN instance IPv4 address family on the PE.
Configure OSPF on the CE, and the CE configuration details are not provided here. Perform the following steps on the PE:
Configuring OSPF on the CE is not described here. For details about how to configure OSPF, see "OSPF Configuration" in the HUAWEI NetEngine 8000 F Series Router Configuration Guide - IP Routing.
The system view is displayed.
An OSPF process is created on the PE, and the OSPF view is displayed.
An OSPF process can be bound to only one VPN instance. If an OSPF process is not bound to any VPN instance before it is started, this process becomes a public network process and cannot be bound to a VPN instance later.
A router ID needs to be specified when an OSPF process is started after it is bound to a VPN instance. The router ID must be different from the public network router ID configured in the system view. If the router ID is not specified, OSPF selects the IP address of one of the interfaces bound to the VPN instance as the router ID based on a certain rule.
The domain ID is configured.
The domain ID can be an integer or in dotted decimal notation.
Each OSPF process can be configured with two domain IDs. Different processes can have the same domain ID. There is no restriction on the domain IDs of the OSPF processes of different VPNs on a PE. The OSPF processes of the same VPN must be configured with the same domain ID to ensure proper route advertisement.
The domain ID of an OSPF process is contained in the routes generated by this OSPF process. When OSPF routes are imported into BGP, the domain ID is added to the BGP VPN routes and forwarded as the BGP extended community attribute.
The VPN route tag is configured.
If a BGP process is not started on the local device, the default VPN route tag is 0.
If a BGP process is started on the local device, the default VPN route tag is 3489660928 (0xD000 in the hexadecimal format) plus the local AS number of BGP.
BGP routes are imported.
The OSPF area view is displayed.
OSPF is enabled on the network segment where the interface bound to the VPN instance resides.
A network segment belongs to only one area. The area to which each OSPF interface belongs must be specified.
OSPF can run on an interface properly only when the following conditions are met:
The OSPF view is displayed.
Return to the system view.
The BGP view is displayed.
The BGP-VPN instance IPv4 address family view is displayed.
OSPF routes are imported into the VRF table of the BGP-VPN instance IPv4 address family.
To configure the device to send only optimal routes in a BGP VPN routing table to a BGP VPNv4 routing table, run the advertise best-route command.
By default, when a local device receives a route (route A) having the same prefix as that of a route (route B) in the local VPN routing table from the remote end but route A and route B have different RDs, route B is also sent to a BGP VPNv4 routing table even if the route selection priority of route B is lower than that of route A. If route B meets BGP VPNv4 route sending conditions, it is also sent to other BGP VPNv4 peers. In this scenario, if you want only optimal BGP VPN routes to be transmitted between BGP VPNv4 peers on the network, run the advertise best-route command on the local device to send only optimal routes in the BGP VPN routing table to the BGP VPNv4 routing table.
To configure the device to send only valid routes in a BGP VPN routing table to a BGP VPNv4 routing table, run the advertise valid-routes command.
By default, the device advertises all routes in the BGP VPN routing table to the BGP VPNv4/VPNv6 routing table. You can run the advertise valid-routes command to configure a device to send only valid routes in a BGP VPN routing table to a BGP VPNv4/VPNv6 routing table.
The configuration is committed.
Deleting a VPN instance or disabling a VPN instance IPv4 address family will delete all the OSPF processes bound to the VPN instance or the VPN instance IPv4 address family on the PE.
Perform the following steps on the PE. Configuring IS-IS on the CE is not described here.
For details about how to configure IS-IS, see "IS-IS Configuration" in the HUAWEI NetEngine 8000 F Series Router Configuration Guide - IP Routing.
The system view is displayed.
An IS-IS process is created on the PE, and the IS-IS view is displayed. An IS-IS process can be bound to only one VPN instance. If an IS-IS process is not bound to any VPN instance before it is started, this process becomes a public network process and cannot be bound to a VPN instance later.
The network entity title (NET) is configured.
A NET specifies the current IS-IS area address and the system ID of the router.
The IS-IS level of the router is specified.
Configure the device level based on the network planning. If no device level is configured, IS-IS establishes Level-1 and Level-2 neighbor relationships separately and maintains two identical LSDBs, consuming excessive system resources.
BGP routes are imported.
If the IS-IS level is not specified in the command, BGP routes will be imported into the Level-2 IS-IS routing table.
Return to the system view.
The view of the interface bound to the VPN instance is displayed.
IS-IS is enabled on the interface.
Return to the system view.
The BGP view is displayed.
The BGP-VPN instance IPv4 address family view is displayed.
IS-IS routes are imported into the VRF table of the BGP-VPN instance IPv4 address family.
To configure the device to send only optimal routes in a BGP VPN routing table to a BGP VPNv4 routing table, run the advertise best-route command.
By default, when a local device receives a route (route A) having the same prefix as that of a route (route B) in the local VPN routing table from the remote end but route A and route B have different RDs, route B is also sent to a BGP VPNv4 routing table even if the route selection priority of route B is lower than that of route A. If route B meets BGP VPNv4 route sending conditions, it is also sent to other BGP VPNv4 peers. In this scenario, if you want only optimal BGP VPN routes to be transmitted between BGP VPNv4 peers on the network, run the advertise best-route command on the local device to send only optimal routes in the BGP VPN routing table to the BGP VPNv4 routing table.
To configure the device to send only valid routes in a BGP VPN routing table to a BGP VPNv4 routing table, run the advertise valid-routes command.
By default, the device advertises all routes in the BGP VPN routing table to the BGP VPNv4/VPNv6 routing table. You can run the advertise valid-routes command to configure a device to send only valid routes in a BGP VPN routing table to a BGP VPNv4/VPNv6 routing table.
The configuration is committed.
Deleting a VPN instance or disabling a VPN instance IPv4 address family will delete all the IS-IS processes bound to the VPN instance or the VPN instance IPv4 address family on the PE.
A direct route can be configured between a PE and a CE only if the CE is a host and connected to the PE using a VLANIF interface. Note that the direct route only needs to be configured on the PE.
Perform the following steps on the PE:
The system view is displayed.
The VPN instance view is displayed.
The VPN instance IPv4 address family view is displayed.
The function to advertise ARP Vlink direct routes are advertised.
After the parameter route-policy or route-filter is specified in the command, only ARP Vlink direct routes matching the route-policy are advertised.
Return to the VPN instance view.
Return to the system view.
The BGP view is displayed.
The BGP-VPN instance IPv4 address family view is displayed.
The direct route to the local CE is imported.
After the direct route to the local CE is imported to the VPN routing table, the local PE use MP-BGP to advertise the direct route to the remote PE. This allows the remote CE to access the local CE.
To configure the device to send only optimal routes in a BGP VPN routing table to a BGP VPNv4 routing table, run the advertise best-route command.
By default, when a local device receives a route (route A) having the same prefix as that of a route (route B) in the local VPN routing table from the remote end but route A and route B have different RDs, route B is also sent to a BGP VPNv4 routing table even if the route selection priority of route B is lower than that of route A. If route B meets BGP VPNv4 route sending conditions, it is also sent to other BGP VPNv4 peers. In this scenario, if you want only optimal BGP VPN routes to be transmitted between BGP VPNv4 peers on the network, run the advertise best-route command on the local device to send only optimal routes in the BGP VPN routing table to the BGP VPNv4 routing table.
To configure the device to send only valid routes in a BGP VPN routing table to a BGP VPNv4 routing table, run the advertise valid-routes command.
By default, the device advertises all routes in the BGP VPN routing table to the BGP VPNv4/VPNv6 routing table. You can run the advertise valid-routes command to configure a device to send only valid routes in a BGP VPN routing table to a BGP VPNv4/VPNv6 routing table.
The configuration is committed.