Communities can be specified as an argument with the aspath-option field of the:
Any packets sent to this group of bgp peers will have the DPA in the BGP packet modified to be this DPA value from this AS. The DPA is specified as part of the AS Path optional [aspath-opt] attributes. Other AS Path optional attributes are:
Any packets received for the bgp peer and aspath will also be check for DPA within the bgp packet of this value. The DPA is specified as part of the AS Path optional (aspath-opt) attributes.
Any packets exported to a bgp neighbor may select routes to be sent by specifying DPA on the source bgp protocol. In addition, packets exported to a peer may have the DPA modified by specifying DPA as part of the AS Path modified.
The community attribute can be a single community or a set of communities. GateD currently takes a maximum of 10 communities. This is a configuration limit, and can be extended by simply recompiling GateD.
The Community attribute can take any of the following forms:
comm-split [AS-value] [community-id]
where:
AS-value is 2 octet AS value
community-id is 2 octet community number
community no-export is a special community which "indicates that the routes associated with this attribute must not be advertised outside a BGP confederation boundary" (draft-ietf-idr-Communities-00.txt). Since the GateD does not support Confederations, this boundary is an AS boundary.
A packet can be modified to contain this attribute and passed to it's neighbor. However, if a packet is received with this attribute it cannot be transmitted outside an AS boundary.
community no-advertise is a special community which "indicates that the routes associated with this attribute must not be advertised to other bgp peers" (draft-ietf-idr-Communities-00.txt). A packet can be modified to contain this attribute and passed to it's neighbor. However, if a packet is received with this attribute it cannot be transmitted to another BGP peer.
community no-export-subconfed is a special community which "indicates that the routes associated with this attribute must not be advertised to external BGP peers(this includes peers in other members autonomous systmes inside a BGP confederation" (draft-ietf-idr-Communities-00.txt).
A packet can be modified to contain this attribute and passed to it's neighbor. However, if a packet is received with this attribute, the routes (prefix-attribute pair) can not be advertised to an external BGP peer. An external BGP peer is that of another AS.
group type [internal | external] peeras 185 aspath-opt { [comm-split as-number community-id] [community no-export] [community no-advertise] [community no-export-sub-confed] } { peer host-addr; }
Examples of this code are:group type internal peeras 185 aspath-opt { comm-split 3552 90 community no-export community no-advertise community no-export-sub-confed } { peer 198.108.60.43; } group type external peeras 186 aspath-opt { comm-split 20 3552 community no-export community no-advertise community no-export-sub-confed } { peer 198.108.60.43; } group type external peeras 65 aspath-opt { comm-split 3552 20 comm-split 3552 21 comm-split 3552 22 comm-split 3552 23 comm-split 3552 24 comm-split 3552 25 comm-split 3552 26 comm-split 3552 27 comm-split 3552 28 comm-split 3552 29 } { peer 198.108.60.43; }
import proto bgp as as-id
aspath-opt {
comm-split as-number community-id
} [pref [number]]
{
route-filter;
};
Example of this code is:
import proto bgp as 185
aspath-opt
{
comm-split 3552 90
community no-export
}
{
128.2 restrict;
all;
}
import proto bgp as 186
aspath-opt
{
comm-split 3552 90
community no-export-subconfed
}
{
all;
}
import proto bgp as 187
aspath-opt
{
comm-split 3552 100
comm-split 3552 101
comm-split 3552 102
comm-split 3552 103
}
{
all;
}
export proto bgp as 2750 { proto bgp as 2704 aspath-opt { [comm-split as-number community-id] [community no-export] [community no-advertise] [community no-export-sub-confed] } { route-filter } }
An example of this format is:export proto bgp as 2750 { proto bgp as 2704 aspath-opt { comm-split 3552 200 comm-split 3552 100 } { all; };
export proto bgp as 2750
mod-aspath
{
[comm-split as-number community-id]
[community no-export]
[community no-advertise]
[community no-export-sub-confed]
}
{
proto bgp as 2704
{
route-filter;
}
proto bgp aspath any
{
route-filter;
}
};
An example of this format is:
export proto bgp as 2750
mod-aspath
{
comm-split 3552 100
comm-split 3552 101
comm-split 3552 102
}
{
proto bgp as 2704
{
206.6 masklen 16;
206.20 masklen 16;
}
proto bgp aspath / .* 2552 .* /
{
all;
}
};