GateD Configuration Guide - Route Aggregation

# Route Aggregation

Route aggregation is a method of generating a more general route given the presence of a specific route. It is used, for example, at an autonomous system border to generate a route to a network to be advertised via EGP given the presence of one or more subnets of that network learned via RIP. Older versions of GateD automatically performed this function, generating an aggregate route to a natural network (using the old Class A, B and C concept) given an interface to a subnet of that natural network. However that was not always the correct thing to do, and with the advent of classless interdomain routing it is even more frequently the wrong thing to do, so aggregation must be explicitly configured. No aggregation is performed unless explicitly requested in an `aggregate` statement.

Route aggregation is also used by regional and national networks to reduce the amount of routing information passed around. With careful allocation of network addresses to clients, regional networks can just announce one route to regional networks instead of hundreds.

Aggregate routes are not actually used for packet forwarding by the originator of the aggregate route, only by the receiver (if it wishes). A router receiving a packet which does not match one of the component routes which led to the generation of an aggregate route is supposed to respond with an ICMP network unreachable message. This is to prevent packets for unknown component routes from following a default route into another network where they would be forwarded back to the border router, and around and around again and again, until their TTL expires. Sending an unreachable message for a missing piece of an aggregate is only possible on systems with support for reject routes.

A slight variation of aggregation is the generation of a route based on the existence of certain conditions. This is sometimes known as the route of last resort. This route inherits the next hops and aspath from the contributor specified with the lowest (most favorable) preference. The most common usage for this is to generate a default based on the presence of a route from a peer on a neighboring backbone.

## Aggregation and Generation syntax

    aggregate default
        | ( network [ ( mask mask ) | ( masklen number ) ] )
        [ preference preference ] [ brief ] {
        proto [ all | direct | static | kernel | aggregate | proto ]
            [ ( as autonomous system ) | ( tag tag )
                | ( aspath aspath_regexp ) ]
            restrict ;
        proto [ all | direct | static | kernel | aggregate | proto ]
            [ ( as autonomous system ) | ( tag tag )
                | ( aspath aspath_regexp ) ]
            [ preference preference ] {
            route_filter [ restrict | ( preference preference ) ] ;
        } ;
    } ;

    generate default
        | ( network [ ( mask mask ) | ( masklen number ) ] )
        [ preference preference ] [ brief ] {
        proto [ all | direct | static | kernel | aggregate | proto ]
            [ ( as autonomous system ) | ( tag tag )
                | ( aspath aspath_regexp ) ]
            restrict ;
        proto [ all | direct | static | kernel | aggregate | proto ]
            [ ( as autonomous system ) | ( tag tag )
                | ( aspath aspath_regexp ) ]
            [ preference preference ] {
            route_filter [ restrict | ( preference preference ) ] ;
        } ;
    } ;

Routes that match the route filters are called contributing routes. They are ordered according to the aggregation preference that applies to them. If there are more than one contributing routes with the same aggregating preference, the route's own preferences are used to order the routes. The preference of the aggregate route will be that of contributing route with the lowest aggregate preference.

preference preference
  Specifies the preference to assign to the resulting aggregate route. The default preference is 130.
brief
  Used to specify that the AS path should be truncated to the longest common AS path. The default is to build an AS path consisting of SETs and SEQUENCEs of all contributing AS paths.
proto proto
  In addition to the special protocols listed, the contributing protocol may be chosen from among any of the ones supported (and currently configured into) GateD.
as autonomous_system
  Restrict selection of routes to those learned from the specified autonomous system.
tag tag
  Restrict selection of routes to those with the specified tag.
aspath aspath_regexp
  Restrict selection of routes to those that match the specified AS path.
restrict
  Indicates that these routes are not to be considered as contributors of the specified aggregate. The specified protocol may be any of the protocols supported by GateD.
route_filter
  See below.

A route may only contribute to an aggregate route which is more general than itself; it must match the aggregate under its mask. Any given route may only contribute to one aggregate route, which will be the most specific configured, but an aggregate route may contribute to a more general aggregate.

## Route Filters

All the formats allow route filters as shown below. See the section on route filters for a detailed explaination of how they work. When no route filtering is specified (i.e. when `restrict` is specified on the first line of a statement), all routes from the specfied source will match that statement. If any filters are specified, only routes that match the specified filters will be considered as contributors. Put differently, if any filters are specified, an `all restrict ;` is assumed at the end of the list.

        network [ exact | refines ]
        network mask mask [exact | refines ]
        network masklen number [ exact | refines ]
        default
        host host

Last updated 1994/04/22 11:58:59.