Step 1 |
enable
Example:
|
Enables privileged EXEC mode.
|
Step 2 |
configure
terminal
Example:
DeviceB# configure terminal
|
Enters global configuration mode.
|
Step 3 |
router
bgp
autonomous-system-number
Example:
DeviceB(config)# router bgp 45000
|
Enters router configuration mode for the specified routing process.
|
Step 4 |
bgp
log-neighbor-changes
Example:
DeviceB(config-router)# bgp log-neighbor-changes
|
(Optional) Enables logging of BGP neighbor status changes (up or down) and neighbor resets.
|
Step 5 |
neighbor
peer-group-name
peer-group
Example:
DeviceB(config-router)# neighbor group192 peer-group
|
Creates a BGP peer group.
|
Step 6 |
bgp
listen
[limit
max-number]
Example:
DeviceB(config-router)# bgp listen limit 200
|
Sets a global limit of BGP dynamic subnet range neighbors.
Note
| Only the syntax applicable to this task is used in this example. For the complete syntax, see Step 7.
|
|
Step 7 |
bgp
listen
[limit
max-number |
range
network
/
length
peer-group
peer-group-name]
Example:
DeviceB(config-router)# bgp listen range 192.168.0.0/16 peer-group group192
|
Associates a subnet range with a BGP peer group and activates the BGP dynamic neighbors feature.
Use the optional
limit keyword and
max-number argument to define the maximum number of BGP dynamic neighbors that can be created.
Use the optional
range keyword and
network
/
length argument to define a prefix range to be associated with the specified peer group.
In this example, the prefix range 192.168.0.0/16 is associated with the listen range group named group192.
|
Step 8 |
neighbor
{ip-address
|
ipv6-address
|
peer-group-name}
ebgp-multihop
[ttl]
Example:
DeviceB(config-router)# neighbor group192 ebgp-multihop 255
|
Accepts and attempts BGP connections to external peers residing on networks that are not directly connected.
|
Step 9 |
neighbor
peer-group-name
remote-as
autonomous-system-number
[alternate-as
autonomous-system-number...]
Example:
DeviceB(config-router)# neighbor group192 remote-as 40000 alternate-as 50000
|
Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router.
Use the optional
alternate-as keyword and
autonomous-system-number argument to identify up to five alternate autonomous system numbers for listen range neighbors.
In this example, the peer group named group192 is configured with two possible autonomous system numbers.
Note
| The
alternate-as keyword is used only with the listen range peer groups, not with individual BGP neighbors.
|
|
Step 10 |
address-family
ipv4
[mdt |
multicast |
unicast [vrf
vrf-name]]
Example:
DeviceB(config-router)# address-family ipv4 unicast
|
Enters address family configuration mode to configure BGP peers to accept address-family-specific configurations.
|
Step 11 |
neighbor
{ip-address |
peer-group-name}
activate
Example:
DeviceB(config-router-af)# neighbor group192 activate
|
Activates the neighbor or listen range peer group for the configured address family.
Note
| Usually BGP peer groups cannot be activated using this command, but the listen range peer groups are a special case.
|
|
Step 12 |
end
Example:
DeviceB(config-router-af)# end
|
Exits address family configuration mode and returns to privileged EXEC mode.
|
Step 13 | Move to another router that has an interface within the subnet range for the BGP peer group configured in this task.
|
—
|
Step 14 |
enable
Example:
|
Enables privileged EXEC mode.
|
Step 15 |
configure
terminal
Example:
DeviceE# configure terminal
|
Enters global configuration mode.
|
Step 16 |
router
bgp
autonomous-system-number
Example:
DeviceE(config)# router bgp 50000
|
Enters router configuration mode for the specified routing process.
|
Step 17 |
neighbor
{ip-address|
peer-group-name}
remote-as
autonomous-system-number [alternate-as
autonomous-system-number...]
Example:
DeviceE(config-router)# neighbor 192.168.3.1 remote-as 45000
|
Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router.
In this example, the interface (192.168.3.2 in the figure above) at Router E is with the subnet range set for the BGP listen range group, group192. When TCP opens a session to peer to Router B, Router B creates this peer dynamically.
|
Step 18 | Return to the first router.
|
—
|
Step 19 |
show
ip
bgp
summary
Example:
DeviceB# show ip bgp summary
|
(Optional) Displays the BGP path, prefix, and attribute information for all connections to BGP neighbors.
|
Step 20 |
show
ip
bgp
peer-group
[peer-group-name] [summary]
Example:
DeviceB# show ip bgp peer-group group192
|
(Optional) Displays information about BGP peer groups.
|
Step 21 |
show
ip
bgp
neighbors
[ip-address]
Example:
DeviceB# show ip bgp neighbors 192.168.3.2
|
(Optional) Displays information about BGP and TCP connections to neighbors.
Note
| Only the syntax applicable to this task is used in this example. For more details, see the
Cisco IOS IP Routing: BGP Command Reference.
|
|