Note ¯ After making any changes to the BGP configuration, you must use the save all and reset bgp commands to ensure the changes take effect, and are retained after PortMaster reboots. If you are changing only peer-specific policy information, however, you need only reset the affected individual peers with the reset bgp peer Ipaddress command.
Command Syntax | |
---|---|
add bgp peer Ipaddress(sr) Ipaddress(dest) ASN | - see page 9-4 |
add bgp policy Policyname | - see page 9-5 |
add bgp summarization Prefix/NM | - see page 9-5 |
add propagation Protocol(src) Protocol(dest) Metric Filtername | - see page 7-3 |
delete bgp peer Ipaddress(dest) | - see page 9-6 |
delete bgp policy Policyname|all | - see page 9-6 |
delete bgp summarization Prefix/NM | - see page 9-7 |
delete propagation Protocol(src) Protocol(dest) | - see page 7-3 |
reset bgp [peer Ipaddress] | - see page 9-8 |
reset propagation | - see page 7-5 |
save bgp | - see page 9-8 |
set bgp as ASN | - see page 9-9 |
set bgp cluster-id Ipaddress | - see page 9-9 |
set bgp cma ASN | - see page 9-10 |
set bgp connect-retry-interval Seconds | - see page 9-10 |
set bgp enable|disable | - see page 9-11 |
set bgp hold-time Seconds | - see page 9-11 |
set bgp id Ipaddress | - see page 9-12 |
set bgp igp-lockstep on|off | - see page 9-12 |
set bgp keepalive-timer Seconds | - see page 9-13 |
set bgp peer Ipaddress(src) Ipaddress(dest) ASN [assume-default [Number]] [confederation-member] [route-reflector-client] [normal] [always-next-hop] {easy-multihome|[accept-policy Policyname|all] [inject-policy Policyname|all] [advertise-policy Policyname|all]} | - see page 9-13 |
set bgp policy Policyname [before] RuleNumber permit|deny|include Policyname [if [prefix [exactly] Prefix/NM] [prefix-longer-than NM] [as-path String|empty] [community Tag]] [then [input-multi-exit-disc Number|strip] [ degree-of-preference Number] [local-pref Number] [output-multi-exit-disc Number|strip] [next-hop Ipaddress] [community add|replace|strip Tag] [ignore-community-restrictions]] | - see page 9-17, page 9-21, page 9-24 |
set bgp policy Policyname blank | - see page 9-28 |
set bgp summarization Prefix/NM [as ASN] [cms ASN] [multi-exit-disc Number] [local-pref Number] [community Tag] [all] | - see page 9-29 |
set debug bgp on|off | - see page 14-2 |
show bgp memory | - see page 9-31 |
show bgp next-hop | - see page 9-32 |
show bgp paths [Prefix/NM [verbose]] | - see page 9-33 |
show bgp peers [verbose|packets] | - see page 9-36 |
show bgp policy [Policyname] | - see page 9-40 |
show bgp summarization | - see page 9-41 |
show routes [String|Prefix/NM] | - see page 9-42 |
Note ¯ BGP is a complex protocol to configure. Consult the instructions and examples in the PortMaster Routing Guide before configuring BGP on a PortMaster 4.
set bgp peer - page 9-13
Caution ¯ Be careful when deleting BGP policy statements. Make sure that they are no longer needed for BGP route selection.
delete bgp summarization Prefix/NM
command> delete bgp summarization 172.16.0.0/16
BGP summarization to 172.16.0.0/16 successfully deleted
add bgp summarization - page 9-5
set bgp policy - page 9-17
set bgp summarization - page 9-29
Note ¯ To save all configuration information, including BGP and global parameters such as the local system and local BGP router ID, use the save all command instead.
Command> set bgp connect-retry-interval 180
BGP connect retry interval changed from 120 to 180
Note ¯ You must issue the save all and reboot commands immediately after issuing the set bgp enable command, before you can continue with any other BGP configuration.
Note ¯ Exact matches only are allowed because simple default routes to support BGP routes can lead to network instability or lost packets.
set bgp peer Ipaddress(src) Ipaddress(dest) ASN
[assume-default [Number] ] [confederation-member]
[route-reflector-client] [normal] [always-next-hop]
{easy-multihome|[accept-policy Policyname|all]
[inject-policy Policyname|all] [advertise-policy Policyname|all]}
Ipaddress(src) | Local address of the PortMaster put in outgoing packets, specified in dotted decimal notation. | |
Ipaddress(dest) | Destination address of the peer, specified in dotted decimal notation. | |
ASN | Autonomous system number of the peer. If this autonomous system is the same as that of the PortMaster, the peer is an internal peer; if it is different, the peer is an external peer. The autonomous system number is a 16-bit number ranging from 1 to 65535. | |
assume-default | Indicates that a default route to this external peer is created if the peer is up. You must assign a hop-count value to the default routes of different peers to specify a preferred peer. | |
Number | Hop count to advertise this default route. When multiple peers are configured with assume-default , the one with the lowest hop count is the preferred router for default-route forwarding. Number is a value from 1 to 15. | |
confederation-member | When specified, identifies a peer that is a member of the same confederation as the PortMaster. By default this keyword is not specified. | |
route-reflector-client | When specified, identifies a peer as a route reflector client that the PortMaster forwards internal routes to. For the peer to be enabled as a route-reflector client, you must have configured the PortMaster with a cluster ID using the set bgp cluster-id command. | |
normal | When specified, identifies a peer that is neither a confederation member nor a route-reflector client. By default normal is specified. | |
always-next-hop | When specified, identifies the PortMaster as the next hop in any update packet sent to it from the peer, even if the PortMaster determines that it is not always the best next hop choice for this peer. This option is useful when you know that this peer has connectivity to the PortMaster, but possibly not to the same devices that you would choose as a next hop--for example, in a partially meshed Frame Relay network. By default always-next-hop is disabled. | |
Note ¯ Standard BGP speaker behavior is to forward next hop information to internal peers without modification. The always-next-hop parameter enables this behavior to be changed. Therefore, when using the always-next-hop parameter, you must take care to ensure that inconsistent routing information is not propagated from multiple external peers to the autonomous system. | ||
easy-multihome | Enables an alternative method to policies for handling multihome paths from the PortMaster. The easy-multihome keyword restricts the BGP routing table to accept only paths through the remote autonomous system, and optionally through one additional autonomous system. Otherwise, the PortMaster uses the assume-default keyword to determine how to route packets. | |
accept-policy | Enables a BGP policy Policyname whose criteria must be met for the PortMaster to accept any IP prefix from this peer as a viable BGP route. If a then degree-of-preference parameter is specified in the policy (see set bgp policy (acceptance) on page 9-17), it is used in place of any information learned from the path for path preference calculation purposes only. Advertisement filters indicate what the other peers are told. If not specified, and easy-multihome is not enabled for this peer, then nothing is accepted from this peer. | |
all | Predefined policy that you can use to permit all routes to be accepted, injected, or advertised. | |
Policyname | Name of a BGP policy statement defined by the set bgp policy command. | |
inject-policy | Enables a BGP policy Policyname whose criteria must be met for the PortMaster to place any IP address prefix received from this peer in the routing table. No then parameters are used in this policy. If not specified, and easy-multihome is not enabled for this peer, then nothing is injected from this peer into the routing table. | |
advertise-policy | Enables a BGP policy Policyname whose criteria must be met for the PortMaster to advertise any IP address prefix to this peer. The advertisement you set with the set bgp policy command indicates the metrics and any community information to advertise with the prefix. If not specified, and easy-multihome is not enabled for this peer, then nothing is advertised to this peer. |
Command> set bgp peer 192.168.0.0 172.16.0.0 21 easy-multihome
New BGP peer successfully added
Caution ¯ The creation of long, complex lists of policy rules can adversely affect PortMaster CPU performance.
set bgp policy Policyname [before] RuleNumber
permit|deny|include Policyname
[if
[prefix [exactly] Prefix/NM]
[prefix-longer-than NM]
[as-path String|empty]
[community Tag]]
[then
[input-multi-exit-disc Number|strip]
[degree-of-preference Number]]
1. Create and define a common BGP policy as follows:
set bgp policy permit1011 1 permit if prefix 10.0.0.0/8
set bgp policy permit1011 2 permit if prefix 11.0.0.0/8
2. Include this policy by reference in another policy as follows:
set bgp policy otherone 5 include permit1011
This command inserts the statements of the permit1011 policy at line 5 of the otherone policy.
Command> set bgp policy acdeg10 1 permit then degree-of-preference 10
Added rule 1 in policy acdeg10
BGP policy acdeg10 updated
Caution ¯ The creation of long, complex lists of policy rules can adversely affect PortMaster CPU performance.
set bgp policy Policyname [before] RuleNumber
permit|deny|include Policyname
[if
[prefix [exactly] Prefix/NM]
[as-path String|empty]
[community Tag]]
Command> add bgp policy inj.one 1 permit if prefix 172.16.0.0/16 community 108 108
Added rule 1 in policy inj.one
BGP policy inj.one updated
Caution ¯ The creation of long, complex lists of policy rules can adversely affect PortMaster CPU performance.
set bgp policy Policyname [before] RuleNumber
permit|deny|include Policyname
[if
[prefix [exactly] Prefix/NM]
[as-path String|empty]
[community Tag]]
[then
[local-pref Number]
[output-multi-exit-disc Number|strip]
[next-hop Ipaddress]
[community add|replace|strip Tag]
[ignore-community-restrictions]]
Command> set bgp policy adver.one 1 permit if prefix 172.16.0.0/16
then community add 108 108
Added rule 1 in policy adver.one
BGP policy adver.one updated
Command> set bgp policy adver.one 2 permit then local-pref 5 community
add 108 108
Added rule 2 in policy adver.one
BGP policy adver.one updated
set bgp summarization Prefix/NM
[as ASN] [cma ASN] [multi-exit-disc Number]
[local-pref Number] [community Tag]
Command> set bgp summarization 172.16.0.0/16 multi 55 as 2 as 3 as 4
BGP summarization successfully added
Command> show bgp memory
BGP is using a total of 7024480 bytes of memory for 42313 destinations:
Destination-specific use: 3296384 bytes
Peer-specific use: 3728096 bytes
show bgp paths [Prefix/NM [verbose]]
Note ¯
When a peer deletion is in process, a message and countdown timer is displayed in the Accept, Inject, and Advertise columns, as follows:
-- Deletion in Progress. Countdown 216 --
Deletion is complete when the countdown drops to zero. A similar "idling" message is shown when the peer is idling down from a previously established up state.
Note ¯ When a BGP peer has been deleted or idled, you might see one of the following messages in place of a configured policy name:
Command> show bgp policy
add401 admit
Command> show bgp policy add401
set bgp policy add401 1 permit
if prefix 10.0.0.0/8
then community add 401 401
show routes [String|Prefix/NM]