diff --git a/README.md b/README.md index 8127dee..f6e7a77 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,12 @@ solution like [PathVector][pv]. ## Defining BGP sessions -You can use [`skeleton.conf`][skeleton] as a basic `bird` starting config. Note -that in this config, static protocol routes are internal to `bird` and will not -be exported to the kernel routing table. You can change this by changing the -export rules for `protocol kernel`. +You can use [`skeleton.conf`][skeleton] as a basic `bird` starting config. +Remember to read the `NOTE`s and change the things marked `FIXME`. + +Also note that in this config, static protocol routes are internal to `bird` +and will not be exported to the kernel routing table. You can change this by +changing the export rules for `protocol kernel`. This filter library makes use of two basic static protocols: * `node_v4`: IPv4 routes to be exported by the `export_cone` helper. diff --git a/skeleton.conf b/skeleton.conf index 04b0fcf..aa13b14 100644 --- a/skeleton.conf +++ b/skeleton.conf @@ -8,6 +8,20 @@ protocol kernel { scan time 60; ipv4 { export where source != RTS_STATIC; + # NOTE: this basic export above doesn't make the routes inserted into + # the kernel prefer your own IPs. Things will work fine with your + # server's IP assigned by the provider if you have a single upstream + # but strange things will happen if you have more than one peer. + # Instead, to use your own IP as the default source IP for outgoing + # connections on your system, add an IP from your range to the `lo` + # interface, remove the line above, and use the block below, changing + # 192.0.2.1 to the IP used. + # + # export filter { + # if source = RTS_STATIC then reject; + # if source = RTS_BGP then krt_prefsrc = 192.0.2.1; + # accept; + # }; }; } @@ -15,6 +29,13 @@ protocol kernel { scan time 60; ipv6 { export where source != RTS_STATIC; + # NOTE: similar to above, use the following block to change the default + # source IP for outgoing connections. + # export filter { + # if source = RTS_STATIC then reject; + # if source = RTS_BGP then krt_prefsrc = 2001:db8::1; + # accept; + # }; }; }