BGP

Border Gateway Protocol

Decision algorithm

BGP speaker - this is a router, which routes are exchanged
with another router (also with BGP speaker'om) via BGP.

So when the BGP speaker receives updates from multiple AS, and in each of these updates include different ways to the same point in the Inet, there is a question of choosing the best route to this point, whether stand-alone system, or network, or a particular host with an IP address. Choosing the optimal path to a certain point, the router tells its neighbors about sovim way.

Algorithm for choosing the optimal route based on several parameters (next hop, administrative weights, local preference, origin of the route, path lenght, etc.) that are contained in update'e, as well as on some other factors that are installed in the configuration of BGP peer 's.

Whenever updates are passed through the AS, BGP AS number added to update'u. AS path attribute - a list of numbers of autonomous systems through which the update was (and, therefore, be held and datagram) in achieving its goal. AS-SET - a set of numbers, namely the number of autonomous systems that have been passed update'om.

Consider a network that is shown in Figure 12-11.

Figure = 12-11: AS_path Attribute

In this figure, Router B advertises network 190.10.0.0 as a member of the AS 200 in this case AS_path is 200. When the update of 190.10.0.0 is transmitted to an adjacent AS 300, Router C adds a number of its AS (ie, 300) to AS_path, and thus, when the update reaches Router A, two AS numbers will be hooked on to it: 200 and 300. Thus, AS_path attribute to achieve network 190.10.0.0 from Router A - it's 300, 200. Similarly, AS_path to reach network 170.10.0.0 from Router B - it's 300, 100.
II.2 Origin Attribute

Origin attribute contains information about who is the "owner" of the path. That is, who initiated the entry in the BGP routing on this particular path.

Origin attribute can take one of three values:
IGP - route is _vnutrennim_ in relation to the AS. This value
i set the attribute entry in the routing table in case
When the router uses the command "network" to add this
way into the BGP table routing.
IGP origin type is represented bukovkoy "i" in the outcome shop ip bgp
team.
EGP - information about the path obtained through the Exterior Gateway Protocol
e (EGP).
EGP origin type is represented bukovkoy "e" in the output of show ip bgp.
Incomplete - origin of route is not known or obtained by some third
? (Not one of opinannyh above) way. And the same origin
incomplete in the case where the route is obtained
by converting the route (for example, obtained from
recording of static routing as redistribute static) into BGP.
In this case, the origin attribute looks like "?".

Figure = 12-12: Origin Attribute

Router configuration using the following commands:
! Router A
router bgp 100
neighbor 190.10.50.1 remote-as 100
neighbor 170.10.20.2 remote-as 300
network 150.10.0.0
redistribute static
!
ip route 190.10.0.0 255.255.0.0 null 0

! Router B
router bgp 100
neighbor 150.10.30.1 remote-as 100
network 190.10.50.0

! Router E
router bgp 300
neighbor 170.10.20.1 remote-as 100
network 170.10.0.0

Based on this configuration, we obtain the following values ??and AS_path Origin attribute to the routing table:

1. in the BGP route table in router A way to reach network 170.10.0.0 has AS_path 300 and Origin attribute "IGP" (as to advertise its network router "E" uses the command network 170.10.0.0).

2. in the BGP route table in router A way to network 190.10.50.0 network has AS_path = empty, and the Origin attribute = "IGP" (for the same reason).

3. in the BGP route table on the router to the network path E 150.10.0.0: AS_path = 100, Orig. attr = "IGP" (for the same reason).

4. in the BGP route table on the router to route E 190.10.0.0: AS_path = 100, Orig. attr. = Incomplete (mk on "A", the network is advertised through "redistribute route".