Cisco® CCNP Routing Exam Notes : Bgp Configuration, Route Summarization, And Bgp Commands.
31. BGP: Internet Assigned Numbers Authority (IANA) is responsible for assigning BGP autonomous system numbers.
1. The assignable BGP autonomous system numbers are from 1 to 65,535 (I.e. 65,535 in total). Autonomous system numbers are of 16 bit length. There are 2 ^ 16 = 65536 -1 possible ASNs. ASN of all 0s is not assigned. Out of this, the Internet Assigned Numbers Authority (IANA) has reserved the following block of AS numbers for private use: 64512 through 65535.
2. External BGP (eBGP) is used to establish session and exchange route information between two or more autonomous systems. Internal BGP (iBGP) is used by routers that belong to the same Autonomous System (AS).
3. Routers running BGP in an AS use network Policy to choose the best path. Metrics are not used in BGP. Remember that Internet is made of autonomous systems (AS) that are connected together based on Policies specific to each AS. Also, AS numbers (ASN) are assigned by AINA and are unique over the Internet. In an internet (not big I) the ASNs can be assigned by the corporation itself that is implementing internet.
4. The following are the four possible message types in a BGP header:
Type 1: OPEN message - This is the first message sent after TCP session is established.
Type 2: UPDATE message - An UPDATE message contains a new route or a route to be withdrawn or both. Note that only one new route can be advertised with one UPDATE message.
Type 3: NOTIFICATION message - this message is sent if an error occurs during a BGP session. This message can be used to troubleshoot the problem.
Type 4: KEEPALIVE message - KEEPALIVE message is used to confirm that the connection between the neighboring routers is still active.
5. Command to set the router RouterA to autonomous system number 1340:
The correct syntax for the command is:
RouterA(config)#router bgp 1340
where 1340 is the AS number which can have a value between 1 and 65535 in an internetwork.
6. Port number 179 is used to establish a session between two routers running BGP.
7. Well-Known mandatory attributes must appear in all BGP update messages. The well-known mandatory messages are:
- AS_PATH: BGP messages carry the sequence of AS numbers indicating the complete path a message has traversed.
- NEXT_HOP: This attribute indicates the IP address of the next-hop destination router.
- ORIGIN: This attribute tells the receiving BGP router, the BGP type of the original source of the NLRI information.
8. Any two routers that have formed a TCP connection in order to exchange BGP routing information are called peers, or neighbors. BGP peers initially exchange their full BGP routing tables. After this exchange, routing table changes are sent as incremental updates. BGP keeps a version number of the BGP table, which should be the same for all of its BGP peers. The version number changes whenever BGP updates the table, likely due to routing information changes. Keep alive packets are sent to ensure that the connection is alive between the BGP peers.
9. show ip bgp neighbors
This is a very useful command in troubleshooting BGP connections. When the connection is established, the peer/ neighbor router exchanges BGP information. If a TCP connection (BGP session) is not established, a BGP router can not exchange any BGP routing information with the adjacent router.
10. Few recommended scenarios, where you use BGP are:
- Connect two or more ISPs
- The traffic flow out of your network need to be managed to suit the requirements of your organization.
- The traffic need to be sent through one AS to get to another AS.
10.The weight attribute in BGP has a range from 0 to 65535. This attribute can be set using "neighbor" command. The default value is 32,768.
11.Various debug commands useful in troubleshooting bgp are:
- Debug ip bgp events: Displays all bgp events as they occur.
- Debug ip bgp dampening: Displays bgp dampening events as they occur.
- Debug ip bgp keepalives: Displays all events related to bgp keepalive packets.
- Debug ip bgp updates: Displays information on all bgp update packets.
12.Prefix lists (filtering) are available only in Cisco IOS versions 12.0 and later.
Characteristics of Prefix lists:
- These are used for filtering BGP routing updates, so that certain path policy is applied.
- Prefix lists put less load on the processor compared to Access lists.
- Prefix lists are easier to configure and implement.
- Prefix lists are read one line at a time.
- There is an implicit deny all at the bottom of the Prefix list. However, if the prefix list is empty, there will be an implicit permit any
- The statement with the smallest sequence numbers is read first.
- Sequence values are generated in increments of 5. The first sequence value generated in a prefix list would be 5, then 10, then 15, and so on.
The following are a few examples of how a prefix list can be used (while configuring BGP policies to filter route updates):
To deny the default route 0.0.0.0/0:
ip prefix-list mylist1 deny 0.0.0.0/0
To permit the prefix 18.104.22.168/8:
ip prefix-list mylist1 permit 22.214.171.124/8
1. A stub AS is a single-homed network with only one entry and exit point. This type of AS can be connected to the external world through the use of a statically configured route.
2. Transit AS: Data from one AS need to reach a remote AS, then it has to travel through intermediate AS. The AS or Autonomous Systems which carry the data from one AS to another AS is (are) called Transit AS (es).
3. eBGP: External BGP is used between two or more Autonomous Systems.
4. iBGP: Internal BGP is used within an AS.
33. In BGP, to disable automatic summarization of subnet routes into network level routes use the command:
To enable automatic summarization of subnet routes into network level routes use the command:
Note that by default, auto-summary is enabled.
34. BGP is an exterior routing protocol, whereas RIP, IGRP, and OSPF are all Interior routing protocols (IRP). Interior routing protocols run inside a company's network and can't run on the Internet. The Internet consists of numerous autonomous systems (AS) which are connected by Exterior Routing protocols like BGP.
35. BGP commands:
Suppose, RouterA and RouterB are running iBGP. The correct syntax for establishing neighbor relationship is:
router bgp 100
neighbor 126.96.36.199 remote-as 100
iBGP routers don't have to be directly connected, as long as there is some IGP running, that allows the two neighbors to reach one another. If two routers belong to the same AS, then they run iBGP, whereas, if they belong to different ASs, they need to run eBGP.
The output is that of "show ip bgp summary". It contains the following among other details:
- BGP router identifier: Router identifier specified by the bgp router-id command, loop back address, or lowest IP address.
- BGP table version: Internal version number of BGP database.
- Main routing table version: Last version of BGP database that was injected into main routing table.
- Neighbor: IP address of a neighbor.
- V: BGP version number spoken to that neighbor.
- AS: Autonomous system.
To specify the networks to be advertised by the Border Gateway Protocol (BGP) use the network command. To remove an entry, use the no network form of this command.
network network-number [mask network-mask]
no network network-number [mask network-mask]
To distribute Border Gateway Protocol (BGP) neighbor information as specified in a prefix list, use the neighbor prefix-list command in address family or router configuration mode.
The following router configuration mode example applies the prefix list named mylist1 to outgoing advertisements from the neighbor 188.8.131.52:
router bgp 100
neighbor 184.108.40.206 prefix-list mylist1 out
To distribute Border Gateway Protocol (BGP) neighbor information as specified in an access list, use the neighbor distribute-list command in address family or router configuration mode.
36. Route maps are used with BGP to control and modify routing information and to define the conditions by which routes are redistributed between Autonomous Systems. The format of a route map is as follows:
route-map map-name [[permit | deny] | [sequence-number]]
The map-name is a name that identifies the route map, and the sequence number indicates the position that an instance of the route map is to have in relation to other instances of the same route map.
37. Some of the terms used commonly with route reflectors in BGP are:
- Route reflector: It is a router that is configured to advertise the routes that are learned from iBGP neighbors.
- Client: A router that shares information with the router configured as route reflector.
- Cluster: The set of all routers configured as route reflectors and clients.
- Cluster ID: If there are one route reflector in a cluster, then, cluster ID is used to identify the route reflectors uniquely in the specified cluster.
38. Do not apply both a neighbor distribute-list and a neighbor prefix-list command to a neighbor in any given direction (inbound or outbound) on a BGP router. These two commands are mutually exclusive, and only one command (neighbor prefix-list or neighbor distribute-list) can be applied to each inbound or outbound direction.
39. BGP peer groups:
- A BGP peer group significantly reduces the overhead of configuring policies on every individual BGP neighbor in an AS. When a peer group is created, policies are assigned to the name of the peer group itself and not to the individual neighbors.
- Route maps, distribution lists, and filter lists usually set update policies.
- Members of the peer group can be configured to override the configuration options for incoming updates, but not to the outgoing updates.
40. The command (BGP)
neighbor <ip-address> peer-group <peer group name>
is used to add a neighbor to a peer-group.
The complete commands to add a neighbor are:
RouterA(config)#router bgp 100
RouterA(config-router)#neighbor mygroup peer-group
RouterA(config-router)#neighbor 220.127.116.11 peer-group mygroup