> Border Gateway Protocol Configuration Mode Commands
> The Border Gateway Protocol (BGP) Configuration Mode is used to configure properties for BGP-4 routing.
> Important: The commands or keywords/variables that are available are dependent on platform type, product version, and installed license(s).
> address-family ipv4
> Configures the IPv4 Address Family information for the specified BGP AS number. Optionally it also enables the VRF routing information, if specified.
> Product
> All
> Privilege
> Security Administrator, Administrator
> Syntax
> [ no ] address-family ipv4 [ vrf vrf_name ]
> no
> This keyword removes the configured IPv4 address family VRF mode for specific BGP AS number.
> vrf vrf_name
> This optional keyword enables the exchange of VRF routing informaiton. When this keyword is specified with this command then the address family mode changed to VRF address family mode for specific BGP AS number.
> Important: The route distinguigher id must be configured for this VRF name through route-distinguisher command in BGP VRF Configuration mode, before using this keyword.
> Usage
> Use this command to configure the IPv4 BGP address family configuration parameters for BGP router and optionally enables the exchange of VRF routing information. This command is also used to switch the command mode to enter the BGP Address Family Configuration Mode.
> Use of address-family ipv4 command swithces the command mode to BGP Address Family Configuraiton Mode and prompt will be changed to the following:
> [context_name>]host_name(config-bgp-af-v4)#
> Use of address-family ipv4 vrf vrf_name command swithces the command mode to BGP Address Family Configuraiton Mode and prompt will be changed to the following:
> [context_name>]host_name(config-bgp-af-vrf)#
> Example
> Use following command to enter the IPv4 BGP Address-Family configuration mode:
> address-family ipv4
> Use following command to enter the IPv4 VRF BGP Address-Family configuration mode for exchange of VRF routing information from VRF route_vrf1:
> address-family ipv4 vrf route_vrf1
> address-family ipv6
> Configures the IPv6 Address Family information for the specified BGP AS number.
> Product
> All
> Privilege
> Security Administrator, Administrator
> Syntax
> address-family ipv6
> Usage
> Use this command to configure the IPv6 BGP address family configuration parameters for BGP router. This command is also used to switch the command mode to enter the BGP Address Family Configuration Mode.
> Use of address-family ipv6 command swithces the command mode to BGP Address Family Configuraiton Mode and prompt will be changed to the following:
> [context_name>]host_name(config-bgp-af-v6)#
> Example
> Use the following command to enter the IPv6 BGP Address-Family configuration mode:
> address-family ipv6
> address-family vpnv4
> Configures the VPNv4 Address Family information for the specified BGP AS number.
> Product
> All
> Privilege
> Security Administrator, Administrator
> Syntax
> address-family vpnv4
> Usage
> Use this command to configure the VPNv4 address family configuration parameters for BGP router. This command is also used to switch the command mode to enter the BGP Address Family Configuration Mode.
> Use of address-family vpnv4 command swithces the command mode to BGP Address Family Configuraiton Mode and prompt will be changed to the following:
> [context_name>]host_name(config-bgp-af-vpnv4)#
> Example
> Use the following command to enter the BGP Address-Family configuration mode for VPNv4 address parameters:
> address-family vpnv4
> bgp
> Define the BGP-specific parameters regarding graceful restarts.
> Product
> All
> Privilege
> Security Administrator, Administrator
> Syntax
> bgp graceful-restart { restart-time rest_time | stalepath-time stale_time | update-delay delay }
> no
> Remove the specified administrative distance for the specific route.
> restart-time rest_time
> Maximum time (seconds) required for neighbor(s) to gracefully restart. rest_time must be an integer between 1 and 3600.
> stalepath-time stale_time
> Maximum time (seconds) to retain stale paths from restarting neighbor(s). stale_time must be an integer between 1 and 3600.
> update-delay rest_time
> Maximum time (seconds) to defer initial route-selection. delay must be an integer between 1 and 3600.
> Usage
> Use this command to set BGP-specific parameters regarding graceful restarts.
> Example
> Use the following command to retain stale paths from restarting neighbor(s) for 100 seconds:
> bgp graceful-restart stalepath-time 100
> distance
> Define the administrative distance for routes. The administrative distance is the default priority for a specific route or type route.
> Product
> All
> Privilege
> Security Administrator, Administrator
> Syntax
> distance { admin distance prefix prefix_addr [ route-access-list list_name ] | bgp external ebgp_dist internal ibgp_dist local local_dist }
> no distance { admin distance prefix prefix_addr [ route-access-list list_name ] | bgp [ external ebgp_dist internal ibgp_dist local local_dist ] }
> no
> Remove the specified administrative distance for the specific route.
> admin distance prefix prefix_addr [ route-access-list list_name ]
> This keyword sets the administrative distance to a specified value for routes with a specific IP prefix. If you also specify a route access list, the IP prefix must match the rules of that access list.
> admin distance: The administrative distance that you want to apply to the IP prefix. distance must be an integer from 1 through 254.
> prefix prefix_addr: The IP prefix of routes that should have the admin distance applied. prefix_addr must be an IPv4 address (in dotted-decimal notation) and the number of subnet bits, representing the subnet mask in shorthand (1.1.1.1/24).
> route-access-list list_name: Define the name of a route access list that defines for which routes the administrative distance should be set.
> bgp external ebgp_dist internal ibgp_dist local local_dist
> This keyword sets the administrative distance for internal (IBGP), external (EBGP) and local routes.
> external ebgp_dist: Set the administrative distance for EBGP routes. ebgp_dist must be an integer from 1 through 254.
> internal ibgp_dist: Set the administrative distance for IBGP routes. ibgp_dist must be an integer from 1 through 254.
> local local_dist: Set the administrative distance for local routes. local_dist must be an integer from 1 through 254.
> Usage
> Use this command to set the administrative distance for specific routes to values that you specify. These values are only applied to the current router.
> Example
> Use the following command to set the administrative distance to 100 for all routes that have an IP prefix of 192.168.0.0 with a netmask of 16 and are specified in a remote access list named racl1:
> distance admin 100 prefix 192.168.0.0/16 route-access-list rac11
> end
> Exits the current configuration mode and returns to the Exec mode.
> Product
> All
> Privilege
> Security Administrator, Administrator
> Syntax
> end
> Usage
> Return to the Exec mode.
> enforce-first-as
> Enforce the first Autonomous System (AS) for Exterior Border Gateway Protocol (EBGP) routes. As stated in RFC1930; “An AS is a connected group of one or more Internet Protocol prefixes run by one or more network operators which has a single and clearly defined routing policy.”
> Product
> All
> Privilege
> Security Administrator, Administrator
> Syntax
> [ no ] enforce-first-as
> Usage
> Use this command to enforce the use of the first AS for EBGP routes.
> Example
> Use the following command to enable this functionality:
> enforce-first-as
> exit
> Exits the current configuration mode and returns to the global configuration mode.
> Product
> All
> Privilege
> Security Administrator, Administrator
> Syntax
> exit
> Usage
> Return to the context configuration mode.
> ip vrf
> This command adds a preconfigured IP VRF context instance to the BGP ASN and configures the BGP attributes and related parameters to the VRF. This command also switches the command mode to BGP VRF Configuration mode.
> ProductAll
> Privilege
> Security Administrator, Administrator
> Syntax
> [ no ] ip vrf vrf_name
> no
> Removes an associated IP VRF from specified BGP AS number and other configured parameters.
> vrf_name
> Specifies the IP VRF context configured in the Context configuration mode and to be associated with a BGP AS number.
> vrf_name must be a string from 1 to 79 identifying an existing instance.
> Usage
> Use this command to associate the specified IP VRF context instance to the BGP AS number and configures the BGP attributes and related parameters to the VRF. This command also switches the command mode to BGP VRF Configuration mode.
> This command swithces the command mode to BGP IP VRF Configuraiton Mode and prompt will be changed to the following:
> [context_name>]host_name(config-bgp-vrf)#
> Example
> Use the following command associates the pre-defined VRF context instance router_mpls to this BGP AS number:
> ip vrf router_mpls
> maximum-paths
> This command enables forwarding packets over multiple paths and specifies the maximum number of external BGP (EBGP) or internal BGP (IBGP) paths between neighbors.
> ProductAll
> Privilege
> Security Administrator, Administrator
> Syntax
> maximum-paths { ebgp max_no | ibgp max_no }
> [ no ] maximum-paths { ebgp | ibgp }
> no
> Disable forwarding packets over multiple EBGP or IBGP paths between neighbors.
> ebgp max_no
> The maximum number of EBGP paths.
> max_no must be an integer from 1 through 10.
> ibgp max_no
> The maximum number of IBGP paths.
> max_no must be an integer from 1 through 10.
> Usage
> Use this command to enable or disable forwarding packets over multiple paths between neighbors and specify the maximum number of EBGP or IBGP paths.
> Example
> To enable forwarding packets over multiple paths and set the maximum number of EBGP paths to 10, enter the following command:
> maximum-paths ebgp 10
> To disable forwarding packets over multiple EBGP paths, enter the following command:
> no maximum-paths ebgp
> neighbor
> This command configures BGP routers that interconnect to non-broadcast networks. Note that a remote AS number must be specified for a neighbor before other parameters can be configured.
> Product
> All
> Privilege
> Security Administrator, Administrator
> Syntax
> [ no ] neighbor ip_address { activate | advertisement-interval adv_time | capability graceful-restart | default-originate [ route-map map_name ] | distribute-list dist_list { in | out } | ebgp-multihop [ max-hop number ] | encrypted password encrypted password | fall-over bfd [ multihop ] | filter-list filt_list { in | out } | max-prefix max_num [ threshold thresh_percent ] [ warning-only ] | next-hop-self | password password | remote-as AS_num | remove-private-AS | restart-time rest_time | route-map map_name { in | out } | send-community { both | extended | standard } | shutdown | srp-activated-soft-clear | timers { [ connect-interval conn_time ] | [ keepalive-interval keep_time holdtime-interval hold_time ] } | update-source ip_address | weight value }
> no
> Delete the specified parameter from the router configuration.
> activate
> Enable the exchange of routes with this neighbor.
> advertisement-interval adv_time
> The minimum interval, in seconds, between sending BGP routing updates.
> Default: 30
> adv_time must be an integer from 0 through 600.
> capability graceful-restart
> Configures BGP graceful restart attributes.
> default-originate [ route-map map_name ]
> Originate default routes to this neighbor
> route-map map_name: Specifies the route-map that contains the criteria to originate default routes. map_name must be the name of an existing route-map in the current context.
> distribute-list dist_list { in | out }
> Filter updates to and from this neighbor based on a route access list.
> Default: No filtering is performed.
> dist_list: The name or number of an existing route-access-list.
> in: Indicates that incoming advertised routes should be filtered.
> out: Indicates that outgoing advertised routes should be filtered.
> ebgp-multihop [ max-hop number ]
> Allow EBGP neighbors not on directly connected networks.
> Default hop count: 255
> max-hop number: The maximum number of hops allowed to reach a neighbor. number must be an integer from 1 through 255.
> encrypted password encrypted password
> Specify encrypted password, used only inside configuration files. This should be a string between 1 to 24.
> fall-over bfd [ multihop ]
> Enables BFD multihop support for fallover.
> filter-list filt_list { in | out }
> Establish BGP filters based on an AS path access list
> filt_list: The name of an existing AS path access list.
> in: Indicates that incoming advertised routes will be filtered.
> out: Indicates that outgoing advertised routes will be filtered.
> max-prefix max_num [ threshold thresh_percent ] [ warning-only ]
> The maximum number of prefixes accepted from this peer. When the maximum is exceeded the neighbor connection is reset.
> Default: No maximum prefix limit.
> max_num: Specifies the maximum number of prefixes permitted. This must be an integer from 1 through 4294967295.
> threshold thresh_percent: A percentage value which specifies that when the BGP table is the specified percentage full from this peer warnings are sent to the neighbor. thresh_percent must be an integer from 1 through 100.
> warning-only: This keyword specifies that only a warning message is sent when the limit is exceeded. The neighbor connection is not reset
> next-hop-self
> Disables the next hop calculation for this neighbor.
> password password
> Specify password, used only inside configuration files. This should be a string between 1 to 24.
> remote-as AS_num
> Specify the AS number of the BGP neighbor.
> AS_num: The neighbor’s autonomous system number. must be an integer from 1 through 65535.
> remove-private-AS
> Remove the private AS number from outbound updates.
> Default: Do not remove the private AS number.
> restart-time rest_time
> Maximum time (seconds) required for neighbor to restart. rest_time must be an integer between 1 and 3600.
> route-map map_name { in | out }
> Apply a route map to the neighbor.
> map_name: Specifies the route-map apply. map_name must be the name of an existing route-map in the current context.
> in: Indicates that the route map applies to incoming advertisements.
> out: Indicates that the route map applies to outgoing advertisements.
> send-community { both | extended | standard }
> Sends the community attributes to a peer router (neighbor).
> both: Sends extended and standard community attributes.
> extended: Sends extended community attributes.
> standard: Sends standard community attributes.
> shutdown
> Administratively shut down this neighbor. This disables exchanging routes or configuring parameters for this neighbor.
> srp-activated-soft-clear
> Enables BGP updates when srp enabled resources are modified.
> timers {[ connect-interval conn_time ] | [ keepalive-interval keep_time holdtime-interval hold_time ]}
> BGP timers for the specified neighbor.
> connect-interval conn_time: Specifies the connect timer in seconds. conn_time must be an integer from 0 through 65535. The default is 60 seconds.
> keepalive-interval keep_time: The frequency, in seconds, at which the current BGP router sends keepalive messages to its neighbor. keep_time must be an integer from 0 through 65535. The default is 30 seconds.
> Holdtime-interval hold_time: The interval, in seconds, the router waits for a keepalive message before declaring a neighbor dead. hold_time must be an integer from 0 through 65535. The default is 90 seconds.
> update-source ip_address
> use this keyword to bind the specified IP address to the bgp socket that is used to communicate to the peer. ip_address is an IPv4 address in dotted decimal notation.
> In most cases you should set the update-source address to the address of the loopback interface in the current context. By doing this, the tcp connection does not go down until there is no route for the loopback address in the peering router.
> weight value
> This command sets the default weight for routes from this neighbor.
> Default: 0
> value: This must be an integer from 0 through 65535.
> Usage
> Use this command to set parameters for communication with a specified neighbor. The chassis supports a maximum of 64 peers per context.
> Example
> The following command specifies that the neighbor at the IP address 192.168.100.25 has an AS number of 2000:
> neighbor 192.168.100.25 remote-as 2000
> The following command allows BGP neighbors that are a maximum of 27 hops away:
> neighbor 192.168.100.25 ebgp-multihop max-hop 27
> The following command sets the minimum interval between sending routing updates to 3 minutes
> neighbor 192.168.100.25 advertisement-interval 180
> The following command sets the default weight for all routes from the specified neighbor to 100:
> neighbor 192.168.100.25 weight 100
> network
> Specify a network to announce via BGP
> Product
> All
> Privilege
> Security Administrator, Administrator
> Syntax
> [ no ] network ip_adrress/mask [ route-map map_name ]
> no
> Delete the specified network from the configuration for the BGP router.
> ip_adrress/mask
> Specifies the IP address and netmask bits for the network to announce via BGP. ip_address is a network IP address (in dotted-decimal notation) and mask is the number of subnet bits, representing a subnet mask in shorthand. These must be entered in the dotted-decimal notation/subnet bits format (1.1.1.1/24).
> route-map map_name
> Filter routes through the specified route map before announcing the network. map_name specifies the name of the route-map to use and must be specified as a string of 1 through 79 alphanumeric characters.
> Usage
> Use this command to specify a network to announce via BGP.
> Example
> The following command announces the network 192.168.0.0 with a netmask of 16 via BGP:
> network 192.168.0.0/16
> The following command removes the network from the BGP router configuration:
> no network 192.168.0.0/16
> redistribute
> This command redistributes routes into BGP. This means that any routes from another protocol are redistributed to BGP neighbors using the BGP protocol.
> Product
> All
> Privilege
> Security Administrator, Administrator
> Syntax
> [ no ] redistribute { connected | ospf | rip | static } [ route-map map_name ]
> no
> Remove the specified redistribution parameters from the BGP router configuration.
> connected
> Specifies that connected routes will be redistributed.
> ospf
> Specifies that OSPF routes will be redistributed
> rip
> Specifies that RIP routes will be redistributed. (RIP is not supported at this time.)
> static
> Specifies that static routes will be redistributed.
> route-map map_name
> Filter routes through the specified route map before redistribution. map_name specifies the name of the route-map to use and must be specified as a string of 1 through 79 alphanumeric characters.
> Usage
> Use this command to specify what routes this BGP router should redistribute into BGP.
> Example
> The following command redistributes OSPF routes after filtering them through the route map named Map1:
> redistribute ospf route-map Map1
> The following command removes the redistribution of OSPF routes from the router’s configuration:
> no redistribute ospf route-map Map1
> router-id
> Override the configured router identifier (peers will reset).
> Product
> All
> Privilege
> Security Administrator, Administrator
> Syntax
> router-id ip_address
> no router-id [ ip_address ]
> no
> Remove the specified router ID from the router’s configuration and use the default router ID.
> ip_address
> The IP address to use as the BGP router ID. ip_address must be an IPv4 address in dotted decimal notation (###.###.###.###).
> Usage
> Use this command to configure a specific router ID that overrides the default.
> Example
> The following command sets the router ID to 192.168.100.25:
> router-id 192.168.100.25
> scan-time
> Configure background scanner interval. The background scanner scans routers for next hop validation.
> Product
> All
> Privilege
> Security Administrator, Administrator
> Syntax
> [ no ] scan-time time
> no
> Remove the user specified scan time from the router’s configuration. The scan time is reset to the default value.
> time
> Default: 60
> The amount of time, in seconds, to wait between background scans to determine next-hop validity. time must be an integer from 5 through 60.
> Usage
> Use this command to set the background scanner interval for the BGP router.
> Example
> The following command sets the background scanner interval to 30 seconds:
> scan-time 30
> timers
> This command configures BGP routing timers.
> Product
> All
> Privilege
> Security Administrator, Administrator
> Syntax
> timers bgp keepalive-interval interval holdtime-interval time [ min-peer-holdtime-interval time ]
> timers bgp [ keepalive-interval interval holdtime-interval time ] [ min-peer-holdtime-interval time ]
> no
> Remove the user specified timer values from the router’s configuration. The timer values are reset to the default values.
> keepalive-interval interval
> Default: 30
> The interval, in seconds, to wait between sending keepalive packets. Must be an integer from 0 through 65535.
> holdtime-interval time
> Default: 90
> The interval, in seconds, after which the neighbor is considered dead if keepalive messages are not received. Must be an integer from 0 through 65535.
> min-peer-holdtime-interval time
> Default: 0
> The interval, in seconds, that is the minimum acceptable hold time from a neighbor. Must be an integer from 0 through 65535. The default is 0 so that there is no restriction on the hold time received in an OPEN message from the peer.
> Usage
> Use this command to configure the how long to wait between sending keepalive packets and how long to wait for a keepalive before considering a a neighbor dead.
> Example
> The following command sets the keepalive interval to 2 minutes and the holdtime interval to 3 minutes:
> timers bgp keepalive-interval 120 holdtime-interval 180 min-peer-holdtime-interval 0

Cisco Systems Inc.
Tel: 408-526-4000
Fax: 408-527-0883