CCNP ENARSI 300-410 Exam Cram Notes

1.0 Layer 3 technologies

1.11 Troubleshoot BGP (Internal and External)

Neighbor relationship and authentication (next-hop, mulithop, 4-byte AS, private AS, route refresh, synchronization, operation, peer group, states and timers)

Below is the list of BGP states in order, from startup to peering:

1. Idle: the initial state of a BGP connection. In this state, the BGP speaker is waiting for a BGP start event, generally either the establishment of a TCP connection or the re-establishment of a previous connection. Once the connection is established, BGP moves to the next state.

2. Connect: In this state, BGP is waiting for the TCP connection to be formed. If the TCP connection completes, BGP will move to the OpenSent stage; if the connection can not complete, BGP goes to Active

3. Active: In the Active state, the BGP speaker is attempting to initiate a TCP session with the BGP speaker it wants to peer with. If this can be done, the BGP state goes to OpenSent state.

4. OpenSent: the BGP speaker is waiting to receive an OPEN message from the remote BGP speaker

5. OpenConfirm: Once the BGP speaker receives the OPEN message and no error is detected, the BGP speaker sends a KEEPALIVE message to the remote BGP speaker

6. Established: All of the neighbor negotiations are complete. You will see a number (2 in this case), which tells us the number of prefixes the router has received from a neighbor or peer group.

BGP can load balance up to six links. You can have up to six links to ISPs and use those links for Internet traffic. This arrangement provides redundancy as well as load balancing.

When route map is configured in BGP, there is an implicit "deny any" at the end of a route map. When a route map is configured in BGP, after checking all the route map statements, there is an automatic denial of route if no match is found. This is same as in ACLs.

The sequence numbers of 5, 10,15,20 etc. are assigned automatically when no sequence numbers are used while configuring prefix lists. As can be seen, the first number assigned is 5 and the increment value is also 5.

Show ip bgp neighbor: The show ip bgp neighbors command is used to display BGP and TCP connection information for neighbor sessions. For BGP, this includes detailed neighbor attribute, capability, path, and prefix information. For TCP, this includes statistics related to BGP neighbor session establishment and maintenance. This command displays information only about IPv4 address-family sessions unless the all keyword is entered.

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.

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.

The command : clear ip bgp *

clears all the entries from the BGP routing table and reset BGP sessions. This command is used after every configuration change to ensure that the change is activated and that peer routers are informed.

Another command, clear ip bgp <address>

ex: clear ip bgp 172.31.0.0 removes the specified network from the BGP table.

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.

While selecting best route in BGP, the order of preferences are as below:

1. Weight - If multiple routes exist, the route with the highest weight is preferred.

2. Local preference - If multiple routes have the same weight, the route with the highest local preference is preferred.

3. Local router - If multiple routes have same local preference, prefer the route originated by the local router.

4. AS path - If multiple routes have the same local preference, prefer the route with shortest AS path.

The syntax for establishing neighbor relationship is:

router bgp 100

neighbor 175.23.1.2 remote-as 200

Also, it is important to know that the eBGP peers are directly connected while the iBGP peers are not.

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.

Path preference (attributes and best-path)

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.

Communities are basically labels that are attached to BGP routes. A few of these labels have pre-defined meanings. The well-known communities are:

Communities are basically labels that are attached to BGP routes. A few of these labels have pre-defined meanings. The well-known communities are:

NO_EXPORT: The NO_EXPORT community tells a router it should only propagate any prefixes this community is attached to over iBGP, and not propagate it over eBGP to external autonomous systems.

NO_ADVERTISE: NO_ADVERTISE Tells the router to not advertise the prefix over BGP at all. Most, if not all, routers automatically honor these communities when they're present. So if you want to overrule this behavior, you need to filter them out.

NO_EXPORT_SUBCONFED: NO_EXPORT_SUBCONFED does something similar to NO_EXPORT in networks using confederations to limit the number of iBGP sessions.

NOPEER: NOPEER was defined later and indicates that a prefix "need not" be advertised over peering relationships.

Many routers don't automatically propagate communities. On a Cisco router, you'll have to enable this explicitly for a BGP neighbor with the "send-community" keyword:

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, incremental updates are sent as the routing table changes. 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 due to routing information changes. Keepalive packets are sent to ensure that the connection is alive between the BGP peers and notification packets are sent in response to errors or special conditions.

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 20.0.0.0/8: ip prefix-list mylist1 permit 20.0.0.0/8

The following examples show how to specify a group of prefixes.

To accept a mask length of up to 24 bits in routes with the prefix 192/8: ip prefix-list mylist1 permit 192.0.0.0/8 le 24

To deny mask lengths greater than 25 bits in routes with a prefix of 192/8: ip prefix-list mylist1 deny 192.0.0.0/8 ge 25

Well-Known mandatory attributes must appear in all BGP update messages. The well-known mandatory messages are:

1. AS_PATH : BGP messages carry the sequence of AS numbers indicating the complete path a message has traversed.

2. NEXT_HOP : This attribute indicates the IP address of the next-hop destination router.

3. ORIGIN : This attribute tells the receiving BGP router, the BGP type of the original source of the NLRI information.

Given are :

AS number : 100
Peer group name : mygroup
The basic commands required are :
!
router bgp 100
neighbor mygroup peer-group
!

1. A BGP peer group is useful to decrease the overhead of configuring policies on all individual BGP neighbors in an AS. When a peer group is created, policies are assigned to the peer group name and not to the individual neighbors.

2. Update policies are normally set by route maps, distribution lists, and filter lists.

3. Members of the peer group can be configured to override the configuration options for incoming updates, but not to the outgoing updates.

The "hello" packets are sent periodically out of each interface using IP multicast addresses. The hello interval specifies the frequency in seconds that a router sends hello's. This is 10 seconds on multi access networks.

When a route reflector in a BGP AS  receives an update, it takes the following actions, depending on the type of peer that sent the update:

1. If the update is from a non-client peer : It sends the update to all clients in the cluster.

2. If the update is from a client peer: It sends the update to all nonclient peers and to all client peers.

3. If the update is from eBGP peer: It sends the update to all nonclient peers and to all client peers.

External BGP (eBGP): 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).

Show ip bgp: Displays entries in the BGP routing table for one network prefix or the entire BGP routing table.

Syntax: show ip bgp [prefix-length]

prefix-length: Display BGP information for a single network prefix.

Description: Use the show ip bgp command to display entries in the BGP routing table. It will also displays the Metric, LocPrf, Weight, and Path attribute values for each route.

Use the prefix-length keyword to display information for a single network prefix.

Show ip bgp summary: The show ip bgp summary command is used to display BGP path, prefix, and attribute information for all connections to BGP neighbors.

A prefix is an IP address and network mask. It can represent an entire network, a subset of a network, or a single host route. A path is a route to a given destination. By default, BGP will install only a single path for each destination. If multipath routes are configured, BGP will install a path entry for each multipath route, and only one multipath route will be marked as the bestpath.

Show ip route bgp: Typical output of this command is given below:

R1# show ip route bgp
128.13.0.0/24 is subnetted, 1 subnets
B 128.13.16.0 [20/0] via 10.10.10.2, 00:09:32
B 130.130.0.0/16 [20/0] via 10.10.10.2, 02:48:46

The administrative distance (20) is shown in the command output along with the route information and the up-time.

Few recommended scenarios, where you use BGP are:

1. Connect two or more ISPs

2. The traffic flow out of your network need to be managed to suit the requirements of your organization.

3.The traffic need to be sent through one AS to get to another AS.

Given below is the list of BGP attributes and their significance:

1. AS path - An ordered list of all the autonomous systems through which this update has passed. Well-known, mandatory.

2. Origin - How BGP learned of this network. i = by network command, e = from EGP, ? = redistributed from other source. Well-known, mandatory.

3. Local Preference - A value telling IBGP peers which path to select for traffic leaving the AS. Default value is 100. Well-known, discretionary.

4. Multi-Exit Discriminator (MED) - Suggests to a neighboring autonomous system which of multiple paths to select for traffic bound into your autonomous system. Lowest MED is preferred. Optional, non-transitive.

5. Weight - Cisco proprietary, to tell a router which of multiple local paths to select for traffic leaving the AS. Highest weight is preferred. Only has local significance.

Prefix lists (filtering)  are available only in Cisco IOS versions 12.0 and later. The following are important characteristics of Prefix lists:

1. These are used for filtering BGP routing updates, so that certain path policy is applied.

2. Prefix lists doesn't put as much load on the processor as that of Access lists.

3. Prefix lists are easier to configure and implement.

4. These are read one line at a time as that of Access lists.

There is an implicit deny all at the bottom of the Prefix list. One exception is that, if the prefix list is empty, there will be an implicit permit any!

The statement with smallest sequence numbers are read first.

MED (Multi_EXIT_DESCRIMINATOR) attribute is an optional non-transitive attribute that is used by BGP to inform the neighboring AS which link to use to receive traffic.

The output is that of "show ip bgp summary". It contains the following among other details:

1. BGP router identifier: Router identifier specified by the bgp router-id command, loop back address, or lowest IP address.

2. BGP table version: Internal version number of BGP database.

3. Main routing table version: Last version of BGP database that was injected into main routing table.

4. Neighbor: IP address of a neighbor.

5. V: BGP version number spoken to that neighbor.

6. AS: Autonomous system.

To specify the networks to be advertised by the Border Gateway Protocol (BGP) use the network command -"network network-number [mask network-mask]"

To remove an entry, use the no form of this command -"no network network-number [mask network-mask]"

1. Prefer the path with the highest WEIGHT. Note that WEIGHT is a Cisco-specific parameter. It is local to the router on which it is configured.

2. Prefer the path with the highest LOCAL_PREF. Note that a path without LOCAL_PREF is considered to have had the value set with the bgp default value of 100.

3. Prefer the path that was locally originated via a network or aggregate BGP subcommand or through redistribution from an IGP.

4. Local paths that are sourced by the network or redistribute commands are preferred over local aggregates that are sourced by the aggregate-address command.

5. Prefer the path with the shortest AS_PATH.

6. Prefer the path with the lowest origin type. Among the paths, note that,  IGP is lower than Exterior Gateway Protocol (EGP), and EGP is lower than INCOMPLETE.

7. Prefer the path with the lowest Multi Exit Discriminator (MED).

Prefer eBGP over iBGP paths.

IBGP works a little different from EBGP. There are a set of rules that apply to IBGP implementation which make IBGP different from EBGP.

1.Routes learnt from One IBGP Peer cannot be advertised to another IBGP Peer.

2 Rule of Synchronization: For A Route to be learnt from an IBGP neighbor, it must first be known via an IGP. Any route learnt from IBGP is entered into the routing table only if that route is first learnt by an IGP. In iBGP, the routes learnt from one iBGP neighbor are not advertised to another iBGP neighbor due to the BGP Split Horizon Rule. To overcome the issues generated by this rule, one option is to have a full mesh of iBGP routers, where each iBGP router is peering directly with all other iBGP routers in the AS. The solution is feasible if you have a small number of iBGP routers, but it will not scale if you need a large number of iBGP speaking routers in the AS.

The number of iBGP Sessions needed in an AS for Full mesh IBGP are calculated with the formula N(N-1)/2.

So assuming you have 10 iBGP routers then the number of iBGP peering sessions would be

10(10-1)/2 = 45 iBGP Sessions to manage within the AS. Thats a lot of configuration and a lot of room for errors and may become difficult to troubleshoot.

Route Reflectors and Confiderations are used as alternative mechanisms to address this problem:

1. Route Reflectors

2. Confederations

To configure a fixed router ID for a BGP-speaking router, use the bgp router-id router configuration command.

bgp router-id {ip-address}

By default, The router ID is set to the IP address of a loop back interface if one is configured. If no virtual interfaces are configured, the highest IP address is configured for a physical interface on that router. Note that peering sessions will be reset if the router ID is changed

It is true that, if Prefix lists are applied for filtering BGP updates, a route is advertised when prefix is permitted. A route is not advertised when the prefix is not permitted.

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.

Various debug commands useful in troubleshooting bgp are:

1. Debug ip bgp events: Displays all bgp events as they occur.

2. Debug ip bgp dampening: Displays bgp dampening events as they occur.

3. Debug ip bgp keepalives: Displays all events related to bgp keepalive packets.

4. Debug ip bgp updates: Displays information on all bgp update packets.

Well-known mandatory attributes: These attributes must be included in all UPDATE messages of BGP.

Well-known discretionary: These attributes may be included in a route description, but not mandatory.

Optional transitive: AGGREGATOR and COMMUNITIES are the optional transitive attributes.

Optional non-transitive: These attributes are used in many private BGP enabled networks.

You can increase the AS-PATH length by adding dummy AS numbers.

The route map configuration command: set as-path prepend 100

causes a router to prepend 100 once to the value of the AS_path attribute before it sends updates to the specified neighbor.

If you want to prepend 100 twice, use the command : set as-path prepend 100 100

Effectively, this will increase the AS-PATH length in the updates being sent to the neighbor and therefore the path selection.

You can delete a prefix list that was configured earlier on a BGP speaking router by using the command "no ip prefix-list" followed by the list name.

To disable automatic summarization of subnet routes into network level routes use the command : no auto-summary

To enable automatic summarization of subnet routes into network level routes use the command : auto-summary

Note that by default, auto-summary is enabled.

1. Distribute lists: To restrict the routing information that the router learns or advertises, you can filter based on routing updates to or from a particular neighbor. The filter consists of an access list that is applied to updates to or from a neighbor.

2. AS_Path filtering: Here, you specify an access list on both incoming and outgoing updates based on the value of the AS_path attribute.

3. Route Map Filtering: Here, the "neighbor route-map" router configuration command is used to apply a route map to incoming and outgoing routes.

4. Community Filtering: You can filter by setting the community attribute on router updates.

iBGP runs between routers of the same AS, where as eBGP runs between the routers belonging to distinct ASs.

Previous   Contents   Next


CCNP ENARSI Cram Notes Contents
certexams ad

simulationexams ad