• Aucun résultat trouvé

Route Processing

Dans le document CCIE Routing and Switching v4.0 (Page 82-87)

All routes received after the neighbor establishment are saved in memory. If more than one way to reach a

destination exists, the best is selected. Use the show ip bgp command to view all the routing information received

© 2011 Cisco Systems Inc. All rights reserved. This publication is protected by copyright. Please see page 245 for more details.

The best route selection criteria occurs in this order:

n Exclude any route with inaccessible next hop

n Prefer highest weight (local to router)

n Prefer highest local preference (global within AS)

n Prefer routes that the router originated

n Prefer shortest AS paths (compare length only)

n Prefer lowest origin code (IGP < EGP < Incomplete)

n Prefer lowest Multiexit Discriminator (MED)

n Prefer external paths over internal BGP (iBGP) paths

n For iBGP paths, prefer path through closest IGP neighbor

n For external BGP (eBGP) paths, prefer the oldest path

n Prefer paths from router with lower BGP router ID

The best routes (valid and reachable) are propagated to BGP neighbors.

The best BGP routes are copied into the IP routing table after the router checks administrative distance values.

The BGP process injects local routes in two different ways:

n Using the network configuration commands. This command lists networks that are candidates if they ap-pear in the routing table.

n Using redistribution by another routing protocol.

Route Summarization

Automatic classful summarization is enabled by default. When you disable automatic summarization, the routes introduced locally into the BGP table are not summarized.

Internal BGP (IBGP) Versus External BGP (EBGP)

BGP operates by establishing peer relationships with other BGP routers in either an external (eBGP) or internal (iBGP) manner. Internal BGP peers are those that share the same AS (AS) number. By contrast, external BGP peers are those which do not share the same AS number. Although these are minor configuration differences, they are handled in different ways:

1. Packets sent to eBGP peers use a TTL of 1.

2. The next-hop field is updated with the last eBGP peer. It is not updated when iBGP is used.

3. eBGP neighbors do not advertise routes to eBGP neighbors in a AS that is contained with in the AS_PATH.

4. iBGP routes have an AD of 200; eBGP routes have an AD of 20.

5. iBGP routes are subject to BGP synchronization (if enabled).

BGP synchronization is the major difference between eBGP and iBGP routes and is characterized by the BGP synchronization rule:

For an iBGP route to be added to the BGP table, the exact prefix must be in the routing table from an IGP.

The synchronization rule is a method that guarantees that a route is known to all routers within the AS even if they are not running BGP. If a route is advertised via iBGP and a non-BGP router sits logically between the BGP peers, the non-BGP router will black hole the traffic because the destination is not known via IGP first. The synchronization check can be turned off (and is by default as of IOS version 12.2(8)T) with the router configuration command:

Router(config-router)# no synchronization

© 2011 Cisco Systems Inc. All rights reserved. This publication is protected by copyright. Please see page 245 for more details.

If disabled, it must be guaranteed that a routing black hole exists within the AS by creating a full-mesh iBGP network or using a BGP tool such as route reflectors or confederations.

BGP Basic Configuration

To start BGP on your router, use the following global configuration command:

router bgp as-number

A public AS number can be obtained from the appropriate agency, or a private AS number is possible in some situations (64,512 to 65,535). Only one BGP process is permitted per router.

To configure your BGP neighbors, use the following router configuration commands:

neighbor ip-address remote-as as-number

neighbor ip-address description neighbor description

To temporarily disable a neighborship, use the following router configuration command:

neighbor ip-address shutdown

To configure MD5 authentication between neighbors, use the following router configuration command. Keep in mind the password string must match on both routers.

neighbor ip-address password string

Announcing Networks

To disable automatic summarization, use the following router configuration command:

no auto-summary

To manually define a network for advertisement by BGP, use the following router configuration command:

network network-number [mask network-mask]

If you use this command and auto-summarization is on (the default behavior), at least one of the subnets must be present in the forwarding table for the major network prefix to be advertised. If auto-summarization is disabled, an exact match is required in the forwarding table. You can use the mask keyword to specify a specific subnet with the network command.

If you would like to modify attributes before inserting prefixes into the BGP table, you can use a route map in the network command in router configuration mode:

network network-number [mask network-mask] [route-map map-tag]

This option might be used for one or more of the following:

n Change the weight of a locally sourced route.

n Manipulate source routes with BGP communities.

n Set the local preference.

n Change the value of the MED.

To advertise routes based on route redistribution, examine the following sample command syntax:

Router(config)# router bgp 64500

Router(config-router)# redistribute ospf 1

Router(config-router)# distribute-list prefix MY_PREFIX_LIST out

One caveat here is that the routes have an origin code of unknown. This makes them seem inferior to other routes per the BGP route-selection process. Notice the optional use of the distribute list syntax to suppress certain networks from being advertised in updates.

Redistribution can be configured with a route map to reset the origin code or set other attributes. Here is an example:

Router(config)# router bgp 64500

Router(config-router)# redistribute ospf 1 route-map MY_ROUTE_MAP

© 2011 Cisco Systems Inc. All rights reserved. This publication is protected by copyright. Please see page 245 for more details.

Classless BGP

To manually announce a classless prefix, be sure to use the following router configuration command:

= network ip-prefix-address mask subnet-mask

You should also consider creating a static route pointing to null0 to create a matching prefix in the IP forwarding table to ensure the subnet is advertised.

Aggregation in BGP

Use the following router configuration command to configure route summarization to suppress the advertising of individual networks. Remember, at least one network of the summarized space must exist in the BGP table:

aggregate-address address-prefix mask summary-only

Dans le document CCIE Routing and Switching v4.0 (Page 82-87)