User Tools

Site Tools


cisco:bgp:bgp_notes

BGP Notes

  • Well-known mandatory attribute
    • AS_PATH
      • Includes a complete listing of all ASNs that the prefix advertisement has traversed from its source AS.
      • Is a loop-prevention mechanism.
      • If a router receives a prefix advertisement with its AS listed in the AS_PATH, it discards the prefix because the router thinks the advertisement forms a loop.
  • BGP Messages
    • BGP communication uses four message types:
      • 1: OPEN
        • Sets up and establishes BGP adjacency
      • 2: UPDATE
        • Advertises, updates, or withdraws routes
      • 3: NOTIFICATION
        • Indicates an error condition to a BGP neighbor
      • 4: KEEPALIVE
        • Ensures that BGP neighbors are still alive
    • OPEN
      • Used to establish a BGP adjacendcy.
      • Both sides negotiate session capabilities before a BGP peering establishes.
      • The OPEN message contains the BGP version number, ASN of the originating router, Hold Time, BGP Identifier, and other optional parameters.
      • Hold Time
        • Sets the Hold Timer in seconds for each BGP neighbor.
        • Upon receipt of an UPDATE or KEEPALIVE, the Hold Timer resets to the initial value.
        • If the Hold Timer reaches zero, the BGP session is torn down, routes from that neighbor are removed, and an appropriate update route withdraw message is sent to other BGP neighbors for the impacted prefixes.
        • Ensures the neighbors are alive and healthy.
        • The smaller Hold Time value will be used that are contained in the two router's OPEN messages.
        • The Hold Time must be at least three seconds, or zero.
        • Cisco default Hold Time is 180 seconds.
      • BGP Identifier
        • The BGP Router-ID (RID) is a 32-bit unique number that identifies the BGP router in the advertised prefixes as the BGP Identifier.
        • Must be non-zero for neighborships to form.
  • AFI/SAFI
    • They're legitimately different routing tables. 128 uses an inner label to keep the packets separate, but that's got nothing to do with the tables
    • The term "MPBGP" really means you're using any SAFIs other than 1
    • It really isn't "mutli-protocol" either. It's more like "multi-table"
    • BGP, at its heart, just creates and passes around tables.
  • rd = route distinguisher
    • Uniquely identifies the IPV4 BGP prefixes.
    • Example:
      • r(config)# ip vrf ARMY
      • r(config-vrf)# rd 65501:44
      • r# show ip vrf
  • rt = route target
    • Identifies what prefixes are exported and imported.
    • 64 bits
    • Example:
      • r(config)# ip vrf ARMY
      • r(config-vrf)# route-target export 3:3
      • r(config-vrf)# route-target import 3:3

Misc

Understanding Key BGP Attributes

Origin (mandatory)

i = originated from an internal network
e = originated from EGP (the old protocol) (you should never see this)
? = unknown origin

AS-Path (mandatory)

How many AS's has this passed through?
If a local router's AS is seen here, the router will drop it because it's considered a loop.
As the route leaves the router, it will add it's local AS to this attribute.

Next-Hop (mandatory) Local Preference (discretionary - has to be on every router, but doesn't have to be used)

Same as weight, but passes on to other routers within the same AS.
Higher value wins.

Atomic Aggregate (discretionary - has to be on every router, but doesn't have to be used) MED (Multi-exit Discriminator (optional - doesn't have to be supported on the router)

A value defined that gives the remote AS's router a suggestion on the path to take.
Considered a non-transitive attribute.
Lower is better.
Another word for MED is metric (like slang language)

Aggregator (optional - doesn't have to be supported on the router)

Who did the aggregation of routes.

Community (optional - doesn't have to be supported on the router)

Like a private VLAN

AD: eBGP = 20 iBGP = 200

updates are 30 secs for eBGP updates are 5 secs for iBGP BGP/TCP keepalives by default every 60 secs Private AS 64512 - 65535

BGP speakers within the same AS are required to be a full mesh topology Only the best paths are advertised to its peers. BGP routing policy

two types:
	outbound filtering
	inbound filtering

BGP administrative policy

defines administrative controls for routes coming into the AS or leaving the AS

To enforce policies, BGP uses a three-step process:

1. Input policy engine
2. Path selection
3. Output policy engine

Path vector routing protocol uses TCP protocol 179 that are carried inside IP packets

Two routers speaking BGP are called BGP speakers routers that establish a TCP connection are called BGP peer routers or BGP neighbors After the TCP connection is established, the routers exchanged their full BGP tables Only changes are sent in update packets Periodic routing updates are not needed because of the TCP connection, therefore, only BGP only sends keepalive messages, similar to the HELLO message sent by OSPF and EIGRP Neighbors only exchange their best BGP routes

Message types:

Open
	19-4096 bytes
	1. After a TCP connection is established, the first message sent by each side is an open message.
	3. Upon accecptance, a keepalive is sent
	4. After a keepalive is sent back, the BGP connection is established, and the update, keep alive, and notification messags can be exchanged
	Includes the following information: 
		Version:
		My AS:
		Hold time:
		Router ID:
			static, highest loopback, highest active interface address
		Optional parameters:
Keepalive
	19 bytes
	2. Sent to confirm receipt of the Open message
Update
	19-4096 bytes
	Includes the following information:
		Withdrawn routes:
		Path attributes:
		Network Layer reachability information (NLRI):
Notification
	19-4096 bytes
	Sent when an error is detected
	The BGP connection is immediately closed after a notification message is sent

Neighbor states:

Idle
Connect
Active
Open sent
Open confirm
Established

When to use BGP:

The AS allows packets to transit through it to reach other ASs
The AS has multiple connections to other ASs
Routing policy and route selection for traffic entering and leaving the AS must be manipulated

eBGP neighbors all have:

Different ASNs
Neighbor's defined
Reachability via the neighbor command
usually directly connected

iBGP neighbors all have:

Same ASN
Neighbor's defined
Reachability, usually with an IGP inside the AS
Don't have to be directly connected
The loopback address is usually used as the neighbor to establish iBGP sessions
A full-mesh must be setup for all iBGP neighbors
If all iBGP neighbors are not fully meshed, routing loops (or black holes) can occur with due to inconsistant IP routing tables

At least one configuration command under router bgp 65000 must be present for BGP to activate Only one AS can be configured per router, else an error will be thrown

The network command doesn't indicate which interfaces advertise BGP, but rather what networks in your AS to advertise, even if they are not locally connected to your router The mask parameter indicates that BGP-4 allows classless prefixes; it can advertise subnets and supernets. The mask command must match exactly what is in the IP Routing Table. To configure a static route to a null interface ( to ensure connectivity): ip route 192.168.0.0 255.255.0.0 null0

The neighbor command tells BGP where to advertise; the network command tells BGP what to advertise

To force a router to advertise itself as the next-hop address for routes sent to a neighbor, use: neighbor 10.10.10.3 next-hop-self This will force BGP to use the source IP address of the update as the next hop fo reach network it advertises to the neighbor, rather than letting the protocol choose the next-hop address to use.

For neighbors to for adjacency that are not directly connected, use eBGP multihop neighbor 12.12.12.2 ebgp-multihop

One AS per router sh ip bgp summary sh ip bgp (entire topology table)

router bgp 500 neighbor remote-as 150.1.1.1 remote-as 111 nei 150.1.1.1 description ISP1 nei 150.1.1.1 shutdown (to shutdown a neighbor) nei 150.1.1.5 weight 5 (then you have to clear ip bgp *, or soft reconfig)

debug ip bgp all

the network command will take an internal route and advertise it out bgp router bgp 500 redistribute connected route-map ISP1_REDISTRIBUTE network 200.1.1.0

To do a filter (config)# access-list 60 permit 200.1.1.0 0.0.0.255 access-list 60 permit 150.1.1.0 0.0.0.255 router bgp 500 distribute-list 60 out connected (filter all connected routes through ACL 60 as they are going out of BGP)

route-map CHANGE_ORIGIN

match ip address 61
set origin igp

router bgp 500

redistribute connected route-map  CHANGE_ORIGIN
aggregate-address 10.1.0.0 255.255.0.0 (study more, summary address)
aggregate-address 10.1.0.0 255.255.0.0 summary-only (summary address)

ip route 10.1.0.0 255.255.0.0 null 0 router bgp 500

network 10.1.0.0 mask 255.255.0.0

Scaling iBGP with Route Relectors

1. Problem is when the iBGP mesh is very large
2. Route relectors
	a. Provide additional control to allow router to advertise (reflect) iBGP learned routes to other iBGP peers
		i. Method reduces the size of the iBGP mesh
	b. Normal BGP speakers can coexist
		i. Only the RR has to support this feature
			1) neighbor x.x.x.x route-relector-client
	c. https://www.google.com/imgres?imgurl=http%3A%2F%2Fwww.cisco.com%2Fc%2Fdam%2Fen%2Fus%2Ftd%2Fi%2FOther%2FSoftware%2FS4001-4500%2Fs4218.ps%2F_jcr_content%2Frenditions%2Fs4218.jpg&imgrefurl=http%3A%2F%2Fwww.cisco.com%2Fc%2Fen%2Fus%2Ftd%2Fdocs%2Fios-xml%2Fios%2Fiproute_bgp%2Fconfiguration%2F12-4%2Firg-12-4-book%2Firg-int-features.html&docid=NIluxx3lQTUHnM&tbnid=dkPQlP8aymSSqM%3A&w=549&h=403&hl=en&bih=953&biw=1920&ved=0ahUKEwiM34b95LjMAhUBdCYKHboPDSYQxiAIAg&iact=c&ictx=1
3. Terminology
	a. Route Reflector (RR)
		i. Router that reflects the iBGP information
	b. Client
		i. Routers between which the RR reflects updates (may be fully meshed among themselves)
	c. Cluster
		i. Set of one or more RRs and their clients (may overlap)
	d. Non-client
		i. iBGP neighbor outside the cluster

Soft Reconfiguration and Route Refresh

1. Changes to BGP neighbor policies only take effect upon incoming/outgoing routing updates
2. clear ip bgp 65001
	a. While BGP is re-establishing TCP and Open exchanges,  you've lost all routes from this neighbor
3. Soft reconfiguration
	a. Allows policies to be changed without clearing the neighbor
	b. both inbound and outbound
		i. Inbound requires additional memory
		ii. Outbound is more efficient
	c. Outbound doesn't require any configuration
	d. Inbound configuration:
		i. router bgp 30
			1) neighbor 141.153.12.2 remote-as 32
			2) neighbor 141 153.12.2 soft-reconfiguration inbound
			3) neighbor 141.153.12.2 route-map filter in
			4) neighbor 141.153.30.2 remote-as 31
		ii. old way:
			1) clear ip bgp 141.153.30.2 soft in
			2) or
			3) clear ip bgp 141.153.30.2 in
		iii. Route refresh capability (new way)
			1) Facilitates non-disruptive policy changes
			2) No configuration is needed
			3) No additional memory is used
			4) clear ip bgp 31 in
			5) Neighbor sends entire BGP without tearing down the TCP connection

AS-Path Filtering

1. Several scenarios require BGP route filtering based on AS path
	a. Announce only local routes to the ISP--AS path needs to be empty
	b. Select routes based on a specific AS number in the AS path
	c. Accept routes for specific AS only from some BGP neighbors
2. AS-path filters use regular expressions
3. Path filters
	a. Filter based on AS path
		i. ip as-path access-list 9 permit regexp
	b. Per neighbor
		i. inbound
		ii. outbound
		iii. filter-list
		iv. route-maps
	c. Example:
		i. Deny all prefixes that originated in AS 200
		ii. router bgp 109
			1) neighbor 160.89.1.1 remote-as 300
			2) neighbor 160.89.1.1 filter-list 5 in
		iii. !
		iv. ip as-path access-list 5 deny _200$
		v. ip as-path access-list 5 permit .*
4. String matching - regular expressions
	a. A string of characters in a regular expression matches any equivalent substring in the AS path
	b. What is the first instance in which 31 finds a match?
		i. |213 317 2316 31|
		ii. Answer: |213 317 2316 31|
5. String Matching Alternatives
	a. Expression expr1|expr2 matches the string if either subexpression matches the string
	b. Which AS Paths does 21|31 match?
	c. |613 817 2326 35|
	d. |813 321 2356 41|
	e. |413 337 2316 92|
	f. |553 557 2386 99|
	g. Answer:
	h. |813 321 2356 41|
	i. |413 337 2316 92|
6. String matching - ranges and wildcard characters
	a. A range of characters matches any single character in the range
	b. Examples: [1234] or [1-4]
	c. Dot (.) matches any single character including a space
	d. How many times does [1-3].[34] match?
	e. (match a total of 3 characters)
	f. |213 317 2316 31|
	g. Answer:
	h. |213 317 2316 31|
	i. or [3].[34]
	j. Answer:
	k. |213 317 2316 31|
7. String matching - matching delimiters
	a. Example 1:
		i. x.x.x.x/y 200 3500 5 760 9000
		ii. Want to match on any prefix that came via neighboring AS 200?
		iii. ^200
		iv. The carat "^" matches the leftmost AS in the AS_Path (neighboring AS)
	b. Example 2:
		i. x.x.x.x/y 200 3500 5 760 9000
		ii. Want to match on any prefix that originated in AS 9000?
		iii. _9000$
		iv. The dollar sign "$" matches the rightmost AS in the AS_PATH (originated AS)
	c. Example 3:
		i. x.x.x.x/y 200 3500 5 760 9000
		ii. Want to match on any string that contained the AS 5?
		iii. _5_
		iv. The underscore "_" matches any character (including a space) OTHER than a digit
8. String matching - Grouping
	a. Parentheses can be used to group smaller regular expressions into larger expressions
	b. Which AS Paths does ([1-4]77_567)_31 match?
	c. |213 317 1218 316 31|
	d. |277 567 3118 316 31|
	e. |577 567 3118 316 31|
	f. |213 377 5678 316 31|
	g. Answer:
	h. |277 567 3118 316 31|
9. String matching - Special characters
	a. /
	b. To use the special characters as single-character patters, remove the special meaning by preceding each character with a backslash (/)
	c. How do you match AS 213 at the end of the string?
	d. | 1218 316 31 {213 317} |
	e. Answer:
	f. /{213_
10. String matching - repeating operators
	a. Matches zero or more atoms *
	b. Matches zero or one atom ?
	c. Matches one or more atoms +
	d. An Atom is a single character or a grouping
	e. Repeating operators can be used to match atoms
	f. Example 1:
		i. How do you match the following AS path:
		ii. |345 6 888|
		iii. |345 67 888|
		iv. |345 677 888|
		v. |345 6777 888|
		vi. Answer:
		vii. ^345_67*_888$
		viii. If the Answer was changed to: 
			1) ^345_(67)*_888$
		ix. Then the question would be
			1) |345 888|
			2) |345 67 888|
			3) |345 6767 888|
			4) |345 676767 888|
	g. Example 2:
		i. How do you match the following AS path:
		ii. |345 888|
		iii. |345 67 888|
		iv. But not,
		v. |345 6767 888|
		vi. |345 676767 888|
		vii. Answer:
		viii. ^345_(67)?_888$
	h. Example 3:
		i. How do you match the following AS path:
		ii. |345 67 888|
		iii. |345 6767 888|
		iv. But not,
		v. |345 888|
		vi. Answer:
		vii. ^345_(67)+_888$
11. String matching - sample regular expressions
	a. Going through AS 100 _100_
	b. Directly connected to AS 100 ^100$
	c. Originated in AS 100 _100$
	d. Networks behind AS 100 ^100_.
	e. AS paths one AS long ^[0-9]+$
	f. Prepending performed in neighboring originating AS ^([0-9]+)(_/1)*$
	g. Networks originated in local AS ^$
	h. Matches everything .*
12. How .* affects the search order
	a. If "XY" is a regular expression then,
		i. XY = match first instance of XY (left to right) anywhere in the string
		ii. XY AB = From left to right, find XY first, then next AS must be AB
		iii. ^XY = XY must be the first AS in the string
		iv. ^XY AB = XY must be the first AS in the string, AB must be the second AS in the string
		v. ^XY.*AB = XY must be the first AS in the string, then keep parsing the string all the way until AB is found
13. Configuring BGP AS-Path Filters
	a. Example 1:
		i. R(config)# ip as-path access-list 5 permit _100_
		ii. Configures AS-Path access-list
		iii. !
		iv. router bgp 1001
			1) neighbor 10.10.10.2 filter-list 5 in
				a) Configures inbound or outbound AS-path filter for specified BGP neighbor
	b. Example 2:
		i. router bgp 2
			1) neighbor 12.12.12.2 filter-list 1 out
		ii. !
		iii. ip as-path access-list 1 permit ^$
14. Show commands
	a. show ip as-path-access-list 5
		i. Displays one or all filter-lists
	b. show ip bgp regexp ^$
		i. Displays all routes in the BGP table permitted by the specified AS-path access-list
	c. show ip bgp filter-list 5
		i. Displays all routes in the BGP table matching regular expression in one or all filter-lists

BGP Policy Control

? Distribute Lists
? Prefix-Lists


? Prefix Filters
	○ Based on network numbers
		§ CIDR
	○ Per neighbor access-list
		§ inbound or outbound
		§ distribute-list/prefix-lists
		§ route-maps
? Distribute-Lists and Standard ACLs
	○ Example 1:
		§ router bgp 109
			□ neighbor 160.89.1.1 distribute-list 5 in
				R (Standard ACLs can only match against the prefix, not the subnet mask associated with that prefix)
		§ !
		§ access-list 5 deny 170.10.0.0 0.0.255.255
		§ access-list 5 permit any
	○ Example 2:
		§ router bgp 109
			□ neighbor 160.89.1.1 route-map filter in
		§ !
		§ route-map filter permit 10
			□ match ip address 5
		§ !
		§ access-list 5 deny 5 170.10.0.0 0.0.255.255
		§ access-list 5 permit any
	○ Goal: Deny any advertised prefix that starts with the first 16 bits matching 170.10.0.0 and with any subnet mask.
	○ Example 3:
		§ router bgp 109
			□ neighbor 160.89.1.1 distribute-list 105 in
		§ !
		§ access-list 105 deny ip 170.0.0.0 0.255.255.255 255.255.192.0 0.0.63.255
		§ access-list 105 permit ip any any
	○ Example 4:
		§ Prefix list example
			□ router bgp 109
				R neighbor 160.89.1.1 prefix-list super in
			□ !
			□ ip prefix-list super deny 170.0.0.0/8 ge 16 le 24
			□ ip prefix-list super permit 0.0.0.0/0 le 32

Path Selection

1. Only consider paths with reachable NEXT_HOPS
2. Do not consider iBGP path is not synchronized
3. Weight
	a. locally significant to the local router only
	b. not used by any other routers
	c. value 0 - 65535
	d. Cisco specific
	e. Default:
		i. originated locally = 32768
		ii. other = 0
	f. Higher weight is preferred over a lower weight
	g. Weight is set via a route-map or neighbor statement
	h. mainly used when as AS has only one router peering to multiple ASs
4. Local Preference
	a. Highest wins
	b. Used when router has two or more exit points
	c. Global to the local AS and passed on to other BGP peers in the same AS
	d. Default = 100
	e. config:
		i. router bgp 109
			1) neighbor x.x.x.x remote-as 1880
			2) neighbor x.x.x.x route-map foo in
		ii. !
		iii. route-map foo permit 10
			1) match as-path 2
			2) set local-preference 120
		iv. !
		v. ip as-path access-list 2 permit ^1800_
5. Locally originated
	a. local router owns route
6. Shortest AS_PATH
7. Lowest ORGIN code
	a. IGP < EGP < incomplete
	b. Origin of the prefix
	c. Values:
		i. IGP (i) = via network command
		ii. EGP (e) = learned from EGP (the old routing protocol)
		iii. incomplete (?) = redistribution
8. Lowest Multi-Exit Discriminator (MED)
	a. Local AS only
	b. Indication (to external peers) of the preferred path into an AS
		i. used in multiple entry AS
		ii. non-transitive
	c. Compared only for routes from the Same AS
	d. Lower MED value is more preferable
	e. Default = 0
	f. config:
		i. router bgp 1755
			1) neighbor x.x.x.x remote-as 1880
			2) neighbor x.x.x.x route-map set_MED out
		ii. !
		iii. route-map set_MED permit 10
			1) match as-path 2
			2) set metric 2
		iv. !
		v. ip as-path access-list 2 permit _690$
	g. When routes arrive out of order, this model breaks down
	h. Can use:
		i. config:
			1) bgp always-compare-med
9. Prefer an External path over an Internal one
10. Lowest IGP metric to the NEXT_HOP
11. For eBGP paths
	a. If multipath is enable, the router may install up to N parallel paths in the routing table but best-path must still be determined
	b. Select the oldest unless updates arrived at the same time
12. Lowest RID
	a. Originator-ID is considered for reflected routes
13. Shortest Cluster-List
	a. Client must be aware of RR attributes
14. Lowest neighbor IP address
	
	

To manipluate the AS_PATH:

1. AS_PATH Prepending
2. config:
	a. router bgp 18
		i. neighbor 1.1.1.1 remote-as 2000
		ii. neighbor 1.1.1.1 route-map prepend out
	b. !
	c. route-map prepend permit 10
		i. match as-path 2
		ii. set as-path prepend 18 18
	d. !
	e. ip as-path access-list 2 permit .*  <-- means all prefixes

Generating BGP Updates

1. Redistribute from IGP
	a. Not always a good thing due to leaking private routes to BGP
2. Redistribute Static routes pointed to null0
	a. Example:
		i. router bgp 109
			1) redistribute static
			2) !
			3) ip route 198.10.0.0 255.255.0.0 null 0
	b. Con: can advertise a stale route, which is not a good thing
3. Network originated by the local router
	a. Matching IGP route must exist
		i. dynamic or static/connected entry in routing table
			1) Example:
				a) router bgp 109
					i) network 200.10.10.0
					ii) network 198.10.0.0 mask 255.255.0.0
					iii) !
					iv) ip route 109.10.0.0 255.255.0.0 null 0
	b. When not to use the mask and the network command
		i. Only when the network specified is classfull and it's in your IGP routing table
			1) network 10.0.0.0 this will work as long as you have this specific route in your IGP table
			2) network 10.10.0.0 this won't work, even if you have the IGP route in your routing table
			3) network 10.10.0.0 mask 255.255.0.0 this will work as long as you have a matching IGP route in your table

Synchronization

In a transit network, a route learned from an internal peer should not be:
	1. advertised to an eBGP peer, or
	2. used for next-hop IP packet forwarding
until all routers in the local AS have learned about it.
Needed to prevent black holes in the middle of an iBGP network
Off by default in later IOS versions
router bgp 234
	synchronization
If all routers run BGP, then turn off
router bgp 235
	no sync
Turning off speeds up BGP convergence

Internal peer group router bgp 109

neighbor internal peer-group
neighbor internal remote-as 109
neighbor internal route-map send out
neighbor internal filter-list 1 out
neighbor 131.108.20.1 peer-group internal
neighbor 131.108.30.1 peer-group internal
neighbor 131.108.30.1 filter-list 3 in

External peer group router bgp 109

neighbor external-peer peer-group
neighbor external-peer route-map set-metric out
neighbor 160.89.1.2 remote-as 200
neighbor 160.89.1.2 peer-group external-peer
neighbor 160.89.1.4 remote-as 300
neighbor 160.89.1.4 peer-group external-peer

eBGP: router bgp 65000

neighbor 11.11.11.2 remote-as 65001

iBGP: router bgp 65000

neighbor 10.10.10.2 remote-as 65000

Also: router bgp 65000

neighbor 10.10.10.2 remote-as 65000 (iBGP)
neighbor 11.11.11.2 remote-as 65001 (eBGP)
neighbor 11.11.11.3 shutdown (Admin down)

Example 2: R1: router bgp 65100

neighbor 209.165.202.130 remote-as 65000 (eBGP)
network 209.165.200.224 mask 255.255.255.224 (advertises the loopback subnet)
no neighbor 209.165.202.130
neighbor 192.168.2.2 remote-as 65000
neighbor 192.168.2.2 update-source lo0
neighbor 192.168.2.2 ebgp-multihop

ip route 192.168.2.2 255.255.255.255 209.165.202.130

R2: router bgp 65000

neighbor 209.165.202.129 remote-as 65100 (eBGP)
neighbor 172.16.23.3 remote-as 65000 (iBGP)
network 192.168.22.0 mask 255.255.255.0 (advertises the loopback subnet)
neighbor 172.16.23.3 next-hop-self (advertises itself as the next hop)
no neighbor 172.16.23.3
neighbor 192.168.3.3 remote-as 65000
neighbor 192.168.3.3 next-hop-self
neighbor 192.168.3.3 update-source lo0
no neighbor 290.165.202.129
neighbor 209.165.201.1 remote-as 65100
neighbor 209.165.201.1 update-source lo0
neighbor 209.165.201.1 ebgp-multihop

ip route 209.165.201.1 255.255.255.255 209.165.202.129

R3: router bgp 65000

neighbor 172.16.23.2 remote-as 65000 (iBGP)
network 192.168.33.0 mask 255.255.255.0 (advertises the loopback 1 address)
no neighbor 172.16.23.2
neighbor 192.168.2.2 remote-as 65000
neighbor 192.168.2.2 update-source lo0

sh ip bgp summary

displays the overall status of all BGP connections
contains: BGP RID, Local ASN, BGP table version, main routing table version, Neighbor, Version of the neighbor, ASs of the neighbors, MsgRcvd, MsgSent, TblVer that was sent to this neighbor, In queue (InQ), OutQ, Up/down, State, Prefix received (PfxRcd)

sh ip bgp neighbors sh ip bgp neighbors 209.165.202.130 debug ip bgp ipv4 unicast debug bgp ipv4 unicast events clear ip bgp * clear ip bgp 14.14.14.4 clear ip bgp 14.14.14.5 out (for outbound updates) clear ip bgp 15.15.15.5 in (for neighbor to resend its BGP table) clear ip bgp soft (for in and outbound update refreshes) debug ip bgp updates show ip bgp neighbors 16.16.16.6 received-routes show ip bgp neighbors 17.17.17.7 routes show ip bgp show ip bgp neighbors 18.18.18.8 advertised-routes

cisco/bgp/bgp_notes.txt · Last modified: 2020/10/05 09:49 by Derg Enterprises