Connectivity Guide

1 Enable BGP and assign the AS number to the local BGP speaker in CONFIGURATION mode, from 1 to 65535 for 2 byte, 1 to
4294967295 | 0.1 to 65535.65535 for 4 byte, or 0.1 to 65535.65535 in dotted format.
router bgp as-number
2 Create a peer template by assigning a neighborhood name to it in ROUTER-BGP mode.
template template-name
3 (Optional) Add a text description for the template in ROUTER-TEMPLATE mode.
description text
4 Enter Address Family mode in ROUTER-NEIGHBOR mode.
address-family {[ipv4 | ipv6] [unicast]}
5 Filter networks in routing updates, create a route-map and assign a ltering criteria in ROUTER-BGP-NEIGHBOR-AF mode.
distribute-list prefix-list-name {in | out}
route-map map-name {in | out}
6 Add a neighbor as a remote AS in ROUTER-TEMPLATE mode, from 1 to 65535 for 2 byte, 1 to 4294967295 | 0.1 to 65535.65535 for
4 byte, or 0.1 to 65535.65535 in dotted format.
neighbor ip-address
7 Add a remote neighbor, and enter the AS number in ROUTER-TEMPLATE mode.
remote-as as-number
To add an EBGP neighbor, congure the as-number parameter with a number dierent from the BGP as-number congured in
the router bgp as-number command.
To add an IBGP neighbor, congure the as-number parameter with the same BGP as-number congured in the router bgp
as-number
command.
8 Assign a peer-template with a peer-group name from which to inherit to the neighbor in ROUTER-NEIGHBOR mode.
inherit template template-name
9 Enable the neighbor in ROUTER-BGP mode.
no shutdown
When you add a peer to a peer group, it inherits all the peer group congured parameters. When you disable a peer group, all the peers
within the peer template that are in the Established state move to the Idle state. A neighbor cannot become a part of a peer group if
it has any of these commands congured:
advertisement-interval
next-hop-self
route-map out
route-reflector-client
send-community
A neighbor may keep its conguration after it is added to a peer group if the neighbor conguration is more specic than the peer group
and if the neighbor conguration does not aect outgoing updates.
To display the peer-group conguration assigned to a BGP neighbor, enter the show ip bgp peer-group peer-group-name
command. The show ip bgp neighbor command output does not display peer-group congurations.
The following example shows a sample conguration:
Congure peer templates
OS10# configure terminal
OS10(config)# router bgp 64601
OS10(config-router-bgp-64601)# template leaf_v4_ebgp
OS10(config-router-template)# description peer_template_1_abcd
OS10(config-router-template)# address-family ipv4 unicast
OS10(config-router-bgp-template-af)# distribute-list leaf_v4_in in
OS10(config-router-bgp-template-af)# distribute-list leaf_v4_out out
OS10(config-router-bgp-template-af)# route-map set_aspath_prepend in
OS10(config-router-bgp-template-af)# exit
OS10(config-router-template)# exit
442
Layer 3