Skip to main content

BGP Redistribution Profile

BGP redistribution profiles control how routes from other protocols (OSPF, static, connected) are redistributed into BGP. The scm CLI provides commands to create, update, delete, and load BGP redistribution profiles.

Overview

The bgp-redistribution-profile commands allow you to:

  • Create BGP redistribution profiles with protocol redistribution settings
  • Update existing redistribution profile configurations
  • Delete redistribution profiles that are no longer needed
  • Bulk import redistribution profiles from YAML files
  • Export redistribution profiles for backup or migration

Set BGP Redistribution Profile

Create or update a BGP redistribution profile.

Syntax

scm set network bgp-redistribution-profile NAME [OPTIONS]

Arguments

ArgumentDescriptionRequired
NAMEName of the BGP redistribution profileYes

Options

OptionDescriptionRequired
--folder TEXTFolder locationYes*
--snippet TEXTSnippet locationYes*
--device TEXTDevice locationYes*
--ipv4-json TEXTIPv4 redistribution config as JSONNo

* Exactly one of --folder, --snippet, or --device is required.

Examples

Redistribute Connected Routes

$ scm set network bgp-redistribution-profile my-redist \
--folder Texas \
--ipv4-json '{"unicast": {"connected": {"enable": true}}}'
---> 100%
Created BGP redistribution profile: my-redist in folder Texas

Redistribute Static Routes

$ scm set network bgp-redistribution-profile static-redist \
--folder Texas \
--ipv4-json '{"unicast": {"static": {"enable": true}}}'
---> 100%
Created BGP redistribution profile: static-redist in folder Texas

Delete BGP Redistribution Profile

Delete a BGP redistribution profile from SCM.

Syntax

scm delete network bgp-redistribution-profile NAME [OPTIONS]

Arguments

ArgumentDescriptionRequired
NAMEName of the BGP redistribution profile to deleteYes

Options

OptionDescriptionRequired
--folder TEXTFolder locationYes*
--snippet TEXTSnippet locationYes*
--device TEXTDevice locationYes*
--forceSkip confirmation promptNo

* Exactly one of --folder, --snippet, or --device is required.

Example

$ scm delete network bgp-redistribution-profile my-redist --folder Texas --force
---> 100%
Deleted BGP redistribution profile: my-redist from folder Texas

Load BGP Redistribution Profile

Load multiple BGP redistribution profiles from a YAML file.

Syntax

scm load network bgp-redistribution-profile [OPTIONS]

Options

OptionDescriptionRequired
--file TEXTPath to YAML fileYes
--folder TEXTOverride folder location for all objectsNo
--snippet TEXTOverride snippet location for all objectsNo
--device TEXTOverride device location for all objectsNo
--dry-runPreview changes without applyingNo

YAML File Format

---
bgp_redistribution_profiles:
- name: connected-redist
folder: Texas
ipv4:
unicast:
connected:
enable: true

- name: static-redist
folder: Texas
ipv4:
unicast:
static:
enable: true

Examples

Load with Original Locations

$ scm load network bgp-redistribution-profile --file bgp-redist.yml
---> 100%
✓ Loaded BGP redistribution profile: connected-redist
✓ Loaded BGP redistribution profile: static-redist

Successfully loaded 2 out of 2 BGP redistribution profiles from 'bgp-redist.yml'

Load with Folder Override

$ scm load network bgp-redistribution-profile --file bgp-redist.yml --folder Austin
---> 100%
✓ Loaded BGP redistribution profile: connected-redist
✓ Loaded BGP redistribution profile: static-redist

Successfully loaded 2 out of 2 BGP redistribution profiles from 'bgp-redist.yml'
note

When using container override options (--folder, --snippet, --device), all BGP redistribution profiles will be loaded into the specified container, ignoring the container specified in the YAML file.

Show BGP Redistribution Profile

Display BGP redistribution profile objects.

Syntax

scm show network bgp-redistribution-profile [NAME] [OPTIONS]

Arguments

ArgumentDescriptionRequired
NAMEName of the BGP redistribution profile to show; omit to list allNo

Options

OptionDescriptionRequired
--folder TEXTFolder locationYes*
--snippet TEXTSnippet locationYes*
--device TEXTDevice locationYes*
--max-results INTEGERMaximum number of results to displayNo
--output [table|json|yaml]Output format (default: table)No

* Exactly one of --folder, --snippet, or --device is required.

note

When no NAME argument is provided, all items are listed by default.

Examples

Show Specific BGP Redistribution Profile

$ scm show network bgp-redistribution-profile my-redist --folder Texas
---> 100%
BGP Redistribution Profile: my-redist
Location: Folder 'Texas'
IPv4 Unicast Connected: enabled

List All BGP Redistribution Profiles (Default Behavior)

$ scm show network bgp-redistribution-profile --folder Texas
---> 100%
BGP redistribution profiles in folder 'Texas':
------------------------------------------------------------
Name: connected-redist
IPv4 Unicast Connected: enabled
------------------------------------------------------------
Name: static-redist
IPv4 Unicast Static: enabled
------------------------------------------------------------

Backup BGP Redistribution Profiles

Backup all BGP redistribution profile objects from a specified location to a YAML file.

Syntax

scm backup network bgp-redistribution-profile [OPTIONS]

Options

OptionDescriptionRequired
--folder TEXTFolder locationNo*
--snippet TEXTSnippet locationNo*
--device TEXTDevice locationNo*
--file TEXTCustom output filenameNo

* One of --folder, --snippet, or --device is required.

Examples

Backup from Folder

$ scm backup network bgp-redistribution-profile --folder Texas
---> 100%
Successfully backed up 4 BGP redistribution profiles to bgp_redistribution_profile_folder_texas_20240115_120530.yaml

Backup with Custom Filename

$ scm backup network bgp-redistribution-profile --folder Texas --file texas-bgp-redist.yaml
---> 100%
Successfully backed up 4 BGP redistribution profiles to texas-bgp-redist.yaml

Best Practices

  1. Redistribute Selectively: Only redistribute route types that are necessary to avoid routing table bloat.
  2. Use Route Maps: Combine redistribution profiles with route maps for granular control over redistributed routes.
  3. Test with Dry Run: Use --dry-run when loading configurations to preview changes before applying.
  4. Backup Before Changes: Always backup existing profiles before making bulk modifications.
  5. Document Redistribution Policies: Clearly document which protocols are redistributed and why.