jeudi 16 août 2012

BGP

BGP AS_PATH Attribute :
BGP AS_PATH is a well-known mandatory attribute. This attribute identifies the autonomous systems (ASes) through which the UPDATE message has passed. It lists in reverse order the ASes traversed by a prefix, with the last AS placed at the beginning of the list. The primary purpose of AS_PATH is to provide loop-prevention during inter-AS routing.Four types of AS segments are supported within the AS_PATH in Cisco IOS- 
  1. AS_SET - Unordered set of ASes a prefix in the UPDATE message has traversed
  1. AS_SEQUENCE - Ordered set of ASes a prefix in the UPDATE message has traversed
  1. AS_CONFED_SET - Unordered set of Member AS numbers in the local confederation that the UPDATE message has traversed
  1. AS_CONFED_SEQUENCE - Ordered set of Member AS numbers in the local confederation that the UPDATE message has traverse
UNDERSTANDING BGP 4-byte ASN :
BGP Autonomous System Number (ASN) is a 2-byte (16-bits) entity. 2-bytes give 65536 possible numbers, of which, 0, 23456, 65535 and 64512- 65534 (private ASN) are reserved by IANA. Of the remaining, 39000+ ASNs are already used.

RFC 4893 discusses about 4-byte ASN. 4-bytes provide ASNs ranging from 0 to 4294967296. 0-65535 are called mappable-ASN. The 4-byte ASN can be represented in one of three ways-

  1. asplain - simple decimal representation of the ASN. For example, ASN 7747 will be represented as 7747, while 123456 will be represented as 123456.
  1. asdot+ - breaks the number up in two 16-bit values as low-order and high-order, separated by a dot. All the 2-byte ASNs can be represented in the low-order value. For example, ASN 65535 will be 0.65535, 65536 will be 1.0, 65537 will be 1.1 and so on. The last ASN 4294967296 will be 65535.65535.
  1. asdot - it is a mixture of asplain and asdot+. Any ASN in the 2-byte range is represented as asplain and any ASN above the 2-byte range is represented as asdot+. For example, 65535 will be 65535 while 65536 will be 1.0. Cisco uses this form of implementation.

UNDERSTAND HOW THE BGP Best Path Selection Algorithm works
BGP is a path-vector routing protocol, which simply means that its job is to exchange routing information between autonomous systems to find the most efficient path for your data to the Internet. Each BGP router connects to its neighbor (or neighbors) with neighbor statements. Once it forms that neighbor relationship, the BGP routers exchange routes.

DIFFERENCE ENTRE IBGP & BGP


AS path does not change inside an AS

 Local preference is only propagated on IBGP sessions
MED of an EBGP route is not propagated to other EBGP neighbors
Between IBGP and EBGP is BGP next hop processing.