Each route may be active in one or more RIBs simultaneously.
Example:
static { 10.0.0.0 masklen 24 interface le1; 10.0.1.0 masklen 24 interface le1 unicast; 10.0.2.0 masklen 24 interface le1 multicast; 10.0.3.0 masklen 24 interface le1 unicast multicast; };The first two static routes apply only to the unicast RIB. The third applies only to the multicast RIB, and the last applies to both.
Example:
aggregate 10.0.0.0 masklen 8 { proto static { 10.0.0.0 masklen 8 refines; }; }; If any static route in the unicast RIB matches the route filter (which three of the four static routes in the previous example do), the aggregate will exist in the unicast RIB. Likewise, for the multicast RIB.RIB limits may, however, be specified. By default, the limit is all ribs (i.e., all RIBs to which any contributing route applies). This can be overridden with a more specific limit, as in the example below:
aggregate 10.0.0.0 masklen 8 unicast { proto static { 10.0.0.0 masklen 8 refines; }; }; The above aggregate applies ONLY to the unicast RIB (and only if a contributing route is in the unicast RIB). Contributing routes in other RIBs are ignored.
Since BGP4+ is able to tag routes as to which RIBs they apply, no additional configuration is required for BGP routes. The RIP, Hello, and Redirect protocols, however, do not do this. Hence, gated must be configured to import RIP (etc) routes into the multicast RIB.
One or more RIB names may be specified as follows (where multicast and unicast appear below):
import proto ( rip | hello | redirect ) [ ( interface interface_list ) | ( gateway gateway_list ) ] [ preference preference ] [ multicast ] [ unicast ] { route_filter [ restrict | ( preference preference ) ] [ multicast ] [ unicast ]; };If no RIBs are specified, the unicast RIB (only) is assumed.
Example 1:
import proto rip { 0.0.0.0 masklen 0 refines; 198.0.0.0 masklen 8 refines multicast unicast; }; This example keeps the normal behavior of allowing all RIP routes in the unicast RIB, but also imports all routes falling under 198/8 into the multicast RIB.Example 2:
import proto rip { 0.0.0.0 masklen 0 refines multicast unicast; }; This example imports all RIP routes into the multicast RIB (as well as the usual unicast RIB). This would be used, for example, in a PIM-SM domain using RIP as the unicast routing protocol.To import OSPF routes into the multicast RIB, you currently must import all OSPF routes as follows:
ospf yes { defaults { ribs unicast multicast; ... }; ... };You may not import OSPF routes into only the multicast RIB. Attempting to do so will be flagged as a configuration error.
Example:
GateD> sh ip walkdown 10 100 um Agg 10/8 --- IGP (Id 1) 100 u Sta 10/24 192.168.10.89 IGP (Id 1) 100 u Sta 10.0.1/24 192.168.10.89 IGP (Id 1) 100 m Sta 10.0.2/24 192.168.10.89 IGP (Id 1) 100 um Sta 10.0.3/24 192.168.10.89 IGP (Id 1) GateD> sh ip walkdown 10 unicast 100 u Agg 10/8 --- IGP (Id 1) 100 u Sta 10/24 192.168.10.89 IGP (Id 1) 100 u Sta 10.0.1/24 192.168.10.89 IGP (Id 1) 100 u Sta 10.0.3/24 192.168.10.89 IGP (Id 1) GateD> sh ip walkdown 10 m 100 m Agg 10/8 --- IGP (Id 1) 100 m Sta 10.0.2/24 192.168.10.89 IGP (Id 1) 100 m Sta 10.0.3/24 192.168.10.89 IGP (Id 1) GateD>