Configuring A Basic BGP Network
Configuring A Basic BGP Network
This module describes the basic tasks to configure a basic Border Gateway Protocol (BGP) network. BGP is
an interdomain routing protocol that is designed to provide loop-free routing between organizations. The
Cisco IOS implementation of the neighbor and address family commands is explained. This module also
contains tasks to configure and customize BGP peers, implement BGP route aggregation, configure BGP
route origination, and define BGP backdoor routes. BGP peer group definition is documented, peer session
templates are introduced, and update groups are explained,
• Finding Feature Information, on page 1
• Prerequisites for Configuring a Basic BGP Network, on page 1
• Restrictions for Configuring a Basic BGP Network, on page 2
• Information About Configuring a Basic BGP Network, on page 2
• How to Configure a Basic BGP Network, on page 17
• Configuration Examples for a Basic BGP Network, on page 75
• Where to Go Next, on page 90
• Additional References, on page 90
• Feature Information for Configuring a Basic BGP Network, on page 91
Note BGP requires more configuration than other routing protocols, and the effects of any configuration changes
must be fully understood. Incorrect configuration can create routing loops and negatively impact normal
network operation.
BGP Router ID
BGP uses a router ID to identify BGP-speaking peers. The BGP router ID is a 32-bit value that is often
represented by an IPv4 address. By default, the Cisco software sets the router ID to the IPv4 address of a
loopback interface on the router. If no loopback interface is configured on the device, the software chooses
the highest IPv4 address configured on a physical interface of the device to represent the BGP router ID. The
BGP router ID must be unique to the BGP peers in a network.
When a TCP connection is established between peers, each BGP peer initially exchanges all its routes—the
complete BGP routing table—with the other peer. After this initial exchange, only incremental updates are
sent when there has been a topology change in the network, or when a routing policy has been implemented
or modified. In the periods of inactivity between these updates, peers exchange special messages called
keepalives.
A BGP autonomous system is a network that is controlled by a single technical administration entity. Peer
devices are called external peers when they are in different autonomous systems and internal peers when they
are in the same autonomous system. Usually, external peers are adjacent and share a subnet; internal peers
may be anywhere in the same autonomous system.
For details about the third method of representing autonomous system numbers, see RFC 5396.
Format Configuration Format Show Command Output and Regular Expression Match
Format
asdot 2-byte: 1 to 65535 4-byte: 1.0 to 2-byte: 1 to 65535 4-byte: 1.0 to 65535.65535
65535.65535
for autonomous system numbers, but you can configure 4-byte autonomous system numbers in both the asplain
and asdot format. In addition, the default format for matching 4-byte autonomous system numbers in regular
expressions is asplain, so you must ensure that any regular expressions to match 4-byte autonomous system
numbers are written in the asplain format. If you want to change the default show command output to display
4-byte autonomous system numbers in the asdot format, use the bgp asnotation dot command under router
configuration mode. When the asdot format is enabled as the default, any regular expressions to match 4-byte
autonomous system numbers must be written using the asdot format, or the regular expression match will fail.
The tables below show that although you can configure 4-byte autonomous system numbers in either asplain
or asdot format, only one format is used to display show command output and control 4-byte autonomous
system number matching for regular expressions, and the default is asplain format. To display 4-byte
autonomous system numbers in show command output and to control matching for regular expressions in the
asdot format, you must configure the bgp asnotation dot command. After enabling the bgp asnotation dot
command, a hard reset must be initiated for all BGP sessions by entering the clear ip bgp * command.
Note If you are upgrading to an image that supports 4-byte autonomous system numbers, you can still use 2-byte
autonomous system numbers. The show command output and regular expression match are not changed and
remain in asplain (decimal value) format for 2-byte autonomous system numbers regardless of the format
configured for 4-byte autonomous system numbers.
asplain 2-byte: 1 to 65535 4-byte: 65536 to 2-byte: 1 to 65535 4-byte: 65536 to 4294967295
4294967295
asdot 2-byte: 1 to 65535 4-byte: 1.0 to 65535.65535 2-byte: 1 to 65535 4-byte: 65536 to 4294967295
asplain 2-byte: 1 to 65535 4-byte: 65536 to 2-byte: 1 to 65535 4-byte: 1.0 to 65535.65535
4294967295
asdot 2-byte: 1 to 65535 4-byte: 1.0 to 65535.65535 2-byte: 1 to 65535 4-byte: 1.0 to 65535.65535
are literally copied. The reserved numbers are documented in the IANA autonomous system number registry.
Reserved 2-byte autonomous system numbers are in the contiguous block, 64496 to 64511 and reserved 4-byte
autonomous system numbers are from 65536 to 65551 inclusive.
Private 2-byte autonomous system numbers are still valid in the range from 64512 to 65534 with 65535 being
reserved for special use. Private autonomous system numbers can be used for internal routing domains but
must be translated for traffic that is routed out to the Internet. BGP should not be configured to advertise
private autonomous system numbers to external networks. Cisco IOS software does not remove private
autonomous system numbers from routing updates by default. We recommend that ISPs filter private
autonomous system numbers.
Note Autonomous system number assignment for public and private networks is governed by the IANA. For
information about autonomous-system numbers, including reserved number assignment, or to apply to register
an autonomous system number, see the following URL: http://www.iana.org/.
Note A new private autonomous system number, 23456, was created by RFC 4893, and this number cannot be
configured as an autonomous system number in the Cisco IOS CLI.
The hold timer restarts when an update or keepalive message is received. If the BGP process receives
an error notification, it will transition to the Idle state.
The relationship between BGP global and BGP address family-dependent configuration categories is shown
in the table below.
Address family-dependent One set of global address family-dependent configurations per address
family
Note Address family configuration must be entered within the address family submode to which it applies.
The following is an example of BGP configuration statements showing the grouping of global address
family-independent and address family-dependent commands.
The following example shows actual BGP commands that match the BGP configuration statements in the
previous example:
The bgp upgrade-cli command simplifies the migration of BGP networks and existing configurations from
the network layer reachability information (NLRI) format to the address family format. Network operators
can configure commands in the address family identifier (AFI) format and save these command configurations
to existing NLRI formatted configurations. The BGP hybrid command-line interface (CLI) does not add
support for complete AFI and NLRI integration because of the limitations of the NLRI format. For complete
support of AFI commands and features, we recommend upgrading existing NLRI configurations with the bgp
upgrade-cli command. For an example of migrating BGP configurations from the NLRI format to the address
family format, see the “Example: NLFI to AFI Configuration” section later in this module.
The bgp soft-reconfig-backup command was introduced to configure BGP to perform inbound soft
reconfiguration for peers that do not support the route refresh capability. The configuration of this command
allows you to configure BGP to store updates (soft reconfiguration) only as necessary. Peers that support the
route refresh capability are unaffected by the configuration of this command.
Hard reset No memory overhead. The prefixes in the BGP, IP, and Forwarding
Information Base (FIB) tables provided by
the neighbor are lost. Not recommended.
Outbound soft reset No configuration, no storing of routing Does not reset inbound routing table updates.
table updates.
Dynamic inbound soft Does not clear the BGP session and Both BGP routers must support the route
reset cache. refresh capability (in Cisco IOS Release 12.1
and later releases).
Does not require storing of routing
table updates, and has no memory Note Does not reset outbound routing
overhead. table updates.
Configured inbound Can be used when both BGP routers Requires preconfiguration.
soft reset (uses the do not support the automatic route
Stores all received (inbound) routing policy
neighbor refresh capability.
updates without modification; is
soft-reconfiguration
In Cisco IOS Release 12.3(14)T, the memory-intensive.
router configuration
bgp soft-reconfig-backup command
command) Recommended only when absolutely
was introduced to configure inbound
necessary, such as when both BGP routers
soft reconfiguration for peers that do
do not support the automatic route refresh
not support the route refresh
capability.
capability.
Note Does not reset outbound routing
table updates.
Once you have defined two routers to be BGP neighbors, they will form a BGP connection and exchange
routing information. If you subsequently change a BGP filter, weight, distance, version, or timer, or make a
similar configuration change, you must reset BGP connections for the configuration change to take effect.
A soft reset updates the routing table for inbound and outbound routing updates. Cisco IOS Release 12.1 and
later releases support soft reset without any prior configuration. This soft reset allows the dynamic exchange
of route refresh requests and routing information between BGP routers, and the subsequent readvertisement
of the respective outbound routing table. There are two types of soft reset:
• When soft reset is used to generate inbound updates from a neighbor, it is called dynamic inbound soft
reset.
• When soft reset is used to send a new set of updates to a neighbor, it is called outbound soft reset.
To use soft reset without preconfiguration, both BGP peers must support the soft route refresh capability,
which is advertised in the OPEN message sent when the peers establish a TCP session. Routers running Cisco
IOS releases prior to Release 12.1 do not support the route refresh capability and must clear the BGP session
using the neighbor soft-reconfiguration router configuration command. Clearing the BGP session in this
way will have a negative impact upon network operations and should be used only as a last resort.
Note Inject maps and exist maps will only match a single prefix per route map clause. To inject additional prefixes,
you must configure additional route map clauses. If multiple prefixes are used, the first prefix matched will
be used.
that it does not advertise the specified network in BGP updates. In the figure below, this means that Router
B will communicate to Router D using the shorter EIGRP route instead of the longer eBGP route.
Figure 2: BGP Backdoor Route Topology
These limitations existed to balance optimal update generation and replication against peer group configuration.
These limitations could cause the network operator to configure smaller peer groups, which reduced the
efficiency of update message generation and limited the scalability of neighbor configuration.
Note In Cisco IOS Release 12.0(22)S, 12.2(14)S, 12.3(2)T, and prior releases, the update group recalculation delay
timer is set to 3 minutes.
For the best optimization of BGP update group generation, we recommend that the network operator keeps
outbound routing policy the same for neighbors that have similar outbound policies.
Peer templates improve the flexibility and enhance the capability of neighbor configuration. Peer templates
also provide an alternative to peer group configuration and overcome some limitations of peer groups. BGP
peer routers using peer templates also benefit from automatic update group configuration. With the configuration
of the BGP peer templates and the support of the BGP dynamic update peer groups, the network operator no
longer needs to configure peer groups in BGP and the network can benefit from improved configuration
flexibility and faster convergence.
Note A BGP neighbor cannot be configured to work with both peer groups and peer templates. A BGP neighbor
can be configured to belong only to a peer group or to inherit policies from peer templates.
• A BGP neighbor cannot be configured to work with both peer groups and peer templates. A BGP neighbor
can be configured to belong only to a peer group or to inherit policies only from peer templates.
• shutdown
• timers
• translate-update
• update-source
• version
General session commands can be configured once in a peer session template and then applied to many
neighbors through the direct application of a peer session template or through indirect inheritance from a peer
session template. The configuration of peer session templates simplifies the configuration of general session
commands that are commonly applied to all neighbors within an autonomous system.
Peer session templates support direct and indirect inheritance. A peer can be configured with only one peer
session template at a time, and that peer session template can contain only one indirectly inherited peer session
template.
Note If you attempt to configure more than one inherit statement with a single peer session template, an error
message will be displayed.
This behavior allows a BGP neighbor to directly inherit only one session template and indirectly inherit up
to seven additional peer session templates. This allows you to apply up to a maximum of eight peer session
configurations to a neighbor: the configuration from the directly inherited peer session template and the
configurations from up to seven indirectly inherited peer session templates. Inherited peer session configurations
are evaluated first and applied starting with the last node in the branch and ending with the directly applied
peer session template configuration at the source of the tree. The directly applied peer session template will
have priority over inherited peer session template configurations. Any configuration statements that are
duplicated in inherited peer session templates will be overwritten by the directly applied peer session template.
So, if a general session command is reapplied with a different value, the subsequent value will have priority
and overwrite the previous value that was configured in the indirectly inherited template. The following
examples illustrate the use of this feature.
In the following example, the general session command remote-as 1 is applied in the peer session template
named SESSION-TEMPLATE-ONE:
Peer session templates support only general session commands. BGP policy configuration commands that are
configured only for a specific address family or NLRI configuration mode are configured with peer policy
templates.
• advertisement-interval
• allowas-in
• as-override
• capability
• default-originate
• distribute-list
• dmzlink-bw
• exit-peer-policy
• filter-list
• inherit peer-policy
• maximum-prefix
• next-hop-self
• next-hop-unchanged
• prefix-list
• remove-private-as
• route-map
• route-reflector-client
• send-community
• send-label
• soft-reconfiguration
• unsuppress-map
• weight
Peer policy templates are used to configure BGP policy commands that are configured for neighbors that
belong to specific address families. Like peer session templates, peer policy templates are configured once
and then applied to many neighbors through the direct application of a peer policy template or through
inheritance from peer policy templates. The configuration of peer policy templates simplifies the configuration
of BGP policy commands that are applied to all neighbors within an autonomous system.
Like a peer session template, a peer policy template supports inheritance. However, there are minor differences.
A directly applied peer policy template can directly or indirectly inherit configurations from up to seven peer
policy templates. So, a total of eight peer policy templates can be applied to a neighbor or neighbor group.
Like route maps, inherited peer policy templates are configured with sequence numbers. Also like a route
map, an inherited peer policy template is evaluated starting with the inherit peer-policy statement with the
lowest sequence number and ending with the highest sequence number. However, there is a difference; a peer
policy template will not collapse like a route map. Every sequence is evaluated, and if a BGP policy command
is reapplied with a different value, it will overwrite any previous value from a lower sequence number.
The directly applied peer policy template and the inherit peer-policy statement with the highest sequence
number will always have priority and be applied last. Commands that are reapplied in subsequent peer templates
will always overwrite the previous values. This behavior is designed to allow you to apply common policy
configurations to large neighbor groups and specific policy configurations only to certain neighbors and
neighbor groups without duplicating individual policy configuration commands.
Peer policy templates support only policy configuration commands. BGP policy configuration commands
that are configured only for specific address families are configured with peer policy templates.
The configuration of peer policy templates simplifies and improves the flexibility of BGP configuration. A
specific policy can be configured once and referenced many times. Because a peer policy supports up to eight
levels of inheritance, very specific and very complex BGP policies can also be created.
Note A device that runs Cisco software can be configured to run only one BGP routing process and to be a member
of only one BGP autonomous system. However, a BGP routing process and autonomous system can support
multiple concurrent BGP address family and subaddress family configurations.
The configuration in this task is done at Router A in the figure below and would need to be repeated with
appropriate changes to the IP addresses (for example, at Router B) to fully achieve a BGP process between
the two devices. No address family is configured here for the BGP routing process, so routing information
for the IPv4 unicast address family is advertised by default.
Figure 3: BGP Topology with Two Autonomous Systems
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. network network-number [mask network-mask] [route-map route-map-name]
5. bgp router-id ip-address
6. timers bgp keepalive holdtime
7. bgp fast-external-fallover
8. bgp log-neighbor-changes
9. end
10. show ip bgp [network] [network-mask]
DETAILED STEPS
Device> enable
Step 4 network network-number [mask network-mask] (Optional) Specifies a network as local to this autonomous
[route-map route-map-name] system and adds it to the BGP routing table.
Example: • For exterior protocols, the network command controls
which networks are advertised. Interior protocols use
Device(config-router)# network 10.1.1.0 mask the network command to determine where to send
255.255.255.0 updates.
Step 5 bgp router-id ip-address (Optional) Configures a fixed 32-bit router ID as the
identifier of the local device running BGP.
Example:
• Use the ip-address argument to specify a unique
Device(config-router)# bgp router-id 10.1.1.99 router ID within the network.
Step 6 timers bgp keepalive holdtime (Optional) Sets BGP network timers.
Example: • Use the keepalive argument to specify the frequency,
in seconds, with which the software sends keepalive
Device(config-router)# timers bgp 70 120 messages to its BGP peer. By default, the keepalive
timer is set to 60 seconds.
• Use the holdtime argument to specify the interval, in
seconds, after which the software, having not received
a keepalive message, declares a BGP peer dead. By
default, the holdtime timer is set to 180 seconds.
Step 7 bgp fast-external-fallover (Optional) Enables the automatic resetting of BGP sessions.
Example: • By default, the BGP sessions of any directly adjacent
external peers are reset if the link used to reach them
Device(config-router)# bgp fast-external-fallover goes down.
Step 8 bgp log-neighbor-changes (Optional) Enables logging of BGP neighbor status changes
(up or down) and neighbor resets.
Example:
• Use this command for troubleshooting network
Device(config-router)# bgp log-neighbor-changes connectivity problems and measuring network
stability. Unexpected neighbor resets might indicate
high error rates or high packet loss in the network and
should be investigated.
Device(config-router)# end
Step 10 show ip bgp [network] [network-mask] (Optional) Displays the entries in the BGP routing table.
Example: Note Only the syntax applicable to this task is used
in this example. For more details, see the Cisco
Device# show ip bgp IOS IP Routing: BGP Command Reference.
Examples
The following sample output from the show ip bgp command shows the BGP routing table for Router
A in the figure above after this task has been configured on Router A. You can see an entry for the
network 10.1.1.0 that is local to this autonomous system.
Troubleshooting Tips
Use the ping command to check basic network connectivity between the BGP routers.
Note By default, neighbors that are defined using the neighbor remote-as command in router configuration mode
exchange only IPv4 unicast address prefixes. To exchange other address prefix types, such as IPv6 prefixes,
neighbors must also be activated using the neighbor activate command in address family configuration mode
for the other prefix types, such as IPv6 prefixes.
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. neighbor ip-address remote-as autonomous-system-number
5. address-family ipv4 [unicast | multicast | vrf vrf-name]
6. neighbor ip-address activate
7. end
8. show ip bgp [network] [network-mask]
9. show ip bgp neighbors [neighbor-address]
DETAILED STEPS
Router> enable
Step 3 router bgp autonomous-system-number Enters router configuration mode for the specified routing
process.
Example:
Step 4 neighbor ip-address remote-as Adds the IP address of the neighbor in the specified
autonomous-system-number autonomous system to the IPv4 multiprotocol BGP neighbor
table of the local router.
Example:
Step 5 address-family ipv4 [unicast | multicast | vrf vrf-name] Specifies the IPv4 address family and enters address family
configuration mode.
Example:
• The unicast keyword specifies the IPv4 unicast address
Router(config-router)# address-family ipv4 unicast family. By default, the router is placed in configuration
mode for the IPv4 unicast address family if the unicast
keyword is not specified with the address-family ipv4
command.
• The multicast keyword specifies IPv4 multicast
address prefixes.
Step 6 neighbor ip-address activate Enables the neighbor to exchange prefixes for the IPv4
unicast address family with the local router.
Example:
Router(config-router-af)# end
Step 8 show ip bgp [network] [network-mask] (Optional) Displays the entries in the BGP routing table.
Example: Note Only the syntax applicable to this task is used in
this example. For more details, see the Cisco IOS
Router# show ip bgp IP Routing: BGP Command Reference.
Step 9 show ip bgp neighbors [neighbor-address] (Optional) Displays information about the TCP and BGP
connections to neighbors.
Example:
Note Only the syntax applicable to this task is used in
Router(config-router-af)# show ip bgp neighbors this example. For more details, see the Cisco IOS
192.168.2.2 IP Routing: BGP Command Reference.
Examples
The following sample output from the show ip bgp command shows the BGP routing table for Router
A in the figure above after this task has been configured on Router A and Router B. You can now
see an entry for the network 172.17.1.0 in autonomous system 45000.
The following sample output from the show ip bgp neighbors command shows information about
the TCP and BGP connections to the BGP neighbor 192.168.1.1 of Router A in the figure above
after this task has been configured on Router A:
Last read 00:00:15, last write 00:00:15, hold time is 120, keepalive intervals
Configured hold time is 120,keepalive interval is 70 seconds, Minimum holdtims
Neighbor capabilities:
Route refresh: advertised and received (old & new)
Address family IPv4 Unicast: advertised and received
Message statistics:
InQ depth is 0
OutQ depth is 0
Sent Rcvd
Opens: 1 1
Notifications: 0 0
Updates: 1 2
Keepalives: 13 13
Route Refresh: 0 0
Total: 15 16
Default minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 13, neighbor version 13/0
Output queue size : 0
Index 1, Offset 0, Mask 0x2
1 update-group member
Sent Rcvd
Prefix activity: ---- ----
Prefixes Current: 1 1 (Consumes 52 bytes)
Prefixes Total: 1 1
Implicit Withdraw: 0 0
Explicit Withdraw: 0 0
Used as bestpath: n/a 1
Used as multipath: n/a 0
Outbound Inbound
Local Policy Denied Prefixes: -------- -------
AS_PATH loop: n/a 1
Bestpath from this peer: 1 n/a
Total: 1 1
Number of NLRIs in the update sent: max 0, min 0
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Connection is ECN Disabled
Local host: 192.168.1.2, Local port: 179
Foreign host: 192.168.1.1, Foreign port: 37725
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x12F4F2C):
Timer Starts Wakeups Next
Retrans 14 0 0x0
TimeWait 0 0 0x0
AckHold 13 8 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 165379618 snduna: 165379963 sndnxt: 165379963 sndwnd: 16040
irs: 3127821601 rcvnxt: 3127821993 rcvwnd: 15993 delrcvwnd: 391
SRTT: 254 ms, RTTO: 619 ms, RTV: 365 ms, KRTT: 0 ms
minRTT: 12 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: passive open, nagle, gen tcbs
IP Precedence value : 6
Datagrams (max data segment is 1460 bytes):
Rcvd: 20 (out of order: 0), with data: 15, total data bytes: 391
Sent: 22 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 04
Troubleshooting Tips
Use the ping command to verify basic network connectivity between the BGP routers.
What to Do Next
If you have BGP peers in a VPN, proceed to the Configuring a BGP Peer for the IPv4 VRF Address Family,
on page 30. If you do not have BGP peers in a VPN, proceed to the Customizing a BGP Peer.
Note By default, neighbors that are defined using the neighbor remote-as command in router configuration mode
exchange only IPv4 unicast address prefixes. To exchange other address prefix types, such as IPv6 prefixes,
neighbors must also be activated using the neighbor activate command in address family configuration mode
for the other prefix types.
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. neighbor ip-address remote-as autonomous-system-number
5. Repeat Step 4 to define other BGP neighbors, as required.
6. address-family ipv4 [unicast | multicast | vrf vrf-name]
7. neighbor ip-address activate
8. Repeat Step 7 to activate other BGP neighbors, as required.
9. network network-number [mask network-mask] [route-map route-map-name]
10. end
11. show ip bgp [network] [network-mask]
12. show ip bgp summary
DETAILED STEPS
Device> enable
Step 3 router bgp autonomous-system-number Enters router configuration mode for the specified routing
process.
Example:
• In this example, the 4-byte AS number, 65538, is
Device(config)# router bgp 65538 defined in asplain notation.
Step 4 neighbor ip-address remote-as Adds the IP address of the neighbor in the specified AS to
autonomous-system-number the IPv4 multiprotocol BGP neighbor table of the local
device.
Example:
• In this example, the 4-byte AS number, 65536, is
Device(config-router)# neighbor 192.168.1.2 defined in asplain notation.
remote-as 65536
Step 6 address-family ipv4 [unicast | multicast | vrf vrf-name] Specifies the IPv4 address family and enters address family
configuration mode.
Example:
• The unicast keyword specifies the IPv4 unicast
Device(config-router)# address-family ipv4 unicast address family. By default, the device is placed in
configuration mode for the IPv4 unicast address
family if the unicast keyword is not specified with
the address-family ipv4 command.
• The multicast keyword specifies IPv4 multicast
address prefixes.
• The vrf keyword and vrf-name argument specify the
name of the virtual routing and forwarding (VRF)
instance to associate with subsequent IPv4 address
family configuration mode commands.
Step 7 neighbor ip-address activate Enables the neighbor to exchange prefixes for the IPv4
unicast address family with the local device.
Example:
Step 9 network network-number [mask network-mask] (Optional) Specifies a network as local to this AS and adds
[route-map route-map-name] it to the BGP routing table.
Device(config-router-af)# end
Step 11 show ip bgp [network] [network-mask] (Optional) Displays the entries in the BGP routing table.
Example: Note Only the syntax applicable to this task is used
in this example. For more details, see the Cisco
Device# show ip bgp 10.1.1.0 IOS IP Routing: BGP Command Reference.
Step 12 show ip bgp summary (Optional) Displays the status of all BGP connections.
Example:
Examples
The following output from the show ip bgp command at Router B shows the BGP routing table entry
for network 10.1.1.0 learned from the BGP neighbor at 192.168.1.2 in Router A in the figure above
with its 4-byte AS number of 65536 displayed in the default asplain format.
The following output from the show ip bgp summary command shows the 4-byte AS number 65536
for the BGP neighbor 192.168.1.2 of Router A in the figure above after this task has been configured
on Router B:
Troubleshooting Tips
Use the ping command to verify basic network connectivity between the BGP routers.
Modifying the Default Output and Regular Expression Match Format for 4-Byte
Autonomous System Numbers
Perform this task to modify the default output format for 4-byte autonomous system (AS) numbers from
asplain format to asdot notation format. The show ip bgp summary command is used to display the changes
in output format for the 4-byte AS numbers.
SUMMARY STEPS
1. enable
2. show ip bgp summary
3. configure terminal
4. router bgp autonomous-system-number
5. bgp asnotation dot
6. end
7. clear ip bgp *
8. show ip bgp summary
9. show ip bgp regexp regexp
10. configure terminal
11. router bgp autonomous-system-number
12. no bgp asnotation dot
13. end
14. clear ip bgp *
DETAILED STEPS
Device> enable
Step 2 show ip bgp summary Displays the status of all Border Gateway Protocol (BGP)
connections.
Example:
Step 4 router bgp autonomous-system-number Enters router configuration mode for the specified routing
process.
Example:
• In this example, the 4-byte AS number, 65538, is
Device(config)# router bgp 65538 defined in asplain notation.
Step 5 bgp asnotation dot Changes the default output format of BGP 4-byte AS
numbers from asplain (decimal values) to dot notation.
Example:
Note 4-byte AS numbers can be configured using
Device(config-router)# bgp asnotation dot either asplain format or asdot format. This
command affects only the output displayed for
show commands or the matching of regular
expressions.
Device(config-router)# end
Step 7 clear ip bgp * Clears and resets all current BGP sessions.
Example: • In this example, a hard reset is performed to ensure
that the 4-byte AS number format change is reflected
Device# clear ip bgp * in all BGP sessions.
Step 8 show ip bgp summary Displays the status of all BGP connections.
Example:
Step 9 show ip bgp regexp regexp Displays routes that match the AS path regular expression.
Example: • In this example, a regular expression to match a
4-byte AS path is configured using asdot format.
Device# show ip bgp regexp ^1\.0$
Step 12 no bgp asnotation dot Resets the default output format of BGP 4-byte AS
numbers back to asplain (decimal values).
Example:
Note 4-byte AS numbers can be configured using
Device(config-router)# no bgp asnotation dot either asplain format or asdot format. This
command affects only the output displayed for
show commands or the matching of regular
expressions.
Device(config-router)# end
Step 14 clear ip bgp * Clears and resets all current BGP sessions.
Example: • In this example, a hard reset is performed to ensure
that the 4-byte AS number format change is reflected
Device# clear ip bgp * in all BGP sessions.
Examples
The following output from the show ip bgp summary command shows the default asplain format
of the 4-byte AS numbers. Note the asplain format of the 4-byte AS numbers, 65536 and 65550.
After the bgp asnotation dot command is configured (followed by the clear ip bgp * command to
perform a hard reset of all current BGP sessions), the output is converted to asdot notation format
as shown in the following output from the show ip bgp summary command. Note the asdot format
of the 4-byte AS numbers, 1.0 and 1.14 (these are the asdot conversions of the 65536 and 65550 AS
numbers.
After the bgp asnotation dot command is configured (followed by the clear ip bgp * command to
perform a hard reset of all current BGP sessions), the regular expression match format for 4-byte AS
paths is changed to asdot notation format. Although a 4-byte AS number can be configured in a
regular expression using either asplain format or asdot format, only 4-byte AS numbers configured
using the current default format are matched. In the first example below, the show ip bgp regexp
command is configured with a 4-byte AS number in asplain format. The match fails because the
default format is currently asdot format and there is no output. In the second example using asdot
format, the match passes and the information about the 4-byte AS path is shown using the asdot
notation.
Note The asdot notation uses a period, which is a special character in Cisco regular expressions. To remove
the special meaning, use a backslash before the period.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip vrf vrf-name
4. rd route-distinguisher
5. route-target {import | export | both} route-target-ext-community
6. exit
7. router bgp autonomous-system-number
8. address-family ipv4 [unicast | multicast | vrf vrf-name]
9. neighbor ip-address remote-as autonomous-system-number
10. neighbor {ip-address | peer-group-name} maximum-prefix maximum [threshold] [restart
restart-interval] [warning-only]
11. neighbor ip-address activate
12. end
DETAILED STEPS
Router> enable
Step 3 ip vrf vrf-name Configures a VRF routing table and enters VRF
configuration mode.
Example:
• Use the vrf-name argument to specify a name to be
Router(config)# ip vrf vpn1 assigned to the VRF.
Step 4 rd route-distinguisher Creates routing and forwarding tables and specifies the
default route distinguisher for a VPN.
Example:
• Use the route-distinguisher argument to add an 8-byte
Router(config-vrf)# rd 45000:5 value to an IPv4 prefix to create a unique VPN IPv4
prefix.
Step 5 route-target {import | export | both} Creates a route target extended community for a VRF.
route-target-ext-community
• Use the import keyword to import routing
Example: information from the target VPN extended
community.
Router(config-vrf)# route-target both 45000:100
• Use the export keyword to export routing information
to the target VPN extended community.
• Use the both keyword to import both import and
export routing information to the target VPN extended
community.
• Use the route-target-ext-community argument to add
the route target extended community attributes to the
VRF's list of import, export, or both (import and
export) route target extended communities.
Router(config-vrf)# exit
Step 7 router bgp autonomous-system-number Enters router configuration mode for the specified routing
process.
Example:
Step 8 address-family ipv4 [unicast | multicast | vrf vrf-name] Specifies the IPv4 address family and enters address family
configuration mode.
Example:
• Use the unicast keyword to specify the IPv4 unicast
address family. By default, the router is placed in
Step 9 neighbor ip-address remote-as Adds the IP address of the neighbor in the specified
autonomous-system-number autonomous system to the IPv4 multiprotocol BGP
neighbor table of the local router.
Example:
Step 10 neighbor {ip-address | peer-group-name} Controls how many prefixes can be received from a
maximum-prefix maximum [threshold] [restart neighbor.
restart-interval] [warning-only]
• Use the maximum argument to specify the maximum
Example: number of prefixes allowed from the specified
neighbor. The number of prefixes that can be
Router(config-router-af)# neighbor 192.168.3.2 configured is limited only by the available system
maximum-prefix 10000 warning-only resources on a router.
• Use the threshold argument to specify an integer
representing a percentage of the maximum prefix
limit at which the router starts to generate a warning
message.
• Use the warning-only keyword to allow the router
to generate a log message when the maximum prefix
limit is exceeded, instead of terminating the peering
session.
Step 11 neighbor ip-address activate Enables the neighbor to exchange prefixes for the IPv4
VRF address family with the local router.
Example:
Router(config-router-af)# end
Troubleshooting Tips
Use the ping command to verify basic network connectivity between the BGP routers, and use the show ip
vrf command to verify that the VRF instance has been created.
Note By default, neighbors that are defined using the neighbor remote-as command in router configuration mode
exchange only IPv4 unicast address prefixes. To exchange other address prefix types, such as IPv6 prefixes,
neighbors must also be activated using the neighbor activate command in address family configuration mode
for the other prefix types, such as IPv6 prefixes.
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. no bgp default ipv4-unicast
DETAILED STEPS
Device> enable
Step 3 router bgp autonomous-system-number Enters router configuration mode for the specified routing
process.
Example:
Step 4 no bgp default ipv4-unicast Disables the IPv4 unicast address family for the BGP
routing process.
Example:
Note Routing information for the IPv4 unicast
Device(config-router)# no bgp default ipv4-unicast address family is advertised by default for each
BGP routing session configured with the
neighbor remote-as router configuration
command unless you configure the no bgp
default ipv4-unicast router configuration
command before configuring the neighbor
remote-as command. Existing neighbor
configurations are not affected.
Step 5 neighbor {ip-address | peer-group-name} remote-as Adds the IP address of the neighbor in the specified
autonomous-system-number autonomous system to the IPv4 multiprotocol BGP
neighbor table of the local device.
Example:
Step 6 neighbor {ip-address | peer-group-name} description (Optional) Associates a text description with the specified
text neighbor.
Example:
Step 7 address-family ipv4 [unicast | multicast | vrf vrf-name] Specifies the IPv4 address family and enters address family
configuration mode.
Example:
• The unicast keyword specifies the IPv4 unicast
Device(config-router)# address-family ipv4 address family. By default, the device is placed in
multicast configuration mode for the IPv4 unicast address
family if the unicast keyword is not specified with
the address-family ipv4 command.
• The multicast keyword specifies IPv4 multicast
address prefixes.
• The vrf keyword and vrf-name argument specify the
name of the VRF instance to associate with
subsequent IPv4 address family configuration mode
commands.
Step 8 network network-number [mask network-mask] (Optional) Specifies a network as local to this autonomous
[route-map route-map-name] system and adds it to the BGP routing table.
Example: • For exterior protocols the network command controls
which networks are advertised. Interior protocols use
Device(config-router-af)# network 172.17.1.0 mask the network command to determine where to send
255.255.255.0 updates.
Step 9 neighbor {ip-address | peer-group-name} activate Enables the exchange of information with a BGP neighbor.
Example:
Step 10 neighbor {ip-address | peer-group-name} (Optional) Sets the minimum interval between the sending
advertisement-interval seconds of BGP routing updates.
Example:
Step 12 exit-address-family Exits address family configuration mode and enters router
configuration mode.
Example:
Device(config-router-af)# exit-address-family
Step 13 neighbor {ip-address | peer-group-name} shutdown (Optional) Disables a BGP peer or peer group.
Example: Note If you perform this step you will not be able to
run either of the subsequent show command
Device(config-router)# neighbor 192.168.3.2 steps because you have disabled the neighbor.
shutdown
Device(config-router)# end
Step 15 show ip bgp ipv4 multicast [command] (Optional) Displays IPv4 multicast database-related
information.
Example:
• Use the command argument to specify any
Device# show ip bgp ipv4 multicast multiprotocol BGP command that is supported. To
see the supported commands, use the ? prompt on the
CLI.
Step 16 show ip bgp neighbors [neighbor-address] (Optional) Displays information about the TCP and BGP
[received-routes | routes | advertised-routes | paths connections to neighbors.
regexp | dampened-routes | received prefix-filter]
Example:
Examples
The following sample output from the show ip bgp ipv4 multicast command shows BGP IPv4
multicast information for Router B in the figure above after this task has been configured on Router
B and Router E. Note that the networks local to each device that were configured under IPv4 multicast
address family appear in the output table.
The following partial sample output from the show ip bgp neighbors command for neighbor
192.168.3.2 shows general BGP information and specific BGP IPv4 multicast address family
information about the neighbor. The command was entered on Router B in the figure above after
this task had been configured on Router B and Router E.
that routing loops are not created when these routes are subsequently advertised by EIGRP. When removing
BGP configuration commands you must remember to remove or disable all the related commands. In this
example, if the route-map command is omitted, then the redistribution will still occur and possibly with
unexpected results as the route map filtering has been removed. Omitting just the redistribute command
would mean that the route map is not applied, but it would leave unused commands in the running configuration.
For more details on BGP CLI removal, see the “BGP CLI Removal Considerations” concept in the “Cisco
BGP Overview” module.
To view the redistribution configuration before and after the CLI removal, see the “Examples: Removing
BGP Configuration Commands Using a Redistribution Example” section.
SUMMARY STEPS
1. enable
2. configure terminal
3. no route-map map-name
4. router eigrp autonomous-system-number
5. no redistribute protocol [as-number]
6. end
7. show running-config
DETAILED STEPS
Device> enable
Step 3 no route-map map-name Removes a route map from the running configuration.
Example: • In this example, a route map named bgp-to-eigrp is
removed from the configuration.
Device(config)# no route-map bgp-to-eigrp
Step 4 router eigrp autonomous-system-number Enters router configuration mode for the specified routing
process.
Example:
Step 5 no redistribute protocol [as-number] Disables the redistribution of routes from one routing
domain into another routing domain.
Example:
• In this example, the configuration of the redistribution
Device(config-router)# no redistribute bgp 45000 of BGP routes into the EIGRP routing process is
removed from the running configuration.
Step 6 end Exits router configuration mode and enters privileged EXEC
mode.
Example:
Device(config-router)# end
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. bgp log-neighbor-changes
5. bgp soft-reconfig-backup
6. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number
7. neighbor {ip-address | peer-group-name} soft-reconfiguration [inbound]
8. neighbor {ip-address | peer-group-name} route-map map-name {in | out}
9. Repeat Steps 6 through 8 for every peer that is to be configured with inbound soft reconfiguration.
10. exit
11. route-map map-name [permit | deny] [sequence-number]
12. set ip next-hop ip-address
13. end
14. show ip bgp neighbors [neighbor-address]
15. show ip bgp [network] [network-mask]
DETAILED STEPS
Device> enable
Step 3 router bgp autonomous-system-number Enters router configuration mode for the specified routing
process.
Example:
Step 6 neighbor {ip-address | peer-group-name} remote-as Adds the IP address of the neighbor in the specified
autonomous-system-number autonomous system to the IPv4 multiprotocol BGP
neighbor table of the local device.
Example:
Step 8 neighbor {ip-address | peer-group-name} route-map Applies a route map to incoming or outgoing routes.
map-name {in | out}
• In this example, the route map named LOCAL will
Example: be applied to incoming routes.
Device(config-router)# exit
Step 11 route-map map-name [permit | deny] Configures a route map and enters route-map configuration
[sequence-number] mode.
Example: • In this example, a route map named LOCAL is
created.
Device(config)# route-map LOCAL permit 10
Step 12 set ip next-hop ip-address Specifies where output packets that pass a match clause
of a route map for policy routing.
Example:
• In this example, the ip address is set to 192.168.1.144.
Device(config-route-map)# set ip next-hop
192.168.1.144
Device(config-route-map)# end
Step 14 show ip bgp neighbors [neighbor-address] (Optional) Displays information about the TCP and BGP
connections to neighbors.
Example:
Note Only the syntax applicable to this task is used
Device# show ip bgp neighbors 192.168.1.2 in this example. For more details, see the Cisco
IOS IP Routing: BGP Command Reference.
Step 15 show ip bgp [network] [network-mask] (Optional) Displays the entries in the BGP routing table.
Example:
Examples
The following partial output from the show ip bgp neighbors command shows information about
the TCP and BGP connections to the BGP neighbor 192.168.2.1. This peer supports route refresh.
The following partial output from the show ip bgp neighbors command shows information about
the TCP and BGP connections to the BGP neighbor 192.168.3.2. This peer does not support route
refresh so the soft-reconfig inbound paths for BGP peer 192.168.3.2 will be stored because there is
no other way to update any inbound policy updates.
The following sample output from the show ip bgp command shows the entry for the network
172.17.1.0. Both BGP peers are advertising 172.17.1.0/24, but only the received-only path is stored
for 192.168.3.2.
SUMMARY STEPS
1. enable
2. clear ip bgp {* | autonomous-system-number | neighbor-address} [soft [in | out] ]
3. show ip bgp [network-address] [network-mask] [longer-prefixes] [prefix-list prefix-list-name | route-map
route-map-name] [shorter prefixes mask-length]
DETAILED STEPS
Device> enable
Step 2 clear ip bgp {* | autonomous-system-number | Clears and resets BGP neighbor sessions:
neighbor-address} [soft [in | out] ]
• In the example provided, all BGP neighbor sessions
Example: are cleared and reset.
Step 3 show ip bgp [network-address] [network-mask] Displays all the entries in the BGP routing table:
[longer-prefixes] [prefix-list prefix-list-name | route-map
• In the example provided, the BGP routing table
route-map-name] [shorter prefixes mask-length]
information for the 10.1.1.0 network is displayed.
Example:
Step 4 show ip bgp neighbors [neighbor-address] Displays information about the TCP and BGP connections
[received-routes | routes | advertised-routes | paths regexp to neighbors.
| dampened-routes | received prefix-filter]
• In the example provided, the routes advertised from
Example: the device to BGP neighbor 192.168.3.2 on another
device are displayed.
Device# show ip bgp neighbors 192.168.3.2
advertised-routes
Step 5 show ip bgp paths Displays information about all the BGP paths in the
database.
Example:
Step 6 show ip bgp summary Displays information about the status of all BGP
connections.
Example:
SUMMARY STEPS
1. enable
2. configure terminal
3. ip route prefix mask {ip-address | interface-type interface-number [ip-address]} [distance] [name]
[permanent | track number] [tag tag]
4. router bgp autonomous-system-number
5. redistribute static
6. end
DETAILED STEPS
Device> enable
Step 5 redistribute static Redistributes routes into the BGP routing table.
Example:
Device(config-router)# end
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. aggregate-address address mask [as-set]
5. end
DETAILED STEPS
Device> enable
Step 3 router bgp autonomous-system-number Enters router configuration mode for the specified routing
process.
Example:
Step 5 end Exits router configuration mode and enters privileged EXEC
mode.
Example:
Device(config-router)# end
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. neighbor ip-address remote-as autonomous-system-number
5. Do one of the following:
• aggregate-address address mask [summary-only]
• aggregate-address address mask [suppress-map map-name]
6. neighbor {ip-address | peer-group-name} unsuppress-map map-name
7. end
DETAILED STEPS
Device> enable
Step 3 router bgp autonomous-system-number Enters router configuration mode for the specified routing
process.
Example:
Step 4 neighbor ip-address remote-as Adds the IP address of the neighbor in the specified
autonomous-system-number autonomous system to the IPv4 multiprotocol BGP neighbor
table of the local device.
Example:
Device(config-router)# end
Note Inactive route suppression can be configured only under the IPv4 address family or under a default IPv4
general session.
>
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp as-number
4. address-family {ipv4 [mdt | multicast | unicast [vrf vrf-name] | vrf vrf-name] | vpnv4 [unicast]}
5. bgp suppress-inactive
6. end
7. show ip bgp rib-failure
DETAILED STEPS
Router> enable
Step 3 router bgp as-number Enters router configuration mode and creates a BGP routing
process.
Example:
Step 4 address-family {ipv4 [mdt | multicast | unicast [vrf Enter address family configuration mode to configure BGP
vrf-name] | vrf vrf-name] | vpnv4 [unicast]} peers to accept address family specific configurations.
Example: • The example creates an IPv4 unicast address family
session.
Router(config-router)# address-family ipv4 unicast
Router(config-router-af)# end
Step 7 show ip bgp rib-failure (Optional) Displays BGP routes that are not installed in the
RIB.
Example:
Examples
The following example shows output from the show ip bgp rib-failure command displaying routes
that are not installed in the RIB. The output shows that the displayed routes were not installed because
a route or routes with a better administrative distance already exist in the RIB.
If the condition is not met, the route is withdrawn and conditional advertisement does not occur. All routes
that may be dynamically advertised or not advertised must exist in the BGP routing table in order for conditional
advertisement to occur. These routes are referenced from an access list or an IP prefix list.
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number
5. neighbor ip-address advertise-map map-name {exist-map map-name | non-exist-map map-name}
6. exit
7. route-map map-tag [permit | deny] [sequence-number]
8. match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name
[access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]}
9. exit
10. route-map map-tag [permit | deny] [sequence-number]
11. match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name
[access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]}
12. exit
13. access-list access-list-number {deny | permit} source [source-wildcard] [log]
14. access-list access-list-number {deny | permit} source [source-wildcard] [log]
15. exit
DETAILED STEPS
Device> enable
Step 3 router bgp autonomous-system-number Enters router configuration mode for the specified routing
process.
Example:
Step 4 neighbor {ip-address | peer-group-name} remote-as Adds the IP address of the neighbor in the specified
autonomous-system-number autonomous system to the IPv4 multiprotocol BGP
neighbor table of the local device.
Example:
Step 5 neighbor ip-address advertise-map map-name Adds the IP address of the neighbor in the specified
{exist-map map-name | non-exist-map map-name} autonomous system to the IPv4 multiprotocol BGP
neighbor table of the local device.
Example:
• In this example, the prefix (172.17.0.0) matching the
Device(config-router)# neighbor 192.168.1.2 ACL in the advertise map (the route map named
advertise-map map1 exist-map map2 map1) will be advertised to the neighbor only when
a prefix (192.168.50.0) matching the ACL in exist
map (the route-map named map2) is in the local BGP
table.
Device(config-router)# exit
Step 7 route-map map-tag [permit | deny] [sequence-number] Configures a route map and enters route map configuration
mode.
Example:
• In this example, a route map named map1 is created.
Device(config)# route-map map1 permit 10
Step 8 match ip address {access-list-number Configures the route map to match a prefix that is permitted
[access-list-number... | access-list-name...] | by a standard access list, an extended access list, or a prefix
access-list-name [access-list-number... | access-list-name] list.
| prefix-list prefix-list-name [prefix-list-name...]}
• In this example, the route map is configured to match
Example: a prefix permitted by access list 1.
Step 9 exit Exits route map configuration mode and enters global
configuration mode.
Example:
Device(config-route-map)# exit
Step 11 match ip address {access-list-number Configures the route map to match a prefix that is permitted
[access-list-number... | access-list-name...] | by a standard access list, an extended access list, or a prefix
access-list-name [access-list-number... | access-list-name] list.
| prefix-list prefix-list-name [prefix-list-name...]}
• In this example, the route map is configured to match
Example: a prefix permitted by access list 2.
Step 12 exit Exits route map configuration mode and enters global
configuration mode.
Example:
Device(config-route-map)# exit
Step 13 access-list access-list-number {deny | permit} source Configures a standard access list.
[source-wildcard] [log]
• In this example, access list 1 permits advertising of
Example: the 172.17.0.0 prefix, depending on other conditions
set by the neighbor advertise-map command.
Device(config)# access-list 1 permit 172.17.0.0
Step 14 access-list access-list-number {deny | permit} source Configures a standard access list.
[source-wildcard] [log]
• In this example, access list 2 permits the 192.168.50.0
Example: to be the prefix of the exist-map.
Device(config)# exit
If the device is peered with an Internet service provider (ISP), the ISP will carry full routing tables, so
configuring a default route into the ISP network saves resources at the local device.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip prefix-list list-name [seq seq-value] {deny network / length | permit network / length} [ge ge-value]
[le le-value]
4. route-map map-tag [permit | deny] [sequence-number]
5. match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name
[access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]}
6. exit
7. router bgp autonomous-system-number
8. neighbor {ip-address | peer-group-name} default-originate [route-map map-name]
9. end
DETAILED STEPS
Device> enable
Step 3 ip prefix-list list-name [seq seq-value] {deny network / Configures an IP prefix list.
length | permit network / length} [ge ge-value] [le le-value]
• In this example, prefix list DEFAULT permits
Example: advertising of the 10.1.1.0/24. prefix depending on a
match set by the match ip address command.
Device(config)# ip prefix-list DEFAULT permit
10.1.1.0/24
Step 4 route-map map-tag [permit | deny] [sequence-number] Configures a route map and enters route map configuration
mode.
Example:
• In this example, a route map named ROUTE is created.
Device(config)# route-map ROUTE
Step 5 match ip address {access-list-number Configures the route map to match a prefix that is permitted
[access-list-number... | access-list-name...] | by a standard access list, an extended access list, or a prefix
access-list-name [access-list-number... | access-list-name] list.
| prefix-list prefix-list-name [prefix-list-name...]}
• In this example, the route map is configured to match
Example: a prefix permitted by prefix list DEFAULT.
Step 6 exit Exits route map configuration mode and enters global
configuration mode.
Example:
Device(config-route-map)# exit
Step 7 router bgp autonomous-system-number Enters router configuration mode for the specified routing
process.
Example:
Step 8 neighbor {ip-address | peer-group-name} default-originate (Optional) Permits a BGP speaker--the local device--to send
[route-map map-name] the default route 0.0.0.0 to a peer for use as a default route.
Example:
Step 9 end Exits router configuration mode and enters privileged EXEC
mode.
Example:
Device(config-router)# end
Troubleshooting Tips
Use the show ip route command on the receiving BGP peer (not on the local router) to verify that the default
route has been set. In the output, verify that a line similar to the following showing the default route 0.0.0.0
is present:
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
DETAILED STEPS
Router> enable
Step 3 router bgp autonomous-system-number Enters router configuration mode for the specified routing
process.
Example:
Step 4 bgp inject-map inject-map-name exist-map Specifies the inject map and the exist map for conditional
exist-map-name [copy-attributes] route injection.
Example: • Use the copy-attributes keyword to specify that the
injected route inherit the attributes of the aggregate
Router(config-router)# bgp inject-map ORIGINATE route.
exist-map LEARNED_PATH
Router(config-router)# exit
Step 7 match ip address {access-list-number Specifies the aggregate route to which a more specific
[access-list-number... | access-list-name...] | route will be injected.
access-list-name [access-list-number... | access-list-name]
• In this example, the prefix list named SOURCE is
| prefix-list prefix-list-name [prefix-list-name...]}
used to redistribute the source of the route.
Example:
Step 8 match ip route-source {access-list-number | Specifies the match conditions for redistributing the source
access-list-name} [access-list-number...| of the route.
access-list-name...]
• In this example, the prefix list named
Example: ROUTE_SOURCE is used to redistribute the source
of the route.
Router(config-route-map)# match ip route-source
prefix-list ROUTE_SOURCE Note The route source is the neighbor address that is
configured with the neighbor remote-as
command. The tracked prefix must come from
this neighbor in order for conditional route
injection to occur.
Step 9 exit Exits route map configuration mode and enters global
configuration mode.
Example:
Router(config-route-map)# exit
Step 10 route-map map-tag [permit | deny] [sequence-number] Configures a route map and enters route map configuration
mode.
Example:
Step 12 set community {community-number [additive] Sets the BGP community attribute of the injected route.
[well-known-community] | none}
Step 13 exit Exits route map configuration mode and enters global
configuration mode.
Example:
Router(config-route-map)# exit
Router(config)# exit
Step 17 show ip bgp injected-paths (Optional) Displays information about injected paths.
Example:
Examples
The following sample output is similar to the output that will be displayed when the show ip bgp
injected-pathscommand is entered:
Troubleshooting Tips
BGP conditional route injection is based on the injection of a more specific prefix into the BGP routing table
when a less specific prefix is present. If conditional route injection is not working properly, verify the following:
• If conditional route injection is configured but does not occur, verify the existence of the aggregate prefix
in the BGP routing table. The existence (or not) of the tracked prefix in the BGP routing table can be
verified with the show ip bgpcommand.
• If the aggregate prefix exists but conditional route injection does not occur, verify that the aggregate
prefix is being received from the correct neighbor and the prefix list identifying that neighbor is a /32
match.
• Verify the injection (or not) of the more specific prefix using the show ip bgp injected-pathscommand.
• Verify that the prefix that is being injected is not outside of the scope of the aggregate prefix.
• Ensure that the inject route map is configured with the set ip address command and not the match ip
address command.
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. neighbor ip-address remote-as autonomous-system-number
5. network ip-address backdoor
6. end
DETAILED STEPS
Device> enable
Step 3 router bgp autonomous-system-number Enters router configuration mode for the specified routing
process.
Example:
Step 4 neighbor ip-address remote-as Adds the IP address of the neighbor in the specified
autonomous-system-number autonomous system to the multiprotocol BGP neighbor
table of the local device.
Example:
• In this example, the peer is an internal peer as the
Device(config-router)# neighbor 172.22.1.2 autonomous system number specified for the peer is
remote-as 45000 the same number specified in Step 3.
Step 5 network ip-address backdoor Indicates a network that is reachable through a backdoor
route.
Example:
Device(config-router)# end
You can disable a BGP peer or peer group without removing all the configuration information using the
neighbor shutdown router configuration command.
Note By default, neighbors that are defined using the neighbor remote-as command in router configuration mode
exchange only IPv4 unicast address prefixes. To exchange other address prefix types, such as IPv6 prefixes,
neighbors must also be activated using the neighbor activate command in address family configuration mode
for the other prefix types.
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. neighbor peer-group-name peer-group
5. neighbor ip-address remote-as autonomous-system-number
6. neighbor ip-address peer-group peer-group-name
7. address-family ipv4 [unicast | multicast | vrf vrf-name]
8. neighbor peer-group-name activate
9. neighbor ip-address peer-group peer-group-name
10. end
DETAILED STEPS
Device> enable
Step 3 router bgp autonomous-system-number Enters router configuration mode for the specified routing
process.
Example:
Step 5 neighbor ip-address remote-as Adds the IP address of the neighbor in the specified
autonomous-system-number autonomous system to the multiprotocol BGP neighbor
table of the local device.
Example:
Step 6 neighbor ip-address peer-group peer-group-name Assigns the IP address of a BGP neighbor to a peer group.
Example:
Step 8 neighbor peer-group-name activate Enables the neighbor to exchange prefixes for the IPv4
address family with the local device.
Example:
Note By default, neighbors that are defined using the
Device(config-router-af)# neighbor fingroup neighbor remote-as command in router
activate configuration mode exchange only unicast
address prefixes. To allow BGP to exchange
other address prefix types, such as multicast
that is configured in this example, neighbors
must also be activated using the neighbor
activate command.
Step 9 neighbor ip-address peer-group peer-group-name Assigns the IP address of a BGP neighbor to a peer group.
Example:
Device(config-router-af)# end
Note The commands in Step 5 and 6 are optional and could be replaced with any supported general session
commands.
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. template peer-session session-template-name
5. remote-as autonomous-system-number
6. timers keepalive-interval hold-time
7. end
8. show ip bgp template peer-session [session-template-name]
DETAILED STEPS
Router> enable
Step 3 router bgp autonomous-system-number Enters router configuration mode and creates a BGP routing
process.
Example:
Step 4 template peer-session session-template-name Enters session-template configuration mode and creates a
peer session template.
Example:
Step 6 timers keepalive-interval hold-time (Optional) Configures BGP keepalive and hold timers.
Example: • The hold time must be at least twice the keepalive time.
Router(config-router-stmp)# timers 30 300 Note Any supported general session command can be
used here. For a list of the supported commands,
see the “Restrictions” section.
Router(config-router)# end
Step 8 show ip bgp template peer-session Displays locally configured peer session templates.
[session-template-name]
• The output can be filtered to display a single peer
Example: policy template with the session-template-name
argument. This command also supports all standard
Router# show ip bgp template peer-session output modifiers.
What to Do Next
After the peer session template is created, the configuration of the peer session template can be inherited or
applied by another peer session template with the inherit peer-session or neighbor inherit peer-session
command.
Configuring Peer Session Template Inheritance with the inherit peer-session Command
This task configures peer session template inheritance with the inherit peer-session command. It creates and
configures a peer session template and allows it to inherit a configuration from another peer session template.
Note The commands in Steps 5 and 6 are optional and could be replaced with any supported general session
commands.
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. template peer-session session-template-name
5. description text-string
6. update-source interface-type interface-number
DETAILED STEPS
Router> enable
Step 3 router bgp autonomous-system-number Enters router configuration mode and creates a BGP routing
process.
Example:
Step 4 template peer-session session-template-name Enter session-template configuration mode and creates a
peer session template.
Example:
Router(config-router-stmp)# description CORE-123 Note Any supported general session command can be
used here. For a list of the supported commands,
see the “Restrictions” section.
Step 6 update-source interface-type interface-number (Optional) Configures a router to select a specific source
or interface to receive routing table updates.
Example:
• The example uses a loopback interface. The advantage
Router(config-router-stmp)# update-source loopback to this configuration is that the loopback interface is
1 not as susceptible to the effects of a flapping interface.
Step 7 inherit peer-session session-template-name Configures this peer session template to inherit the
configuration of another peer session template.
Example:
Router(config-router)# end
Step 9 show ip bgp template peer-session Displays locally configured peer session templates.
[session-template-name]
• The output can be filtered to display a single peer
Example: policy template with the optional
session-template-name argument. This command also
Router# show ip bgp template peer-session supports all standard output modifiers.
What to Do Next
After the peer session template is created, the configuration of the peer session template can be inherited or
applied by another peer session template with the inherit peer-session or neighbor inherit peer-session
command.
Configuring Peer Session Template Inheritance with the neighbor inherit peer-session Command
This task configures a router to send a peer session template to a neighbor to inherit the configuration from
the specified peer session template with the neighbor inherit peer-session command. Use the following steps
to send a peer session template configuration to a neighbor to inherit.
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. neighbor ip-address remote-as autonomous-system-number
5. neighbor ip-address inherit peer-session session-template-name
6. end
7. show ip bgp template peer-session [session-template-name]
DETAILED STEPS
Router> enable
Step 3 router bgp autonomous-system-number Enters router configuration mode and creates a BGP routing
process.
Example:
Step 4 neighbor ip-address remote-as Configures a peering session with the specified neighbor.
autonomous-system-number
• The explicit remote-as statement is required for the
Example: neighbor inherit statement in Step 5 to work. If a
peering is not configured, the specified neighbor in
Router(config-router)# neighbor 172.16.0.1 Step 5 will not accept the session template.
remote-as 202
Step 5 neighbor ip-address inherit peer-session Sends a peer session template to a neighbor so that the
session-template-name neighbor can inherit the configuration.
Example: • The example configures a router to send the peer
session template named CORE1 to the 172.16.0.1
Router(config-router)# neighbor 172.16.0.1 inherit neighbor to inherit. This template can be applied to a
peer-session CORE1 neighbor, and if another peer session template is
indirectly inherited in CORE1, the indirectly inherited
configuration will also be applied. No additional peer
session templates can be directly applied. However,
the directly inherited template can also inherit up to
seven additional indirectly inherited peer session
templates.
Step 6 end Exits router configuration mode and enters privileged EXEC
mode.
Example:
Router(config-router)# end
Step 7 show ip bgp template peer-session Displays locally configured peer session templates.
[session-template-name]
• The output can be filtered to display a single peer
Example: policy template with the optional
session-template-name argument. This command also
Router# show ip bgp template peer-session supports all standard output modifiers.
What to Do Next
To create a peer policy template, go to the Configuring Peer Policy Templates, on page 68.
Note The commands in Steps 5 through 7 are optional and could be replaced with any supported BGP policy
configuration commands.
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. template peer-policy policy-template-name
5. maximum-prefix prefix-limit [threshold] [restart restart-interval | warning-only]
6. weight weight-value
7. prefix-list prefix-list-name {in | out}
8. end
DETAILED STEPS
Device> enable
Step 4 template peer-policy policy-template-name Enters policy-template configuration mode and creates a
peer policy template.
Example:
Step 5 maximum-prefix prefix-limit [threshold] [restart (Optional) Configures the maximum number of prefixes
restart-interval | warning-only] that a neighbor will accept from this peer.
Example: Note Any supported BGP policy configuration
command can be used here. For a list of the
Device(config-router-ptmp)# maximum-prefix 10000 supported commands, see the “Peer Policy
Templates” section.
Step 6 weight weight-value (Optional) Sets the default weight for routes that are sent
from this neighbor.
Example:
Note Any supported BGP policy configuration
Device(config-router-ptmp)# weight 300 command can be used here. For a list of the
supported commands, see the “Peer Policy
Templates” section.
Step 7 prefix-list prefix-list-name {in | out} (Optional) Filters prefixes that are received by the router
or sent from the router.
Example:
• The prefix list in the example filters inbound internal
Device(config-router-ptmp)# prefix-list addresses.
NO-MARKETING in
Note Any supported BGP policy configuration
command can be used here. For a list of the
supported commands, see the “Peer Policy
Templates” section.
Device(config-router-ptmp)# end
What to Do Next
After the peer policy template is created, the configuration of the peer policy template can be inherited or
applied by another peer policy template. For details about peer policy inheritance, see the “Configuring Peer
Policy Template Inheritance with the inherit peer-policy Command” section or the “Configuring Peer Policy
Template Inheritance with the neighbor inherit peer-policy Command” section.
Configuring Peer Policy Template Inheritance with the inherit peer-policy Command
This task configures peer policy template inheritance using the inherit peer-policycommand. It creates and
configure a peer policy template and allows it to inherit a configuration from another peer policy template.
When BGP neighbors use inherited peer templates, it can be difficult to determine which policies are associated
with a specific template. In Cisco IOS Release 12.0(25)S, 12.4(11)T, 12.2(33)SRB, 12.2(33)SB, and later
releases, the detail keyword was added to the show ip bgp template peer-policy command to display the
detailed configuration of local and inherited policies associated with a specific template.
Note The commands in Steps 5 and 6 are optional and could be replaced with any supported BGP policy configuration
commands.
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. template peer-policy policy-template-name
5. route-map map-name {in| out}
6. inherit peer-policy policy-template-name sequence-number
7. end
8. show ip bgp template peer-policy [policy-template-name[detail]]
DETAILED STEPS
Router> enable
Step 3 router bgp autonomous-system-number Enters router configuration mode and creates a BGP routing
process.
Example:
Step 4 template peer-policy policy-template-name Enter policy-template configuration mode and creates a
peer policy template.
Example:
Step 6 inherit peer-policy policy-template-name Configures the peer policy template to inherit the
sequence-number configuration of another peer policy template.
Example: • The sequence-number argument sets the order in which
the peer policy template is evaluated. Like a route map
Router(config-router-ptmp)# inherit peer-policy sequence number, the lowest sequence number is
GLOBAL 10 evaluated first.
• The example configures this peer policy template to
inherit the configuration from GLOBAL. If the
template created in these steps is applied to a neighbor,
the configuration GLOBAL will also be inherited and
applied indirectly. Up to six additional peer policy
templates can be indirectly inherited from GLOBAL
for a total of eight directly applied and indirectly
inherited peer policy templates.
• This template in the example will be evaluated first if
no other templates are configured with a lower
sequence number.
Router(config-router-ptmp)# end
Step 8 show ip bgp template peer-policy Displays locally configured peer policy templates.
[policy-template-name[detail]]
• The output can be filtered to display a single peer
Example: policy template with the policy-template-name
argument. This command also supports all standard
Router# show ip bgp template peer-policy NETWORK1 output modifiers.
detail
• Use the detail keyword to display detailed policy
information.
Examples
The following sample output of the show ip bgp template peer-policy command with the detail
keyword displays details of the policy named NETWORK1. The output in this example shows that
the GLOBAL template was inherited. Details of route map and prefix list configurations are also
displayed.
Configuring Peer Policy Template Inheritance with the neighbor inherit peer-policy Command
This task configures a router to send a peer policy template to a neighbor to inherit using the neighbor inherit
peer-policy command. Perform the following steps to send a peer policy template configuration to a neighbor
to inherit.
When BGP neighbors use multiple levels of peer templates, it can be difficult to determine which policies are
applied to the neighbor. In Cisco IOS Release 12.0(25)S, 12.4(11)T, 12.2(33)SRB, 12.2(33)SB, and later
releases, the policy and detail keywords were added to the show ip bgp neighbors command to display the
inherited policies and policies configured directly on the specified neighbor.
SUMMARY STEPS
1. enable
2. configure terminal
3. router bgp autonomous-system-number
4. neighbor ip-address remote-as autonomous-system-number
5. address-family ipv4 [multicast | unicast | vrf vrf-name]
6. neighbor ip-address inherit peer-policy policy-template-name
7. end
8. show ip bgp neighbors [ip-address[policy [detail]]]
DETAILED STEPS
Router> enable
Step 3 router bgp autonomous-system-number Enters router configuration mode and creates a BGP routing
process.
Example:
Step 4 neighbor ip-address remote-as Configures a peering session with the specified neighbor.
autonomous-system-number
• The explicit remote-as statement is required for the
Example: neighbor inherit statement in Step 6 to work. If a
peering is not configured, the specified neighbor in
Router(config-router)# neighbor 192.168.1.2 Step 6 will not accept the session template.
remote-as 40000
Step 5 address-family ipv4 [multicast | unicast | vrf vrf-name] Enters address family configuration mode to configure a
neighbor to accept address family-specific command
Example:
configurations.
Router(config-router)# address-family ipv4 unicast
Step 6 neighbor ip-address inherit peer-policy Sends a peer policy template to a neighbor so that the
policy-template-name neighbor can inherit the configuration.
Example: • The example configures a router to send the peer policy
template named GLOBAL to the 192.168.1.2 neighbor
Router(config-router-af)# neighbor 192.168.1.2 to inherit. This template can be applied to a neighbor,
inherit peer-policy GLOBAL and if another peer policy template is indirectly
inherited from GLOBAL, the indirectly inherited
configuration will also be applied. Up to seven
additional peer policy templates can be indirectly
inherited from GLOBAL.
Router(config-router-af)# end
Step 8 show ip bgp neighbors [ip-address[policy [detail]]] Displays locally configured peer policy templates.
Example:
Examples
The following sample output shows the policies applied to the neighbor at 192.168.1.2. The output
displays both inherited policies and policies configured on the neighbor device. Inherited polices are
policies that the neighbor inherits from a peer-group or a peer-policy template.
SUMMARY STEPS
1. enable
2. clear ip bgp update-group [index-group | ip-address]
3. show ip bgp replication [index-group | ip-address]
DETAILED STEPS
Device> enable
Step 2 clear ip bgp update-group [index-group | ip-address] Clears BGP update group membership and recalculate BGP
update groups.
Example:
• In the example provided, the membership of neighbor
Device# clear ip bgp update-group 192.168.2.2 192.168.2.2 is cleared from an update group.
Step 3 show ip bgp replication [index-group | ip-address] Displays update replication statistics for BGP update groups.
Example:
Step 4 show ip bgp update-group [index-group | ip-address] Displays information about BGP update groups.
[summary]
Example:
Troubleshooting Tips
Use the debug ip bgp groups command to display information about the processing of BGP update groups.
Information can be displayed for all update groups, an individual update group, or a specific BGP neighbor.
The output of this command can be very verbose. This command should not be deployed in a production
network unless your are troubleshooting a problem.
Router B
Router A
bgp log-neighbor-changes
timers bgp 70 120
neighbor 192.168.1.1 remote-as 65538
!
address-family ipv4
neighbor 192.168.1.1 activate
no auto-summary
no synchronization
network 10.1.1.0 mask 255.255.255.0
exit-address-family
Router B
Router E
Asdot Format
The following example shows how to create the configuration for Router A, Router B, and Router E in the
figure below with a BGP process configured between three neighbor peers (at Router A, at Router B, and at
Router E) in separate 4-byte autonomous systems configured using the default asdot format. IPv4 unicast
routes are exchanged with all peers.
Figure 7: BGP Peers Using 4-Byte Autonomous System Numbers in Asdot Format
Router A
Router B
Router E
ip vrf vpn_red
rd 64500:100
route-target both 65537:100
exit
route-map red_map permit 10
set extcommunity rt 65537:100
end
After the configuration is completed, use the show route-map command to verify that the extended community
is set to the route target that contains the 4-byte autonomous system number of 65537:
ip vrf vpn_red
rd 65536:100
route-target both 65537:100
exit
After the configuration is completed, use the show vrf command to verify that the 4-byte AS number route
distinguisher is set to 65536:100:
Note In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SXI1, and later releases, this example works if you
have configured asdot as the default display format using the bgp asnotation dot command.
ip vrf vpn_red
rd 64500:100
route-target both 1.1:100
exit
route-map red_map permit 10
set extcommunity rt 1.1:100
end
After the configuration is completed, use the show route-map command to verify that the extended community
is set to the route target that contains the 4-byte autonomous system number of 1.1.
ip vrf vpn_red
rd 1.0:100
route-target both 1.1:100
exit
The show running-config command can be used in privileged EXEC mode to verify that an existing router
configuration file has been upgraded from the NLRI format to the AFI format. The following sections provide
sample output from a router configuration file in the NLRI format, and the same router configuration file after
it has been upgraded to the AFI format with the bgp upgrade-cli command in router configuration mode.
Note After a router has been upgraded from the AFI format to the NLRI format with the bgp upgrade-clicommand,
NLRI commands will no longer be accessible or configurable.
!
address-family ipv4 multicast
neighbor 10.1.1.1 activate
no auto-summary
no synchronization
exit-address-family
!
address-family ipv4
neighbor 10.1.1.1 activate
no auto-summary
no synchronization
exit-address-family
!
ip default-gateway 10.4.9.1
ip classless
!
!
route-map REDISTRIBUTE-MULTICAST_mcast permit 10
match ip address prefix-list MULTICAST-PREFIXES
!
route-map REDISTRIBUTE-MULTICAST permit 10
match ip address prefix-list MULTICAST-PREFIXES
!
route-map MULTICAST-PREFIXES permit 10
!
route-map REDISTRIBUTE-UNICAST permit 20
match ip address prefix-list UNICAST-PREFIXES
!
!
!
line con 0
line aux 0
line vty 0 4
password PASSWORD
login
!
end
In the second configuration example, both the route-map command and the redistribute command are
disabled. If only the route-map command is removed, it does not automatically disable the redistribution. The
redistribution will now occur without any matching or filtering. To remove the redistribution configuration,
the redistribute command must also be disabled.
configure terminal
no route-map bgp-to-eigrp
router eigrp 100
no redistribute bgp 45000
end
The following example clears the session with the neighbor 192.168.1.1:
The clear ip bgp 65550 command is entered to remove all BGP peers in the 4-byte autonomous system 65550.
The ADJCHANGE message shows that the BGP peer at 192.168.3.2 is being reset.
The show ip bgp command is entered again, and only the peer in 4-byte autonomous systems 65536 is now
displayed.
Almost immediately, the next ADJCHANGE message shows that the BGP peer at 192.168.3.2 (in the 4-byte
autonomous system 65550) is now back up.
RouterB#
*Nov 30 23:25:55.995: %BGP-5-ADJCHANGE: neighbor 192.168.3.2 Up
Note The clear ip bgp * command also clears all the internal BGP structures which makes it useful as a
troubleshooting tool.
The show ip bgp command is used to display all the entries in the BGP routing table. The following example
displays BGP routing table information for the 10.1.1.0 network:
The show ip bgp neighbors command is used to display information about the TCP and BGP connections
to neighbors. The following example displays the routes that were advertised from Router B in the figure
above (in the “Configuring a BGP Peer for the IPv4 VRF Address Family” section) to its BGP neighbor
192.168.3.2 on Router E:
The show ip bgp pathscommand is used to display all the BGP paths in the database. The following example
displays BGP path information for Router B in the figure above (in the “Customizing a BGP Peer” section):
The show ip bgp summarycommand is used to display the status of all BGP connections. The following
example displays BGP routing table information for Router B in the figure above (in the “Customizing a BGP
Peer” section:
The following configuration shows how to create an aggregate entry in the BGP routing table when at least
one specific route falls into the specified range. The aggregate route will be advertised as coming from your
autonomous system and has the atomic aggregate attribute set to show that information might be missing. (By
default, atomic aggregate is set unless you use the as-set keyword in the aggregate-address router configuration
command.)
The following example shows how to create an aggregate entry using the same rules as in the previous example,
but the path advertised for this route will be an AS_SET consisting of all elements contained in all paths that
are being summarized:
The following example shows how to create the aggregate route for 10.0.0.0 and also suppress advertisements
of more specific routes to all neighbors:
The following example configures a maximum route limit in the VRF named RED and configures BGP to
not advertise inactive routes through the VRF named RED:
Device(config-vrf)# exit
Device(config)# router bgp 50000
Device(config-router)# address-family ipv4 vrf RED
Device(config-router-af)# bgp suppress-inactive
Device(config-router-af)# end
The following example creates a peer session template named CORE1. This example inherits the configuration
of the peer session template named INTERNAL-BGP.
The following example configures the 192.168.3.2 neighbor to inherit the CORE1 peer session template. The
192.168.3.2 neighbor will also indirectly inherit the configuration from the peer session template named
INTERNAL-BGP. The explicit remote-as statement is required for the neighbor inherit statement to work.
If a peering is not configured, the specified neighbor will not accept the session template.
The following example creates a peer policy template named PRIMARY-IN and enters policy-template
configuration mode:
The following example creates a peer policy template named CUSTOMER-A. This peer policy template is
configured to inherit the configuration from the peer policy templates named PRIMARY-IN and GLOBAL.
The following example configures the 192.168.2.2 neighbor in address family mode to inherit the peer policy
template named CUSTOMER-A. Assuming this example is a continuation of the example above, because the
peer policy template named CUSTOMER-A above inherited the configuration from the templates named
PRIMARY-IN and GLOBAL, the 192.168.2.2 neighbor will also indirectly inherit the peer policy templates
named PRIMARY-IN and GLOBAL.
Has 2 members:
10.4.9.5 10.4.9.8
Where to Go Next
• If you want to connect to an external service provider, see the “Connecting to a Service Provider Using
External BGP” module.
• To configure BGP neighbor session options, proceed to the “Configuring BGP Neighbor Session Options”
module.
• If you want to configure some iBGP features, see the “Configuring Internal BGP Features” module.
Additional References
Related Documents
Cisco IOS commands Cisco IOS Master Command List, All Releases
IPv6 commands: complete command syntax, command Cisco IOS IPv6 Command Reference
mode, defaults, usage guidelines, and examples
Overview of Cisco BGP conceptual information with “Cisco BGP Overview” module in the IP Routing:
links to all the individual BGP modules BGP Configuration Guide
Multiprotocol Label Switching (MPLS) and BGP “MPLS VPN Inter-AS with ASBRs Exchanging IPv4
configuration example using the IPv4 VRF address Routes and MPLS Labels” module in the MPLS:
family Layer 3 VPNs: Inter-AS and CSC Configuration
Guide
Standards
Standard Title
MIBs
CISCO-BGP4-MIB To locate and download MIBs for selected platforms, Cisco IOS releases, and feature
sets, use Cisco MIB Locator found at the following URL:
http://www.cisco.com/go/mibs
RFCs
RFC Title
RFC 1930 Guidelines for Creation, Selection, and Registration of an Autonomous System (AS)
RFC 5398 Autonomous System (AS) Number Reservation for Documentation Use
Technical Assistance
Description Link
BGP Conditional 12.0(22)S The BGP Conditional Route Injection feature allows you to inject
Route Injection more specific prefixes into a BGP routing table over less specific
12.2(4)T
prefixes that were selected through normal route aggregation.
12.2(14)S These more specific prefixes can be used to provide a finer
granularity of traffic engineering or administrative control than
15.0(1)S
is possible with aggregated routes.
Cisco IOS XE
3.1.0SG
BGP 12.0(24)S The BGP Configuration Using Peer Templates feature introduces
Configuration a new mechanism that groups distinct neighbor configurations
12.2(18)S
Using Peer for BGP neighbors that share policies. This type of policy
Templates 12.2(27)SBC configuration has been traditionally configured with BGP peer
groups. However, peer groups have certain limitations because
12.3(4)T
peer group configuration is bound to update grouping and specific
15.0(1)S session characteristics. Configuration templates provide an
alternative to peer group configuration and overcome some of
the limitations of peer groups.
BGP Dynamic 12.0(24)S The BGP Dynamic Update Peer Groups feature introduces a new
Update Peer algorithm that dynamically calculates and optimizes update groups
12.2(18)S
Groups of neighbors that share the same outbound policies and can share
12.2(27)SBC the same update messages. In previous versions of Cisco IOS
software, BGP update messages were grouped based on
12.3(4)T
peer-group configurations. This method of grouping updates
15.0(1)S limited outbound policies and specific-session configurations.
The BGP Dynamic Update Peer Group feature separates update
Cisco IOS XE
group replication from peer group configuration, which improves
3.1.0SG
convergence time and flexibility of neighbor configuration.
BGP Hybrid CLI 12.0(22)S The BGP Hybrid CLI feature simplifies the migration of BGP
networks and existing configurations from the NLRI format to
12.2(15)T
the AFI format. This new functionality allows the network
15.0(1)S operator to configure commands in the AFI format and save these
command configurations to existing NLRI formatted
configurations. The feature provides the network operator with
the capability to take advantage of new features and provides
support for migration from the NLRI format to the AFI format.
Suppress BGP 12.2(25)S The Suppress BGP Advertisements for Inactive Routes feature
Advertisement for allows you to configure the suppression of advertisements for
12.2(33)SXH
Inactive Routes routes that are not installed in the Routing Information Base (RIB).
15.0(1)M Configuring this feature allows Border Gateway Protocol (BGP)
updates to be more consistent with data used for traffic
15.0(1)S
forwarding.