Step 1
|
enable
|
Enables privileged EXEC mode. Enter your password, if prompted.
Note
|
This configuration is entered on router B.
|
|
Step 2
|
configure
terminal
RouterB# configure terminal
|
Enters global configuration mode.
|
Step 3
|
router
bgp
autonomous-system-number
RouterB(config)# router bgp 64501
|
Enters router configuration mode for the specified routing process.
|
Step 4
|
bgp
log-neighbor-changes
RouterB(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
RouterB(config-router)# neighbor group192 peer-group
|
Creates a BGP peer group.
|
Step 6
|
bgp
listen
[limit
max-number ]
RouterB(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 ]
RouterB(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-securityhop
[ ttl ]
RouterB(config-router)# neighbor group192 ttl-security hops 2
|
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... ]
RouterB(config-router)# neighbor group192 remote-as 64501 alternate-as 64502
|
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
l2vpn
evpn
RouterB(config-router)# address-family l2vpn evpn
|
Enters address family configuration mode to configure BGP peers to accept address-family-specific configurations.
|
Step 11
|
neighbor
peer-group-name
activate
RouterB(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
neighbor
peer-group-name
activate command, but the listen range peer groups are a special case.
|
|
Step 12
|
end
RouterB(config-router-af)# end
|
Exits address family configuration mode and returns to privileged EXEC mode.
Move to another router that has an interface within the subnet range for the BGP peer group configured in this task.
|
Step 13
|
enable
|
Enables privileged EXEC mode.Enter your password, if prompted.
Note
|
The configuration is entered on Router E.
|
|
Step 14
|
configure
terminal
RouterE# configure terminal
|
Enters global configuration mode.
|
Step 15
|
router
bgp
autonomous-system-number
RouterE(config)# router bgp 64502
|
Enters router configuration mode for the specified routing process.
|
Step 16
|
neighbor
{ip-address |
peer-group-name }
remote-as
autonomous-system-number [alternate-as
autonomous-system-number... ]
RouterE(config-router)# neighbor 192.168.3.1 remote-as 64503
|
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.1 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 17
|
address-family
l2vpn
evpn
RouterE(config-router)# address-family l2vpn evpn
|
Enters address family configuration mode to configure BGP peers to accept address-family-specific configurations.
|
Step 18
|
neighbor
{ip-address |
peer-group-name }
activate
RouterE(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 19
|
end
RouterE(config-router-af)# end
|
Exits address family configuration mode and returns to privileged EXEC mode.
|
Step 20
|
Return to the first router.
|
|
Step 21
|
show
ip
bgp
l2vpn
evpn
summary
RouterB# show ip bgp l2vpn evpn summary
|
(Optional) Displays the BGP path, prefix, and attribute information for all connections to BGP neighbors.
|
Step 22
|
show
ip
bgp
l2vpn
evpn
peer-group
[peer-group-name ] [summary ]
RouterB# show ip bgp peer-group group192
|
(Optional) Displays information about BGP peer groups.
|
Step 23
|
show
ip
bgp
l2vpn
evpn
neighbors
[ip-address ]
RouterB# show ip bgp l2vpn evpn neighbors 192.168.3.2
|
(Optional) Displays information about BGP and TCP connections to neighbors.
|