Resource Public Key Infrastructure (RPKI) ensures BGP security by validating the origin ASs of BGP routes.
RPKI is mainly applied to the networking where an RPKI server exists and the origin ASs of BGP routes needs to be validated. In addition, you can apply the validation result to BGP route selection to ensure that hosts in the local AS can securely communicate with hosts in other ASs.
RPKI configuration on a client includes configuring basic RPKI session information and applying the BGP origin AS validation result to route selection.
The system view is displayed.
RPKI is started, and the RPKI view is displayed.
An address of the RPKI server is specified for a TCP connection to be set up between the client and RPKI server.
Parameters are configured for the TCP connection to be set up between the client and RPKI server.
MD5 authentication is not recommended if high security is required.
The new password is at least eight characters long and contains at least two of the following types: upper-case letters, lower-case letters, digits, and special characters, except the question mark (?) and space.
For security purposes, you are advised to configure a password in ciphertext mode. To further improve device security, periodically change the password.
Timers are configured for the RPKI session between the client and the RPKI server.
aging-time specifies the aging time of validation information, and refresh-time specifies the interval at which validation information is updated. You can configure the two timers to achieve the desired level of BGP security. If high BGP security is desired, configure a small value for each timer. Note that frequent validation information updates will lead to high bandwidth resource consumption.
The maximum number of Route Origination Authorization (ROA) entries that the device is allowed to receive in a session is configured.
In most cases, a large number of ROA entries exist on an RPKI server. If the device receives a large number of ROA entries from the RPKI server, excessive system resources will be consumed. To prevent this problem, run the rpki-limit command to configure the maximum number of ROA entries that the BGP device is allowed to receive in a session.
The source interface for sending RPKI packets is specified.
An SSL policy to be bound to the TCP connection between the device and RPKI server is configured.
The configuration is committed.
After RPKI session configurations are changed, run the reset rpki session command to reset the involved RPKI session for the new configurations to take effect.
The system view is displayed.
The BGP view is displayed.
Origin AS validation of RPKI is enabled.
After origin AS validation is enabled, the device matches the origin AS of each received route against the ROAs in the database and provides the validation result, which can be Valid, NotFound, or Invalid.
To check ROA data of routes, including the origin ASs, run the display rpki table command. RPKI origin AS validation takes effect on the routes received from EBGP peers, not on the routes received from IBGP peers.
The BGP origin AS validation result of RPKI is applied to route selection.
BGP selects routes in the order of Valid, NotFound, and Invalid. If allow-invalid is not specified in the command, BGP ignores the routes with the validation result being Invalid during route selection.
The device is configured to advertise extended community attributes to a specified peer.
The BGP device is enabled to advertise the origin AS validation result of RPKI to the specified peer or peer group.
The BGP origin AS validation result of RPKI can be advertised only to IBGP peers.
The configuration is committed.
The system view is displayed.
The BGP view is displayed.
The local device is configured to perform ROA on the routes to be advertised to an EBGP peer.
After the local device is configured to perform ROA on the routes to be advertised to an EBGP peer, the device compares the origin AS of a route with that of the matched route recorded in the database. The ROA result can be Valid (indicating that the origin AS is correct), NotFound (indicating no result), or Invalid (indicating that the origin AS is incorrect). By default, only the routes whose ROA result is Valid are advertised. To configure the device to advertise the routes with the ROA result being Valid or NotFound, specify the include-not-found keyword in the preceding command. To configure the device to advertise the routes with the ROA result being Valid or NotFound (if the routes with the result being NotFound were received from another AS), specify the include-not-found external keyword in the preceding command.
The configuration is committed.
The system view is displayed.
RPKI is started, and the RPKI view is displayed.
Regional validation is enabled, and the regional validation view is displayed.
A region is created.
A description is configured for the region.
An AS number list is configured so that the AS numbers in it can be added to the region.
Exit the RPKI region-validation-region view.
A region is created.
Exit the RPKI region-validation-region view.
A regional confederation is created.
A description is configured for the regional confederation.
A region ID list is configured in the regional confederation so that regions in the list are added to the regional confederation.
Exit the RPKI region-validation-confederation view.
The BGP view is displayed.
BGP regional validation is enabled.
Or run region-validation confed-check strict
Strict BGP regional validation is enabled.
The BGP regional validation result of RPKI is applied to BGP route selection.
If regional validation succeeds, the route is valid and can participate in route selection. If regional validation fails, the route is invalid and cannot participate in route selection. To allow the routes that fail regional validation to be valid and participate in route selection, configure the allow-invalid parameter in the command. The priority of such routes is reduced during route selection.
The configuration is committed.
Run the display rpki session ipv4-address verbose command to verify the RPKI session configuration.