[Top] [Prev] [Next] [Bottom]

Using the BGP4 Protocol


This document describes how to configure and monitor the Border Gateway Protocol (BGP). It contains the following sections:

Border Group Protocol Overview

How BGP Works

Setting Up BGP

Sample Policy Definitions

BGP Commands

Border Group Protocol Overview

Note: OpenROUTE Networks recommends that you run BGP with a minimum of 32M RAM.

BGP is an exterior gateway routing protocol used to exchange network reachability information among autonomous systems (ASs). An AS is essentially a collection of routers and endnodes that operate under a single administrative organization. Within each AS, routers and endnodes share routing information using an interior gateway protocol. The interior gateway protocol may be either RIP or OSPF.

BGP was introduced to facilitate the loop-free exchange of routing information between autonomous systems (ASs). Based on Classless Inter-Domain Routing (CIDR), BGP has evolved to support the aggregation and reduction of routing information.

In essence, CIDR is a strategy designed to address the following problems:

CIDR eliminates the concept of address classes and provides a method for summarizing n different routes into single routes. This significantly reduces the amount of routing information that BGP routers must store and exchange.

Note: OpenROUTE Networks supports BGP4, which is defined in RFC 1771.

How BGP Works

BGP is a routing protocol that provides reachability information. In essence, BGP routers selectively collect and advertise reachability information to and from BGP neighbors in their own and other autonomous systems (ASs). Reachability information consists of the sequences of AS numbers that form the paths to particular BGP speakers, and the list of IP addresses that can be reached via each advertised path. An AS is an administrative group of networks and routers that share reachability information using one or more Interior Gateway Protocols (IGPs), such as RIP or OSPF.

Routers that run BGP are called BGP speakers. These routers function as servers with respect to their BGP neighbors (their clients). Each BGP router opens a passive TCP connection on port 179 and listens for incoming connections from neighbors at this well-known address. The router also opens active TCP connections to enabled BGP neighbors. This TCP connection enables BGP routers to share and update reachability information with neighbors in the same or other ASs. Connections between BGP speakers in the same AS are called internal BGP (IBGP) connections, while connections between BGP speakers in different ASs are external BGP (EBGP) connections. A single AS may have one or many BGP connections to outside ASs.

Figure 1 shows two ASs. The BGP speaker in AS1 is attempting to establish a TCP connection with its neighbor in AS2. Once this connection is established, the routers are able to share reachability information.

Figure 1 BGP Connections Between Two Autonomous Systems

While the ASs shown in Figure 1 have only one BGP router, each could have multiple connections to other ASs. As an example of this, Figure 2 shows three interconnected ASs. AS1 has three BGP connections to outside ASs: one to AS2, one to AS3 and one to ASx. Similarly, AS3 has connections to AS1, AS2 and to ASy.

Figure 2 BGP Connections Among Three Autonomous Systems

Originate, Send and Receive Policies

Decisions on which reachability information to advertise (send) and which to accept (receive) are made on the basis of explicitly defined policy statements. OpenROUTE Networks BGP implementation supports three types of policy statements:

Once a TCP connection is established, the BGP speaker shown in Figure 1 can send its entire routing table to its BGP neighbor in AS2. However, for security or other reasons, it may not be desirable to send reachability information on each network to AS2. Similarly, it may not be desirable for AS2 to receive reachability information on each network in AS1.

Determining the Best Path

BGP uses the following rules of preference to determine the best path to an autonomous system. BGP checks updates it receives against these items in the order shown below. As soon as a criteria shows that one path is superior to another path, BGP selects that path and does not check the rest of the items.

1. Path with the highest Local Preference.

2. Path that this router originated.

3. Path with the lowest number of AS Prepends.

4. Path with the lowest origin type, where IGP is lower than EGP and EGP is lower than Incomplete.

5. Path with the lowest Multi-Exit Discriminator (MED) attribute.

6. Path the router learned through external BGP (EBGP) over path the router learned through internal BGP (IBGP).

7. Path with the lowest BGP neighbor ID IP address.

Influencing Routing Paths

When you set up BGP neighbors, you can artificially set some of these criteria to influence routing paths. Doing so allows you to balance the routing load over different network paths. The parameters you can set are:

AS Prepends

When a BGP router sends reachability information to a neighbor, it includes the sequence of AS numbers that form paths to particular BGP speakers. Each router that receives a route advertisement prepends its own AS number to the packet before forwarding the route to its neighbors. Each AS prepend indicates a hop.

For example, the following steps explain the default behavior of BGP prepends in Figure 3.

1. When the BGP router in AS 19 sends a BGP update to its neighbor in AS 20, the router in AS 19 prepends the number 19 to the BGP update.

2. The BGP router in AS 20 adds the number 20 to the BGP update and then forwards the update to its BGP neighbors in AS 30 and AS 40.

3. The BGP router in AS 30 adds the number 30 to the BGP update and then forwards the update to its BGP neighbor in AS40.

4. The BGP router in AS 40 receives two BGP updates. The update from AS 20 shows that there are two hops to AS 19 (20-19) through AS 20. The update from AS 30 shows that there are three hops to AS 19 (30-20-19) through AS 30.

Figure 3 Using AS Prepends

However, you can make it appear to AS 40 that there are an equal number of hops to AS 19 through AS 40 and AS 30. Therefore, AS 40 would not favor one route to AS 19 over the other route. To accomplish this, you would set the number of prepends AS 20 sends to AS 40 to two prepends, causing AS 20 to send a prepend of 20-20-19 to AS 40.

Local Preference

Another parameter you can set for BGP neighbors is local preference. Local preference is a number the router assigns to BGP updates the router receives from a BGP neighbor. The local preference overrides the path length. (The number of AS Prepends determines the path length.) You can use the local preference to assign a preference to incoming routes, which then affects how the router sends traffic to those BGP neighbors.

For example, when you set up the BGP router in AS 20 in Figure 4, you add two BGP neighbors, one for AS 30 and one for AS 40. When you add a BGP neighbor, you can assign a number as the local preference. If you leave the local preference at the default of 100, BGP does not use local preference as a criteria for determining which route to use. (See Determining the Best Path.)

Figure 4 Local Preference

However, if you wanted the BGP router in AS 20 to favor the path to AS 30 over AS 40, you would set the local preference for AS 40 to a higher number. For example, when you set up the BGP router in AS 20, you add the BGP router in AS 40 as a neighbor and you assign a number higher than 100 as the local preference.

BGP Config>add neighbor
Neighbor address [0.0.0.0]? 128.185.1.178
AS [0]? 40
Init timer [12]?
Connect timer [120]?
Hold timer [90]?
TCP segment size [1024]?

Local preference (0-9999) [100]? 200
Number of AS prepends when sending (1-20) [1]?
Send Multi-Exit Descriminator (0=No, 1=Yes) [0]?

Local Preference is transparent to the BGP routers in AS 30 and AS 40, it affects only the BGP router in AS 20.

Forcing Origin Type

Determining the Best Path lists the rules of preference BGP uses to determine the best path to an AS. As soon as one of these criteria shows that one path is superior to another path, BGP selects that path and does not check the rest of the items.

In some routing situations, you may want the path with the lowest Multi-Exit Discriminator (MED) attribute (criteria 5) to be the best path for a particular neighbor, instead of the path with the lowest origin type (criteria 4).

To force the software to use the lowest MED instead of the lowest origin type, you can artificially set the origin type in packets that BGP aends to the neighbor. To do this, use the change neighbor command and set the Force origin type parameter.

BGP Messages

BGP routers use four kinds of messages to communicate with their neighbors: OPEN, KEEP ALIVE, UPDATE, and NOTIFICATION.

Setting Up BGP

Setting up BGP involves three basic steps:

1. Enabling BGP

Enabling BGP requires you to specify the BGP router's unique AS Number. AS numbers are assigned by Stanford Research Institute Network Information Center.

2. Defining BGP Neighbors

BGP Neighbors are BGP routers with which a BGP speaker establishes a TCP connection. Once neighbors are defined, connections to them are established by default.

3. Defining Policies

The policies you establish determine which routes are imported and exported by the BGP speaker.

You can set up policies for different purposes. See Sample Policy Definitions.

The sections that follow explain each of these steps in detail.

Enabling BGP

To enable BGP, enter enable bgp, enter an AS number range from 1 to 65535, and set the TCP segment size. The TCP segment size is the maximum segment size BGP uses for passive TCP connections. The range is 1 to 65535. The default is 1024.

BGP Config>enable bgp
AS [0]? 167
TCP segment size [1024]?

The AS number range is 1 to 65535.

Defining BGP Neighbors

After enabling a BGP speaker, you must define its neighbors. BGP neighbors are internal or external. Internal neighbors exist in the same AS and do not need to have a direct connection to one another. External neighbors exist in different ASs. These must have a direct connection to one another.

To define internal or external BGP neighbors, use the add neighbor command. You must specify the IP address of the neighbor and assign an AS number to the neighbor. Internal neighbors must have the same AS number as the BGP speaker.

BGP Config>add neighbor
Neighbor address [0.0.0.0]? 192.0.190.178
AS [0]? 178
Init timer [12]? 30
Connect timer [120]?
Hold timer [90]? 30
TCP segment size [1024]? 512

Local preference (0-9999) [100]?
Number of AS prepends when sending (1-20) [1]?
Send Multi-Exit Descriminator (0=No, 1=Yes) [0]?

Adding a BGP neighbor automatically enables it, causing the BGP speaker to send out a connection request to the neighbor.

Adding Policies

OpenROUTE Networks supports three BGP add policy commands.
This command . . . lets you select the . . .
originate-policy internal gateway protocol (IGP) networks to export.

receive-policy route information to import from BGP peers.

send-policy route information to export to peers. Note that exportable route information can include information collected from neighboring ASs, as well as the routes that originate in the IGP.

If an AS is behaving as a transit AS, you must define the receive policies to select the routes from any BGP peer before the BGP software can export them to another BGP peer via send policy definitions.

Changing the Order of Policies

The order of policies is important because the router applies aggregates and policies in the order that you create them. If policies are the wrong order, BGP may fail to import or export reachability information in the manner that you intend.

You can change the order of aggregates and policies with the BGP move command.

Sample Policy Definitions

This section provides examples of some specific policies you can set up for a BGP speaker.

Use the BGP add command to define all policies.

Originate Policy Examples

Include All Routes for Advertisement

This example includes all routes in the BGP speaker's IGP routing table for advertisement. In this sense, you can view this command as the "default" originate policy statement for BGP.

Notice that the command specifies a range of addresses, rather than a single address.

BGP Config>add originate-policy inclusive
Network Prefix [0.0.0.0]?
Network Mask [0.0.0.0]?
Address Match (Exact/Range) [Range]? range
Tag [0]?

Exclude a Range of Routes

This example also specifies a range, but in this case the goal is to prevent the BGP speaker from advertising addresses in this range to its neighbors.

This example excludes all routes in the range 194.10.16.0 and 194.10.31.255 from the BGP routing table, which in turn prevents them from being advertised.

BGP Config>add originate-policy exclusive
Network Prefix [0.0.0.0]? 194.10.16.0
Network Mask [0.0.0.0]? 255.255.240.0
Address Match (Exact/Range) [Range]? range
Tag [0]?

Receive Policy Examples

Import all Routes from All BGP Neighbors

This example ensures that the BGP speaker will import all routes from all of its neighbors into its IGP routing table.

BGP Config>add receive-policy inclusive
Network Prefix [0.0.0.0]?
Network Mask [0.0.0.0]?
Address Match (Exact/Range) [Range]? range
Originating AS# [0]?
Adjacent AS# [0]?
IGP-metric [0]?

IGP-metric specifies the metric value with which the accepted routes are imported into the speaker's IGP routing table. You are only prompted to enter a value for IGP-metric when setting up a policy for route inclusion.

Block Specific Routes from a Transit AS

This example prevents the BGP speaker from importing any routes originating at AS 168 from neighboring AS 165. You might use this command if you do not want the BGP speaker to receive any routes from AS 168 for security reasons.

BGP Config>add receive-policy exclusive
Network Prefix [0.0.0.0]?
Network Mask [0.0.0.0]?
Address Match (Exact/Range) [Range]? range
Originating AS# [0]? 168
Adjacent AS# [0]? 165

Send Policy Examples

Restrict Route Advertisement to a Specific AS

This example restricts the BGP speaker. The speaker cannot advertise routes in the address range 143.116.0.0 to 143.116.255.255, that originate from AS 165, to autonomous system 168.

BGP Config>add send exclusive
Network Prefix [0.0.0.0]? 143.116.0.0
Network Mask [0.0.0.0]? 255.255.0.0
Address Match (Exact/Range) [Range]? range
Tag [0]? 165
Adjacent AS# [0]? 168

Advertise All Known Routes

This example ensures that the BGP speaker will advertise all routes originated from its IGP, and all routes learned from its neighboring autonomous systems.

BGP Config>add send policy inclusive
Network Prefix [0.0.0.0]?
Network Mask [0.0.0.0]?
Address Match (Exact/Range) [Range]? range
Tag [0]?
Adjacent AS# [0]?

BGP Commands

This section describes BGP configuration and monitoring commands.

Press Space twice after you type a command to display the available options for each command. Enter help for information about using the command line interface.

[C] means the command is available at the BGP config> prompt.

[M] means the command is available at the BGP> prompt.

Table 1 BGP Commands

Command Function
Add [C] Adds BGP aggregates, neighbors, or policies.

Change [C] Modifies information that was originally entered with the add command.

Delete [C] Deletes BGP configuration information that was entered with the add command.

Destinations [M] Displays all entries in the BGP routing table.

Disable [C] Disables certain BGP features.

Enable [C] Enables BGP speakers or BGP neighbors.

Exit [C] [M] Exits the process.

List [C] Displays BGP configuration items.

Move [C] Changes the order in which policies and aggregates are defined.

Neighbors [M] Displays currently active neighbors.

Paths [M] Displays all available paths in the database.

Sizes [M] Displays the number of entries in various databases.

Add [C]

Adds BGP information to your configuration.

Syntax: add

aggregate
neighbor
no-receive asnum
originate-policy
receive-policy
send-policy

aggregate

Causes the BGP speaker to aggregate a block of addresses, and advertise a single route to its BGP neighbors. You must specify the network prefix common to all the routes being aggregated and its mask.

The following example illustrates how to aggregate a block of addresses from 194.10.16.0 through 194.10.31.255.

Example: add aggregate

Network Prefix [0.0.0.0]? 194.10.16.0
Network Mask [0.0.0.0]? 255.255.240.0

When you add an aggregate definition, remember to define a policy to block the aggregated routes from being exported. If you do not, the router will support both the individual routes and the aggregate you have defined.

neighbor

Defines a BGP neighbor. The neighbor can be internal to the BGP speaker's AS, or external. An internal neighbor must exist on the same network as the speaker.

Example: add neighbor

Neighbor address [0.0.0.0]? 192.0.251.165
AS [0]? 165
Init timer [12]?
Connect timer [120]?
Hold timer [90]?
TCP segment size [1024]?

Local preference (0-9999) [100]?
Number of AS prepends when sending (1-20) [1]?
Send Multi-Exit Descriminator (0=No, 1=Yes) [0]? 1
Multi-Exit Descriminator, in hex [0xFFFFFFFF]?

Neighbor address

Address of the neighbor you wish to peer with. It could be within your own autonomous system (AS) or in another AS. If it's an external neighbor, both BGP speakers must share the same network. There is no such restriction for internal neighbors.

AS

Your own autonomous system number for internal neighbor or neighbor's autonomous system number.

Init Timer

The amount of time the BGP speaker waits to initialize resources and re-initiate transport connection with the neighbor in case the speaker has transitioned to IDLE state due to an error. If the error persists, this timer increases exponentially. The default is 12 seconds.

Connect Timer

The amount of time the BGP speaker waits to re-initiate transport connection to its neighbor, if the TCP connection fails while in either CONNECT or ACTIVE state. In the meantime, the BGP speaker continues to listen for any connection that its neighbor may initiate. The default is 120 seconds.

Hold Timer

The length of time the BGP speaker waits before assuming that the neighbor is unreachable. Both neighbors exchange the configured information in OPEN message and choose the smallest of the two timers as their negotiated Hold Timer value. The default is 90 seconds.

Once neighbors have established BGP connection, they exchange Keepalive messages at frequent intervals to ensure that the connection is still alive and the neighbors are reachable. The KeepAlive timer interval is calculated to be one third of the negotiated hold timer value. Hence the hold timer value must be either zero or at least three seconds.

Note that on switched lines, you may wish to have the Hold Timer value of zero to save bandwidth by not sending KeepAlives at frequent intervals.

TCP Segment Size

The maximum data size that may be exchanged on the TCP connection with a neighbor. This value is used for active TCP connection with the neighbor. It defaults to 1024, but can be set up to 65535.

Local Preference

Assigns a number to BGP updates the router receives from a BGP neighbor. You can use the local preference to balance the load of traffic the router sends to its BGP neighbors. See Local Preference.

Number of AS prepends when sending

Each router that receives a route advertisement prepends its own AS number to the packet before forwarding the route to its neighbors. Each AS prepend indicates a hop. You can influence routing by setting up the router to add extra prepends to updates it sends to certain neighbors. See AS Prepends.

Send Multi-Exit Discriminator

A multi-exit discriminator is one of the criteria BGP uses to determine the best path. See Determining the Best Path. By default, the router does not send a multi-exit discriminator to its neighbors.

Multi-Exit Discriminator in hex

If you choose to send an MED to a neighbor, enter the discriminator in hex. If the router uses the MED to determine the best path, the router chooses the path with the lowest MED.

no-receive

Use add no-receive to exclude updates from a particular AS.

Example: add no-receive

Enter AS: [0]? 178

originate-policy (exclusive/inclusive)

Creates a policy that determines whether a specific address, or range of addresses, can be imported to the BGP speaker's routing table from the IGP routing table.
Exclusive

Exclusive policies prevent route information from being included in the BGP speaker's routing table.

Inclusive

Inclusive policies ensure that specific routes are included in the BGP speaker's routing table.

Network prefix

The network prefix for the addresses being affected.

Address match

The address, or range of addresses, that are affected by the policy statement.

Tag

The value that has been set for a particular AS. All tag values match that of the AS from which they were learned.

The following example includes all routes in the BGP speaker's IGP routing table to be advertised.

Example: add originate-policy exclusive

Network Prefix [0.0.0.0]?
Network Mask [0.0.0.0]?
Address Match (Exact/Range) [Range]? range
Tag [0]?

See Originate Policy Examples for detailed examples of this policy command.

receive-policy (exclusive/inclusive)

Creates policies that determine what routes are imported to the BGP speaker's routing table.

Example: add receive-policy exclusive

Network Prefix [0.0.0.0]? 10.0.0.0
Network Mask [0.0.0.0]? 255.0.0.0
Address Match (Exact/Range) [Range]? range
Originating AS# [0]? 168
Adjacent AS# [0]? 165

See Receive Policy Examples for detailed examples of this policy command.

send-policy (exclusive/inclusive)

Creates policies that determine which of the BGP speaker's learned routes are re-advertised. These routes can be internal or external to the BGP speaker's AS.

Example: add send exclusive

Network Prefix [0.0.0.0]? 180.220.0.0
Network Mask [0.0.0.0]? 255.255.0.0
Address Match (Exact/Range) [Range]? range
Tag [0]?
Adjacent AS# [0]? 25

See Send Policy Examples for detailed examples of this policy command.

Change [C]

Changes an BGP configuration item previously installed by the add command.

Syntax: change

aggregate
neighbor
originate-policy
receive-policy
send-policy

aggregate

Changes the definition of an aggregate. See add aggregate.

Example: change aggregate

Enter index of aggregate to be modified [1]? 1
Network Prefix [128.185.0.0]? 128.128.0.0
Network Mask [255.255.0.0]? 255.192.0.0

neighbor

Lets you change the configuration of a neighbor. See add neighbor for a description of these parameters.

Example: change neighbor

Neighbor address to be modified [0.0.0.0]? 192.0.251.165
AS [165]?
Init timer [12]?
Connect timer [60]?
Hold timer [12]? 0
TCP segment size [1024]?

Local preference (0-9999) [100]?
Number of AS prepends when sending (1-20) [1]?
Send Multi-Exit Descriminator (0=No, 1=Yes) [0]?
Force origin type (0=NONE, 1=IGP, 2=EGP, 3=OTHER) [0]?

For a description of Force origin type, see Forcing Origin Type.

originate-policy

Changes an existing originate policy definition. See add originate-policy.

This example alters the BGP speaker's originate policy. Rather than excluding networks with prefix 194.10.16.0 from the IGP routing table, the policy now includes all routes.

Example: change originate-policy

Enter index of originate-policy to be modified [1]?
Policy Type (Inclusive/Exclusive) [Exclusive]? inclusive
Network Prefix [194.10.16.0]? 0.0.0.0
Network Mask [255.255.240.0]? 0.0.0.0
Address Match (Exact/Range) [Range]?
Tag [0]?

receive-policy

Changes an existing receive policy definition. See add receive-policy.

This example adds a restriction to the BGP speaker's receive-policy. Rather than import route information from every BGP peer into its IGP routing table, it now prevents routes from AS 165 from being imported.

Example: change receive-policy

Enter index of receive-policy to be modified [1]?
Policy Type (Inclusive/Exclusive) [Inclusive]? exclusive
Network Prefix [0.0.0.0]?
Network Mask [0.0.0.0]?
Address Match (Exact/Range) [Range]?
Originating AS# [0]?
Adjacent AS# [0]? 165

send-policy

Alters an existing send policy to one that is more inclusive or more exclusive. See add send-policy.

This example adds a restriction to the BGP speaker's send policy. The restriction ensures that all routes in the address range 194.10.16.0 to 194.10.31.255 are excluded when advertising to autonomous system 165.

Example: change send-policy

Enter index of send-policy to be modified [1]?
Policy Type (Inclusive/Exclusive) [Inclusive]? exclusive
Network Prefix [0.0.0.0]? 194.10.16.0
Network Mask [0.0.0.0]? 255.255.240.0
Address Match (Exact/Range) [Range]?
Tag [0]?
Adjacent AS# [0]? 165

Delete [C]

Deletes a BGP configuration item previously installed by the add command.

Syntax: delete

aggregate
neighbor
no-receive
originate-policy
receive-policy
send-policy

aggregate

You must specify the index number of the aggregate you want to delete. The index number is equivalent to the AS number.

Example: delete aggregate

Enter index of aggregate to be deleted [1]? 1

neighbor

Deletes a BGP neighbor. You must specify the neighbor's network address.

Example: delete neighbor

Neighbor address to delete [0.0.0.0]? 192.0.251.165

no-receive

Deletes the no-receive policy set up for a particular AS. You must specify the AS number.

Example: delete no-receive

Enter AS: [0]? 168

originate-policy

Deletes a specific originate policy. You must specify the index number associated with the policy.

Example: delete originate-policy

Enter index of originate-policy to be deleted [1]? 2

receive-policy

Deletes a specific receive policy. You must specify the index number associated with the policy.

Example: delete receive-policy

Enter index of receive-policy to be deleted [1]?

delete send-policy

Deletes a specific send policy. You must specify the index number associated with the policy.

Example: delete send-policy

Enter index of send-policy to be deleted [1]? 4

Destinations [M]

Use the destinations command to dump all BGP routing table entries, or to display information on routes advertised to, or received from, specified BGP neighbor addresses (destinations).

Syntax: destinations net address/net address net mask

advertised-to network address
received-from network address
Example: destinations

Network Mask NextHop AAG AGRAS ORG AS-Path
128.185.0.0 FFFF0000 192.0.251.165 No 0 IGP
142.4.0.0 FFFF0000 192.0.190.178 No 0 IGP seq[178-80]
143.116.0.0 FFFF0000 128.185.252.168 No 0 IGP seq[178-701-72]
192.0.190.0 FFFFFF00 192.0.251.165 No 0 IGP
192.0.251.0 FFFFFF00 192.0.251.165 No 0 IGP
194.10.16.0 FFFFF000 192.0.251.167 No 167 IGP seq[167]

destinations

Displays detailed information on the specified route or destination network. The command shows how a specific route was learned, the best path to a specific destination, the metric associated with the route, and other information.

Example: destinations 3.0.0.0

Network Mask NextHop AAG AGRAS ORG AS-Path
3.0.0.0 FF000000 204.6.103.1 No 0 INC seq[174-701-80]

Dest:3.0.0.0, Mask:FF000000, Age:190, Upd#:343959, LastSent:0021:50:37

Eligible paths: 1
PathID: 25011 - (Best Path)
ASpath: seq[174-701-80]
LocalPref: 100, Pathlen: 3, Origin: INC, MED: 0x0 (defaulted)
BGP Neighbor-id: 38.1.3.9
NextHop: 204.6.103.1, Neighbor: 204.6.103.1, IGPMetric: 0,
AtomicAggr: No

AS-Path

Enumeration of ASs along the path.
- seq: Sequence of ASs in order in the path
- set: Set of ASs in the path.

Origin

Originator of the destination. This is either EGP, IGP, or Incomplete (originated by some other means not known).

LocalPref

Local router's degree of preference for the destination. See Local Preference.

Metric

Path metric with which the route is imported.

NextHop

Address of the router to use as the forwarding address for destinations reachable via the given path.

AtomicAggr

Indicates whether the router advertising the path has included the path in an atomic-aggregate.

destinations net address net mask

Displays detailed information on the specified route or destination network. The command shows how a specific route was learned, the best path to a specific destination, the metric associated with the route, and other information.

This command is useful in cases where multiple network addresses have the same prefix and different masks. In such cases, specifying the network mask narrows the scope of the information presented.

Example: destinations 3.0.0.0 255.0.0.0

Dest:3.0.0.0, Mask:FF000000, Age:190, Upd#:343959, LastSent:0021:52:40
Eligible paths: 1
PathID: 25011 - (Best Path)
ASpath: seq[174-701-80]
LocalPref: 100, Pathlen: 3, Origin: INC, MED: 0x0 (defaulted)
BGP Neighbor-id: 38.1.5.9
NextHop: 204.6.123.1, Neighbor: 204.6.123.1, IGPMetric: 0,
AtomicAggr: No

advertised-to net address

Lists all routes advertised to the specified BGP neighbor.

Example: destinations advertised-to

BGP neighbor address [0.0.0.0]? 192.0.251.165

Destinations advertised to BGP neighbor 192.0.251.165

Network Mask NextHop AAG AGRAS ORG AS-Path
194.10.16.0 FFFFF000 194.10.16.167 No 167 IGP
192.0.190.0 FFFFFF00 192.0.251.165 No 0 IGP seq [165]
142.4.0.0 FFFF0000 192.0.251.165 No 0 IGPseq [165-178]
143.116.0.0 FFFF0000 128.185.250.168 No 0 IGP seq [168]

received-from net address

Lists all routes received from the specified BGP neighbor.

Example: destinations received-from

BGP neighbor address [0.0.0.0]? 128.185.250.167

Destinations obtained from BGP neighbor 128.185.250.167

Network Mask NextHop AAG AGRAS ORG AS-Path
194.10.16.0 FFFFF000 128.185.250.167 No 167 IGP seq[167]
192.0.190.0 FFFFFF00 128.185.250.167 No 0 IGP seq[167-165]
142.4.0.0 FFFF0000 128.185.250.167 No 0 IGP seq[167-165-178]

Disable [C]

Disables BGP or a BGP neighbor. Note that when you add a neighbor, the router automatically enables the neighbor.

Syntax: disable

bgp
neighbor

bgp

Disables BGP on the router.

Example: disable bgp

neighbor

Disables a BGP neighbor that you added.

Example: disable neighbor

Neighbor address [0.0.0.0]? 192.0.190.178

Enable [C]

Activates the BGP features, capabilities, and information added to your BGP configuration.

Syntax: enable

bgp
neighbor

bgp

Enables the BGP protocol.

Example: enable bgp

AS [0]? 165
TCP segment size [1024]?

Enable BGP load-sharing (0=No, 1=Yes) [0]?

neighbor

Enables a BGP neighbor.

Example: enable neighbor

Neighbor address [0.0.0.0] 192.0.190.178

Exit [C] [M]

Use the exit command to return to the previous prompt.

Syntax: exit

Example: exit

List [C]

Displays various pieces of the BGP configuration.

Syntax: list

aggregate
all
bgp
neighbor
no-receive
originate-policy
receive-policy
send-policy

aggregate

Lists all aggregated routes defined with the add aggregate command.

Example: list aggregate

Aggregation:
Index Prefix Mask
1 194.10.16.0 255.255.240.0

all

Lists the BGP neighbors, policies, aggregated routes, and no-receive-as records in the current BGP configuration.

Example: list all

BGP Protocol: Enabled AS: 6654
TCP-Segment Size: 1024 BGP load-sharing: Enabled

Configured Neighbors: AS
Neighbor Init Conn Hold TCPSEG Local Pre- MED MED
Address Ena AS Timer Timer Timer Size Pref pends St Value
204.6.10.1 Y 174 12 120 90 1024 100 1 ENA 00000200
128.185.20.64 Y 6654 12 120 90 1024 100 1 DIS FFFFFFFF

Receive-Policies:

Index Type Prefix Mask Match OrgAS AdjAS IGPmetric
1 INCL 0.0.0.0 0.0.0.0 Range 0 0 0

Send-Policies:
Index Type Prefix Mask Match Tag AdjAS
1 INCL 0.0.0.0 0.0.0.0 Range 0 0

Originate-Policies:
Index Type Prefix Mask Match Tag
1 INCL 128.185.0.0 255.255.0.0 Exact 0
2 EXCL 0.0.0.0 0.0.0.0 Range 0

No aggregation records in configuration.
No no-receive-AS records in configuration.

bgp

Displays the BGP configuration.

Example: list bgp


BGP Protocol: Enabled AS: 1
TCP-Segment Size: 1024 BGP load-sharing: Disabled

neighbor

Displays information on BGP neighbors. See add neighbor for a description of the items displayed.

Example: list neighbor

Configured Neighbors: AS
Neighbor Init Conn Hold TCPSEG Local Pre- MED MED
Address Ena AS Timer Timer Timer Size Pref pends St Value
128.185.3.2 Y 3 12 120 90 1024 100 1 DIS FFFFFFFF

no-receive

Displays information on no-receive-AS definitions that have been added to the BGP configuration.

Example: list no-receive

AS-PATH with following ASs will be discarded:
AS 178
AS 165

originate-policy

Displays information on the originate policies that have been added to the BGP configuration.

Example: list originate-policy

Originate-Policies:
Index Type Prefix Mask Match Tag
1 EXCL 194.10.16.0 255.255.240.0 Range 0
2 INCL 0.0.0.0 0.0.0.0 Range 0

receive-policy

Displays information on the receive policies that have been added to the BGP configuration. You can display all receive policies defined for an AS, or display policies by index or prefix number.

Example: list receive-policy

Receive-Policies:
Index Type Prefix Mask Match OrgAS AdjAS IGPmetric
1 EXCL 0.0.0.0 0.0.0.0 Range 178 165
2 INCL 0.0.0.0 0.0.0.0 Range 0 0 0

send-policy

Displays information on send policies defined for specified ASs. You can display all send policies defined for an AS, or display policies by index or prefix number.

Example: list send-policy

Send-Policies:
Index Type Prefix Mask Match Tag AdjAS
1 EXCL 194.10.16.0 255.255.240.0 Range 0 165
2 INCL 0.0.0.0 0.0.0.0 Range 0 0

Move [C]

Changes the order in which policies and aggregates have been defined. This changes the order in which the router applies existing policies to route information. Before using this command, you can use the list command to see what policies are defined.

Syntax: move

aggregate
originate-policy
receive-policy
send-policy

aggregate

Moves an aggregate in the list of aggregated routes.

Example: move aggregate

Enter index of aggregate to move [1]? 1
Move record AFTER record number [0]? 2

originate-policy

Moves an originate policy in the list of policies.

Example: move originate-policy

Enter index of originate-policy to move [1]? 3
Move record AFTER record number [0]? 5

receive-policy

Moves a receive policy in the list of policies.

Example: move receive-policy

Enter index of receive-policy to move [1]? 2
Move record AFTER record number [0]? 3

send-policy

Moves a send policy in the list of policies.

Example: move send-policy

Enter index of send-policy to move [1]? 1
Move record AFTER record number [0]? 3

Neighbors [M]

Displays information on all active BGP neighbors or on a particular BGP neighbor.

Syntax: neighbors [internet address]

Example: neighbors

IP-Address State DAY-HH:MM:SS BGP-ID AS Upd#
128.185.252.168 Established 000-00:48:52 128.185.142.168 168 16
192.0.190.178 Established 000-02:01:49 142.4.140.178 178 16
192.0.251.167 Established 000-02:01:45 194.10.16.167 167 16

IP-Address

The IP address of the BGP neighbor.

State

Specifies the state of the connection. Possible states are:

Connect— Waiting for the TCP connection to the neighbor to be completed.
Active— In the event of TCP connection failure, the state is changed to Active, and the attempt to acquire the neighbor continues.
OpenSent— OPEN has been sent, and BGP waits for an OPEN message from the neighbor.
OpenConfirm— KEEPALIVE has been sent in response to neighbor's OPEN, and waits for a KEEPALIVE/ NOTIFICATION from the neighbor.
Established— A BGP connection is established, and can now start to exchange UPDATE messages.
BGP-ID

The neighbor's BGP Identification number.

AS

The neighbor's AS number.

Upd#

Sequence number of the last UPDATE message sent to the neighbor.

Enter neighbor followed by an IP address to display detailed data on a particular BGP neighbor.

Example: neighbor 192.0.251.167

Active Conn: Sprt:1026 Dprt:179 State: Established KeepAlive/Hold Time: 4/12
Passve Conn: None
TCP connection errors: 0 TCP state transitions: 0

BGP Messages: Sent Received Sent Received
Open: 1 1 Update: 11 11
Notification: 0 0 KeepAlive: 1828 1830
Total Messages: 1840 1842

Msg Header Errs: Sent Received Sent Received
Conn sync err: 0 0 Bad msg length: 0 0
Bad msg type: 0 0

Open Msg Errs: Sent Received Sent Received
Unsupp versions: 0 0 Unsupp auth code: 0 0
Bad peer AS ident:0 0 Auth failure: 0 0
Bad BGP ident: 0 0 Bad hold time: 0 0

Update Msg Errs: Sent Received Sent Received
Bad attr list: 0 0 AS routing loop: 0 0
Bad wlkn attr: 0 0 Bad NEXT_HOP atr: 0 0
Mssng wlkn attr: 0 0 Optional atr err: 0 0
Attr flags err: 0 0 Bad netwrk field: 0 0
Attr length err: 0 0 Bad AS_PATH attr: 0 0
Bad ORIGIN attr: 0 0

Total Errors: Sent Received Sent Received
Msg Header Errs: 0 0 Hold Timer Exprd: 0 0
Open Msg Errs: 0 0 FSM Errs: 0 0
Update Msg Errs: 0 0 Cease: 0 0

Paths [M]

Displays the paths stored in the path description database.

Syntax: paths

Example: paths

PathId NextHop AAG AGRAS RefCnt ORG AS-Path

0 10.2.0.3 No 0 2 IGP
4 192.2.0.2 No 0 2 IGP seq[2]
5 192.2.0.2 No 2 1 IGP seq[2]
6 192.2.0.2 No 0 1 IGP seq[2-1]
7 10.2.0.168 No 0 4 IGP
8 192.3.0.1 No 0 2 IGP seq[1]
9 192.2.0.2 No 2 1 IGP seq[2]
10 10.2.0.3 No 0 1 IGP

PathId

Path identifier

NextHop

Address of the router to use as the forwarding address for the destinations that can be reached via the given path.

AAG

Indicates if the path has been atomic-aggregated; that is, the router that is advertising the given path has selected a less specific route over the more specific one when presented with overlapping routes.

AGRAS

AS number of the BGP speaker that aggregated the routes.

RefCnt

Number of path entities referring to the descriptor.

ORG

Originator of the advertised destinations in the given path: either EGP, IGP, or Incomplete (originated by some other means not known).

AS-Path

Enumeration of ASs along the path.
- seq: Sequence of ASs in order in the path
- set: Set of ASs in the path.

Sizes [M]

Displays the number of entries stored in the various databases.

Syntax: sizes

Example: sizes

# Paths: 48531
# Path descriptors: 5579
Update sequence#: 636643
# Routing tbl entries (allocated): 50430
# Current tbl entries (not imported): 0
# Current tbl entries (imported to IGP): 48529

Paths

Eligible paths for all the routes in the BGP routing table.

Path descriptors

Path descriptors in the database used to hold common path information.

Update sequence#

Current update sequence number.

Routing tbl entries (allocated)

Entries in BGP routing table.

Current tbl entries
(not imported)

BGP routes not imported into IGP.

Current tbl entries (imported to IGP)

BGP routes imported into IGP.



[Top] [Prev] [Next] [Bottom]

docs@openroute.com
Copyright © 1999, OpenROUTE Networks, Inc. All rights reserved.