The neighbor local-as command is used to customize the AS_PATH attribute by adding and removing autonomous system numbers for routes received from eBGP neighbors.
The configuration of this command allows a router to appear to external peers as a member of another autonomous system for the purpose of autonomous system number migration. This feature simplifies the process of changing the autonomous system number in a BGP network by allowing the network operator to migrate customers to new configurations during normal service windows without disrupting existing peering arrangements.
Caution BGP prepends the autonomous system number from each BGP network that a route traverses to maintain network reachability information and to prevent routing loops. This command should be configured only for autonomous system migration, and should be deconfigured after the transition has been completed. This procedure should be attempted only by an experienced network operator. Routing loops can be created through improper configuration. This command can be used for only true eBGP peering sessions. This command does not work for two peers in different subautonomous systems of a confederation.
This command supports individual peering sessions and configurations applied through peer groups and peer templates. If this command is applied to a group of peers, the individual peers cannot be customized.
Saturday, April 20, 2013
BGP neighbor local-as
Friday, April 19, 2013
BGP neighbor disable-connected-check
A BGP routing process will verify the connection of single-hop eBGP peering session (TTL=254) to determine if the eBGP peer is directly connected to the same network segment by default. If the peer is not directly connected to same network segment, connection verification will prevent the peering session from being established.
The neighbor disable-connected-check command is used to disable the connection verification process for eBGP peering sessions that are reachable by a single hop but are configured on a loopback interface or otherwise configured with a non-directly connected IP address. This command is required only when the neighbor ebgp-multihop command is configured with a TTL value of 1. The address of the single-hop eBGP peer must be reachable. The neighbor update-source command must be configured to allow the BGP routing process to use the loopback interface for the peering session.
from: Cisco IOS IP Routing: BGP Command Reference
Files:
Topology
Configs
BGP Configuration
neighbor disable-connected-check
To disable connection verification to establish an eBGP peering session with a single-hop peer that uses a loopback interface, use the neighbor disable-connected-check command in address family or router configuration mode. To enable connection verification for eBGP peering sessions, use the noform of this command.
neighbor {ip-address | peer-group-name} disable-connected-check
no neighbor {ip-address | peer-group-name} disable-connected-check
Syntax Description
Command Default
A BGP routing process will verify the connection of single-hop eBGP peering session (TTL=254) to determine if the eBGP peer is directly connected to the same network segment by default. If the peer is not directly connected to same network segment, connection verification will prevent the peering session from being established.
Command Modes
Address family
Router configuration
Router configuration
Command History
Release
|
Modification
|
---|---|
12.0(22)S
|
This command was introduced.
|
12.2(13)T
|
This command was integrated into Cisco IOS Release 12.2(13)T.
|
Usage Guidelines
The neighbor disable-connected-check command is used to disable the connection verification process for eBGP peering sessions that are reachable by a single hop but are configured on a loopback interface or otherwise configured with a non-directly connected IP address.
This command is required only when the neighbor ebgp-multihop command is configured with a TTL value of 1. The address of the single-hop eBGP peer must be reachable. The neighbor update-source command must be configured to allow the BGP routing process to use the loopback interface for the peering session.
Files:
Topology
Configs
BGP Configuration
Thursday, April 18, 2013
BGP Support for 4-byte ASN
Prior to January 2009, BGP autonomous system numbers that were allocated to companies were 2-octet numbers in the range from 1 to 65535 as described in RFC 4271, A Border Gateway Protocol 4 (BGP-4). Due to increased demand for autonomous system numbers, the Internet Assigned Number Authority (IANA) will start in January 2009 to allocate four-octet autonomous system numbers in the range from 65536 to 4294967295. RFC 5396, Textual Representation of Autonomous System (AS) Numbers, documents three methods of representing autonomous system numbers. Cisco has implemented the following two methods:
- Asplain--Decimal value notation where both 2-byte and 4-byte autonomous system numbers are represented by their decimal value. For example, 65526 is a 2-byte autonomous system number and 234567 is a 4-byte autonomous system number.
- Asdot--Autonomous system dot notation where 2-byte autonomous system numbers are represented by their decimal value and 4-byte autonomous system numbers are represented by a dot notation. For example, 65526 is a 2-byte autonomous system number and 1.169031 is a 4-byte autonomous system number (this is dot notation for the 234567 decimal number).
Formula to calculate ASN 4bytes(quotient.remainder):
Example for AS 769672:
quotient => 769672 / 65536 = 11
remainder = 769672 - (11*65536) = 48776
Result: AS 11.48776
Script from: http://labs.spritelink.net/ascalc
from: IP Routing: BGP Features
Files:
Topology
Configs
BGP Configuration
Cisco Document - ASN
Good article about Conversion
Asdot Only Autonomous System Number Formatting
In Cisco IOS XE Release 2.3, the 4-octet (4-byte) autonomous system numbers are entered and displayed only in asdot notation, for example, 1.10 or 45000.64000. When using regular expressions to match 4-byte autonomous system numbers the asdot format includes a period, which is a special character in regular expressions. A backslash must be entered before the period (for example, 1\.14) to ensure the regular expression match does not fail. The table below shows the format in which 2-byte and 4-byte autonomous system numbers are configured, matched in regular expressions, and displayed in show command output in Cisco IOS images where only asdot formatting is available.
Asplain as Default Autonomous System Number Formatting
In Cisco IOS XE Release 2.4 and later releases, the Cisco implementation of 4-byte autonomous system numbers uses asplain as the default display format for autonomous system numbers, but you can configure 4-byte autonomous system numbers in both the asplain and asdot format. In addition, the default format for matching 4-byte autonomous system numbers in regular expressions is asplain, so you must ensure that any regular expressions to match 4-byte autonomous system numbers are written in the asplain format. If you want to change the default show command output to display 4-byte autonomous system numbers in the asdot format, use the bgp asnotation dot command under router configuration mode. When the asdot format is enabled as the default, any regular expressions to match 4-byte autonomous system numbers must be written using the asdot format, or the regular expression match will fail. The tables below show that although you can configure 4-byte autonomous system numbers in either asplain or asdot format, only one format is used to display show command output and control 4-byte autonomous system number matching for regular expressions, and the default is asplain format. To display 4-byte autonomous system numbers in show command output and to control matching for regular expressions in the asdot format, you must configure the bgp asnotation dot command. After enabling the bgp asnotation dot command, a hard reset must be initiated for all BGP sessions by entering the clear ip bgp * command.
Note | If you are upgrading to an image that supports 4-byte autonomous system numbers, you can still use 2-byte autonomous system numbers. The show command output and regular expression match are not changed and remain in asplain (decimal value) format for 2-byte autonomous system numbers regardless of the format configured for 4-byte autonomous system numbers. |
Table 2 | Default Asplain 4-Byte Autonomous System Number Format |
Format
|
Configuration Format
|
Show Command Output and Regular Expression Match Format
|
---|---|---|
asplain
|
2-byte: 1 to 65535 4-byte: 65536 to 4294967295
|
2-byte: 1 to 65535 4-byte: 65536 to 4294967295
|
asdot
|
2-byte: 1 to 65535 4-byte: 1.0 to 65535.65535
|
2-byte: 1 to 65535 4-byte: 65536 to 4294967295
|
Table 3 | Asdot 4-Byte Autonomous System Number Format |
Format
|
Configuration Format
|
Show Command Output and Regular Expression Match Format
|
---|---|---|
asplain
|
2-byte: 1 to 65535 4-byte: 65536 to 4294967295
|
2-byte: 1 to 65535 4-byte: 1.0 to 65535.65535
|
asdot
|
2-byte: 1 to 65535 4-byte: 1.0 to 65535.65535
|
2-byte: 1 to 65535 4-byte: 1.0 to 65535.65535
|
Reserved and Private Autonomous System Numbers
In Cisco IOS XE Release 2.3 and later releases, the Cisco implementation of BGP supports RFC 4893. RFC 4893 was developed to allow BGP to support a gradual transition from 2-byte autonomous system numbers to 4-byte autonomous system numbers. A new reserved (private) autonomous system number, 23456, was created by RFC 4893 and this number cannot be configured as an autonomous system number in the Cisco IOS CLI.
RFC 5398, Autonomous System (AS) Number Reservation for Documentation Use, describes new reserved autonomous system numbers for documentation purposes. Use of the reserved numbers allow configuration examples to be accurately documented and avoids conflict with production networks if these configurations are literally copied. The reserved numbers are documented in the IANA autonomous system number registry. Reserved 2-byte autonomous system numbers are in the contiguous block, 64496 to 64511 and reserved 4-byte autonomous system numbers are from 65536 to 65551 inclusive.
Private 2-byte autonomous system numbers are still valid in the range from 64512 to 65534 with 65535 being reserved for special use. Private autonomous system numbers can be used for internal routing domains but must be translated for traffic that is routed out to the Internet. BGP should not be configured to advertise private autonomous system numbers to external networks. Cisco IOS software does not remove private autonomous system numbers from routing updates by default. We recommend that ISPs filter private autonomous system numbers.
Note | Autonomous system number assignment for public and private networks is governed by the IANA. For information about autonomous-system numbers, including reserved number assignment, or to apply to register an autonomous system number, see the following URL: http://www.iana.org/. |
Files:
Topology
Configs
BGP Configuration
Cisco Document - ASN
Good article about Conversion
Monday, April 15, 2013
BGP neighbor allowas-in
The allowas-in command prevents the looped-back information from being dropped, breaking the routing loop protection: If the AS_PATH attribute of a BGP route contains an AS loop, the BGP route should be excluded from the Phase 2 decision function. AS loop detection is done by scanning the full AS path (as specified in the AS_PATH attribute), and checking that the autonomous system number of the local system does not appear in the AS path. It is critical that BGP speakers within an AS do not make conflicting decisions regarding route selection that would cause forwarding loops to occur.
from: BGP Commands on Cisco IOS
Files:
Topology
R1
R2
R3
allowas-in
To allow an AS path with the provider edge (PE) autonomous system number (ASN) a specified number of times, use the allowas-in command in an appropriate configuration mode. To restore the system to its default condition, use the no form of this command.
allowas-in [as-occurrence-number]
no allowas-in [as-occurrence-number]
Syntax Description
Files:
Topology
R1
R2
R3
Sunday, April 14, 2013
BGP ttl-security hops
What happens in fact is that when you specify such multi-hop BGP peer the router starts sending BGP packets with TTL being equal to the number of hops you set . That means if I set peer to be 3 hops away and some attacker tries to spoof legit peer’s IP but is 4 hops away – such attack won’t succeed cause my router will receive spoofed BGP packets ok but will send replies with TTL of 3 which will expire just 1 hop away from the attacker. Questionable , but security . So why ttl-security? This feature indeed enforces that BGP peer is no more than given hops away . And here comes the difference – it enforces it inbound . It works this way – after you enable ttl security on the BGP peer session and specify how many hops away this peer is allowed to be, your router checks incoming TCP packets from this peer and does this simple calculation ; configured value <= 255 – hops-away-to-peer , if it holds true your router goes on with establishing BGP session , if not – session is shut down. Regarding outgoing TTL values – may be it is Cisco-only thing, may be not , but the moment you enable ttl security for some BGP peer on Cisco the router itself starts sending BGP-related packets to this peer with initial ttl being equal to 255. I guess it is logical that if you enforce on your side ttl security the peering side will want to do the same.
from: BGP Support for TTL Security Check
Files:
Topology
R1
R2
R3
BGP Support for TTL Security Check Feature Overview
The BGP Support for TTL Security Check feature introduces a lightweight security mechanism to protect eBGP peering sessions from CPU utilization-based attacks. These types of attacks are typically brute force Denial of Service (DoS) attacks that attempt to disable the network by flooding the network with IP packets that contain forged source and destination IP addresses.
This feature protects the eBGP peering session by comparing the value in the TTL field of received IP packets against a hop count that is configured locally for each eBGP peering session. If the value in the TTL field of the incoming IP packet is greater than or equal to the locally configured value, the IP packet is accepted and processed normally. If the TTL value in the IP packet is less than the locally configured value, the packet is silently discarded and no ICMP message is generated. This is designed behavior; a response to a forged packet is unnecessary.
Although it is possible to forge the TTL field in an IP packet header, accurately forging the TTL count to match the TTL count from a trusted peer is impossible unless the network to which the trusted peer belongs has been compromised.
This feature supports both directly connected peering sessions and multihop eBGP peering sessions. The BGP peering session is not affected by incoming packets that contain invalid TTL values. The BGP peering session will remain open, and the router will silently discard the invalid packet. The BGP session, however, can still expire if keepalive packets are not received before the session timer expires.
Configuring the TTL Security Check for BGP Peering Sessions
The BGP Support for TTL Security Check feature is configured with the neighbor ttl-security command in router configuration mode or address family configuration mode. When this feature is enabled, BGP will establish or maintain a session only if the TTL value in the IP packet header is equal to or greater than the TTL value configured for the peering session. Enabling this feature secures the eBGP session in the incoming direction only and has no effect on outgoing IP packets or the remote router. The hop-count argument is used to configure the maximum number of hops that separate the two peers. The TTL value is determined by the router from the configured hop count. The value for this argument is a number from 1 to 254.
Configuring the TTL Security Check for Multihop BGP Peering Sessions
The BGP Support for TTL Security Check feature supports both directly connected peering sessions and multihop peering sessions. When this feature is configured for a multihop peering session, the neighbor ebgp-multihop router configuration command cannot be configured and is not needed to establish the peering session. These commands are mutually exclusive, and only one command is required to establish a multihop peering session. If you attempt to configure both commands for the same peering session, an error message will be displayed in the console.
To configure this feature for an existing multihop session, you must first disable the existing peering session with the no neighbor ebgp-multihop command. The multihop peering session will be restored when you enable this feature with theneighbor ttl-security command.
This feature should be configured on each participating router. To maximize the effectiveness of this feature, the hop-countargument should be strictly configured to match the number of hops between the local and external network. However, you should also consider path variation when configuring this feature for a multihop peering session.
Benefits of the BGP Support for TTL Security Check Feature
The BGP Support for TTL Security Check feature provides an effective and easy-to-deploy solution to protect eBGP peering sessions from CPU utilization-based attacks. When this feature is enabled, a host cannot attack a BGP session if the host is not a member of the local or remote BGP network or if the host is not directly connected to a network segment between the local and remote BGP networks. This solution greatly reduces the effectiveness of DoS attacks against a BGP autonomous system.
Files:
Topology
R1
R2
R3
Saturday, April 13, 2013
Exceeding BGP Limitations with E-BGP Multihop
eBGP mulithop is used when peering with another BGP speaking router that is more than one hop away. By default, eBGP peering messages are link local, so the TTL value in the packet is 1. The eBGP Multihop command is used to change the default TTL value to something other than one.
from: Cisco IOS IP Routing: BGP Command Reference
Files:
Topology
R1
R2
R3
neighbor ebgp-multihop
To accept and attempt BGP connections to external peers residing on networks that are not directly connected, use the neighbor ebgp-multihopcommand in router configuration mode. To return to the default, use the no form of this command.
neighbor {ip-address | ipv6-address | peer-group-name} ebgp-multihop [ttl]
no neighbor {ip-address | ipv6-address | peer-group-name} ebgp-multihop
Syntax Description
Files:
Topology
R1
R2
R3
Monday, April 1, 2013
IP Routing Protocol-Independent Commands
distribute-list out
To suppress networks from being advertised in updates.
For training, we want to redistribute only the Networks 10.0.5.2/32 and 10.0.9.3/32 (no restrictions from R2 to R1).
For training, we want to redistribute only the Networks 10.0.5.2/32 and 10.0.9.3/32 (no restrictions from R2 to R1).
from: IP Routing Protocol-Independent Commands
distribute-list out (IP)
To suppress networks from being advertised in updates, use the distribute-list out command in the appropriate configuration mode. To cancel this function, use the no form of this command.
distribute-list {access-list-number | access-list-name} out [interface-name | routing-process | as-number]
no distribute-list {access-list-number | access-list-name} out [interface-name | routing-process | as-number]
Syntax Description
Defaults
This command is disabled by default. Networks are advertised in updates.
Command Modes
Address family configuration (config-af)
Router address family topology configuration (config-router-af-topology)
Router configuration (config-router)
Router address family topology configuration (config-router-af-topology)
Router configuration (config-router)
Command History
Usage Guidelines
When networks are redistributed, a routing process name can be specified as an optional trailing argument to the distribute-list command. Specifying this option causes the access list to be applied to only those routes derived from the specified routing process. After the process-specific access list is applied, any access list specified by a distribute-list command without a process name argument will be applied. Addresses not specified in thedistribute-list command will not be advertised in outgoing routing updates.
The interface-name argument cannot be used in address family configuration mode.
Note To filter networks received in updates, use the distribute-list in command.
Release 12.2(33)SRB
If you plan to configure the Multi-Topology Routing (MTR) feature, you need to enter the distribute-list out command in router address family topology configuration mode in order for this OSPF router configuration command to become topology-aware.
Subscribe to:
Posts (Atom)