56
Chapter 40 Border Gateway Protocol version 4 (BGP-4) Introduction ................................................................................................. 40-3 Overview of BGP-4 ...................................................................................... 40-3 BGP Operation ............................................................................................. 40-4 BGP States ............................................................................................ 40-5 BGP Messages ....................................................................................... 40-6 BGP Attributes ...................................................................................... 40-7 BGP Route Selection .............................................................................. 40-8 Classless Inter-domain Routing (CIDR) and Aggregation ......................... 40-9 BGP Multi-homing ..................................................................................... 40-10 BGP Route Filtering .................................................................................... 40-12 AS Path Filtering .................................................................................. 40-12 Community Filtering ............................................................................ 40-14 Route Map Filtering ............................................................................. 40-14 Network Prefix Filtering ....................................................................... 40-15 AS Confederations ..................................................................................... 40-15 Configuring BGP ........................................................................................ 40-16 Configuration Example .............................................................................. 40-20 Example One ....................................................................................... 40-20 Example Two ....................................................................................... 40-22 Example Three ..................................................................................... 40-23 Example Four ...................................................................................... 40-23 Example Five ....................................................................................... 40-23 Example Six ......................................................................................... 40-24 Example Seven .................................................................................... 40-24 Example Eight ..................................................................................... 40-25 Example Nine ...................................................................................... 40-25 Command Reference ................................................................................. 40-26 ADD BGP AGGREGATE ........................................................................ 40-26 ADD BGP CONFEDERATIONPEER ......................................................... 40-27 ADD BGP IMPORT ............................................................................... 40-28 ADD BGP NETWORK ........................................................................... 40-29 ADD BGP PEER .................................................................................... 40-30 DELETE BGP AGGREGATE .................................................................... 40-33 DELETE BGP CONFEDERATIONPEER ..................................................... 40-34 DELETE BGP IMPORT ........................................................................... 40-34 DELETE BGP NETWORK ....................................................................... 40-35 DELETE BGP PEER ................................................................................ 40-36 DISABLE BGP DEBUG ........................................................................... 40-36 DISABLE BGP PEER .............................................................................. 40-37 ENABLE BGP DEBUG ........................................................................... 40-37 ENABLE BGP PEER ............................................................................... 40-38 RESET BGP PEER .................................................................................. 40-39

bgp-4

Embed Size (px)

DESCRIPTION

BGP

Citation preview

Chapter 40

Border Gateway Protocol version 4(BGP-4)

Introduction ................................................................................................. 40-3Overview of BGP-4 ...................................................................................... 40-3BGP Operation ............................................................................................. 40-4

BGP States ............................................................................................ 40-5BGP Messages ....................................................................................... 40-6BGP Attributes ...................................................................................... 40-7BGP Route Selection .............................................................................. 40-8Classless Inter-domain Routing (CIDR) and Aggregation ......................... 40-9

BGP Multi-homing ..................................................................................... 40-10BGP Route Filtering .................................................................................... 40-12

AS Path Filtering .................................................................................. 40-12Community Filtering ............................................................................ 40-14Route Map Filtering ............................................................................. 40-14Network Prefix Filtering ....................................................................... 40-15

AS Confederations ..................................................................................... 40-15Configuring BGP ........................................................................................ 40-16Configuration Example .............................................................................. 40-20

Example One ....................................................................................... 40-20Example Two ....................................................................................... 40-22Example Three ..................................................................................... 40-23Example Four ...................................................................................... 40-23Example Five ....................................................................................... 40-23Example Six ......................................................................................... 40-24Example Seven .................................................................................... 40-24Example Eight ..................................................................................... 40-25Example Nine ...................................................................................... 40-25

Command Reference ................................................................................. 40-26ADD BGP AGGREGATE ........................................................................ 40-26ADD BGP CONFEDERATIONPEER ......................................................... 40-27ADD BGP IMPORT ............................................................................... 40-28ADD BGP NETWORK ........................................................................... 40-29ADD BGP PEER .................................................................................... 40-30DELETE BGP AGGREGATE .................................................................... 40-33DELETE BGP CONFEDERATIONPEER ..................................................... 40-34DELETE BGP IMPORT ........................................................................... 40-34DELETE BGP NETWORK ....................................................................... 40-35DELETE BGP PEER ................................................................................ 40-36DISABLE BGP DEBUG ........................................................................... 40-36DISABLE BGP PEER .............................................................................. 40-37ENABLE BGP DEBUG ........................................................................... 40-37ENABLE BGP PEER ............................................................................... 40-38RESET BGP PEER .................................................................................. 40-39

40-2 AR Series Router Software Reference

SET BGP .............................................................................................. 40-40SET BGP AGGREGATE ......................................................................... 40-41SET BGP IMPORT ................................................................................. 40-42SET BGP PEER ...................................................................................... 40-43SHOW BGP ......................................................................................... 40-46SHOW BGP AGGREGATE ..................................................................... 40-47SHOW BGP CONFEDERATION .............................................................. 40-48SHOW BGP IMPORT ............................................................................ 40-49SHOW BGP NETWORK ........................................................................ 40-50SHOW BGP PEER ................................................................................. 40-51SHOW BGP ROUTE .............................................................................. 40-54

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) 40-3

Introduction

This chapter describes the Border Gateway Protocol version 4, (BGP-4), support for BGP-4, and how to configure the router to use BGP-4 as a routing protocol.

BGP4 will only run on hardware with 16 MB or more of RAM, and is used with IPv4. See the Hardware Reference for memory details.

Overview of BGP-4

The Border Gateway Protocol version 4 (BGP-4) is an external gateway protocol which allows two routers in different routing domains, known as Autonomous Systems (AS), to exchange routing information, thereby facilitating the forwarding of data across the border of the routing domains.

An Autonomous System is a set of routers under a single technical administration, which uses one or more internal gateway protocols (IGP) and one or more sets of common metrics to route packets within its own AS, and uses an external gateway protocol (EGP) to route packets to other ASs.

BGP allows routers to learn multiple paths, choose the best path for routing information and install that path in the IP routing table. BGP-4 is based on distance vector (DV) protocol algorithms, and uses TCP as its transport protocol on TCP port 179.

When BGP is used as an external gateway protocol to exchange routing information across AS borders, it is known as External BGP (EBGP). EBGP connections are established between BGP speakers which have different AS numbers. A BGP speaker is any host which can use BGP to exchange routing information with another BGP-capable host. A BGP speaker does not necessarily have to be a router, it could be a host which passes routes learned by BGP to a router via another means, such as RIP.

A speaker may advertise any routes it knows about to any other speaker over an EBGP connection, as long as the speaker being advertised to has a different AS number to that of the speaker advertising.

The routes advertised over an EBGP connection can be learned by any means, e.g. by IGP, by EGP or by static assignment. Figure 40-1 on page 40-4 shows the use of IBGP and EBGP.

When BGP is used as an internal gateway protocol to transfer routing information within an AS, it is known as an Internal BGP (IBGP). IBGP connections are established between BGP speakers which all have the same AS number.

In order for a speaker within an AS to learn the routes known by all the other speakers in the AS, all speakers must have an IBGP connection to all the other speakers in the AS. This is because a speaker cannot advertise routes learned over an IBGP connection to a speaker over another IBGP connection. However, a speaker can advertise routes learned from other means (e.g. RIP, OSPF) to another speaker over an IBGP connection. A speaker can also advertise routes

Software Release 2.3.1C613-03038-00 REV A

40-4 AR Series Router Software Reference

learned from an IBGP connection to another speaker over an EBGP connection. An AS with only one BGP speaker and a single external BGP connection is referred to as a stub AS.

Figure 40-1: Example of the use of IBGP and EBGP.

BGP Operation

BGP is a protocol which is utilised between two BGP speakers. The two routers become BGP peers via the establishment of a TCP connection, on Port 179, between themselves. The communication flow necessary to establish a BGP session between peers is illustrated in Figure 40-2 on page 40-4.

Figure 40-2: Communication flow necessary to establish a BGP session.

AS1AS2

Router A

Router B

Router C

Router DIBGP

IBGP

EBGP

Router A Rotuer B

Establish a TCP connection on TCP port 179

BGP Open Message sent simultaneously by both routersNow in OpenSent state

Now in OpenConfirm state

Now in OpenSent state

Now in OpenConfirm state

BGP Open Message received by both routers

If a router 'disagrees' with the contentsof the Open message it will send an errormessage and close the connection.

If both routers accept the Openmessage they send each other a Keep Alivemessage, move into the Established state and start sending Update messages to each other.

Error

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) 40-5

Once a TCP connection is established, BGP peers identify themselves to each other by simultaneously sending an Open message, and then move into the OpenSent state. When each router receives an Open message it moves into the OpenConfirm state and sends back a Keep Alive message. Each neighbour has the right to accept or refuse the connection. If one of the peers ‘disagrees’ with the contents of the Open message it will send an notification message and close the connection.

When both routers have received a Keep Alive signal they move into the Established state and start sending Update messages to each other. The BGP session is now open.

BGP sessions typically stay in the Established state most of the time. If an error occurs while a given BGP session is active, the router perceiving the error sends a notification message to its peer identifying the error, closes the TCP connection and moves into the Idle state. Each router must stop using routing information it heard from the other. If the connection between BGP peers is broken, the keep alive message and TCP connection time out and each router stops using the routing information it heard from the other.

BGP StatesBGP peers can be in any of five states as described in Table 40-1 on page 40-5. To see the state of a BGP peer, use the SHOW BGP PEER command on page 40-51.

Table 40-1: BGP peer states.

State Meaning

Idle This is the initial state. BGP refuses all incoming BGP connections and does not allocate any resources to peers.

Connect In this state, BGP is waiting for the TCP connection to be completed. If the connection is successful, BGP changes its state to OpenSent. If the connection is unsuccessful, BGP changes its state to active.

Active In this state, BGP tries to acquire a peer by initialising a TCP connection. If any other events are initiated, the local system releases all BGP resources associated with the connection and changes its state to idle.

OpenSent In this state, BGP is waiting for an Open message from its peer. When it receives one, it checks all the fields for correctness. If there are errors, it sends a notification message and changes its state to Idle. If there are no errors, a Keep Alive message is sent.

OpenConfirm In this state, BGP is waiting for a Keep Alive or Notification message. If the system receives a keep alive message, it changes its state to Established. If the system receives a notification message, it changes its state to Idle.

Established In this state, BGP can exchange update, notification and Keep Alive messages with its peer.

Software Release 2.3.1C613-03038-00 REV A

40-6 AR Series Router Software Reference

BGP MessagesOnce a TCP connection is established, the BGP peers are able to pass messages over that connection. There are four types of messages:

� Open messages

� Update messages

� Notification messages

� Keep Alive messages.

Open MessageThe open message opens a BGP session between peers. It is the first message sent by each router after a TCP connection is established. The open message allows each peer to identify itself to the other and agree on various protocol parameters, such as timers. Open messages are confirmed using a keep alive message sent by the peer device and must be confirmed before update messages can be exchanged.

Update MessageThe update message is used to transfer routing information between BGP speakers. The routing information contained within an update message consists of a list of one or more prefixes, and a set of attributes common to each of these prefixes (for a description of all the supported attributes see “BGP Attributes” on page 40-7). A prefix is the network portion of an IP address, in dotted decimal notation, optionally followed by a “/” character and a decimal number from 0 to 32. Each prefix contained within an update message represents a network that can be reached through the IP address given in the NextHop attribute contained in the same update message.

Update messages can either advertise routing information to, or withdraw routing information from a BGP speaker, and are the only means a BGP speaker has to provide the other speakers it is connected to with a consistent view of the networks it can route packets to.

Notification MessageNotifications are used to close an active session and to inform any connected routers of why the session is being closed.

A notification message is sent whenever an error condition is detected during a BGP session, or when the DISABLE BGP PEER command on page 40-37 command is executed. The TCP connection will be closed immediately after sending or receiving a notification message.

Keep Alive MessagesThe keep alive message is used by peers to check that the connection between them is still active. Keep alive messages are sent often enough to keep the session from expiring, timed between 1 and 21845 seconds. See the SHOW BGP PEER command on page 40-51 for information on the keep alive time.

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) 40-7

BGP AttributesAn important part of the BGP protocol operation are the attributes associated with prefixes. When a router advertises a prefix to its neighbour, a number of attributes are associated with that prefix. Attributes must be one of the following:

� Optional transitive

The attribute does not have to be recognised by all BGP speakers, but if the route contained in the update message containing the attribute is advertised to another speaker, the attribute must be passed on to this speaker.

� Optional non-transitiv

The attribute does not have to be recognised by all BGP speakers, and is not passed on to other BGP peers

� Well-known mandator

The attribute must be recognised by all BGP speakers and must be included in all update messages.

� Well-known discretionary

The attribute must be recognised by all BGP speakers but does not have to be included in every update message.

The standard path attributes are described briefly below.

� Origin

This is a mandatory transitive attribute which describes how a protocol came to be routed by BGP at the origin AS. Prefixes are learned from various sources such as directly connected interfaces, manually configured static routes, or dynamic internal or external routing protocols and then put into BGP.

Allowed values for the Origin attribute are IGP (such as RIP and OSPF), EGP (other EGPs) and INCOMPLETE (static routes or other means).

� AS-Path

This is a mandatory transitive attribute which contains the ASs through which the announcement for the prefix has passed. As prefixes pass between ASs each AS adds its Autonomous System Number (ASN), so the AS-Path can be used to make routing decisions. An ASN is a globally unique number assigned to every AS on the internet, assigned and controlled by the IANA.

� Next-Hop

This is a mandatory transitive attribute which provides the address of the next node the router should send packets to in order to get the packets closer to the destination.

� Multi-Exit-Discriminator (MED)

This is an optional, non-transitive attribute which carries a metric expressing the optimal path to reach a particular prefix in or behind a particular AS. One AS will set the value and a different AS will use that value in deciding which path to chose.

� Local-Preference

The local-preference (local-pref) attribute is the metric used in IBGP so each host knows which path inside the AS it should use to reach the advertised prefix. EBGP peers do not send this value, and ignore it on receipt.

Software Release 2.3.1C613-03038-00 REV A

40-8 AR Series Router Software Reference

� Atomic-Aggregate

This non-transitive attribute allows BGP peers to inform each other about decisions they have made regarding overlapping routes. If Router A gets overlapping routes, and selects the less specific (more general route) only, then it attaches the Atomic-Aggregate attribute. When one of its neighbours receives a prefix with the Atomic-Aggregate attribute set, that neighbour must not take the prefix and de-aggregate it into any more specific entries in BGP.

� Aggregator

This is an optional, transitive attribute which can be attached to an aggregated prefix to specify the AS and router that performed the aggregation.

� Community

This is an optional, transitive attribute which BGP may use to control which routing information it accepts, prefers or distributes to other peers. A BGP speaker receiving a route that does not have the community attribute may append the attribute to the route when propagating it to its peers. A BGP speaker receiving a route with the community attribute may modify the attribute according to local policy.

BGP Route SelectionA major part of BGP, as with any routing protocol, is the route selection process. The route selection process involves selecting which paths toward a prefix, if any, should be selected and put into the forwarding table. All routes that have been learned and accepted by the local system can be selected.

If there is only one route toward a particular prefix, that is the route used. If there are multiple routes for a particular prefix, then the system uses the following rules to decide which route to use.

5. Selecting on LOCAL-PREF.

The route with the highest LOCAL-PREF is selected first. The value of the preference is calculated locally for routes learned via an EBGP session or for routes learned from sources such as an IGP or static configuration. The preference is learned from another router for routes learned from an IBGP peer - the UPDATE message for that route will contain a LOCAL-PREF attribute indicating the degree of preference.

If this step selects exactly one route, the process is complete. If this step does not select exactly one route, the system goes to the next step.

6. Selecting on Weight value.

The route with the higher weight value is preferred. This value does not allow routes to bypass any of the route filters or any parts of the decision process. If a route is selected by weight it can still be filtered out by the rest of the decision process.

Selection using the weight value can be applied to all routes matched by a particular routemap using the ADD IP ROUTEMAP command on page 8-84 of Chapter 8, Internet Protocol (IP).

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) 40-9

7. Selecting on AS-Path.

The route with the shortest AS path is selected. If this step selects exactly one route, the process is complete. If this step does not select exactly one route, the system goes to the next step.

8. Selecting on the Multi-Exit Discriminator value.

If the local system is configured to take into account the value of the MULTI-EXIT DISCRIMINATOR (MED), and if the multiple routes are learned from the same neighbouring AS, the route with the lowest MED value is selected. If this selects exactly one route, the process is complete. If this step does not select exactly one route, the system goes to the next step.

9. Selecting on the NEXT-HOP attribute.

In this step the system analyses the NEXT-HOP attribute of each of the routes. The system selects the route that has the minimum cost to the NEXT-HOP. Deciding on the cost for a NEXT-HOP involves looking into the IP route table. If this selects exactly one route, the process is complete. If this step does not select exactly one route, the system goes to the next step.

10. Selecting on routes learned via EBGP.

If all routes are learned via IBGP, the system goes to the next step. If exactly one route is learned via EBGP, that route is selected. If more than one route is learned via EBGP, then the route learned from the EBGP peer with the lowest BGP identifier is selected.

11. Selecting on routes learned via IBGP

If all routes are learned via IBGP, the route that was learned from the IBGP neighbour with the lowest BGP identifier is selected.

Classless Inter-domain Routing (CIDR) and AggregationInterfaces, static routes and routes learned via IGP (such as RIP and OSPF) can all have a specific classful subnet mask (Class A, B, C or D). BGP routes are however, classless, (whereby IP addresses are not part of a class) so that shorter route tables can be exchanged and the number of advertised routes (prefixes) is less. Figure 40-3 on page 40-9 shows an example of inter-domain routing without CIDR, and Figure 40-4 on page 40-10 shows an example of inter-domain routing with CIDR.

Figure 40-3: Inter-domain routing without CIDR.

ServiceProvider

Global InternetRouting Mesh

204.71.0.0

204.71.255.0

204.71.3.0

204.71.2.0

204.71.1.0

............

204.71.0.0

204.71.255.0

204.71.3.0204.71.2.0204.71.1.0

............

{

{{{{

Inter-domain routing without CIDR

Software Release 2.3.1C613-03038-00 REV A

40-10 AR Series Router Software Reference

Figure 40-4: Inter-domain routing with CIDR.

In Figure 40-3 on page 40-9, the service provider has many customers, all of them with Class C addresses that start with 204.71. The service provider announces each of the networks individually into the global Internet routing mesh. By routing with CIDR, as shown in Figure 40-4 on page 40-10, the service provider can aggregate the classful networks used by its customers into single classless advertisements, thus providing routing for hundreds of customers by announcing only one advertisement into the global Internet routing mesh.

CIDR also copes with overlapping routes/prefixes as the route with the longest match (greatest number of bits/more specific netmask), is always chosen first. As the prefix traverses Autonomous Systems, each AS adds its AS number to the AS path bits, in both the BGP attribute and also the source IP and next-hop address.

BGP Multi-homing

An AS may have multiple EBGP speakers connected to different ASs, this is known as BGP multi-homing. Multi-homing is used to improve reliability of the AS connection to the Internet, and improve network performance owing to the fact that the network’s bandwidth is the sum of all the circuits’ bandwidth. Network performance increases only when more than one connection is used at a time; otherwise maximum performance would be the bandwidth being used by one connection at a given time. An even split of traffic across multiple connections is called load balancing.

Sites can be multi-homed in either of two ways - multi-homed to a single Internet Service Provider (ISP) or Network Service Provider (NSP), or to more than one ISP or NSP.

Figure 40-5 on page 40-11 illustrates the most reliable multi-homing topology to a single ISP involving different routers in the ISP and different routers in the Customer network.

This example is the most reliable because no equipment is shared between the two links. If the amount of traffic going between the two networks is equal, the approach to load balancing would be to use the link between Router A and Router C for traffic going to 138.39/16 and use the link between Router B and Router D for traffic going to 204.70/16.

ServiceProvider

Global InternetRouting Mesh

Only advertise singleBGP route 204.71.0.0/16(16=Class B)

204.71.0.0

204.71.255.0

204.71.3.0

204.71.2.0

204.71.1.0

............

Inter-domain routing with CIDR

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) 40-11

Figure 40-5: Multi-homing to a single ISP.

Figure 40-6 on page 40-11 illustrates multi-homing to more than one provider. The Customer is multi-homed to ISP1 and ISP2; ISP1, ISP2 and ISP3 all connect to each other. The Customer has to decide how it will use address space, as this is critical for load balancing from the ISPs to the Customer, whether it will have it delegated to it by ISP1, ISP2, both or independently.

Figure 40-6: Multi-homing to more than one provider.

If the Customer uses the address space delegated to it by ISP1, the Customer will use a more-specific prefix out of ISP1s aggregate and ISP1 can announce only the aggregate to ISP2. If the Customer gets as much traffic from ISP1 as it gets from ISP2 and ISP3 put together, load balancing can be good. If ISP2 and ISP3 together send substantially more traffic than ISP1, load balancing can be poor. If the Customer uses the address space delegated to it by ISP2 it will do the same, although ISP1 will be the ISP to announce the more-specific route and attract traffic to it. load balancing may be quite good if ISP1s address space is used, but not very good if ISP2s space is used.

If the Customer uses the address space delegated to it by both ISP1 and ISP2, the degree of load balancing from ISP1 and ISP2 to the Customer depends on the amount of traffic destined for the two ISPs. If the amount of traffic for the two is about the same, load balancing towards the customer can be quite good, if not, load balancing can be poor.

Router A Router B

ISP

CustomerRouter DRouter C

138.39/16 204.70/16

ISP1 ISP2

ISP3

Customer

Software Release 2.3.1C613-03038-00 REV A

40-12 AR Series Router Software Reference

The option of the Customer getting its own address space from a registry rather than from either ISP1 or ISP2 will provide the most control but there will not be any aggregation. Aggregation is the combining of several different routes so that a single route can be advertised. This minimises the size of the routing table. The Customer needs address space that makes it through the route filters (see “BGP Route Filtering” on page 40-12), otherwise the Customer may end up having no connectivity. If the Customer gets address space that makes it through the route filters, there will need to be control over which provider uses which path to reach the Customer.

If ISP1 is the largest, it may want to reach the Customer via the ISP1-Customer link, but have ISP2 and ISP3 go through the ISP2-Customer link. If the path learned from ISP2 is shorter than the path learned from ISP1, ISP3 will use ISP2 to reach the Customer.

BGP Route Filtering

BGP route filtering is used to ensure that a network provider only uses and advertises the routing information that it is allowed to under the terms of the business relationships it has with the networks it connects to. A provider can apply filters to both the routing information it receives from, and advertises to the networks it connects to, thus ensuring complete control over the path any traffic originating from, or traversing its network takes to its destination.

By using route filtering, a provider can ensure that no traffic traverses its network which it does not have a business agreement with. The provider can also ensure that its own network traffic travels to its destination only by traversing networks which it has business agreements with.

BGP route information can be filtered in a number of ways including filtering by AS path, community, route map and network prefix. Each filtering method can be used to achieve the same result, though each method has a different level of coarseness. The finer the filtering, the more user configuration will be required to achieve the same result as a coarser method. In addition, the finer the filtering used, the longer it will take to process received routing information, the coarser the filtering used the faster it will process the information.

The finest grain filtering is the prefix filtering, followed by AS path filtering, with the coarsest filtering being community filtering. Routemap filtering is a way of applying AS path and community filtering to received and advertised routing information. It also provides a way of matching, then modifying, received or advertised routing information before it is utilised or forwarded.

AS Path FilteringThe AS path is a BGP attribute that describes the Autonomous Systems that routing information about a route has traversed. The attribute consists of a number of collections of AS numbers.

To filter BGP routing information based on the AS path, regular expressions are used. Path filtering will match an UPDATE message’s AS path attribute with the entries in the ASPATH LIST being used. The AS path attribute is turned into a string of AS numbers, separated by spaces. Each entry in an ASPATHLIST has an action and a regular expression. Regular expressions can

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) 40-13

be entered into AS path filters for matching with an AS path in the UPDATE message. The regular expression pattern is used by the ASPATHLIST filters to include or exclude the route information contained in an UPDATE message, which may contain a number of AS path segments, in its route selection process.

The regular expressions are based on industry standard regular expressions. Numbers entered in the regular expression are matched against the whole AS number. Thus a regular expression “1” will match AS 1, but not any other AS number containing a “1” (e.g. AS 12). The regular expression tokens supported in BGP-4 AS path filtering are given in Table 40-2 on page 40-13.

The regular expressions supported by this version of BGP-4 are a subset of the total number of traditional regular expressions available.

AS path regular expressions can contain spaces. Therefore, each regular expression used must be enclosed in double quotes, (e.g. SH BGP ROUTE REGEXP=”^32 *23”). Otherwise, any information entered after the space is handled as a new command option.

Examples of AS path regular expressions include:

� ^$

matches an empty AS path list.

� ^123$

matches an AS path list with a single AS number, 123.

� 123

matches any AS path list including AS 123 (but not 1234, 12345, 5123 etc).

� .*

matches all AS path lists.

� ^123

matches AS path lists with AS 123 and the first AS

AS path filters are added with the command ADD IP ASPATHLIST command on page 8-60 of Chapter 8, Internet Protocol (IP). This adds a single entry to a given AS path filter. There are 99 possible AS path filters, numbered 1 to 99.

Table 40-2: AS path regular expressions.

Token Meaning

^ Matches the start of the AS path list.

$ Matches the end of the AS path list.

<space> Used to separate AS numbers in an AS path list.

<AS number> Matches the identical AS numbers in the list (0-65534).

* Matches zero or more repetitions of the preceeding token in the AS list being filtered.

+ Matches one or more repetitions of the preceeding token in the AS list being filtered.

. Matches any AS number.

Software Release 2.3.1C613-03038-00 REV A

40-14 AR Series Router Software Reference

Each entry in an AS path filter contains a single regular expression and an action, INCLUDE or EXCLUDE.

An INCLUDE action specifies an AS path regular expression which causes routes which match the regular expression to be included in the filter or route map which is referencing the AS path list. An EXCLUDE action specifies an AS path regular expression which causes routes which match the regular expression to be excluded in the filter or route map which is referencing the AS path list.

The router compares the AS path list with each entry in the AS path filter until a match is found or the end of the list is reached. The action, (INCLUDE or EXCLUDE), and whether a match was made are passed back to the invoking router.

An AS path filter with no entries in it is compared with a filter that matches any AS path list and has the action INCLUDE. Each non-empty AS path list has an implicit entry appended to it which matches any AS path list and has the action EXLUDE.

The ADD BGP PEER command on page 40-30 and the SET BGP PEER command on page 40-43 provide information on the filtering parameters.

Community FilteringA community is a group of destinations which share some common property. By default, all destinations belong to the general Internet community.

A community filter is a list of entries, each of which contains up to 10 communities and an action (INCLUDE or EXCLUDE). A BGP speaker may use this filter to control which routing information it accepts, prefers or distributes to other peers.

Community filtering will match an UPDATE message’s community attribute list against the communities in entries of the COMMUNITYLIST being used if the EXACT parameter is set to YES. If the EXACT parameter is set to NO, a match may be made without having to be an exact match.

If every community in the community entry matches with a community in the UPDATE message’s community field, the entry’s action (either INCLUDE or EXCLUDE) is used and no more matching is performed.

Route Map FilteringRoute maps provide another means of applying AS path and community filters to received or advertised routing information, and are able to combine INCLUDE or EXCLUDE actions to achieve more complex filtering than can be achieved with just AS path or prefix filtering. Route maps also provide the ability to use AS path and community filters to match, then modify, the attributes of received or advertised routing information.

Route map filters filter and modify the attributes of an UPDATE message. A route map entry can only filter by either AS path attribute or community (see “AS Path Filtering” on page 40-12, and “Community Filtering” on page 40-14).

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) 40-15

If a route map entry generates a match with an UPDATE message, it can set the UPDATE message attributes to the values it is configured to set them to. Route maps can do the following.

� Add up to 10 AS numbers to the beginning of the AS path attribute.

� Replace the community attribute with another of up to 10 entries or add up to 10 communities to the community attribute.

� Change the LOCAL_PREF to another value.

� Change the WEIGHT attribute to another value.

� Change the MED attribute to another value.

� Change the ORIGIN attribute to another value.

If a route map entry generates a match then it returns the action associated with the entry and does not process the rest of the entries in the route map.

Every route map has a default entry which matches all routes with an action of INCLUDE, so if none of the entries in a route map generate a match with an UPDATE message, then it will be included by default.

Network Prefix FilteringPrefix filtering will match an UPDATE message’s Network Layer Reachability Information (NRLI) and withdrawn routes field entries against the SOURCE and SMASK fields in the entries of the IP filter being used. The NRLI specifies the networks that the NEXT_HOP being advertised can reach. This enables a BGP speaker to be configured to accept only routes for particular networks from a particular peer. It also enables a BGP speaker to be configured so that only routes for particular networks are sent to a particular peer. This means that subsets of routes that have originated from or traversed a particular AS (or list of ASs) can be received or transmitted. This is not possible with AS path filtering.

See ADD IP ROUTEMAP command on page 8-84 of Chapter 8, Internet Protocol (IP), the ADD BGP PEER command on page 40-30 and the SET BGP PEER command on page 40-43 for more information on the filtering parameters.

The ADD BGP PEER command on page 40-30 and the SET BGP PEER command on page 40-43 provide information on the filtering parameters.

AS Confederations

An AS confederation is a collection of autonomous systems advertised as a single AS number to BGP speakers that are not members of the confederation. The Autonomous Systems communicate between themselves using Confederation BGP (CBGP). AS confederations are used to subdivide autonomous systems with a very large number of BGP speakers to control routing policy. Figure 40-7 on page 40-16 illustrates an example of an AS confederation.

Software Release 2.3.1C613-03038-00 REV A

40-16 AR Series Router Software Reference

Figure 40-7: Example of an AS confederation.

In Figure 40-7 on page 40-16, AS1 has been split into several sub-ASs (AS10-AS14). The original AS does not look any different to Router 2 which is outside the confederation, it still sees AS1 rather than AS10-AS14. This implies routers within the confederation are configured with an AS number for the confederation (e.g. AS1), and an AS member number, an AS number visible only to those members within the confederation (e.g. AS10).

Splitting a large AS into several smaller ASs allows a significant reduction in the number of intra-domain BGP connections. Unfortunately, splitting an AS may increase the complexity of routing policy based on AS path information for all members on the Internet. It also increases the maintenance overhead of coordinating external peering when the internal topology of this collection of ASs is modified.

Dividing an AS may unnecessarily increase the length of the sequence portions of the AS path attribute, and may adversely affect optimal routing of packets through the Internet.

Configuring BGP

The commands and examples listed below are the basic commands used to configure BGP peers.

To add a BGP peer, use the command:

ADD BGP PEER=ipadd REMOTEAS=1..65534 [AUTHENTICATION={NONE|RFC2385}] [CONNECTRETRY={DEFAULT|0..4294967295}] [DESCRIPTION[=description]] [EHOPS={DEFAULT|1..255}] [HOLDTIME={DEFAULT|0|3..65535}] [INFILTER={NONE|300..399}] [INPATHFILTER={NONE|1..99}] [INROUTEMAP[=routemap]] [KEEPALIVE={DEFAULT|1..21845}] [MAXPREFIX={OFF|1..4294967295}] [MAXPREFIXACTION={WARNING|TERMINATE}] [MINASORIGINATED={DEFAULT|0..3600}] [MINROUTEADVERT={DEFAULT|0..3600}] [NEXTHOPSELF={NO|YES}] [OUTFILTER={NONE|300..399}] [OUTPATHFILTER={NONE|1..99}] [OUTROUTEMAP[=routemap]] [PASSWORD[=password]] [SENDCOMMUNITY={NO|YES}]

R2

R1

10

1114

1312

AS2

AS1AS Confederation

Sub-AS

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) 40-17

This command adds a BGP peer in the disabled state. The router will not attempt to begin communicating with the peer until the ENABLE BGP PEER command on page 40-38 is entered. This allows full configuration of the peer entry before starting to communicate with it.

There is a limit of 64 configurable peers.

To add a BGP peer whose IP address is 192.168.1.1 and whose AS number is 54321, use the command:

ADD BGP PEER=192.168.1.1 REMOTEAS=54321 DESCRIPTION="test remote BGP peer"

To enable all BGP peers use the command:

ENABLE BGP PEER=ALL

To disable all BGP peers, use the command:

DISABLE BGP PEER=ALL

Once a BGP peer has been disabled it can be deleted from the router. To delete a peer whose IP address is 192.168.1.1, use the command:

DELETE BGP PEER=192.168.1.1

The peer must be an existing BGP peer on this router.

To modify parameters for an existing BGP peer in the router, first disable the BGP peer on the router, then modify the BGP peer using the command below, then enable the BGP peer.

SET BGP PEER=ipadd [AUTHENTICATION={NONE|RFC2385}] [CONNECTRETRY={DEFAULT|0..4294967295}] [DESCRIPTION[=description]] [EHOPS={DEFAULT|1..255}] [HOLDTIME={DEFAULT|0|3..65535}] [INFILTER={NONE|300..399}] [INPATHFILTER={NONE|1..99}] [INROUTEMAP[=routemap]] [KEEPALIVE={DEFAULT|1..21845}] [MAXPREFIX={OFF|1..4294967295}] [MAXPREFIXACTION={WARNING|TERMINATE}] [MINASORIGINATED={DEFAULT|0..3600}] [MINROUTEADVERT={DEFAULT|0..3600}] [NEXTHOPSELF={NO|YES}] [OUTFILTER={NONE|300..399}] [OUTPATHFILTER={NONE|1..99}] [OUTROUTEMAP[=routemap]] [PASSWORD[=password]][REMOTEAS=1..65534] [SENDCOMMUNITY={NO|YES}]

to modify parameters for an existing BGP peer in the router, first disable the BGP peer on the router, then modify the BGP peer, then enable the BGP peer.

To show summary information about all BGP peers use the command:

SHOW BGP PEER

This will produce the following output.

Software Release 2.3.1C613-03038-00 REV A

40-18 AR Series Router Software Reference

Figure 40-8: Example Output from the SHOW BGP PEER command.

Table 40-3: Parameters in the output of the SHOW BGP PEER command.

To show detailed information for the BGP peer 192.168.2.254, use the command:

SHOW BGP PEER=192.168.2.254

This will produce the following output.

Figure 40-9: Example output from the SHOW BGP PEER command for a specified peer.

BGP peer entries

Peer State AS InMsg OutMsg-------------------------------------------------------------192.168.2.254 Estab 12345 23456 3245192.168.3.16 Idle(D) 123 2 3

Parameter Meaning

Peer The IP address of the BGP peer.

State The BGP peer state; one of "Idle", "Idle(D)", "Connect", "Active" "OpenSent", "OpenConf" and "Estab". "Idle(D)" indicates that the peer is idle and also disabled.

AS The number of the autonomous system to which this peer belongs.

InMsg The number of messages received from this peer since the TCP connection opened.

OutMsg The number of messages sent to this peer since the TCP connection opened.

Peer ................ 192.168.2.254Description ......... Sprint’s AS 12345State ............... EstablishedRemote AS ........... 12345 Authentication ...... RFC2385 Password ............ jnhdfyeh4nbf84hgf83hjfjfurh4ufConnect Retry ....... 200s Hold time ........... 90s (actual 0s) Keep alive .......... 30s (actual 0s - no KEEPALIVES) Min AS originated ... 20s Min route advert .... 40s Filtering In filter ......... - In path filter .... - In route map ...... - Out filter ........ 334 Out path filter ... - Out route map ..... -Max prefix .......... 2000 (action is WARNING) External hops ....... 5 (EBGP multihop enabled)Next hop self ....... No Send community ...... NoMessages In/Out ..... 23456/3245Debugging ........... -Device .............. -

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) 40-19

Table 40-4: Parameters in the output from the SHOW BGP PEER command for a specified peer.

Parameter Meaning

Peer The IP address of the BGP peer.

Description The description set for this BGP peer.

State The BGP peer state; one of "Idle", "Idle(D)", "Connect", "Active" "OpenSent", "OpenConfirm" and "Established". "Idle(D)" indicates that the peer is idle and also disabled.

Remote AS The number of the autonomous system to which this peer belongs.

Authentication The authentication type used for communication with this BGP peer; one of "None" or "RFC2385".

Password The password for this peer, if the authentication type is not "None".

Connect Retry The time interval for retrying the initial TCP connection to this peer in the event of a connection failure.

Hold time The configured and actual hold times for this peer. The actual hold time is the lower of the configured hold times of the peer and this router.

Keep alive The configured and actual keep alive times for this peer. The actual keep alive time is set by the actual hold time in such a way that the ratio of actual keep alive to hold time is the same as the ratio of configured keep alive to hold time.

Min AS originated

The minimum time between advertisements of routes which originate in this autonomous system.

Min route advert The minimum time between advertisements of routes which originate outside this autonomous system.

Filtering Settings for inward and outward filtering of routing information via BGP.

In filter The traffic filter used for filtering incoming routes from this peer.

In path filter The AS path filter used for filtering incoming routes from this peer.

In route map The route map used for filtering incoming routes from this peer.

Out filter The traffic filter used for filtering outgoing routes to this peer.

Out path filter The AS path filter used for filtering outgoing routes to this peer.

Out route map The route map used for filtering outgoing routes to this peer.

Max prefix The maximum number of route prefixes that may be received from this peer, and the action taken when this number is exceeded. The action is one of "WARNING" or "TERMINATE".

External hops The number of hops that can be used to reach this peer, if it is an EBGP peer. Having this number exceed 1 allows multihop EBGP.

Next hop self Whether or not this router will advertise to this peer that the next hop for all routes is itself; one of "No" or "Yes".

Send community Whether or not this router will send the community attribute in the path attributes of UPDATE messages; one of "Yes" or "No".

Messages In/Out The number of incoming/outgoing BGP messages from/to this peer.

Debugging The debugging types enabled for this peer; one or more of "MSG", "STATE", "UPDATE" or "ALL".

Device The device to which debugging output is being sent.

Software Release 2.3.1C613-03038-00 REV A

40-20 AR Series Router Software Reference

Configuration Example

The following examples illustrate the steps required to configure BGP-4 on the router. The first example shows a simple configuration without filtering, the other examples illustrate configurations using filtering parameters.

Example OneRouter A has been configured with IP address 10.0.0.2, AS number 2, and is to establish a BGP session with a peer, (Router B), configured with IP address 10.0.0.1, AS number 1. This example assumes that the IP address has already been configured and the two peers can ping each other. Figure 40-10 on page 40-20 illustrates a simple BGP-4 configuration.

Figure 40-10: Example of a simple BGP-4 configuration.

To configure Router A and Router B as peers.

1. Set the AS number

Set the autonomous system number for Router A using the command:

SET IP AUTONOMOUS=2

2. Set the local IP address

Set the configuration of Router A’s local IP interface, using the command:

SET IP LOCAL IP=10.0.0.2

The local IP interface is a virtual interface which represents the IP routing module itself. The interface can be assigned an IP address, which can then be used as the source address of IP packets generated internally by IP protocols such as RIP, OSPF, PING and NTP. (See the SET IP LOCAL command on page 8-140 of Chapter 8, Internet Protocol (IP).

3. Add Router B as a peer.

Add Router B as a peer to Router A, using the command:

ADD BGP PEER=10.0.0.1 REMOTEAS=1

The peer is now configured, but not yet able to establish a connection.

AS1

Router A

10.0.0.2

AS2

Router B

EBGP

10.0.0.1

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) 40-21

There is a limit of 64 configurable peers.

4. Establish a connection between Router A and Router B.

Enable Router B so that a connection can be established, using the command:

ENABLE BGP PEER=10.0.0.1

Router A can now attempt to establish a connection with Router B.

5. Check that the connection has been successfully established.

To make sure that the connection is successfully established, use the command:

SHOW BGP PEER

This produces the output shown in Figure 40-11 on page 40-21.

Figure 40-11: Example output from the SHOW BGP PEER command.

6. Show the detailed output for a particular router.

To see detailed information about the status of Router B, use the command:

SHOW BGP PEER=10.0.0.1

This produces the output shown in Figure 40-12 on page 40-22.

BGP peer entries

Peer State AS InMsg OutMsg-------------------------------------------------------------10.0.0.1 Estab 1 23456 3245

Software Release 2.3.1C613-03038-00 REV A

40-22 AR Series Router Software Reference

Figure 40-12: Example output from the SHOW BGP PEER command for a specified peer.

Example TwoRouter A has been configured with IP address 10.0.0.2, AS number 2, Router B will be a configured as a peer with IP address 10.0.0.1, AS number 1. This example illustrates a configuration using the INPATHFILTER filtering parameter. The INPATHFILTER filters received BPG UPDATE messages based upon their AS path attributes. The filter is defined on a per peer basis.

To set up a peer with an IP address of 10.0.0.1 and an AS of 1 that will have all received UPDATE messages that have originated from AS 300 filtered out (i.e. the originating AS will be at the end of the AS list.

1. Add an AS path list entry.

ADD IP ASPATHLIST=1 ENTRY=1 EXCLUDE=”300$”

2. Set up the BGP peer.

ADD BGP PEER=10.0.0.1 REMOTEAS=1 INPATHFILTER=1

All other UPDATE messages received from this peer will be included by default.

3. Exclude routes that did not originate from AS300 but went through AS200.

ADD IP ASPATHLIST=1 ENTRY=2 EXCLUDE=”*200*”

If an UPDATE message has AS200 in it, and it originated from AS300, then only the first entry in the ASPATHLIST will be matched, the second entry match will not be attempted.

Peer ................ 10.0.0.1Description ......... -State ............... EstablishedRemote AS ........... 1Authentication ...... NonePassword ............ -Connect Retry ....... 120sHold time ........... 90s (actual 0s)Keep alive .......... 30s (actual 0s - no KEEPALIVES)Min AS originated ... 15Min route advert .... 30Filtering In filter ......... - In path filter .... - In route map ...... - Out filter ........ - Out path filter ... - Out route map ..... -Max prefix .......... OFFExternal hops ....... 1 (EBGP multihop disabledNext hop self ....... NoSend community ...... NoMessages In/Out ..... 23456/3245Debugging ........... -Device .............. -

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) 40-23

Example ThreeRouter A has been configured with IP address 10.0.0.2, AS number 2, Router B will be a configured as a peer with IP address 10.0.0.1, AS number 1. This example illustrates a configuration using the OUTPATHFILTER filtering parameter. Using OUTPATHFILTER filters out BGP UPDATE messages being transmitted based upon their AS path attributes. The filter is defined on a per peer basis.

To set up a peer with an IP address of 10.0.0.1 and an AS of 1 that will not have any routes that have originated from AS550 advertised to it.

1. Add an AS path list entry.

ADD IP ASPATHLIST=2 ENTRY=1 EXCLUDE=”550$”

2. Set up the BGP peer.

ADD BGP PEER=10.0.0.1 REMOTEAS=1 OUTPATHFILTER=1

All other UPDATE messages received from this peer will be included by default.

3. Exclude routes that originated from AS550.

ADD IP ASPATHLIST=1 ENTRY=2 EXCLUDE=”*200*”

Example FourRouter A has been configured with IP address 10.0.0.2, AS number 2, Router B will be a configured as a peer with IP address 10.0.0.1, AS number 1. This example illustrates a configuration using the OUTROUTEMAP filtering parameter. The OUTROUTEMAP filter is applied before all other filters have acted on an UPDATE message. The OUTROUTEMAP filter is applied to an UPDATE message being transmitted, and filters it based on its AS path attribute if its match clause specifies an ASPATHLIST.

The advantage of routemap filters over path filters is that they can be used to modify the attributes of a received BGP UPDATE message, whereas the path filters can only include or exclude messages.

To set up a peer with an IP address of 10.0.0.1 and an AS of 1 that will not have any routes that have originated from AS550 advertised to it.

1. Add an AS path list entry.

ADD IP ASPATHLIST=2 ENTRY=1 EXCLUDE=”*550*”

2. Exclude routes that originated from AS550.

ADD IP ROUTEMAP=AS550 FILTER MATCH ASPATHLIST=2

Example FiveRouter A has been configured with IP address 10.0.0.2, AS number 2, Router B will be a configured as a peer with IP address 10.0.0.1, AS number 1. This example illustrates a configuration using the INROUTEMAP filtering parameter. The INROUTEMAP filter is applied after all other filters have acted on an UPDATE message. The INROUTEMAP filter is applied to a received UPDATE message, and filters it based on its AS path attribute if its match clause specifies an ASPATHLIST.

Software Release 2.3.1C613-03038-00 REV A

40-24 AR Series Router Software Reference

To set up a peer with an IP address of 10.0.0.1 and an AS of 1 that will have all received UPDATE messages that have originated from AS 300 filtered out (i.e. the originating AS will be at the end of the AS list).

1. Add an AS path list entry.

ADD IP ASPATHLIST=1 ENTRY=1 EXCLUDE=”300$”

2. Filter out messages from AS300

ADD IP ROUTEMAP=AS300 FILTER MATCH ASPATHLIST=1

3. Set up the BGP peer.

ADD BGP PEER=10.0.0.1 REMOTEAS=1 INROUTEMAP=AS300

Example SixRouter A has been configured with IP address 10.0.0.2, AS number 2, Router B will be a configured as a peer with IP address 10.0.0.1, AS number 1. This example illustrates a configuration using the INFILTER filtering parameter as Router B advertises a route to network 101.0.0.0, but there is a preferred route (because of an arrangement with the network) to use.

To set up a peer with an IP address of 10.0.0.1 and an AS of 1 that advertises a route to a network, but there is a preferred route.

1. Advertise the network route.

ADD IP FILT=300 ENTRY=1 ACTION=EXCLUDE SOURCE=101.0.0.0 SMASK=255.0.0.0

2. Set the filter to include all routes.

ADD IP FILT=300 ENTRY=1 ACTION=INCLUDE SOURCE=0.0.0.0 SMASK=255.0.0.0

3. Set up the INFILTER parameter.

ADD BGP PEER=10.0.0.1 REMOTEAS=1 INFILTER=300

Example Seven

Router A has been configured with IP address 10.0.0.2, AS number 2, Router B will be a configured as a peer with IP address 10.0.0.1, AS number 1. This example illustrates a configuration using the INFILTER filtering parameter as Router B advertises a route to network 101.0.0.0, but there is a preferred route (because of an arrangement with the network) to use.

To set up a peer with an IP address of 10.0.0.1 and an AS of 1 that advertises a route to a network, but there is a preferred route.

1. Advertise the network route.

ADD IP FILT=300 ENTRY=1 ACTION=EXCLUDE SOURCE=101.0.0.0 SMASK=255.0.0.0

2. Set the filter to include all routes.

ADD IP FILT=300 ENTRY=1 ACTION=INCLUDE SOURCE=0.0.0.0 SMASK=255.0.0.0

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) 40-25

3. Set up the INFILTER parameter.

ADD BGP PEER=10.0.0.1 REMOTEAS=1 INFILTER=300

Example EightRouter A has been configured with IP address 10.0.0.2, AS number 2, Router B is configured as a peer with IP address 10.0.0.1, AS number 1. This example illustrates a configuration where the peer is one that does not want to advertise a route to network 102.0.0.0 to use, using the OUTFILTER filtering parameter.

To set up a peer with an IP address of 10.0.0.1 and an AS of 1 that excludes network 102.0.0.0.

1. Advertise the network route to exclude.

ADD IP FILT=301 ENTRY=1 ACTION=EXCLUDE SOURCE=102.0.0.0 SMASK=255.0.0.0

2. Set the filter to include all routes.

ADD IP FILT=301 ENTRY=2 ACTION=INCLUDE SOURCE=0.0.0.0 SMASK=255.0.0.0

3. Set up the INFILTER parameter.

ADD BGP PEER=10.0.0.1 REMOTEAS=1 INFILTER=300

Example NineRouter A has been configured with IP address 10.0.0.2, AS number 2, Router B is configured as a peer with IP address 10.0.0.1, AS number 1. This example illustrates a configuration filtering on communities using the INROUTEMAP filtering parameter.

To set up a peer with an IP address of 10.0.0.1 and an AS of 1 that excludes routes containing the community 10000.

1. Advertise the network route to exclude.

ADD IP COMMUNITYLIST=1 ENTRY=1 EXCLUDE=10000

2. Set the routemap to match community=1.

ADD IP=ROUTEMAP=COMM1 ENTRY=1 MATCH COMMUNITY=1

3. Set up the INFILTER parameter.

ADD BGP PEER=10.0.0.1 REMOTEAS=1 INROUTEMAP0=COMM1

To set up a peer with an IP address of 10.0.0.1 and an AS of 1 that does not advertise any routes containing the community INTERNET.

1. Advertise the community to exclude.

ADD IP COMMUNITYLIST=2 ENTRY=1 EXCLUDE=INTERNET

2. Set the routemap to match community=1.

ADD IP=ROUTEMAP=INTERNET ENTRY=1 MATCH COMMUNITY=2

3. Set up the INFILTER parameter.

ADD BGP PEER=10.0.0.1 REMOTEAS=1 OUTROUTEMAP0=COMM1

Software Release 2.3.1C613-03038-00 REV A

40-26 ADD BGP AGGREGATE AR Series Router Software Reference

Command Reference

This section describes the commands available on the router to enable, configure, control and monitor BGP. See Chapter 8, Internet Protocol (IP) for the commands required to enable and configure IP to use BGP.

See “Conventions” on page lxxvi of Preface in the front of this manual for details of the conventions used to describe command syntax. See Appendix A, Messages for a complete list of messages and their meanings.

ADD BGP AGGREGATE

Syntax ADD BGP AGGREGATE=prefix [MASK=ipadd] [SUMMARY={NO|YES}] [ROUTEMAP[=routemap]]

where:

� prefix is an IP address in dotted decimal notation, optionally followed by a’/’ character and a decimal number from 0 to 32.

� ipadd is an IP address in dotted decimal notation.

� routemap is a character string, 1 to 15 characters in length. Valid characters are uppercase letters (A-Z), lowercase letters (a-z), digits (0-9) and the underscore character ("_").

Description This command adds an aggregate entry to BGP. This causes a route to be added to BGP’s route table as long as there are more specific BGP routes available. The aggregate route is advertised as coming from the router’s autonomous system and has the ATOMIC AGGREGATE attribute set.

The AGGREGATE parameter specifies the network prefix to be used for this aggregate entry. The parameter is expressed in terms of the base IP address of the network, and optionally, the number of bits in the network mask. If the number of bits is not given, the mask is taken from the MASK parameter, if this is present. If the MASK parameter is not present, the mask is taken as the natural mask for the network, based on whether it is a class A, B or C network.

The MASK parameter optionally specifies the network mask for the aggregate entry. If the network mask is given as part of the AGGREGATE parameter and the MASK parameter is present, an error will result unless the two masks agree. This parameter is provided for compatibility with other router commands which specify an IP address and mask; the preferred form is to specify the mask as part of the AGGREGATE parameter.

The SUMMARY parameter specifies whether or not this aggregate entry is to be a summary only, or whether the more specific routes that make up the aggregate are also to be advertised. If NO is specified, the more specific routes are also advertised. If YES is specified, only the aggregate route is advertised. Routes that are not advertised as a result of setting SUMMARY to YES are shown with the character ’s’ in the output of SHOW BGP ROUTE. The default is NO.

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) ADD BGP CONFEDERATIONPEER 40-27

The ROUTEMAP parameter specifies the name of a route map that is used to filter the more specific routes that make up the aggregate, or to set attributes for the aggregate route. The default is no route map, which means that no filtering of routes or setting of attributes will take place.

Examples To add an aggregate entry for the network 192.168.8.0/21 and using route map agg_map, use the command:

ADD BGP AGGREGATE=192.168.8.0/21 ROUTEMAP=agg_map

See Also DELETE BGP AGGREGATESET BGP AGGREGATESHOW BGP AGGREGATESHOW BGP ROUTE

ADD BGP CONFEDERATIONPEER

Syntax ADD BGP CONFEDERATIONPEER=1..65534

Description This command adds an Autonomous System to the AS confederation to which this router belongs. An AS confederation is a group of Autonomous Systems which communicate between themselves using confederation BGP, and communicate to Autonomous Systems outside the confederation as if they were a single Autonomous System. See “AS Confederations” on page 40-15 for more information about AS confederations.

The CONFEDERATIONPEER parameter specifies the number of an Autonomous System which is to be treated as one of the Autonomous Systems in the confederation. This number cannot be the same as this router’s AS number, or this router’s confederation ID. The specified AS number should not already have been added with this command.

A router does not have to be configured with all of the AS numbers in the AS confederation, only those with which it will have peer relationships. Similarly, the confederation ID for the router only has to be configured on routers which will have peer relationships with BGP routers outside the confederation.

Examples To set up a confederation with AS numbers 60001, 60002 and 60003, whose external AS number is 1234, and with this router in AS 60001, use the commands:

SET IP AUTONOMOUS=60001SET BGP CONFEDERATIONID=1234 ADD BGP CONFEDERATIONPEER=60002ADD BGP CONFEDERATIONPEER=60003

See Also DELETE BGP CONFEDERATIONPEERSET BGPSET IP AUTONOMOUS in Chapter 8, Internet Protocol (IP)SHOW BGP CONFEDERATION

Software Release 2.3.1C613-03038-00 REV A

40-28 ADD BGP IMPORT AR Series Router Software Reference

ADD BGP IMPORT

Syntax ADD BGP IMPORT={OSPF|RIP|STATIC} [ROUTEMAP[=routemap]]

where:

� routemap is a character string, 1 to 15 characters in length. Valid characters are uppercase letters (A-Z), lowercase letters (a-z), digits (0-9) and the underscore character ("_").

Description This command adds an import entry to BGP. This is a directive to BGP to import routing table routes from a given route source into the BGP route table. Optionally, a route map can be specified to allow filtering of routes and setting of BGP attributes.

The IMPORT parameter specifies the source of routing information for the routes that are to be imported into BGP. Specifying OSPF imports OSPF routes, specifying RIP imports RIP or RIP2 routes and specifying STATIC imports static and interface routes into BGP.

The ROUTEMAP parameter specifies the route map used to filter the routes imported into BGP and to set attributes for the routes as advertised by BGP. The default is to have no route map, which means that no router filtering or attribute setting will take place.

A number of import entries can be added to allow routes from more than one source to be imported into BGP. However, only one import entry can be added for any given route source.

Examples To import OSPF routes into BGP and use the route map ospf_bgp_map to filter and set attributes, use the command:

ADD BGP IMPORT=OSPF ROUTEMAP=ospf_bgp_map

See Also ADD IP ROUTEMAP in Chapter 8, Internet Protocol (IP)DELETE BGP IMPORTSET BGP IMPORTSHOW BGP IMPORT

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) ADD BGP NETWORK 40-29

ADD BGP NETWORK

Syntax ADD BGP NETWORK=prefix [MASK=ipadd] [ROUTEMAP[=routemap]]

where:

� prefix is an IP address in dotted decimal notation, optionally followed by a ’/’ character and a decimal number from 0 to 32.

� ipadd is an IP address in dotted decimal notation.

� routemap is a character string, 1 to 15 characters in length. Valid characters are uppercase letters (A-Z), lowercase letters (a-z), digits (0-9) and the underscore character ("_").

Description This command adds a network to the list of networks that can be advertised to remote BGP peers, and optionally specifies a route map to use in filtering the networks and/or setting attributes on the routes sent.

The NETWORK parameter specifies the network to be added to the list of networks that can be advertised. The parameter is expressed in terms of the base IP address of the network, and optionally, the number of bits in the network mask. If the number of bits is not given, the mask will be taken from the MASK parameter, if this is present. If the MASK parameter is not present, the mask will be taken as the natural mask for the network, based on whether it is a class A, B or C network.

The MASK parameter optionally specifies the network mask for the network. If the network mask is given as part of the NETWORK parameter and the MASK parameter is present, an error will result unless the two masks agree. This parameter is provided for compatibility with other router commands which specify an IP address and mask; the preferred form is to specify the mask as part of the NETWORK parameter.

The ROUTEMAP parameter specifies a route map to be used in filtering this network and/or setting attributes on the routes sent. The route map can allow the manager to set attributes on the routes which are sent in the BGP UPDATE messages that advertise this route.

Any network in the list of networks will only be advertised by BGP when the network appears in the routing table of the router by some other means. For example, the network must have a static route entry or be added by the operation of a routing protocol such as OSPF.

Examples To add the network 192.169.2.0 to the list of networks advertised by BGP and to use the route map "normal", use the command:

ADD BGP NETWORK=192.169.2.0/24 ROUTEMAP=normal

See Also DELETE BGP NETWORKSHOW BGP NETWORK

Software Release 2.3.1C613-03038-00 REV A

40-30 ADD BGP PEER AR Series Router Software Reference

ADD BGP PEER

Syntax ADD BGP PEER=ipadd REMOTEAS=1..65534 [CONNECTRETRY={DEFAULT|0..4294967295}] [DESCRIPTION[=description]] [EHOPS={DEFAULT|1..255}] [HOLDTIME={DEFAULT|0|3..65535}] [INFILTER={NONE|300..399}] [INPATHFILTER={NONE|1..99}] [INROUTEMAP[=routemap]] [KEEPALIVE={DEFAULT|1..21845}] [MAXPREFIX={OFF|1..4294967295}] [MAXPREFIXACTION={WARNING|TERMINATE}] [MINASORIGINATED={DEFAULT|0..3600}] [MINROUTEADVERT={DEFAULT|0..3600}] [NEXTHOPSELF={NO|YES}] [OUTFILTER={NONE|300..399}] [OUTPATHFILTER={NONE|1..99}] [OUTROUTEMAP[=routemap]] [SENDCOMMUNITY={NO|YES}]

where:

� ipadd is an IP address in dotted decimal notation.

� description is a character string, 1 to 63 characters in length. Valid characters are any printable characters except ’?’ and ’"’. If description contains spaces, it must be enclosed in double quotes.

� routemap is a character string, 0 to 15 characters in length. Valid characters are uppercase letters (A-Z), lowercase letters (a-z), digits (0-9) and the underscore character ("_").

Description This command adds a BGP peer to the router. This command adds the peer in the disabled state; the router will not attempt to begin communicating with the peer until the “ENABLE BGP PEER” on page 38 command is entered. This allows full configuration of the peer entry before starting to communicate with it.

The PEER parameter specifies the IP address of the peer to be added. This address should be the address that this router will use when communicating with the peer, in other words, the address of the interface on the peer which is closest to this router.

The REMOTEAS parameter specifies the remote Autonomous System to which this peer belongs. If the remote AS number is the same as this router’s AS number, the peer is an internal BGP (IBGP) peer. If the remote AS number is different from this router’s AS number, the peer is an external BGP (EBGP) peer. If the remote AS numbers are different but the routers have the same confederation peer, the peer is a confederation BGP peer.The AS number is assigned and controlled by the IANA.

The CONNECTRETRY parameter specifies the time interval between attempts to establish a BGP connection to the peer. If DEFAULT is specified, the connect retry time will be set to the default value of 120 seconds. Otherwise, the time can be specified in seconds. A value of 0 means that there will be no repeated attempts to establish a BGP connection.

The DESCRIPTION parameter specifies a free format description for this peer. This parameter is purely for administrative convenience, and has no effect on the operation of BGP.

The EHOPS parameter specifies the number of hops to put in the TTL (Time To Live) field of BGP messages for external BGP. Normally, EBGP requires that the

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) ADD BGP PEER 40-31

BGP peers be connected to a common network, which means that they are separated by a single hop. Setting the EHOPS parameter to a value greater than 1 indicates that multihop EBGP is allowed. If DEFAULT is specified, the EHOPS parameter is set to the default value of 1. Otherwise, the parameter is a number in the range 1 to 255.

The HOLDTIME parameter specifies the value that this router will propose for the time interval between reception of KEEPALIVE and/or UPDATE messages from this peer. The actual hold time used on a peer connection is negotiated when the connection is opened, as the lower of the hold times proposed. If DEFAULT is specified, the hold time will be set to the default value of 90 seconds. If 0 is specified, this router is proposing not to have a hold time on this BGP connection. Otherwise any value between 3 seconds and 65535 seconds may be specified.

The INFILTER parameter specifies the routing filter used to filter networks received in BGP UPDATE messages from this peer, by prefix. The filter must already have been defined with the ADD IP FILTER command and must be a routing filter whose index is in the range 300 to 399. If NONE is specified, filtering of network prefixes from this peer will be turned off and all networks will be allowed, except those filtered in other ways.

The INPATHFILTER parameter specifies the AS path filter used to filter received BGP UPDATE messages from this peer, by AS PATH attribute. The filter does not have to have been defined with the ADD IP ASPATHLIST command. If NONE is specified, filtering of networks by AS path matching will be turned off and all networks will be allowed, except those filtered in other ways.

The INROUTEMAP parameter specifies a route map to use to filter and modify updates from this peer. The value of this parameter is the name of a route map already defined with the ADD IP ROUTEMAP command. If no value is specified, there will be no route map associated with incoming updates from this peer and no filtering or modification of updates will take place.

If more than one of the INFILTER, INPATHFILTER or INROUTEMAP parameters is specified, the order in which they are applied becomes important. If an INPATHFILTER is specified, it is applied first. The AS path filter will filter out entire UPDATE messages if a match is made. If an INFILTER is specified, it is applied second. This has the effect of filtering out certain network prefixes from the UPDATE message. If an INROUTEMAP is specified, it is applied last. This has the effect of filtering out network prefixes, but can also be used to change BGP route attributes before the route is added to the BGP routing tables.

The KEEPALIVE parameter specifies the time that this router would prefer to use in sending KEEPALIVE messages to this peer. This time should be one third of the HOLDTIME parameter. The actual value used for the keep alive interval is determined once the BGP connection is opened, since the hold time interval is calculated as part of the BGP connection opening. The actual keep alive interval is such that the ratio of configured keep alive interval to hold time interval is the same as actual keep alive interval to negotiated hold time interval. If the hold time is negotiated to be 0 seconds, then the keep alive interval will also be 0 seconds, in which case KEEPALIVE messages will not be sent.

The MAXPREFIX parameter specifies how many network prefixes may be received from this peer. The use of this parameter is to provide a safety

Software Release 2.3.1C613-03038-00 REV A

40-32 ADD BGP PEER AR Series Router Software Reference

mechanism in case the peer sends more prefixes than might normally be expected to be sent. If OFF is specified, there is no maximum prefix checking. The default value is OFF.

The MAXPREFIXACTION parameter specifies the action to take when a peer has sent a number of prefixes which exceeds the number specified by the MAXPREFIX parameter. If WARNING is specified, the router will only log warnings when the maximum number of prefixes is exceeded. If TERMINATE is specified, the router resets the peer connections and logs warnings. The default value is WARNING.

The MINASORIGINATED parameter specifies the time interval in seconds between successive UPDATE messages from this router that specify routes originating in this router’s Autonomous System. If DEFAULT is specified, the interval is 15 seconds.

The MINROUTEADVERT parameter specifies the time interval between successive advertisements, in UPDATE messages, of a given destination to this peer. This interval applies to destinations learned from peers in other autonomous systems. If DEFAULT is specified, the interval is 30 seconds.

The NEXTHOPSELF parameter specifies whether or not to force the next hop for updates sent to this peer to be this router or not. If YES is specified, all updates to this peer will specify this router as the next hop. If NO is specified, the next hop will be specified as per RFC1771. The default value is NO.

The OUTFILTER parameter specifies the routing filter used to filter networks sent in BGP UPDATE messages to this peer. The filter must already have been defined with the ADD IP FILTER command and must be a routing filter whose index is in the range 300 to 399. If NONE is specified, filtering of networks to this peer will be turned off and all networks will be allowed, except those filtered in other ways.

The OUTPATHFILTER parameter specifies the AS path filter used to filter networks sent in BGP UPDATE messages to this peer. The filter does not have to have been defined with the ADD IP ASPATHLIST command. If NONE is specified, filtering of networks by AS path matching will be turned off and all networks will be allowed, except those filtered in other ways.

The OUTROUTEMAP parameter specifies a route map to use to filter and modify updates to this peer. The value of this parameter is the name of a route map already defined with the ADD IP ROUTEMAP command. If no value is specified, there will be no route map associated with outgoing updates to this peer and no filtering or modification of updates will take place.

If more than one of the OUTFILTER, OUTPATHFILTER or OUTROUTEMAP parameters is specified, the order in which they are applied becomes important. If an OUTPATHFILTER is specified, it is applied first. The AS path filter will filter out entire groups of networks if a match is made. If an OUTFILTER is specified, it is applied second. This has the effect of filtering out certain network prefixes from the UPDATE message. If an OUTROUTEMAP is specified, it is applied last. This has the effect of filtering out network prefixes, but can also be used to change BGP route attributes before the route is added to the BGP UPDATE message.

The SENDCOMMUNITY parameter specifies whether or not the COMMUNITY attribute should be present in UPDATE messages originating from this router to this peer. If NO is specified, the COMMUNITY attribute will

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) DELETE BGP AGGREGATE 40-33

not be set in UPDATE messages to this peer. If YES is specified, the COMMUNITY attribute will be set in UPDATE messages to this peer. The actual value of the COMMUNITY attribute can be set by specifying a route map that has been created using the ADD IP ROUTEMAP command on page 8-84 of Chapter 8, Internet Protocol (IP). The default value is NO.

Examples To add a BGP peer whose IP address is 192.168.1.1 and whose AS number is 54321, use the command:

ADD BGP PEER=192.168.1.1 REMOTEAS=54321 DESCRIPTION="test remote BGP peer"

See Also ADD IP ASPATHLIST in Chapter 8, Internet Protocol (IP)ADD IP FILTER in Chapter 8, Internet Protocol (IP)ADD IP ASPATHLIST in Chapter 8, Internet Protocol (IP)DELETE BGP PEERDISABLE BGP PEERENABLE BGP PEERRESET BGP PEERSET BGP PEERSHOW BGP PEER

DELETE BGP AGGREGATE

Syntax DELETE BGP AGGREGATE=prefix [MASK=ipadd]

where:

� prefix is an IP address in dotted decimal notation, optionally followed by a ’/’ character and a decimal number from 0 to 32.

� ipadd is an IP address in dotted decimal notation.

Description This command deletes an aggregate entry from BGP. BGP will no longer advertise the aggregate entry.

The AGGREGATE parameter specifies the aggregate entry to be deleted. The parameter is expressed in terms of the base IP address of the network, and optionally, the number of bits in the network mask. If the number of bits is not given, the mask will be taken from the MASK parameter, if this is present. If the MASK parameter is not present, the mask will be taken as the natural mask for the network, based on whether it is a class A, B or C network.

The MASK parameter optionally specifies the network mask for the aggregate entry. If the network mask is given as part of the AGGREGATE parameter and the MASK parameter is present, an error will result unless the two masks agree. This parameter is provided for compatibility with other router commands which specify an IP address and mask; the preferred form is to specify the mask as part of the AGGREGATE parameter.

When the aggregate route is deleted from the BGP route table, BGP sends an UPDATE message to all peers, withdrawing the route.

Software Release 2.3.1C613-03038-00 REV A

40-34 DELETE BGP CONFEDERATIONPEER AR Series Router Software Reference

Examples To delete the aggregate entry for the network 192.168.8.0/21, use the command:

DELETE BGP AGGREGATE=192.168.8.0/21

See Also ADD BGP AGGREGATESET BGP AGGREGATESHOW BGP AGGREGATE

DELETE BGP CONFEDERATIONPEER

Syntax DELETE BGP CONFEDERATIONPEER=1..65534

Description This command deletes an Autonomous System from the AS confederation to which this router belongs. An AS confederation is a group of Autonomous Systems which communicate between themselves using confederation BGP, and communicate to Autonomous Systems outside the confederation as if they were a single Autonomous System. See “AS Confederations” on page 40-15 for more information about AS confederations.

The CONFEDERATIONPEER parameter specifies the number of an Autonomous System which is no longer to be treated as one of the Autonomous Systems in the confederation. The specified AS number must be an already existing AS confederation peer.

A router does not have to be configured with all of the AS numbers in the AS confederation, only those with which it will have peer relationships. Similarly, the confederation ID for the router only has to be configured on routers which will have peer relationships with BGP routers outside the confederation.

Examples To remove AS 60003 from the AS confederation to which this router belongs, use the command:

DELETE BGP CONFEDERATIONPEER=60003

See Also ADD BGP CONFEDERATIONPEERSET BGPSHOW BGP CONFEDERATION

DELETE BGP IMPORT

Syntax DELETE BGP IMPORT={OSPF|RIP|STATIC}

Description This command deletes an import entry from BGP. Routes from the source specified will no longer be imported into the BGP route table. Routes already in the BGP route table will be removed.

The IMPORT parameter specifies the source of routing information for the routes that are no longer to be imported into BGP. Specifying OSPF imports

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) DELETE BGP NETWORK 40-35

OSPF routes, specifying RIP imports RIP or RIP2 routes and specifying STATIC imports static and interface routes into BGP.

Examples To stop importing OSPF routes into BGP, use the command:

DELETE BGP IMPORT=OSPF

See Also ADD BGP IMPORTSET BGP IMPORTSHOW BGP IMPORT

DELETE BGP NETWORK

Syntax DELETE BGP NETWORK=prefix [MASK=ipadd]

where:

� prefix is an IP address in dotted decimal notation, optionally followed by a ’/’ character and a decimal number from 0 to 32.

� ipadd is an IP address in dotted decimal notation.

Description This command deletes a network from the list of networks that can be advertised to remote BGP peers. The network must be present in the list already.

The NETWORK parameter specifies the network to be deleted from the list of networks that can be advertised. The parameter is expressed in terms of the base IP address of the network, and optionally, the number of bits in the network mask. If the number of bits is not given, the mask will be taken from the MASK parameter, if this is present. If the MASK parameter is not present, the mask will be taken as the natural mask for the network, based on whether it is a class A, B or C network.

The MASK parameter optionally specifies the network mask for the network. If the network mask is given as part of the NETWORK parameter and the MASK parameter is present, an error will result unless the two masks agree. This parameter is provided for compatibility with other router commands which specify an IP address and mask; the preferred form is to specify the mask as part of the NETWORK parameter.

When the network is deleted from the list of networks, BGP will cause an UPDATE message to be sent to all peers, withdrawing the network.

Examples To delete the network 192.169.2.0 from the list of networks advertised by BGP, use the command:

DELETE BGP NETWORK=192.169.2.0/24

See Also ADD BGP NETWORKSHOW BGP NETWORK

Software Release 2.3.1C613-03038-00 REV A

40-36 DELETE BGP PEER AR Series Router Software Reference

DELETE BGP PEER

Syntax DELETE BGP PEER=ipadd

where:

� ipadd is an IP address in dotted decimal notation.

Description This command deletes a BGP peer from the router. The BGP peer must be in a disabled state, that is, it hasn’t ever been enabled (or it has been enabled, but subsequently disabled with the DISABLE BGP PEER command).

The PEER parameter specifies the IP address of the peer to be deleted. The peer must be an existing BGP peer on this router.

Examples To delete a BGP peer whose IP address is 192.168.1.1, use the command:

DELETE BGP PEER=192.168.1.1

See Also DISABLE BGP PEERSHOW BGP PEER

DISABLE BGP DEBUG

Syntax DISABLE BGP DEBUG[={MSG|STATE|UPDATE|ALL}[,...]] [PEER=ipadd]

where:

� ipadd is an IP address in dotted decimal notation.

Description This command disables one or more forms of BGP debugging, optionally for a given BGP peer.

The DEBUG parameter specifies which debugging options are to be disabled. The value of this parameter is a single item or a comma-separated list of items. The items allowed and the debugging that is turned off by specifying the item are shown in Table 40-5 on page 40-38. The default is ALL.

The PEER parameter specifies the IP address of the peer for which debugging is no longer required. The peer must be an existing BGP peer on this router. If no peer is specified, debugging is turned off for all BGP peers.

Only one manager device can have BGP debugging directed to it at a time. This means that if someone is debugging BGP on another terminal device, debugging cannot be enabled on the current terminal device. However, debugging can be disabled for the other device by using this command, following which debugging can be enabled for the current device.

Examples To disable all debugging for all BGP peers, use the command:

DISABLE BGP DEBUG

See Also ENABLE BGP DEBUG

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) ENABLE BGP DEBUG 40-37

DISABLE BGP PEER

Syntax DISABLE BGP PEER={ALL|ipadd}

where:

� ipadd is an IP address in dotted decimal notation.

Description This command disables a given BGP peer, or all BGP peers. If the peer is active, this command will send a notification message (see “BGP Messages” on page 40-6) and cause a BGP Stop event to be actioned in the state machine of the peer(s).

A stop event is generated to move the BGP peer from the idle state to the connect state (see “BGP States” on page 40-5).

The PEER parameter specifies the IP address of the peer being disabled. The peer must be an existing BGP peer on this router. The value ALL specifies that all BGP peers be disabled.

Examples To disable the BGP peer 192.168.1.1, use the command:

DISABLE BGP PEER=192.168.1.1

See Also ENABLE BGP PEERSHOW BGP PEER

ENABLE BGP DEBUG

Syntax ENABLE BGP DEBUG={MSG|STATE|UPDATE|ALL}[,...] [PEER=ipadd]

where:

� ipadd is an IP address in dotted decimal notation.

Description This command enables one or more forms of BGP debugging, optionally for a given BGP peer.

The DEBUG parameter specifies which debugging options are to be enabled. The value of this parameter is a single item or a comma-separated list of items. The items allowed and the debugging that is turned on by specifying the item are shown in Table 40-5 on page 40-38.

The PEER parameter specifies the IP address of the peer for which debugging is to be turned on. The peer must be an existing BGP peer on this router. If no peer is specified, debugging will be turned on for all BGP peers.

Only one manager device can have BGP debugging directed to it at a time. This means that if someone is debugging BGP on another terminal device, debugging cannot be enabled on the current terminal device. However, debugging can be disabled for the other device by using the DISABLE BGP DEBUG command, following which debugging can be enabled for the current device.

Software Release 2.3.1C613-03038-00 REV A

40-38 ENABLE BGP PEER AR Series Router Software Reference

Examples To enable message and state debugging for BGP peer 192.168.1.1, use the command:

ENABLE BGP DEBUG=MSG,STATE PEER=192.168.1.1

See Also DISABLE BGP DEBUG

ENABLE BGP PEER

Syntax ENABLE BGP PEER={ALL|ipadd}

where:

� ipadd is an IP address in dotted decimal notation.

Description This command enables a given BGP peer, or all BGP peers. This command will cause a BGP Start event to be actioned in the state machine of the peer(s), and the BGP peer moves from the idle state to the connect state (see “BGP States” on page 40-5).

If a start event is not generated for a peer, the BGP state machine will never try to establish a BGP session with that peer. The peer must be an existing BGP peer on this router. The start event causes the system to initialise BGP resources, initiate the transport connection to BGP peers and listen for any connections initiated by remote BGP peers.

The PEER parameter specifies the IP address of the peer being enabled. The peer must be an existing BGP peer on this router. If ALL is specified, all BGP peers are

Examples To enable all BGP peers, use the commands:

ENABLE BGP PEER=ALL

Table 40-5: Border Gateway Protocol (BGP) debugging options.

Option Description

ALL All debugging options, including MSG, STATE and UPDATE.

MSG Message reception and transmission. There are four message types, OPEN, UPDATE, KEEPALIVE and NOTIFY. The output of the debug messages consists of the timestamp, the direction of the message, incoming or outgoing, the IP address of the peer, the message type and the details. For OPEN, KEEPALIVE and NOTIFICATION messages the details will consist of the decoded contents of the packet. For UPDATE messages the details will consist of the lengths of the withdrawn routes and NRLI fields and a complete decode of the path attributes.

STATE State machine events and transitions. The output of the debug messages consists of the timestamp, the IP address of the peer, the event that causes the state change and the old and new states.

UPDATE Detailed debugging for received and transmitted UPDATE messages. The output of the debug messages consists of the same output as for MSG debugging, as well as a full decode of the withdrawn routes and NRLI fields.

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) RESET BGP PEER 40-39

See Also DISABLE BGP PEERSHOW BGP PEER

RESET BGP PEER

Syntax RESET BGP PEER={ALL|ipadd}

where:

� ipadd is an IP address in dotted decimal notation.

Description This command resets a given BGP peer, or all BGP peers. This command will cause a BGP Stop event to be actioned in the state machine of the peer(s), followed by a period of cleanup and recovery. A stop event is generated to move the BGP peer from the idle state to the connect state (see “BGP States” on page 40-5).

Then the command will cause a BGP Start event to be actioned in the state machine of the peer(s). A start event is generated to move the BGP peer from the idle state to the connect state (see “BGP States” on page 40-5).

If a start event is not generated for a peer, the BGP state machine will never try to establish a BGP session with that peer. The peer must be an existing BGP peer on this router. The start event causes the system to initialise BGP resources, initiate the transport connection to BGP peers and listen for any connections initiated by remote BGP peers.

The PEER parameter specifies the IP address of the peer being reset. The peer must be an existing BGP peer on this router. If ALL is specified, all BGP peers are reset.

Examples To reset BGP peer 192.168.1.1, use the command:

RESET BGP PEER=192.168.1.1

See Also ENABLE BGP PEERDISABLE BGP PEERSHOW BGP PEER

Software Release 2.3.1C613-03038-00 REV A

40-40 SET BGP AR Series Router Software Reference

SET BGP

Syntax SET BGP [CONFEDERATIONID={NONE|1..65534}] [LOCALPREF={DEFAULT|0..4294967295}] [MED={NONE|0..4294967294}] [PREFEXT={DEFAULT|1..255}] [PREFINT={DEFAULT|1..255}] [TABLEMAP[=routemap]]

where:

� routemap is a character string, 0 to 15 characters in length. Valid characters are uppercase letters (A-Z), lowercase letters (a-z), digits (0-9) and the underscore character ("_").

Description This command sets global BGP parameters in the router.

The CONFEDERATIONID parameter specifies the AS number of the AS confederation to which this router belongs. This AS number is used as the AS number for this router when communicating with BGP peers outside the confederation. A peer outside the confederation is one whose AS number is not the same as the router’s AS number and not one of this router’s confederation peers. This parameter must be set on this router if one of this router’s peers is outside the confederation. See “AS Confederations” on page 40-15 for more information about AS confederations. The default value for this parameter is NONE.

The confederation ID for a router only has to be configured on routers which will have peer relationships with BGP routers outside the confederation. Similarly, the router does not have to be configured with all of the AS numbers in the AS confederation, only those with which it will have peer relationships.

The LOCALPREF parameter specifies the local preference value used in all UPDATE messages sent to internal peers when this is not overridden by changes due to the actions in a route map. If DEFAULT is specified, LOCALPREF is set to the default value of 100. The local preference is used in internal BGP to decide which BGP route to put into the main routing table. The route with the highest value of local preference is used.

The MED parameter specifies the Multi-Exit Discriminator (MED) value that will be placed in UPDATE messages to external BGP peers from this router when not overridden by the action of a route map. If NONE is specified, no MED attribute will be placed in the UPDATE message. Otherwise an MED attribute will be placed in the UPDATE message with value as given by this command. The MED attribute is used by routers in one AS to distinguish between different exit points in the same neighbouring AS. A route with a lower value of MED will be used, all other things being equal. See “BGP Route Selection” on page 40-8 for further information about the use of MED in route selection.

The PREFEXT parameter specifies the route preference to give to routes learned by BGP from external peers. If DEFAULT is specified, the default value of 170 is set. Routes with a lower preference value are used before routes with a higher preference.

The PREFINT parameter specifies the route preference to give to routes learned by BGP from internal peers. If DEFAULT is specified, the default value of 170 is

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) SET BGP AGGREGATE 40-41

set. Routes with a lower preference value are used before routes with a higher preference.

The TABLEMAP parameter specifies a route map for BGP routes to be passed through before installing the route into the routing table. If no value is given, the TABLEMAP parameter is cleared and BGP routes are not passed through a route map before being installed into the routing table. The value, if given, should be the name of a valid existing route map in the router.

Examples To set the preference of routes learned by internal BGP to be better than the preference of routes learned by OSPF (which is 10), use the command:

SET BGP PREFINT=9

See Also ADD BGP CONFEDERATIONPEERDELETE BGP CONFEDERATIONPEERSHOW BGPSHOW BGP CONFEDERATION

SET BGP AGGREGATE

Syntax SET BGP AGGREGATE=prefix [MASK=ipadd] [SUMMARY={NO|YES}] [ROUTEMAP[=routemap]]

where:

� prefix is an IP address in dotted decimal notation, optionally followed by a ’/’ character and a decimal number from 0 to 32.

� ipadd is an IP address in dotted decimal notation.

� routemap is a character string, 1 to 15 characters in length. Valid characters are uppercase letters (A-Z), lowercase letters (a-z), digits (0-9) and the underscore character ("_").

Description This command sets the parameters of an existing aggregate entry in the BGP route table.

The AGGREGATE parameter specifies the existing aggregate entry to modify. The parameter is expressed in terms of the base IP address of the network, and optionally, the number of bits in the network mask. If the number of bits is not given, the mask will be taken from the MASK parameter, if this is present. If the MASK parameter is not present, the mask will be taken as the natural mask for the network, based on whether it is a class A, B or C network.

The MASK parameter optionally specifies the network mask for the aggregate entry. If the network mask is given as part of the AGGREGATE parameter and the MASK parameter is present, an error will result unless the two masks agree. This parameter is provided for compatibility with other router commands which specify an IP address and mask; the preferred form is to specify the mask as part of the AGGREGATE parameter. Note that the MASK parameter is used only to identify the aggregate entry, and not to set the network mask in the aggregate entry.

The SUMMARY parameter specifies whether or not this aggregate entry is to be a summary only, or whether the more specific routes that make up the

Software Release 2.3.1C613-03038-00 REV A

40-42 SET BGP IMPORT AR Series Router Software Reference

aggregate are also to be advertised. If NO is specified, the more specific routes are also advertised. If YES is specified, only the aggregate route is advertised. The default is NO.

The ROUTEMAP parameter specifies the name of a route map that is used to filter the more specific routes that make up the aggregate, or to set attributes for the aggregate route. The default is to have no route map.

Examples To set the route map for the aggregate entry for the network 192.168.8.0/21 to be route map agg_map1, use the command:

SET BGP AGGREGATE=192.168.8.0/21 ROUTEMAP=agg_map1

See Also ADD BGP AGGREGATEDELETE BGP AGGREGATESHOW BGP AGGREGATE

SET BGP IMPORT

Syntax SET BGP IMPORT={OSPF|RIP|STATIC} [ROUTEMAP[=routemap]]

where:

� routemap is a character string, 1 to 15 characters in length. Valid characters are uppercase letters (A-Z), lowercase letters (a-z), digits (0-9) and the underscore character ("_").

Description This command modifies the routemap of a BGP import entry.

The IMPORT parameter specifies the BGP import entry to be modified. This should already have been added to BGP.

The ROUTEMAP parameter specifies the route map used to filter the routes imported into BGP and to set attributes for the routes as advertised by BGP. The default is to have no route map.

Examples To change the route map for the import entry for importing OSPF routes into BGP to route map ospf_bgp_map1, use the command:

SET BGP IMPORT=OSPF ROUTEMAP=ospf_bgp_map1

See Also ADD BGP IMPORTDELETE BGP IMPORTSHOW BGP IMPORT

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) SET BGP PEER 40-43

SET BGP PEER

Syntax SET BGP PEER=ipadd [CONNECTRETRY={DEFAULT|0..4294967295}] [DESCRIPTION[=description]] [EHOPS={DEFAULT|1..255}] [HOLDTIME={DEFAULT|0|3..65535}] [INFILTER={NONE|300..399}] [INPATHFILTER={NONE|1..99}][INROUTEMAP[=routemap]] [KEEPALIVE={DEFAULT|1..21845}] [MAXPREFIX={OFF|1..4294967295}] [MAXPREFIXACTION={WARNING|TERMINATE}] [MINASORIGINATED={DEFAULT|0..3600}] [MINROUTEADVERT={DEFAULT|0..3600}] [NEXTHOPSELF={NO|YES}] [OUTFILTER={NONE|300..399}] [OUTPATHFILTER={NONE|1..99}] [OUTROUTEMAP[=routemap]] [REMOTEAS=1..65534] [SENDCOMMUNITY={NO|YES}]

where:

� ipadd is an IP address in dotted decimal notation.

� description is a character string, 1 to 63 characters in length. Valid characters are any printable characters except ’?’ and ’"’. If description contains spaces, it must be enclosed in double quotes.

� routemap is a character string, 0 to 15 characters in length. Valid characters are uppercase letters (A-Z), lowercase letters (a-z), digits (0-9) and the underscore character ("_").

Description This command modifies parameters for an existing BGP peer in the router. If the BGP peer is enabled, the BGP peer must be disabled, this command executed, and the BGP peer enabled before the change takes effect. If the BGP peer is disabled, the peer must be enabled before the change takes effect.

The PEER parameter specifies the IP address of the peer to be modified. The peer must be an existing BGP peer on this router.

The CONNECTRETRY parameter specifies the time interval between attempts to establish a BGP connection to the peer. If DEFAULT is specified, the connect retry time will be set to the default value of 120 seconds. Otherwise, the time can be specified in seconds. A value of 0 means that there will be no repeated attempts to establish a BGP connection.

The DESCRIPTION parameter specifies a free format description for this peer. This parameter is purely for administrative convenience, and has no effect on the operation of BGP.

The EHOPS parameter specifies the number of hops to put in the TTL field of BGP messages for external BGP. Normally, EBGP requires that the BGP peers be connected to a common network, which means that they are separated by a single hop. Setting the EHOPS parameter to a value greater than 1 indicates that multihop EBGP is expected. If DEFAULT is specified, the EHOPS parameter is set to the default value of 1. Otherwise, the parameter is a number in the range 1 to 255.

The HOLDTIME parameter specifies the value that this router will propose for the time interval between reception of KEEPALIVE and/or UPDATE messages from this peer. The actual hold time used on a peer connection is negotiated when the connection is opened, as the lower of the hold times proposed. If DEFAULT is specified, the hold time will be set to the default value of 90

Software Release 2.3.1C613-03038-00 REV A

40-44 SET BGP PEER AR Series Router Software Reference

seconds. If 0 is specified, this router is proposing not to have a hold time on this BGP connection. Otherwise any value from 3 seconds up may be specified.

The INFILTER parameter specifies the routing filter used to filter networks received in BGP UPDATE messages from this peer, by prefix. The filter must already have been defined with the ADD IP FILTER command and must be a routing filter whose index is in the range 300 to 399. If NONE is specified, filtering of network prefixes from this peer will be turned off and all networks will be allowed, except those filtered in other ways.

The INPATHFILTER parameter specifies the AS path filter used to filter networks received in BGP UPDATE messages from this peer. The filter does not have to have been defined with the ADD IP ASPATHLIST command. If NONE is specified, filtering of networks by AS path matching is turned off and all networks are allowed, except those filtered in other ways.

The INROUTEMAP parameter specifies a route map to use to filter and modify updates from this peer. The value to this parameter is the name of a route map already defined with the ADD IP ROUTEMAP command. If no value is specified, there is no route map associated with incoming updates from this peer and no filtering or modification of updates will take place.

If more than one of the INFILTER, INPATHFILTER or INROUTEMAP parameters is specified, the order in which they are applied becomes important. If an INPATHFILTER is specified, it is applied first. The AS path filter will filter out entire UPDATE messages if a match is made. If an INFILTER is specified, it is applied second. This has the effect of filtering out certain network prefixes from the UPDATE message. If an INROUTEMAP is specified, it is applied last. This has the effect of filtering out network prefixes, but can also be used to change BGP route attributes before the route is added to the BGP routing tables.

The KEEPALIVE parameter specifies the time that this router would prefer to use in sending KEEPALIVE messages to this peer. This time should be one third of the HOLDTIME parameter. The actual value used for the keep alive interval is determined once the BGP connection is opened, since the hold time interval is calculated as part of the BGP connection opening. The actual keep alive interval is such that the ratio of configured keep alive interval to hold time interval is the same as actual keep alive interval to negotiated hold time interval. If the hold time is negotiated to be 0 seconds, then the keep alive interval will also be 0 seconds, in which case KEEPALIVE messages will not be sent.

The MAXPREFIX parameter specifies how many network prefixes may be received from this peer. The use of this parameter is to provide a safety mechanism in case the peer sends more prefixes than might normally be expected to be sent. If OFF is specified, there is no maximum prefix checking. The default value is OFF.

The MAXPREFIXACTION parameter specifies the action to take when a peer has sent a number of prefixes which exceeds the number specified by the MAXPREFIX parameter. If WARNING is specified, the router will only log warnings when the maximum number of prefixes in exceeded. If TERMINATE is specified, the peer connection will be reset as well as warnings being logged. The default value is WARNING.

The MINASORIGINATED parameter specifies the time interval in seconds between successive UPDATE messages from this router that specify routes

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) SET BGP PEER 40-45

originating in this router’s Autonomous System. If DEFAULT is specified, the interval will be 15 seconds.

The MINROUTEADVERT parameter specifies the time interval between successive advertisements of a given destination to this peer. This interval applies to destinations learned from peers in other autonomous systems. If DEFAULT is specified, the interval will be 30 seconds.

The NEXTHOPSELF parameter specifies whether or not to force the next hop for updates sent to this peer to be this router or not. If YES is specified, all updates to this peer will specify this router as the next hop. If NO is specified, the next hop will be specified as per RFC1771. The default value of this parameter is NO.

The OUTFILTER parameter specifies the routing filter used to filter networks sent in BGP UPDATE messages to this peer. The filter must already have been defined with the ADD IP FILTER command on page 8-64 of Chapter 8, Internet Protocol (IP)and must be a routing filter whose index is in the range 300 to 399. If NONE is specified, filtering of networks to this peer is turned off and all networks are allowed, except those filtered in other ways.

The OUTPATHFILTER parameter specifies the AS path filter used to filter networks sent in BGP UPDATE messages to this peer. The filter does not have to have been defined with the ADD IP ASPATHLIST command on page 8-60 of Chapter 8, Internet Protocol (IP). If NONE is specified, filtering of networks by AS path matching is turned off and all networks are allowed, except those filtered in other ways.

The OUTROUTEMAP parameter specifies a route map to use to filter and modify updates to this peer. The value to this parameter is the name of a route map already defined with the ADD IP ROUTEMAP command on page 8-84 of Chapter 8, Internet Protocol (IP). If no value is specified, there is no route map associated with outgoing updates to this peer and no filtering or modification of updates will take place.

If more than one of the OUTFILTER, OUTPATHFILTER or OUTROUTEMAP parameters is specified, the order in which they are applied becomes important. If an OUTPATHFILTER is specified, it is applied first. The AS path filter will filter out entire groups of networks if a match is made. If an OUTFILTER is specified, it is applied second. This has the effect of filtering out certain network prefixes from the UPDATE message. If an OUTROUTEMAP is specified, it is applied last. This has the effect of filtering out network prefixes, but can also be used to change BGP route attributes before the route is added to the BGP UPDATE message.

The REMOTEAS parameter specifies the remote Autonomous System to which this peer belongs. If the AS number is the same as this router’s AS number, the peer is an Internal BGP (IBGP) peer. If the remote AS number is different from this router’s AS number, the peer is an External BGP (EBGP) peer.If the remote AS numbers are different but the routers have the same confederation peer, the peer is a confederation BGP peer.

The SENDCOMMUNITY parameter specifies whether or not the COMMUNITY attribute should be present in UPDATE messages originating from this router to this peer. If NO is specified, the COMMUNITY attribute will not be set in UPDATE messages to this peer. If YES is specified, the COMMUNITY attribute will be set in UPDATE messages to this peer. The

Software Release 2.3.1C613-03038-00 REV A

40-46 SHOW BGP AR Series Router Software Reference

actual value of the COMMUNITY attribute can be set by using a route map for outgoing updates which sets the COMMUNITY for a particular value.

Examples To set authentication for a BGP peer whose IP address is 192.168.1.1, use the command:

SET BGP PEER=192.168.1.1 AUTHENTICATION=RFC2385 PASSWORD="3a^t4r7i9c2k5y^p1a4ss7w8o9r0d#$%!@#xxx"

See Also ADD BGP PEERADD IP ASPATHLIST in Chapter 8, Internet Protocol (IP)ADD IP FILTER in Chapter 8, Internet Protocol (IP)ADD IP ROUTEMAP in Chapter 8, Internet Protocol (IP)DELETE BGP PEERDISABLE BGP PEERENABLE BGP PEERRESET BGP PEERSHOW BGP PEER

SHOW BGP

Syntax SHOW BGP

Description This command displays information about BGP global configuration and operation (Figure 40-13 on page 40-46, Table 40-6 on page 40-46).

Figure 40-13: Example output from the SHOW BGP command.

BGP router ID ................. 192.168.1.1Local autonomous system ....... 123Confederation ID .............. 1234Local preference .............. 100 (default)Multi Exit Discriminator ...... -EBGP route preference ......... 170 (default)IBGP route preference ......... 170 (default)Route table route map ......... -Number of peers Defined ..................... 4 Established ................. 2BGP route table Iteration ................... 231 Number of routes ............ 12654 Route table memory .......... 431872

Table 40-6: Parameters displayed in the output of the SHOW BGP command.

Parameter Meaning

BGP router ID The router ID for BGP for this router. Calculated as the IP address of the local interface or the first IP interface found.

Local autonomous system The number of the Autonomous System to which this router belongs.

Confederation ID The AS number of the AS confederation to which this router belongs.

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) SHOW BGP AGGREGATE 40-47

Examples To show general BGP parameters and a summary of BGP operations, use the command:

SHOW BGP

See Also SHOW BGP AGGREGATESHOW BGP IMPORTSHOW BGP NETWORKSHOW BGP PEERSHOW BGP ROUTE

SHOW BGP AGGREGATE

Syntax SHOW BGP AGGREGATE

Description This command displays information about the BGP aggregate entries configured in this router (Figure 40-14 on page 40-48, Table 40-7 on page 40-48).

Local preference The value of the local preference for this router. This is sent to internal BGP peers to help in the decision process for deciding which BGP routes get put into the main routing table.

Multi-Exit Discriminator The value of the Multi-Exit Discriminator for this router. This is sent to external BGP peers to help in the decision process for deciding which BGP routes get put into the main routing table.

EBGP route preference The route table preference given to routes learned via EBGP.

IBGP route preference The route table preference given to routes learned via IBGP.

Route table route map The name of the route map that BGP uses before entering a route into the route table.

Number of peers Counters giving the number of configured and established peers.

Defined The number of peers currently configured on the router.

Established The number of peers currently in the established state.

BGP route table Information about the BGP route table.

Iteration The number of times the BGP route table has been modified.

Number of routes The number of routes in the BGP route table.

Route table memory The amount of router memory currently used in the BGP route table.

Table 40-6: Parameters displayed in the output of the SHOW BGP command.

Parameter Meaning

Software Release 2.3.1C613-03038-00 REV A

40-48 SHOW BGP CONFEDERATION AR Series Router Software Reference

Figure 40-14: Example output from the SHOW BGP AGGREGATE command.

Examples To display information about BGP aggregates, use the command:

SHOW BGP AGGREGATE

See Also ADD BGP AGGREGATEDELETE BGP AGGREGATESET BGP AGGREGATESHOW BGPSHOW IP ROUTEMAP in Chapter 8, Internet Protocol (IP)

SHOW BGP CONFEDERATION

Syntax SHOW BGP CONFEDERATION

Description This command displays information about the BGP confederation setup of this router (Figure 40-15 on page 40-48, Table 40-8 on page 40-49).

Figure 40-15: Example output from the SHOW BGP CONFEDERATION command.

BGP aggregate entries

Prefix Summary Route map---------------------------------------------- 192.168.248.0/21 Yes aggregate_map192.168.16.0/21 No - ----------------------------------------------

Table 40-7: Parameters displayed in the output of the SHOW BGP AGGREGATE command.

Parameter Meaning

Prefix The prefix for this aggregate entry. This is the prefix that BGP will advertise for this aggregate as long as a route which is a subset of this prefix is present in the BGP routing table.

Summary One of "Yes" or "No". "Yes" means that the aggregate route only will be advertised, not any of the subset routes. "No" means that subset routes will also be advertised.

Route map The name of the route map that is used to filter routes for this aggregate entry and set the BGP attributes for the aggregate route entry.

BGP confederation information

Local AS ................ 60001Confederation ID ........ 1234Confederation peers ..... 60002 60003Peers ................... 192.168.1.1 (AS 60001, IBGP) 192.169.3.2 (AS 60002, CBGP) 192.170.4.5 (AS 7658, EBGP)

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) SHOW BGP IMPORT 40-49

Examples To display information concerning the AS confederation to which this router belongs, use the command:

SHOW BGP CONFEDERATION

See Also ADD BGP CONFEDERATIONPEERDELETE BGP CONFEDERATIONPEERSET BGPSET IP AUTONOMOUS in Chapter 8, Internet Protocol (IP)SHOW BGP

SHOW BGP IMPORT

Syntax SHOW BGP IMPORT

Description This command displays information about the BGP import entries present in the router (Figure 40-16 on page 40-49, Table 40-9 on page 40-50).

Figure 40-16: Example output from the SHOW BGP IMPORT command.

Table 40-8: Parameters displayed in the output of the SHOW BGP CONFEDERATION command.

Parameter Meaning

Local AS The AS number of the AS to which this router belongs. This must contain a valid value before BGP can function correctly.

Confederation ID The AS number of the AS confederation to which this router belongs. The AS confederation will behave to external BGP peers as this AS. Only needs to be set if this router has a peer relationship with a BGP router outside the confederation.

Confederation peers The AS numbers of Autonomous Systems in the router’s AS confederation.

Peers A list of the configured BGP peers, from the point of view of AS confederation configuration. For each peer, the peer address, peer AS and BGP type is given. BGP type is one of "EBGP" (external BGP, peer is in a different AS and outside the AS confederation), "CBGP" (confederation BGP, peer is in a different AS but inside the AS confederation) or "IBGP" (internal BGP, peer is in the same AS as this router).

BGP import entries

Proto Route map-------------------------- OSPF ospf_proto_mapRIP rip_proto_map --------------------------

Software Release 2.3.1C613-03038-00 REV A

40-50 SHOW BGP NETWORK AR Series Router Software Reference

Examples To show the BGP import entries on this router, use the command:

SHOW BGP IMPORT

See Also ADD BGP IMPORTDELETE BGP IMPORTSET BGP IMPORTSHOW IP ROUTEMAP in Chapter 8, Internet Protocol (IP)

SHOW BGP NETWORK

Syntax SHOW BGP NETWORK

Description This command displays information about the BGP network entries configured in this router (Figure 40-17 on page 40-50, Table 40-10 on page 40-50).

Figure 40-17: Example output from the SHOW BGP NETWORK command.

Examples To display information about BGP networks, use the command:

SHOW BGP NETWORK

Table 40-9: Parameters displayed in the output of the SHOW BGP IMPORT command.

Parameter Meaning

Protocol The routing protocol whose routes will be imported into BGP; one of "OSPF", "RIP" or "Static".

Route map The name of the route map used to filter routes and set attributes for routes imported into BGP

BGP network entries

Prefix Route map------------------------------------ 192.168.248.0/21 network_map 192.168.16.0/21 -------------------------------------

Table 40-10: Parameters displayed in the output of the SHOW BGP NETWORK command.

Parameter Meaning

Prefix The prefix for this network entry. This is the prefix that BGP will advertise for this network as long as a route which matches this prefix exactly is present in the BGP routing table.

Route map The name of the route map that is used to filter routes and set the BGP attributes for this network entry.

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) SHOW BGP PEER 40-51

See Also ADD BGP NETWORKDELETE BGP NETWORKSHOW BGPSHOW IP ROUTEMAP in Chapter 8, Internet Protocol (IP)

SHOW BGP PEER

Syntax SHOW BGP PEER[=ipadd]

where:

� ipadd is an IP address in dotted decimal notation.

Description This command displays summary information about the specified BGP peer or all BGP peers.

The PEER parameter specifies the IP address of the BGP peer about which detailed information is to be displayed. If a value is not specified, summary information is displayed for all BGP peers (Figure 40-18 on page 40-51 and Table 40-11 on page 40-51). If a value is specified, detailed information about the specified BGP peer is displayed (Figure 40-19 on page 40-52, Table 40-12 on page 40-52).

Figure 40-18: Example summary output from the SHOW BGP PEER command.

BGP peer entries

Peer State AS InMsg OutMsg-------------------------------------------------------------192.168.2.254 Estab 12345 23456 3245192.168.3.16 Idle(D) 123 2 3

Table 40-11: Example summary output from the SHOW BGP PEER command.

Parameter Meaning

Peer The IP address of the BGP peer.

State The BGP peer state; one of "Idle", "Idle(D)", "Connect", "Active" "OpenSent", "OpenConf" and "Estab". "Idle(D)" indicates that the peer is idle and also disabled.

AS The number of the autonomous system to which this peer belongs.

InMsg The number of messages received from this peer since the TCP connection opened.

OutMsg The number of messages sent to this peer since the TCP connection opened.

Software Release 2.3.1C613-03038-00 REV A

40-52 SHOW BGP PEER AR Series Router Software Reference

Figure 40-19: Example detailed output from the SHOW BGP PEER command.

.

Peer ................ 192.168.2.254Description ......... Sprint’s AS 12345State ............... EstablishedRemote AS ........... 12345Connect Retry ....... 200sHold time ........... 90s (actual 0s)Keep alive .......... 30s (actual 0s - no KEEPALIVES)Min AS originated ... 20sMin route advert .... 40sFiltering In filter ......... - In path filter .... - In route map ...... - Out filter ........ 334 Out path filter ... - Out route map ..... -Max prefix .......... 2000 (action is WARNING)External hops ....... 5 (EBGP multihop enabled)Next hop self ....... No Send community ...... No Messages In/Out ..... 23456/3245 Debugging ........... - Device ............ -

Table 40-12: Parameters displayed in the detailed output of the SHOW BGP PEER command.

Parameter Meaning

Peer The IP address of the BGP peer.

Description The description set for this BGP peer.

State The BGP peer state; one of "Idle", "Idle(D)", "Connect", "Active" "OpenSent", "OpenConfirm" and "Established". "Idle(D)" indicates that the peer is idle and also disabled.

Remote AS The number of the autonomous system to which this peer belongs.

Connect Retry The time interval for retrying the initial TCP connection to this peer in the event of a connection failure.

Hold time The configured and actual hold times for this peer. The actual hold time is the lower of the configured hold times of the peer and this router.

Keep alive The configured and actual keep alive times for this peer. The actual keep alive time is set by the actual hold time in such a way that the ratio of actual keep alive to hold time is the same as the ratio of configured keep alive to hold time.

Min AS originated The minimum time between advertisements of routes which originate in this autonomous system.

Min route advert The minimum time between advertisements of routes which originate outside this autonomous system.

Filtering Settings for inward and outward filtering of routing information via BGP.

In filter The traffic filter used for filtering incoming routes from this peer.

In path filter The AS path filter used for filtering incoming routes from this peer.

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) SHOW BGP PEER 40-53

Examples To display summary information for all BGP peers, use the command:

SHOW BGP PEER

To display detailed information for the BGP peer 192.168.1.1, use the command:

SHOW BGP PEER=192.168.1.1

See Also ADD BGP PEERDELETE BGP PEERSET BGP PEERSHOW BGPSHOW IP ROUTEMAP in Chapter 8, Internet Protocol (IP)P

In route map The route map used for filtering incoming routes from this peer.

Out filter The traffic filter used for filtering outgoing routes to this peer.

Out path filter The AS path filter used for filtering outgoing routes to this peer.

Out route map The route map used for filtering outgoing routes to this peer.

Max prefix The maximum number of route prefixes that may be received from this peer, and the action taken when this number is exceeded. The action is one of "WARNING" or "TERMINATE".

External hops The number of hops that can be used to reach this peer, if it is an EBGP peer. Having this number exceed 1 allows multihop EBGP.

Next hop self Whether or not this router will advertise to this peer that the next hop for all routes is itself; one of "No" or "Yes".

Send community Whether or not this router will send the community attribute in the path attributes of UPDATE messages; one of "Yes" or "No".

Messages In/Out The number of incoming/outgoing BGP messages from/to this peer.

Debugging The debugging types enabled for this peer; one or more of "MSG", "STATE", "UPDATE" or "ALL".

Device The device to which debugging output is being sent.

Table 40-12: Parameters displayed in the detailed output of the SHOW BGP PEER command.

Parameter Meaning

Software Release 2.3.1C613-03038-00 REV A

40-54 SHOW BGP ROUTE AR Series Router Software Reference

SHOW BGP ROUTE

Syntax SHOW BGP ROUTE[=prefix] [REGEXP=aspathregexp] [COMMUNITY={INTERNET|NOEXPORT|NOEXPORTSUBCONFED|NOADVERTISE|1..4294967295}]

where:

� prefix is an IP address in dotted decimal notation, optionally followed by a ’/’ character and a decimal number from 0 to 32.

� aspathregexp is an AS path regular expression. See "AS Path Regular Expressions".

Description This command displays information about routes in the BGP routing table (Figure 40-20 on page 40-54, Table 40-13 on page 40-54). Entering the command without a value for the route parameter and with no other parameters will cause all BGP routes to be displayed. Entering a ROUTE parameter will cause only routes that match the prefix, or that are subnets of the prefix, to be displayed. Optional parameters allow the display to be restricted to routes with certain AS paths or communities.

The ROUTE parameter specifies the routes to be displayed, by network prefix. All routes that match the prefix or that are subnets of the prefix are displayed. If a value is not specified, all BGP routes (except as otherwise restricted by other parameters on the command line) are displayed.

The REGEXP parameter specifies an AS path regular expression which will restrict the routes displayed. Only routes whose AS path attribute matches the regular expression will be displayed. Routes may further be restricted by specifying a prefix with the ROUTE parameter, or by specifying a COMMUNITY parameter.

The COMMUNITY parameter restricts the routes displayed to those with the specified community in their community attribute. Routes which do not contain a community attribute will not be displayed if the COMMUNITY parameter is specified. Routes may further be restricted by specifying a prefix with the ROUTE parameter, or by specifying a REGEXP parameter.

Figure 40-20: Example output from the SHOW BGP ROUTE command.

BGP route table-------------------------------------------------------------------------- Prefix Next hop Origin MED Local pref Path -------------------------------------------------------------------------- 192.168.8.0/21 192.168.1.2 Incomplete 1234567890 1234567890

--------------------------------------------------------------------------

Table 40-13: Parameters displayed in the output of the SHOW BGP ROUTE command.

Parameter Meaning

Prefix The network prefix for this route

Next hop The IP address of the next hop for this route.

Software Release 2.3.1C613-03038-00 REV A

Border Gateway Protocol version 4 (BGP-4) SHOW BGP ROUTE 40-55

Examples To display the BGP route table for routes which pass through AS 1234, use the command:

SHOW BGP ROUTE REGEXP=1234

See Also SHOW BGPSHOW BGP AGGREGATESHOW BGP IMPORTSHOW BGP NETWORKSHOW BGP PEER

Origin The origin attribute for this route; one of "IGP", "EGP" or "Incomplete".

MED The Multi Exit Discriminator attribute for this route.

Local pref The local preference attribute for this route.

Path The AS path attribute for this route.

Table 40-13: Parameters displayed in the output of the SHOW BGP ROUTE command.

Parameter Meaning

Software Release 2.3.1C613-03038-00 REV A