BGP Commands Advance-Final
BGP Commands Advance-Final
COM/C/NETWORKJOURNEY
clear ip bgp
clear ip bgp [{<ip-address> | all} [soft] [in | out]]
Clears BGP learned routes from the BGP table and resets the connection to
the neighbor.
ip-address A BGP peer IP address. Only the specified neighbor is reset.
all All BGP peers. All BGP neighbors are reset.
Syntax Clears BGP learned routes from the BGP table without
soft
Description resetting the connection to the neighbor
in Inbound routes are reset
out Outbound routes are reset
Default N/A
Configuration
config
Mode
3.3.5006 First release
History 3.3.5200 Updated description
3.6.3004 Removed “out” parameter
Example switch (config)# clear ip bgp all
Related
Commands
This command removes BGPv4 learned routes from the routing table,
Notes reads all routes from designated peers, and sends routes to those peers as
required.
1
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
router bgp
router bgp <as-number>
no router bgp <as-number>
Range: 1-4294967295
Default N/A
Configuration
config
Mode
3.3.5006
History
3.3.5200 Updated syntax description
switch (config)# router bgp 100
Example switch (config router bgp 100)#
Related
ip routing
Commands
Notes
2
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
shutdown
shutdown
no shutdown
3
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
address-family
address-family {ipv4-unicast | ipv6-unicast | l2vpn-evpn}
4
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
aggregate-address
aggregate-address <ip_prefix_length> [summary-only] [as-set] [attribute-
map]
no aggregate-address <ip_prefix_length> [summary-only] [as-set]
[attribute-map]
5
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
bgp default
no bgp default {ipv4-unicast | ipv6-unicast}
disable bgp default {ipv4-unicast | ipv6-unicast}
6
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
7
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
8
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
cluster-id
cluster-id <ip-address> [force]
no cluster-id <ip-address> [force]
9
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
client-to-client reflection
client-to-client reflection
no client-to-client reflection
10
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
distance
distance <external> <internal> <local>
no distance
11
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
graceful-restart stalepath-time
graceful-restart stalepath-time <interval>
no graceful-restart stalepath-time
Configures the maximum time that stale routes from a restarting BGP
neighbor are retained after a BGP session is reestablished with that
peer.
The no form of the command resets to the default value.
Time in seconds
Syntax Description interval
Range: 1-3600
Default 300 seconds
Configuration Mode config router bgp
History 3.4.0000
switch (config router bgp 100)# graceful-restart
Example stalepath-time 350
Related Commands
Note
12
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
graceful-restart helper
[neighbor {<ip-address> | <peer-group-name>}] graceful-restart helper
no [neighbor {<ip-address> | <peer-group-name>}] graceful-restart helper
Enables BGP graceful restart helper mode on the switch for all or specific
BGP neighbor.
The no form of the command disables BGP graceful restart helper mode on
the switch for all or a specific BGP neighbor.
Syntax
N/A
Description
Default Graceful restart is enabled
Configuration
config router bgp
Mode
3.4.0000
History
3.6.4070 Added support for IPv6/4 and to target a specific neighbor
Example switch (config router bgp 100)# graceful-restart helper
Related
Commands
• When graceful restart helper mode is enabled, the switch retains
routes from neighbors capable of graceful restart while those
neighbors are restarting BGP
• Individual neighbor configuration takes precedence over the global
Notes
configuration
• This parameter can only be configured when BGP is admin-down
state
13
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
maximum-paths
maximum-paths [ibgp] <maximum-path>
14
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor activate
neighbor <ip-address | peer-group> activate
no neighbor <ip-address | peer-group> activate
disable neighbor <ip-address | peer-group> activate
15
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor advertisement-interval
neighbor {<ip-address> | <peer-group-name>} advertisement-interval
<delay>
no neighbor {<ip-address> | <peer-group-name>} advertisement-interval
Sets the minimum route advertisement interval (MRAI) between the sending
of BGP routing updates.
The no form of the command disables this function.
ipv4_addr,
A BGP peer IP address
ipv6_addr
peer-group-name Peer group name
Syntax
Description Time (in seconds) is specified by an integer
Range: 0-600; where “0” disables this function and
delay
prevents the system from inheriting this parameter’s group
configuration
Default 30 seconds
Configuration
config router bgp
Mode
3.4.0000
History
3.6.3004 Updated description of “delay” parameter
switch (config router bgp 100)# neighbor 10.10.10.10
Example advertisement-interval 100
Related
Commands
When configuring an advertisement interval to a BGP session, this interval
is implemented per prefix route of that session. For example: If a session is
configured with advertisement interval of 100 seconds, when it first learns a
Notes new route it automatically sends an update on this route. If it learns another
route in the same prefix as the initial route, it waits for 100 seconds. But if it
learns another route in a different prefix it immediately advertises that route
and does not wait another 100 seconds.
16
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor allowas-in
neighbor {<ip-address > | <peer-group-name>} allowas-in [number]
no neighbor {<ip-address > | <peer-group-name>} allowas-in
17
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor default-originate
neighbor <ip-address | peer_group> default-originate [route_map_name]
no neighbor <ip-address | peer_group> default-originate
[route_map_name]
disable neighbor <ip-address | peer_group> default-originate
[route_map_name]
18
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor description
neighbor {<ip-address> | <peer-group-name>} description <string>
no neighbor {<ip-address> | <peer-group-name>} description
19
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor ebgp-multihop
neighbor {<ip-address > | <peer-group-name>} ebgp-multihop [<ttl>]
no neighbor {<ip-address > | <peer-group-name>} ebgp-multihop
Enables BGP to connect to external peers that are not directly connected to
the switch.
The no form of the command disables connecting to external peers.
ip-address IP address of the BGP-speaking neighbor
peer-group-
Peer group name
name
Syntax
Description Time-to-live
Range: 1-255 hops; where “1” disables connecting to external
ttl
peers and prevents the system from inheriting this parameter’s
group configuration
Default ttl – 1
Configuration
config router bgp
Mode
3.3.5006
History 3.3.5200 Updated Default
3.6.3004 Updated description of “ttl” parameter
switch (config router bgp 100)# neighbor 10.10.10.10 ebgp-
Example multihop 5
Related ip routing
Commands neighbor <ip-address> remote-as <as-number>
The command does not establish the multi-hop if the only route to the peer
Notes
is the default route (0.0.0.0)
20
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor export-localpref
neighbor {<ip-address> | <peer-group-name>} export-localpref <value>
no neighbor {<ip-address> | <peer-group-name>} export-localpref
Configures the local preference value sent to the specified peer or peer
group.
The no form of the command resets the local preference to its default
value.
ip-address IP address of the BGP-speaking neighbor
peer-group-
Peer group name
name
Syntax
Description Preference value
Range: 0-2147483647; where “100” configures the default,
value
and prevents the system from inheriting this parameter’s
group configuration
Default 100
Configuration
config router bgp
Mode
3.4.0000
History
3.6.3004 Updated description of “value” parameter
switch (config router bgp 100)# neighbor 10.10.10.10 export-
Example localpref 100
Related
Commands
Notes
21
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
22
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
Enables BGP graceful restart helper mode for the specified BGP neighbor
or peer group.
The no form of the command disables this parameter.
Syntax ip-address IP address of the BGP-speaking neighbor
Description peer-group-name Peer group name
Default Graceful restart is enabled
Configuration
config router bgp
Mode
History 3.4.0000
switch (config router bgp 100)# neighbor graceful-restart
Example helper
Related
Commands
• When graceful restart helper mode is enabled, the switch retains
routes from neighbors capable of graceful restart while those
neighbors are restarting BGP
Notes
• Individual neighbor configuration takes precedence over the global
configuration
23
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor import-localpref
neighbor {<ip-address> | <peer-group-name>} import-localpref <value>
no neighbor {<ip-address> | <peer-group-name>} import-localpref
<value>
Configures the local preference value assigned to routes received from the
specified peer or peer group.
The no form of the command resets the local preference to its default
value.
ip-address IP address of the BGP-speaking neighbor
peer-group-
Peer group name
name
Syntax
Description Preference value
Range: 0-2147483647; where “100” configures the default,
Value
and prevents the system from inheriting this parameter’s
group configuration
Default 100
Configuration
config router bgp
Mode
3.4.0000
History
3.6.3004 Updated description of “value” parameter
switch (config router bgp 100)# neighbor 10.10.10.10 import-
Example localpref 100
Related
Commands
Notes
24
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor local-as
neighbor {<ip-address> | <peer-group-name>} local-as <asn-id> [no-
prepend | replace-as]
no neighbor {<ip-address> | <peer-group-name>} local-as
Enables the modification of the AS path attribute for routes received from
an eBGP neighbor.
The no form of the command disables AS path modification for the
specified peer or peer group.
ip-address IP address of the BGP-speaking neighbor
peer-group-
Peer group name
name
AS number that is sent instead of the actual AS of the switch.
asn-id
Syntax Range: 0-4294967295
Description local-as number is not pre-pended to the routes received
no-prepend
from external neighbors
Prepends only the local autonomous system number (as
replace-as configured with the IP address argument) to the AS path
attribute
Default N/A
Configuration
config router bgp
Mode
3.4.0000
3.6.3004 Updated description of “as-id” parameter
History
3.6.4070 Added support for IPv6 and IPv4
3.6.4110 Updated command syntax
switch (config router bgp 4) # neighbor 100.100.100.100
Example local-as 123
Related ip routing
Commands neighbor <ip-address> remote-as <as-number>
• This function allows the switch to appear as a member of a
different autonomous system (AS) to external peers
Notes • To disable peering with the neighbor run the command “clear ip
bgp”
25
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor local-v6-addr
neighbor {<ip-address > | <peer-group-name>} local-v6-addr
<ipv6_local>
no neighbor {<ip-address > | <peer-group-name>} local-v6-addr
Specifies the switche’s next-hop value sent using IPv6 NLRI in IPv4
transport session.
The no form of the command removes next-hop value.
ip-address IP address of the BGP-speaking neighbor
Syntax Description peer-group-name Peer group name
ipv6_local IPv6 next hop address
Default N/A
Configuration
config router bgp
Mode
History 3.6.4070
switch (config router bgp 4) # neighbor 10.10.10.1
Example local-v6-addr 2001::2
Related Commands
Notes
26
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor maximum-prefix
neighbor {<ip-address> | <peer-group-name>} maximum-prefix
<maximum> [warning-only]
no neighbor {<ip-address> | <peer-group-name>} maximum-prefix
Configures the number of BGP routes the switch accepts from a specified
neighbor and defines an action when the limit is exceeded.
The no form of the command removes the limitation.
ip-address IP address of the BGP-speaking neighbor
peer-group-
Peer group name
name
Number of BGP routes the switch accepts from a specified
Syntax neighbor
Description maximum Range: 1-2147483647; where “12000” configures the
default, and prevents the system from inheriting this
parameter’s group configuration
warning- Only generates a warning rather than disconnecting the
only neighbor
Default 12000
Configuration
config router bgp
Mode
3.4.0000
History
3.6.3004 Updated description of “maximum” parameter
switch (config router bgp 100)# neighbor 10.10.10.10
Example maximum-prefix 12000 warning-only
Related ip routing
Commands neighbor <ip-address> remote-as <as-number>
Notes
27
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor next-hop-peer
neighbor {<ip-address> | <peer-group-name>} next-hop-peer [disable]
no neighbor {<ip-address> | <peer-group-name>} next-hop-peer
Configures the switch to list the peer address as the next hop in routes that
it receives from the specified peer BGP-speaking neighbor or members of
the specified peer group.
The no form of the command disables this function.
ip-address IP address of the neighbor
peer-group-
Syntax Peer group name
name
Description
Disables this function and prevents the system from
disable
inheriting this parameter’s group configuration
Default no next-hop-peer
Configuration
config router bgp
Mode
3.3.5006
History
3.6.3004 Added “disable” parameter
switch (config router bgp 100)# neighbor 10.10.10.10 next-
Example hop-peer
Related
Commands
This command overrides the next hop for all routes received from this
Notes
neighbor or peer group
28
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor next-hop-self
neighbor {<ip-address> | <peer-group-name>} next-hop-self [disable]
no neighbor {<ip-address> | <peer-group-name>} next-hop-self
Configures the IP address of the router as the next hop address in routes
advertises to the specific neighbor.
The no form of the command resets this parameter to its default.
ip-address IP address of the neighbor
peer-group-
Syntax Peer group name
name
Description
Disables this function and prevents the system from
Disable
inheriting this parameter’s group configuration
Default no next-hop-self
Configuration
config router bgp
Mode
3.3.5006
History
3.6.4070 Added support for IPv6
switch (config router bgp 100)# neighbor 10.10.10.10 next-
Example hop-self
Related
neighbor <ip-address> remote-as <as-number>
Commands
• This function is used in networks where BGP neighbors do not
directly access all other neighbors on the same subnet.
Notes • In the default state, the next hop is generated based on the IP
address and the present next hop in the route information.
29
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
[neighbor] next-hop-unchanged
[neighbor <ip-address | peer group>] next-hop-unchanged
no [neighbor <ip-address | peer group>] next-hop-unchanged
disable [neighbor <ip-address | peer group>] next-hop-unchanged
30
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor out-delay
neighbor {<ip-address> | <peer-group-name>} out-delay <delay>
no neighbor {<ip-address> | <peer-group-name>} out-delay
31
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor password
neighbor {<ip-address> | <peer-group-name>} password [<encryption>]
<string>
no neighbor {<ip-address> | <peer-group-name>} password
32
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor no-password
neighbor {<ip-address> | <peer-group-name>} no-password
33
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor peer-group
1. neighbor {<ip-address >} peer-group <peer-group-name>
2. neighbor {<peer-group-name>} peer-group
3. no neighbor {<ip-address >} peer-group <peer-group-name>
4. no neighbor {<peer-group-name>} peer-group
3.4.0000
History 3.6.3004 Added notes
3.6.4070 Added support for IPv6 and IPv4
switch (config router bgp 100)# neighbor groupA peer-group
Example switch (config router bgp 100)# neighbor 1.2.3.4 peer-group
groupA
Related
Commands
34
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor remote-as
neighbor {<ip-address>} remote-as <as-number>
no neighbor {<ip-address>} remote-as <as-number>
Configures a neighbor.
The no form of the command removes the neighbor, dropping the
connection and all routes if already connected.
ipv4_addr,
IP address of the neighbor
ipv6_addr
peer-group-
Syntax Description Peer group name
name
The BGP peer as-number
as-number
Range: 1-65535
Default N/A
Configuration Mode config router bgp
3.3.5006
History
3.3.5200 Updated description and note
switch (config router bgp 100)# neighbor 10.10.10.10
Example remote-as 200
ip routing
Related Commands
router bgp <as-number>
Neighbors from the same AS as the router are considered as iBGP
Notes
peers, and neighbors from other ASs are considered eBGP peers
35
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor remove-private-as
neighbor {<ip-address> | <peer-group-name>} remove-private-as [disable]
no neighbor {<ip-address> | <peer-group-name>} remove-private-as
36
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor route-map
neighbor <ip-address | peer-group-name> route-map <route-map-name> [in | out]
no neighbor <ip-address | peer-group-name> route-map <route-map-name> [in |
out]
disable neighbor <ip-address | peer-group-name> route-map <route-map-name>
[in | out]
Configures route-map export or import to the peer either for a specific address
family or for all (depending on the configuration context).
The no form of the command removes map-route configuration and enables
inheritance. The Onyx inheritance priority is as follows:
a. Peer AFI-SAFI
b. Peer
c. Peer Group AFI-SAFI
d. Peer Group
The “disable” form of the command resets the route-map configuration to the
default and disables inheritance.
37
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
38
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor no-route-map
neighbor {<ip-address> | <peer-group-name>} no-route-map
Unsets route-map for neighbor and prevents the system from inheriting this
parameter’s group configuration.
ip-address IP address of the neighbor
Syntax
Description peer-group-
Peer group name
name
Default N/A
Configuration
config router bgp
Mode
History 3.6.3004
switch (config router bgp 100)# neighbor 10.10.10.10 no-route-
Example map
Related neighbor <ip-address> remote-as <as-number>
Commands route-map <map-name> [deny | permit] [sequence-number]
Notes
39
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor route-reflector-client
neighbor <ip-address | peer-group> route-reflector-client
no neighbor <ip-address | peer-group>] route-reflector-client
disable neighbor <ip-address | peer-group>] route-reflector-client
Configures a given peer to be a reflector client of this router for this address-
family.
The no form of the command removes configuration and enables inheritance
of AFI/SAFI route-reflector-client configuration from a peer group if this
neighbor is member in one.
The disable form of the command removes a given peer from being a reflector
client of this router for this AFI/SAFI and disables configuration inheritance.
ip-
Neighbor IP address
Syntax address
Description peer-
Peer group name
group
Default N/A
Configuration config router bgp
Mode config router bgp address-family
3.3.5006
3.3.5200 Updated notes and default
History 3.6.3004 Added “disable” parameter
3.6.4070 Added support for IPv6 and IPv4
3.6.8100 Added “config router bgp address-family” configuration mode
switch (config router bgp 100)# neighbor 10.10.10.10 route-
Example reflector-client
Related
Commands
There are 4 possible ways of using the “disable” prefix:
40
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor send-community
neighbor <ip-address | peer group> send-community [extended]
no neighbor <ip-address | peer group> send-community [extended]
disable neighbor <ip-address | peer group> send-community [extended]
41
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor shutdown
neighbor {<ip-address> | <peer-group-name>} shutdown [disable]
no neighbor {<ip-address> | <peer-group-name>} shutdown
42
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor soft-reconfiguration
neighbor {<ip-address> | <peer-group-name>} soft-reconfiguration
inbound
no neighbor {<ip-address> | <peer-group-name>} soft-reconfiguration
43
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
44
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor timers
neighbor {<ip-address> | <peer-group-name>} timers <keep-alive> <hold-
time>
no neighbor {<ip-address> | <peer-group-name>} timers
keep-alive – 60 seconds
Default
hold-time – 180 seconds
Configuration
config router bgp
Mode
3.3.5006
3.3.5200 Updated description
History Updated “hold-time” and “keep-alive” parameter’s syntax
3.6.3004
description
3.6.4070 Added IPv6 and IPv4 support
switch (config router bgp 100)# neighbor 10.10.10.10 timers
Example 65 195
Related
neighbor <ip-address> remote-as <as-number>
Commands
45
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
Hold time must be at least 3 seconds and should be three times longer than
Notes
the keep-alive setting.
Sets the TCP connection for the specified BGP neighbor or peer group to
passive mode.
The no form of the command sets the specified BGP neighbor or peer
group to active connection mode.
ip-address IP address of the neighbor
peer-
group- Peer group name
Syntax
name
Description
Sets the specified BGP neighbor or peer group to active
disable connection mode and prevents the system from inheriting this
parameter’s group configuration
Default TCP sessions initiated
Configuration
config router bgp
Mode
3.4.0000
History 3.6.3004 Added “disable” parameter
3.6.4070 Added IPv6 and IPv4 support
switch (config router bgp 100)# neighbor 10.10.10.10
Example transport connection-mode passive
Related
Commands
• When the peer’s transport connection mode is set to passive, it
accepts TCP connections for BGP, but does not initiate them
Notes • BGP peers in active mode can both accept and initiate TCP
connections for BGP
46
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor update-source
neighbor <ip-address> update-source {ethernet <slot/port> | loopback
<number> | port-channel <number> | vlan <vlan-id>}
no neighbor <ip-address> update-source
47
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor no-update-source
neighbor <ip-address> no-update-source
48
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
neighbor weight
neighbor {<ip-address> | <peer-group-name>} weight <value>
no neighbor {<ip-address> | <peer-group-name>} weight
49
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
Network
network <ip_prefix length> [<route-map-name>]
no network <ip_prefix length> [<route-map-name>]
Default N/A
Configuration
config router bgp
Mode
3.3.5006
3.6.4070
50
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
Redistribute
[neighbor <peer_group>] redistribute {connected | static | ospf | ospf-
internal | ospf-external} [<route-map>]
no redistribute {connected | static | ospf}
51
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
router-id
router-id <ip-address> [force]
no router-id [force]
Configuration
config router bgp
Mode
3.3.5006
History
3.6.3004 Added “force” parameter
Example switch (config router bgp 100)# router-id 10.10.10.10
Related
Commands
The IP address configured identifies the BGP speaker. The command
Notes
triggers an automatic notification and session reset for the BGP neighbors.
52
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
route-map
[neighbor <peer_group>] route-map <route_map_name> [{in | out}]
no [neighbor <peer_group>] route-map <route_map_name> [{in | out}]
Specifies a route map that will be applied in the given direction for
specific address family.
The no form of the command removes this configuration.
route_map_name Name of a route map to apply
Syntax Specifies in which direction the route map is applied. If
in/out
Description nothing is given, route map is applied in both directions.
peer_group Peer group name
Default N/A
Configuration
config router bgp
Mode
History 3.6.4070
Example switch (config router bgp 100)# route-map default in
Related
Commands
Notes
53
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
timers bgp
timers bgp <keep-alive> <hold>
no timers bgp
54
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
vni
vni <vni_value>
no vni <vni_value>
55
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
vni rd
vni <vni_value> rd <rd>
no vni <vni_value> rd
56
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
vni route-target
vni <vni_value> route-target {both | import | export} <route_target>
no vni <vni_value> route-target {both | import | export}
Valid ranges:
Default N/A
Configuration
config router bgp address-family l2vpn-evpn
Mode
History 3.8.1000
switch (config router bgp 100 vrf default address-family
Example l2vpn-evpn) # vni 1000 route-target both 1.2.3.4:15
Related
Vni
Commands
Notes This command is irrelevant when using the enabled auto-create mode.
57
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
auto-create
auto-create
no auto-create
58
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
Status codes:
s: suppressed
d: damped
h: history
*: valid
>: best
i: internal
r: RIB-failure
S: Stale
m: multipath
59
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
b: backup-path
x: best-external
Origin codes:
i: IGP
e: EGP
?: incomplete
-------------------------------------------------------------------------
Network Next Hop Status Metric LocPrf Weight Path
-------------------------------------------------------------------------
192.168.100.0/24 0.0.0.0 *> 0 100 32768 i
Related
Commands
• Aggregated information in the “detail” parameter (i.e. aggregator
AS, aggregator ID) is displayed only for aggregated routes.
Notes
• Generic and “Longer prefixes” examples were updated.
60
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
Example
Example output 1:
switch (config) # show ip bgp address-family l2vpn-evpn
Address family : L2VPN EVPN
Maximum Path : 0/0
Redistribute :
Total Neighbors : 1
Total peer-groups : 1
Total dynamic ranges : 0
Auto-Create VNI : Disable
switch (config) # show ip bgp address-family l2vpn-evpn active
Address family : L2VPN EVPN
Networks :
maximum-path : 0/0
redistribute : -
Total neighbors : 2
Total peer-groups : 0
Total dynamic ranges : 0
switch (config) # show ip bgp address-family l2vpn-evpn detail
Neighbors:
------------------------------------------------------------------------
---------------
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down
State/PfxRcd
------------------------------------------------------------------------
---------------
61
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
Total peer-groups : 1
Peer Group : peer
Total dynamic ranges : 0
Auto-Create VNI : Disable
--------------------------------------------------------------------------
---------
VNI Vlan Route Distinguisher Route Target
--------------------------------------------------------------------------
---------
1000 5 1.2.3.4:3 None
Example output 2:
switch (config) # show ip bgp address-family ipv4-unicast detail
Address family : IPv4
Maximum Path : 0/0
Redistribute :
Total Neighbors: 1
Neighbors:
------------------------------------------------------------------------
---------------
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down
State/PfxRcd
------------------------------------------------------------------------
---------------
3.3.3.3 4 200 0 0 1 0 0 Never
IDLE/0
Total peer-groups : 1
Peer Group : basim_ipv4
Total dynamic ranges: 0
Address family configuration:
Next hop unchanged: Enable
Related
Commands
Notes
62
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
Example
63
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
extcommunity
Filters by router MAC
router-mac
VNI value
Vni
Range: 1-16777215
Filters by route target
Default N/A
Configuration
Any command mode
Mode
History 3.6.8100
64
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
Example
---------------------------------------------------------------------------
-------------------
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down
State/PfxRcd
---------------------------------------------------------------------------
-------------------
192.168.3.2 4 65002 25 29 2 0 0
0:00:11:10 ESTABLISHED/1
192.168.5.2 4 65003 24 28 2 0 0
0:00:11:17 ESTABLISHED/0
Related Commands
Notes
65
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
Displays some basic statistics about BGP per VRF only for
neighbors who support L2EVPN AF.
Syntax Description vrf Name of VRF
Default N/A
Configuration Mode Any command mode
History 3.6.8100
Example
--------------------------------------------------------------------------
--------------------
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ
Up/Down State/PfxRcd
--------------------------------------------------------------------------
--------------------
192.168.3.2 4 65002 25 29 2 0 0
0:00:11:10 ESTABLISHED/1
192.168.5.2 4 65003 24 28 2 0 0
0:00:11:17 ESTABLISHED/0
Related Commands
Notes
66
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
History 3.3.5200
3.7.1000 Updated Example
Example
Neighbor configuration:
----------------------------------------------------------------------
--
Configuration IPV4 Unicast IPV6 Unicast L2VPN
EVPN
----------------------------------------------------------------------
--
Configured AFI SAFI Enabled Disabled Enabled
Send Community Disabled Disabled Disabled
Send Extended Community Disabled Disabled Disabled
Route Reflection Disabled Disabled Disabled
Next Hop Unchanged Disabled Disabled Disabled
Neighbor capabilities:
Route Refresh : advertise and received
Soft Reconfiguration : Disabled
Graceful Restart Capability: advertise
Address family IPv4 Unicast: advertise and received
Address family IPv6 Unicast: n/a
Address family L2VPN EVPN : advertise and received
Message statistics:
InQ depth : 0
OutQ depth: 0
67
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
-------------------------------------------
Parameter Sent Rcvd
-------------------------------------------
Opens 1 1
Notification 0 0
Updates 3 2
Keepalives 12 11
Refreshes 0 0
Total 16 14
L2VPN EVPN:
----------------------------------------------
Prefix activity Sent Rcvd
----------------------------------------------
Prefixes Current 2 2
Prefixes Total 2 2
Implicit Withdraw 0 0
Explicit Withdraw 0 0
Used as bestpath n/a 2
Used as multipath n/a n/a
--------------------------------------------------------
Local Policy Denied Prefixes Outbound Inbound
--------------------------------------------------------
Total 0 0
Connection Information:
Connections established : 4
Dropped : 1
Last Reset : 0:00:03:22
Last Drop Reason : 6 (2)
Maximum hops to external BGP neighbor: 255
Connection State : ESTABLISHED
Local host : 192.168.2.1
Local port : 179
Foreign host : 192.168.2.2
Local Port : 50394
68
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
Example
Status codes:
s: suppressed
d: damped
h: history
*: valid
>: best
i: internal
r: RIB-failure
S: Stale
m: multipath
b: backup-path
x: best-external
Origin codes:
i: IGP
e: EGP
?: incomplete
--------------------------------------------------------------------------
-------------------------
Network Next Hop Status Metric LocPrf
Weight Path
--------------------------------------------------------------------------
-------------------------
94.0.0.0/24 192.168.3.2 *> 0 100
0 100 i
69
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
History 3.3.5200
3.7.1000 Updated Example
Example
Local Connected:
Origin : IGP
metric : 0
localpref : 100
weight : 32768
Attributes: valid, best
switch (config)# show ip bgp 192.168.100.0 /24 detail
Local connected:
0.0.0.0 from 0.0.0.0 (192.168.100.11):
Origin : IGP
metric : 0
localpref : 100
weight : 32768
Attributes: valid, sourced, best
Related Commands
Notes
70
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
71
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
------------------------------------------------------------------------
Configuration IPV4 Unicast IPV6 Unicast L2VPN EVPN
------------------------------------------------------------------------
Configured AFI SAFI Disabled Disabled Disabled
Send Community Disabled Disabled Disabled
Send Extended Community Disabled Disabled Disabled
Route Reflection Disabled Disabled Disabled
Next Hop Unchanged Disabled Disabled Disabled
--------------------------------------------------------------------------
----------------------------
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ
Up/Down State/PfxRcd
--------------------------------------------------------------------------
----------------------------
72
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
73
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
--------------------------------------------------------------------------
--------------------------
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ
Up/Down State/PfxRcd
--------------------------------------------------------------------------
--------------------------
192.168.2.2 4 65001 368 428 7 0 0
0:00:06:30 ESTABLISHED/2
Update-group : 5
BGP version : 4
Address Family : IPv4 Unicast
Minimum time between advertisements runs in seconds: 30
Has 1 members:
192.168.2.2
Update-group : 6
BGP version : 4
Address Family : L2VPN EVPN
Minimum time between advertisements runs in seconds: 30
Has 1 members:
192.168.2.2
Related Commands
Notes
74
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
History 3.6.6000
3.6.8100 Updated Example
Example
--------------------------------------------------------------------------
------------------
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down
State/PfxRcd
--------------------------------------------------------------------------
------------------
1.1.1.1 4 65002 25 29 3 0 0
0:00:10:38 ESTABLISHED/2
1.1.1.5 4 100 0 0 3 0 0 Never
IDLE/0
Related Commands
Notes
75
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
ip as-path access-list
ip as-path access-list <list-name> {permit | deny} <reg-exp> [any | egp |
igp | incomplete]
no ip as-path access-list <list-name>
76
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
ip community-list standard
ip community-list standard <list-name> {deny | permit} <list-of-
communities>
no ip community-list standard <list-name>
Default N/A
Configuration
config
Mode
History 3.4.0000
switch (config)# ip community-list standard mycommunity
Example permit 1:2 3:4
Related Commands
A BGP community access list filters route maps that are configured as
Notes BGP communities. The command uses regular expressions to name the
communities specified by the list.
77
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
ip community-list expanded
ip community-list expanded <list-name> {deny | permit} <reg-exp>
no ip community-list expanded <list-name>
78
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS
BGP COMMANDS – CCIE/CCNP || AUTHOR: NETWORKJOURNEY.COM || YOUTUBE.COM/C/NETWORKJOURNEY
show ip community-list
show ip community-list [community-list-name]
79
AUTHOR: HTTPS://WWW.NETWORKJOURNEY.COM/GET-FULL-COURSE-CONTENT-VIDEOS/ ||
YOUTUBE.COM/C/NETWORKJOURNEY || ADVANCE BGP CLI COMMANDS