BGP Commands Flashcards

Including Route-Maps, Prefix-Lists, Dist-Lists, and Community-Lists

1
Q

Command to initialize the BGP Process?

A

Router(config)# router bgp as-number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Identify a BGP peer to establish a neighbor session

A

Router(config-router)# neighbor ip-address remote-as AS-number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Disable the automatic ipv4 address-family configuration mode in BGP.

A

Router(config-router)# no bgp default ipv4-unicast

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Initialize a specific address-family and sub-address family configuration mode

A

Router(config-router)# address-family afi safi

Example:
Router(config-router)# address-family ipv6 unicast
Router(config-router-af)#

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Make a BGP neighbor active for a specific address-family

A

Router(config-router-af)# neighbor ip-address activate

Note: from address-family configuration mode.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Advertise a network to BGP

A

Router(config-router)# network network mask subnet-mask [route-map route-map-name]

Example: Router(config-router)# network 10.9.8.0 mask 255.255.255.0 route-map RM_BGP_ROUTES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Configure a BGP aggregate IPv4 prefix (summary)

A

Router(config-router-af)# aggregate-address network subnet-mask [summary-only] [as-set]

Example: Router(config-router)# aggregate-address 10.9.8.0 255.255.255.0 summary-only as-set

NOTE: If bgp default ipv4-unicast is disabled, this is done in address-family config mode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Configure a BGP aggregate IPv6 prefix (summary)

A

Router(config-router-af)# aggregate-address prefix/prefix-length [summary-only] [as-set]

Example: Router(config-router)# aggregate-address 2001:db8:23:a/64 summary-only as-set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Display the contents of the BGP database

A

Router# show bgp afi safi [network] [detailed]

Example: Router# show bgp ipv4 unicast 10.9.8.0 detailed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Display a summary of the BGP table and neighbor peering sessions

A

Router# show bgp afi safi summary

Example: Router# show bgp ipv4 unicast summary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Display the negotiated BGP settings for a specified peer and the number of prefixes exchanged with that peer.

A

Router# show bgp afi safi neighbors ip-address

Example: Router# show bgp ipv4 unicast neighbors 10.4.4.1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Display the Adj-RIB-Out BGP table for a specific BGP neighbor

A

Router# show bgp afi safi neighbors ip-address advertised-routes

Example: Router# show bgp ipv4 unicast neighbors 10.4.4.1 advertised routes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What command is used on a BGP router to see the BGP peering state?

A

show tcp brief

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What command might you need to ensure that an iBGP neighbor a reachable next hop address so the route will get installed to the Global routing table?

A

Router(config-router)# neighbor ip-address next-hop-self

NOTE: This is configured in address-family mode when bgp default ipv4-unicast is disabled

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What command shows the BGP routing table?

A

show bgp afi safi

Example: show bgp ipv4 unicast

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What command would you use to ‘reset’ all bgp neighbors? Why do you need to be careful about using that command?

A

Router# clear ip bgp *

This command will break all connections to BGP peers until the neighbor states are reestablished.

17
Q

What is the command you would use to see all the routes being sent out from the router you are on?

A

show bgp AFI SAFI neighbors ip-address advertised-routes

18
Q

For iBGP, when configuring neighbors using loopback addresses, what additional command is needed?

A

Router(config-router)# neighbor ip-address update-source loopback-#

Example: Router(config-router)# neighbor 5.5.5.5 update-source loopback0

19
Q

What is the command to create a route map? (Include the common options)

A

Router(config)# route-map NAME [permit | deny] [sequence-number]

NOTE: Best practice is to start sequence numbers at 10 and increase by increments of 10 similar to an access-list.

20
Q

What is the command to create an AS-Path Access List?

A

Router(config)# ip as-path access-list number {permit | deny} regular-expression-string

21
Q

What is the command to create a prefix-list?

A

Router(config)# {ip | ipv6} prefix-list NAME [seq sequence-num] {permit | deny} network-address/netmask [ge value] [le value]

Example: ip prefix-list deny FILTER_1 seq 10 deny 1.1.1.0/24 ge 32

22
Q

What is the command to create a BGP community-list for the purpose of conditional route matching?

A

Router(config)# ip community-list {1-500 | standard list-name | expanded list-name} {permit | deny} community-pattern

23
Q

From route-map config mode, what is the command to match on a BGP AS-Path?

A

Router(config-route-map)# match as-path acl-number

24
Q

From route-map config mode, what is the command to match on IP addresses that was set in an ACL?

A

Router(config-route-map)# match ip address {acl-number | acl-name}

25
What is the command to redistribute routes from an iGP into BGP without any route filtering?
Router(config-router)# **redistribute** *protocol-name* [*process-id*] NOTE: To redistribute from an IGP into BGP, this will be done in BGP configuration mode. When using address-families, it is done in the address-family config mode under the BGP process.
26
What is the command to redistribute routes from an iGP into BGP using a route-map to filter the routes?
Router(config-router)# **redistribute** *protocol-name* [*process-id*] **subnets route-map** *RM-NAME* NOTE: To redistribute from an IGP into BGP, this will be done in BGP configuration mode. When using address-families, it is done in the address-family config mode under the BGP process.
27
What is the command to see a BGP rib-failure reason when seen in a routing table?
**show bgp** *afi safi* **rib-failure** OR **show ip bgp rib-failure**
28
When trying to configure an eBGP peer using loopback addresses, what two commands may be needed to ensure the default TTL for eBGP does not prevent peering?
Router(config-router)# **neighbor** *ip-address* **disable-connect-check** Router(config-router)# **neighbor** *ip-address* **ebgp-multihop** *1-255*
29
What is the command to create a Route Reflector?
Router(config-router-af)# **neighbor** *ip-address* **route-reflector-client** NOTE: The command is done on the Route Reflector and in address-family config mode if applicable
30
What are the commands to put a router into a BGP confederation?
Router(config)# **router bgp** *Member-AS-number* Router(config-router)# **bgp confederation identifier** *Main-AS-Number*
31
What command specifies the router will peer with another Member-AS other than its own?
Router(config-router)# **bgp confederation peers** *Other-Member-AS*
32
Hard reset a BGP session with a peer
Router# **clear bgp ipv4 unicast** *neighbor-ip*
33
Soft reset a BGP session with a peer
Router# **clear bgp ipv4 unicast** *neighbor-ip* [in | out | soft]
34
Show bgp routes that only include a specific AS in the AS Path
Router# **show bgp ipv4 unicast regexp** *regex-expression*
35
What is the command to create a Route Map?
Router(config)# **route-map** *NAME* {**permit | deny**} [*sequence-num*]
36
Inside a Route Map, match ip on a prefix-list
Router(config-route-map)# **match ip address prefix-list** *NAME*
37
Inside a Route Map, set the weight attribute
Router(config-route-map)# **set weight** *value*
38
Enable IPv6 on a router (before configuring BGP for IPv6)
Router(config)# **ipv6 unicast-routing**
39
Create an IPv6 neighbor (4 commands)
Router(config)# router bgp *AS-number* Router(config-router)# neighbor *ipv6-address* remote-as *AS-number* Router(config-router)# address-family ipv6 unicast Router(config-router-af)# neighbor *ipv6-address* activate