Updates on review
This commit is contained in:
parent
bdd181e736
commit
04f6aa1281
35
README.md
35
README.md
@ -1,2 +1,37 @@
|
||||
# Global Route Collector
|
||||
|
||||
The global route collector is a common resource for collecting route data from across the DN42 network. This data can then be used to provide statistics and a global map of the DN42 network.
|
||||
|
||||
## Providing Routes to the Collector
|
||||
|
||||
All DN42 users are invited to provide routes to the collector; the more users that take part, the more useful the collector becomes.
|
||||
|
||||
1. Contact burble@hackint or mail dn42@burble.com, including your AS number and BGP peer address(es)
|
||||
|
||||
The collector runs bird2 and supports multiprotocol BGP; the preference is for multiprotocol peering over IPv6.
|
||||
If you can't support multiprotocol BGP, please provide both IPv4 and IPv6 peer addresses.
|
||||
|
||||
2. Configure a BGP session for the collector on your router.
|
||||
|
||||
Some example client configurations are included in the 'examples' directory.
|
||||
Users are encouraged to configure the [BGP Add-Path](https://tools.ietf.org/html/rfc7911) extension to provide a comprehensive set of routes to the collector.
|
||||
|
||||
3. Profit !
|
||||
|
||||
|
||||
## Route Collector Services
|
||||
|
||||
### Looking Glass
|
||||
|
||||
[http://collector.dn42:5001/](http://collector.dn42:5001/) (DN42 link)
|
||||
[https://grc.burble.com/](https://grc.burble.com/) (public internet link)
|
||||
|
||||
The burble.dn42 looking glass is based on [bird-lg](https://github.com/sileht/bird-lg) with
|
||||
patches by [Zhaofeng](https://github.com/zhaofengli/bird-lg) and [Burble](https://github.com/sesa-me/bird-lg)
|
||||
to fix formating and bird2 compatibility.
|
||||
|
||||
### Prometheus Metrics
|
||||
|
||||
[http://collector.dn42:9324/metrics](http://collector.dn42:9324/metrics)
|
||||
|
||||
The collector runs [bird_exporter](https://github.com/czerwonk/bird_exporter) and the metrics are publically available on the default bird_exporter port.
|
||||
|
40
examples/bird1/client.conf
Normal file
40
examples/bird1/client.conf
Normal file
@ -0,0 +1,40 @@
|
||||
##########################################################################
|
||||
#
|
||||
# Bird1 Route Collector Client Example
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
# IPv4
|
||||
protocol bgp ROUTE_COLLECTOR4
|
||||
{
|
||||
local as ***YOUR_AS***;
|
||||
|
||||
neighbor 172.20.129.165 as 4242422602;
|
||||
multihop;
|
||||
|
||||
# import nothing, export everything
|
||||
import none;
|
||||
export all;
|
||||
|
||||
# export multiple paths to same destination
|
||||
add paths tx;
|
||||
}
|
||||
|
||||
# IPv6
|
||||
protocol bgp ROUTE_COLLECTOR6
|
||||
{
|
||||
local as ***YOUR_AS***;
|
||||
|
||||
neighbor fd42:4242:2601:ac12::1 as 4242422602;
|
||||
multihop;
|
||||
|
||||
# import nothing, export everything
|
||||
import none;
|
||||
export all;
|
||||
|
||||
# export multiple paths to same destination
|
||||
add paths tx;
|
||||
}
|
||||
|
||||
##########################################################################
|
||||
# end of file
|
@ -8,7 +8,7 @@ protocol bgp ROUTE_COLLECTOR
|
||||
{
|
||||
local as ***YOUR_AS***;
|
||||
|
||||
neighbor fd42:4242:2601:ac12::1 as 4242422601;
|
||||
neighbor fd42:4242:2601:ac12::1 as 4242422602;
|
||||
multihop;
|
||||
|
||||
ipv4 {
|
||||
|
@ -5,7 +5,7 @@
|
||||
##########################################################################
|
||||
|
||||
# route collector AS
|
||||
define GRC_AS = 4242422601;
|
||||
define GRC_AS = 4242422602;
|
||||
|
||||
# router ID
|
||||
router id 172.20.129.165;
|
||||
@ -29,42 +29,37 @@ protocol device { }
|
||||
# import filters
|
||||
|
||||
# IPv4 import filter
|
||||
filter rc_peer_import4
|
||||
function rc_peer_import4(int peer_as; int peer_ref)
|
||||
{
|
||||
# only accept valid DN42 networks
|
||||
# https://git.dn42.us/dn42/registry/src/master/data/filter.txt
|
||||
|
||||
# accept valid networks
|
||||
if net ~ [
|
||||
|
||||
172.20.0.0/14{21,29}, # dn42
|
||||
172.20.0.0/24{28,32}, # dn42 Anycast
|
||||
172.21.0.0/24{28,32}, # dn42 Anycast
|
||||
172.22.0.0/24{28,32}, # dn42 Anycast
|
||||
172.23.0.0/24{28,32}, # dn42 Anycast
|
||||
172.31.0.0/16+, # ChaosVPN
|
||||
10.100.0.0/14+, # ChaosVPN
|
||||
10.0.0.0/8{15,24} # Freifunk.net
|
||||
172.16.0.0/12+,
|
||||
10.0.0.0/8+
|
||||
] then {
|
||||
|
||||
] then accept;
|
||||
# add a large community to tag where the route was sourced
|
||||
bgp_large_community.add(( GRC_AS, peer_as, peer_ref ));
|
||||
return true;
|
||||
}
|
||||
|
||||
# reject anything else
|
||||
reject;
|
||||
return false;
|
||||
}
|
||||
|
||||
# IPv6 import filter
|
||||
filter rc_peer_import6
|
||||
function rc_peer_import6(int peer_as; int peer_ref)
|
||||
{
|
||||
# only accept valid DN42 networks
|
||||
# https://git.dn42.us/dn42/registry/src/master/data/filter6.txt
|
||||
|
||||
# accept valid networks
|
||||
if net ~ [
|
||||
|
||||
fd00::/8{44,64}
|
||||
|
||||
] then accept;
|
||||
] then {
|
||||
|
||||
bgp_large_community.add(( GRC_AS, peer_as, peer_ref ));
|
||||
return true;
|
||||
}
|
||||
|
||||
# reject anything else
|
||||
reject;
|
||||
return false;
|
||||
}
|
||||
|
||||
##########################################################################
|
||||
@ -75,6 +70,7 @@ template bgp RC_PEER4 {
|
||||
|
||||
local as GRC_AS;
|
||||
multihop;
|
||||
passive;
|
||||
|
||||
ipv4 {
|
||||
import keep filtered;
|
||||
@ -83,8 +79,7 @@ template bgp RC_PEER4 {
|
||||
# accept multiple routes for same desgination
|
||||
add paths rx;
|
||||
|
||||
# import valid DN42 routes, export nothing
|
||||
import filter rc_peer_import4;
|
||||
# don't export anything
|
||||
export none;
|
||||
};
|
||||
|
||||
@ -95,6 +90,7 @@ template bgp RC_PEER6 {
|
||||
|
||||
local as GRC_AS;
|
||||
multihop;
|
||||
passive;
|
||||
|
||||
ipv6 {
|
||||
import keep filtered;
|
||||
@ -103,8 +99,7 @@ template bgp RC_PEER6 {
|
||||
# accept multiple routes for same desgination
|
||||
add paths rx;
|
||||
|
||||
# import valid DN42 routes, export nothing
|
||||
import filter rc_peer_import6;
|
||||
# don't export anything
|
||||
export none;
|
||||
};
|
||||
|
||||
@ -116,6 +111,7 @@ template bgp RC_MULTIPEER {
|
||||
|
||||
local as GRC_AS;
|
||||
multihop;
|
||||
passive;
|
||||
|
||||
ipv4 {
|
||||
import keep filtered;
|
||||
@ -124,8 +120,7 @@ template bgp RC_MULTIPEER {
|
||||
# accept multiple routes for same desgination
|
||||
add paths rx;
|
||||
|
||||
# import valid DN42 routes, export nothing
|
||||
import filter rc_peer_import4;
|
||||
# don't export anything
|
||||
export none;
|
||||
};
|
||||
|
||||
@ -136,8 +131,7 @@ template bgp RC_MULTIPEER {
|
||||
# accept multiple routes for same desgination
|
||||
add paths rx;
|
||||
|
||||
# import valid DN42 routes, export nothing
|
||||
import filter rc_peer_import6;
|
||||
# don't export anything
|
||||
export none;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user