Configuring BGP Policies
    • 07 Jun 2024
    • 2 Minutes to read
    • Dark
      Light
    • PDF

    Configuring BGP Policies

    • Dark
      Light
    • PDF

    Article summary

    This section explains how to configure the Border Gateway Protocol (BGP) routing policy IP prefix list. A prefix list identifies which routes must be accepted or denied in a BGP network. The prefixes represent the match criteria to apply the filter. Routes are then either permitted or denied based on these specified criteria. For example, if there is a need for a BGP network to disallow the distribution of a route with the IP address 10.1.1.3, this prefix can be included in the match criteria within the route map to block connections for this IP. To configure the prefix list:

    1. Log into the Nodegrid Web UI.
    2. Navigate to Network::Routing::Policy.
    3. Click Add.
    4. Specify a name for the prefix list.
    5. Select the IPv4 or IPv6 address family.
    6. Specify a meaningful description of the prefix list.
    7. Specify the sequence in which the prefix entries will be processed. You can include multiple sequences in the prefix list. For more information, see Adding Multiple Sequences to the Prefix List.
    8. Select the action Deny or Permit based on whether you want to deny or allow the route in the BGP network for redistribution. 
    9. Select the match criteria Any or Custom to apply the prefix rule.
      1. Option Any filters the route without any network parameters defined. 
      2. The Custom option applies prefix rules based on the network length and parameters LE and GE. If the parameter is LE, the prefix rules are only applied to routes whose subnets are equal to or smaller than the specified value. If the parameter is GE, the prefix rules are only applied to routes whose subnets are equal to or larger than the specified value. 
    10. Click Save.

    CLI Configuration Example

    
    [admin@nodegrid /]# cd settings/routing/policy/prefix_list/
    [admin@nodegrid prefix_list]# add
    [admin@nodegrid {prefix_list}]# set name=test-ipv4 
    [admin@nodegrid {prefix_list}]# set ip_type=ipv4 
    [admin@nodegrid {prefix_list}]# set description=docu-testing
    [admin@nodegrid {prefix_list}]# set sequence=5
    [admin@nodegrid {prefix_list}]# set action=permit
    [admin@nodegrid {prefix_list}]# set match=custom network|length=10.0.0.0/24 le=30 ge=28
    [admin@nodegrid {prefix_list}]# commit
    

    Adding Multiple Sequences to the Prefix List

    Follow this procedure to include multiple sequences.

    1. Navigate to Network::Routing::Policy.

    2. Click on the configured prefix list in the table. 

    3. Click Add.

    4. Specify the new sequence number to be included in the list and specify Action and Match criteria to be applied to the prefix rule.

    5. Click Save.

    The newly created sequence is included in the prefix list.

    CLI Configuration Example

    [admin@nodegrid /]# cd /settings/routing/policy/prefix_list/
    [admin@nodegrid prefix_list]# cd my-prefix-list-ipv6-ipv6/
    [admin@nodegrid my-prefix-list-ipv6-ipv6]# ls
    settings/
    sequence/
    [admin@nodegrid my-prefix-list-ipv6-ipv6]# cd sequence
    [admin@nodegrid sequence]# add    
    [admin@nodegrid {sequence}]# set sequence=15
    [admin@nodegrid {sequence}]# set action=permit
    [admin@nodegrid {sequence}]# set match=any
    [admin@nodegrid {sequence}]# commit
    [admin@nodegrid sequence]# show
      sequence  action  network/length  ge  le 
      ========  ======  ==============  ==  ===
      5         Permit  Any                    
      10        Permit  2001:db8::/32   32  128
      15        Permit  Any 



    Was this article helpful?

    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence