Skip to main content

9. UPDATE Message Handling

An UPDATE message may be received only in the Established state. When an UPDATE message is received, each field is checked for validity as specified in Section 6.3.

If an optional non-transitive attribute is unrecognized, it is quietly ignored. If an optional transitive attribute is unrecognized, the Partial bit (the third high-order bit) in the attribute flags octet is set to 1, and the attribute is retained for propagation to other BGP speakers.

If an optional attribute is recognized, and has a valid value, then, depending on the type of the optional attribute, it is processed locally, retained, and updated, if necessary, for possible propagation to other BGP speakers.

If the network and the path attributes associated with a route to that network are correct, then the route is compared with other routes to the same network.

When a BGP speaker receives a new route from a peer over external BGP link, it shall advertise that route to other BGP speakers in its autonomous system by means of an UPDATE message if either of the following conditions occur:

  1. the newly received route is considered to be better than the other routes to the same network (as listed in the UPDATE message) that have been received over external BGP links, or
  2. there are no other acceptable routes to the network (as listed in the UPDATE message) that have been received over external BGP links.

When a BGP speaker receives an unreachable route from a BGP peer over external BGP link, it shall advertise that route to all other BGP speakers in its autonomous system, indicating that it has become unreachable, if the following condition occur:

  1. a corresponding acceptable route to the same destination was considered to be the best one among all routes to that destination that have been received over external BGP links (that is the local system has been advertising the route to all other BGP speakers in its autonomous system before it received the UPDATE message that reported it as unreachable).

Whenever a BGP speaker selects a new route (among all the routes received from external and internal BGP peers), or determines that the reachable destinations within its own autonomous system have changed, it shall generate an UPDATE message and forward it to each of its external peers (peers connected via external BGP links).

If a route in the UPDATE was received over an internal link, it is not propagated over any other internal link. This restriction is due to the fact that all BGP speakers within a single AS form a completely connected graph (see above).

If the UPDATE message is propagated over an external link, then the local AS number is prepended to the AS_PATH attribute, and the NEXT_HOP attribute is updated with an IP address of the router that should be used as a next hop to the network. If the UPDATE message is propagated over an internal link, then the AS_PATH attribute and the NEXT_HOP attribute are passed unmodified.

Generally speaking, the rules for comparing routes among several alternatives are outside the scope of this document. There are two exceptions:

  • If the local AS appears in the AS path of the new route being considered, then that new route cannot be viewed as better than any other route. If such a route were ever used, a routing loop would result.

  • In order to achieve successful distributed operation, only routes with a likelihood of stability can be chosen. Thus, an AS must avoid using unstable routes, and it must not make rapid spontaneous changes to its choice of route. Quantifying the terms "unstable" and "rapid" in the previous sentence will require experience, but the principle is clear.