howto/Bird-communities.md
... ...
@@ -36,7 +36,20 @@ Propagation:
36 36
```
37 37
For example, if your peer is 12ms away and the link speed between you is 250Mbit/s and you are peering using OpenVPN P2P, then the community string would be (3, 24, 33).
38 38
39
-You might want to use this [script](https://github.com/Mic92/bird-dn42/blob/master/bgp-community.rb) to measure round trip time and calculate community values automatically.
39
+You might want to use this [script](https://github.com/Mic92/bird-dn42/blob/master/bgp-community.rb) to measure round trip time and calculate community values automatically:
40
+
41
+```
42
+$ ruby bgp-community.rb
43
+USAGE: bgp-community.rb [-6] host mbit_speed unencrypted|unsafe|encrypted|pfs
44
+$ ruby bgp-community.rb 212.129.13.123 300 encrypted
45
+ # 15 ms, 300 mbit/s, encrypted tunnel (updated: 2016-02-11)
46
+ import where dn42_import_filter(3,24,33);
47
+ export where dn42_export_filter(3,24,33);
48
+$ ruby bgp-community.rb -6 dn42-2.higgsboson.tk 1000 pfs
49
+ # 11 ms, 1000 mbit/s, pfs tunnel (updated: 2016-02-11)
50
+ import where dn42_import_filter(3,25,34);
51
+ export where dn42_export_filter(3,25,34);
52
+```
40 53
41 54
See also this [mail](https://lists.nox.tf/pipermail/dn42/2015-December/001259.html) for communities for route origin.
42 55