History: Was introduced in 3.6.2, (2014)
In networking devices that act as layer 3 routers, common services for route propagation may be controlled by CFEngine. Those promises that are internal to CFEngine with only minimal configuration are configured through stanzas of the form:
```cf3 body routing_services control {
} ``` ### Attributes ###
Allowed input range:
Description: Set log file for route service messages, if supported on platform
Type: file path
Allowed input range:
Description: Set password for service, if supported on platform (e.g. quagga)
Type: string
Allowed input range: normal,detail,none
Description: OSPF logging of neighbour changes
Type: menu string
Allowed input range: 0,6
Description: Maximum precision in microseconds
Type: int
Allowed input range: aaa.bbb.ccc.ddd
Description: The router’s identity address aka loopback address used by ospf
Type: quasi IPv4 address
Allowed input range: kernel,connected,static,bgp
Description: List of sources of routing information considered authoritative
Type: menu string
Allowed input range: 1,2
Description: How to calculate metrics for external routes
Type: int
Allowed input range: 1,9999
Description: Metric for redistributed kernel route
Type: int
Allowed input range: 1,9999
Description: Metric for redistributed direct connetions
Type: int
Allowed input range: 1,9999
Description: Metric for redistributed static route
Type: int
Allowed input range: 1,9999
Description: Metric for redistributed BGP route
Type: int
Allowed input range: 0,99999
Description: This router’s BGP autonomous system number
Type: int
Allowed input range: aaa.bbb.ccc.ddd
Description: The router’s identity address aka loopback address for bgp
Type: quasi IPv4 address
Allowed input range: true/false
Description: Activate logging for bgp neighbour changes
Type: boolean
Allowed input range: kernel,connected,static,ospf
Description: Which source of configuration is considered authoritative?
Type: menu string
Allowed input range: IPv4 CIDR
Description: List of local ipv4 networks to advertise for this router
Type: IPv4 address in CIDR format
Allowed input range: IPv6 CIDR
Description: List of local ipv6 networks to advertise for this router
Type: IPv6 address in CIDR format
Allowed input range: true/false
Description: BGP session restart RFC, default is false
Type: boolean
Example:
```cf3
body routing_services control { any:: routing_service_log_file => “/var/log/quagga”; routing_service_password => “x1234”;
router1:: ospf_log_adjacency_changes => “detail”; ospf_router_id => “$(sys.ipv4[lo])”; ospf_log_timestamp_precision => “4”; ospf_redistribute => { “kernel”, “static”, “bgp” }; ospf_redistribute_metric_type => “2”; ospf_redistribute_kernel_metric => “1”; ospf_redistribute_connected_metric => “0”; ospf_redistribute_static_metric => “1”; ospf_redistribute_bgp_metric => “2”;
router2::
bgp_graceful_restart => “true”; bgp_local_as => “65001”; bgp_ipv4_networks => { “192.168.1.0/24”, “192.168.2.0/24” }; bgp_log_neighbor_changes => “true”; bgp_redistribute => { “kernel”, “static”, “connected”, “ospf” };
}
```