diff --git a/docs/additional/dn42_interconnection.md b/docs/additional/dn42_interconnection.md deleted file mode 100644 index f32cd26..0000000 --- a/docs/additional/dn42_interconnection.md +++ /dev/null @@ -1,106 +0,0 @@ -# CRXN / dn42 gateway documentation - -CRXN mainly uses IGP protocols such as babel or ospf, while dn42 uses the EGP BGP. Since the protocols are based on different concepts, a direct connection is not possible. - -## Routes into dn42 -If everyone who is a member of dn42 and CRXN would not filter the routes, this would result in announcing them in dn42 under their own AS number. However, according to the registry, you do not have permission to do this. Therefore the dummy ASN 4242423182 was registered in dn42. This is the origin of CRXN routes. So before exporting the routes to dn42, attach an AS path with AS4242423182 to it. So it looks from the outside that the CRXN routes come from AS4242423182. AS4242423182 has the permission to announce the CRXN routes. - -## Routes into the CRXN -CRXN uses IGP and therefore does not know the concept of AS numbers or originating systems. In CRXN it appears that everything comes from one system. Accordingly, you can export dn42 routes here without preparation. - -## Notes - -- If possible, try to export only CRXN routes to the dn42, which are also in the entitydb. - -## Example configuration in bird - -To create the BGP path artificially you can use the command `bgp_path.prepend`. This appends an AS number to the BGP path. -```bird -define CRXNAS = 4242423182; - -function dn42_export_filter() { - /* some filter */ - - if ( is_crxn_net() ) then { - bgp_path.prepend(CRXNAS); - } - - /* some filter */ - - accept; -} -``` - -If you want to avoid so much traffic flowing through your gateway, you can repeat the command `bgp_path.prepend(CRXNAS);` once. By doing this, you intentionally make your gateway less attractive to others. (see Route Prepending) -```bird -if ( is_crxn_net() ) then { - bgp_path.prepend(CRXNAS); - bgp_path.prepend(CRXNAS); -} -``` - -## Registering the gateway - -Currently, a list of gateway operators is maintained in [https://codeberg.org/crxn/dn42_gateways/](https://codeberg.org/crxn/dn42_gateways/). If you also want to operate a gateway, please submit a PR there. - -## View current gateways - -In case someone is running a gateway without permission or in case you want to check if your gateway is working, you can ask the [Global Route Collector (GRC)](https://wiki.dn42/services/Route-Collector) of dn42: -```bash -$ssh shell@collector.dn42 ------------------------------------- -* DN42 Global Route Collector * ------------------------------------- -* https://collector.dn42/ - -This service provides a bird2 shell -for querying the route collector - -Be nice, access is logged and -abuse will not be tolerated ------------------------------------- -BIRD v2.0.9-11-g207ac485 ready. -Access restricted -bird> show route where bgp_path.last = 4242423182 all -Table master6: -fd14:57af:fe7a::/64 unreachable [DYN_00107 13:04:33.512 from fd89:35db:fc0::4] * (100) [AS4242423182i] - Type: BGP univ - BGP.origin: IGP - BGP.as_path: 4242420604 4242422923 4242423182 - BGP.next_hop: fd89:35db:fc0::4 - BGP.local_pref: 100 - BGP.community: (64511,6) (64511,24) (64511,33) - BGP.large_community: (65535, 70, 2) (210074, 0, 4242420591) (210074, 1, 1) (4242420604, 2, 13) (4242420604, 501, 4242423513) (4242420604, 502, 41) (4242420604, 504, 3) - unreachable [DYN_00037 2022-12-04 from fd89:35db:fc0::3] (100) [AS4242423182i] - Type: BGP univ - BGP.origin: IGP - BGP.as_path: 4242421271 4242422225 210074 4242422924 4242423182 4242423182 - BGP.next_hop: fd89:35db:fc0::3 - BGP.local_pref: 100 - BGP.community: (64511,6) (64511,24) (64511,33) - BGP.large_community: (65535, 70, 2) (210074, 0, 4242420591) (210074, 1, 1) (4242420604, 2, 13) (4242420604, 501, 4242423513) (4242420604, 502, 41) (4242420604, 504, 3) - unreachable [DYN_00139 00:37:09.086 from fd9e:5312:a3b3:100::11] (100) [AS4242423182i] - Type: BGP univ - BGP.origin: IGP - BGP.as_path: 76190 4242420591 210074 4242422923 4242423182 - BGP.next_hop: fd9e:5312:a3b3:100::11 - BGP.local_pref: 100 - BGP.community: (64511,6) (64511,23) (64511,33) - BGP.large_community: (65535, 70, 2) (210074, 0, 4242420591) (210074, 1, 1) (4242420604, 2, 13) (4242420604, 501, 4242423513) (4242420604, 502, 41) (4242420604, 504, 3) -``` -(The data are only examples and not real) - -``` -fd14:57af:fe7a::/64 -``` -This is the prefix that is passed through the gateway. - -``` -BGP.as_path: 4242420604 4242422923 4242423182 -``` -This is the line which is interesting because you can see there who is currently running a gateway. At the very end is the dummy ASN 4242423182, preceded by either the dummy ASN or the operator's ASN. You can then look up the ASN number in the dn42 registry and know who is running the gateway. - -Alternatively, you can filter out the AS numbers directly using standard tools: -```bash -ssh shell@collector.dn42 show route where bgp_path.last = 4242423182 all 2>/dev/null | grep -P "^\tBGP.as_path: " | grep -Po "(\d{5,10}) 4242423182" | awk '{ split($0,ary," "); print ary[1] }' | sort | uniq -``` diff --git a/docs/additional/index.md b/docs/additional/index.md index 74b9f4d..e2b0d86 100644 --- a/docs/additional/index.md +++ b/docs/additional/index.md @@ -3,4 +3,4 @@ - [DNS](dns) - [DN42 Interconnection](dn42-interconnection) -- [ORG](otg/) +- [OTG](otg/) diff --git a/docs/home_network/dns.md b/docs/home_network/dns.md deleted file mode 100644 index 0051684..0000000 --- a/docs/home_network/dns.md +++ /dev/null @@ -1,3 +0,0 @@ -# DNS - -TODO: Add documentation @mark22k diff --git a/docs/home_network/index.md b/docs/home_network/index.md deleted file mode 100644 index 485a910..0000000 --- a/docs/home_network/index.md +++ /dev/null @@ -1,6 +0,0 @@ - -# Setting up your home network - -- [Setting up radv (router)](radv) -- [Setting up SLAAC (hosts)](slaac) -- [DNS](dns) diff --git a/docs/home_network/radv.md b/docs/home_network/radv.md deleted file mode 100644 index c9a8b04..0000000 --- a/docs/home_network/radv.md +++ /dev/null @@ -1,72 +0,0 @@ -Radv -==== - -This document is for setting up radv on Bird 2.0. - -# General syntax - -You will want to add one of these to one of your Bird configuration files: - -``` -protocol radv -{ - # Stuff goes here -} -``` - -## Advertising your prefix - -If you would like to advertise your prefix to hosts on your LAN that have set their address acquisition for IPv6 to _'Automatic'_ such that they will assign themselves an address within that prefix then you will want to add a `prefix` block as so: - -``` -protocol radv -{ - # Advertise your prefix - prefix fd40:ec65:5b4c::/64 { - # TODO: Add anything that needs to be in here - }; - - # Interfaces to run radv on - interface "eth0"; - -} -``` - -In the above example I am advertising a `/64` within my `/48`/ULA (`fd40:ec65:5b4c::/48`), `fd40:ec65:5b4c::/64`, and only on interface `eth0` will radv run. - -## Advertising route(s) - -You can advertise a default route, to `fd00::/8` or simply all routes in your router's routing table, to your hosts using the following: - -### Advertising a single `fd00::/8` - -TODO: Add this as I normally don't do this even though one should as it means less memory consumption and advertisement updates - -### Advertising all known routes - -This will advertise all the routes your Bird router knows (those in the `crxn` table) such that your, laptop for example, will add all of them to its routing table. - -``` -protocol radv -{ - # Enable propagating of routes exported to us via radv to hosts - propagate routes yes; - - ipv6 { - # Export all your routes into the radv advertisement - export filter crxn6; - table crxn; - }; - - # Interface to run radv on - only eth0 (change to what you want) - interface "eth0" { - # Advertise your prefix - prefix fd40:ec65:5b4c::/64 { - # Defaults are fine - }; - - # Prevent advertising of default route - default lifetime 0; - }; -} -``` \ No newline at end of file diff --git a/docs/home_network/slaac.md b/docs/home_network/slaac.md deleted file mode 100644 index bf2f7ea..0000000 --- a/docs/home_network/slaac.md +++ /dev/null @@ -1,44 +0,0 @@ -SLAAC -===== - -Configuring your hosts for automatic IP network and address assignment, DNS and routing is very easy. - -**Note::** This tutorial is written for those who have setup Radv already. - -## NetworkManager-based systems - -For NetworkManager-based systems do the following. Open up `nm-connection-editor` and you should have a screen appear like this: - -![](../img/slaac/nm-connection-editor.png) - -Then double click on the wifi or ethernet connection you have active of which connects you to the same LAN as your router and you should see a window like this popup: - -![](../img/slaac/nm-connection-window.png) - -Then go to the `IPv6` tab and you should see this: - -![](../img/slaac/ipv6-nm-connection.png) - -Now make sure that this part is set to `Automatic`: - -![](../img/slaac/address_acquisition_automatic.png) - -And then for the bottom two parts you can choose whatever option you want in these dropdowns: - -![](../img/slaac/whatever_you_want.png) - -Once you have configured that, then hit save and close all those windows: - -![](../img/slaac/save_connection.png) - -What you want to do now is to open `nmtui` (in your terminal) and reactivate that connection, first go to _Activate a connection_: - -![](../img/slaac/nmtui_main_menu.png) - -Now reactivate the connection. You can do this by deactivating it and activating it again (unplugging and replugging won't reactivate it - it doesn't reload the profile). - -![](../img/slaac/connection_reactivate.png) - ---- - -And that is it, now you should be connected to CRXN on your laptop via your router. diff --git a/docs/tunneling/fastd.md b/docs/tunneling/fastd.md index 7f5b810..a4c5ebc 100644 --- a/docs/tunneling/fastd.md +++ b/docs/tunneling/fastd.md @@ -46,8 +46,8 @@ peer "" { remote "" port ; key ""; - interface ""; - float yes; + interface "$INTERFACE"; + float yes; } ``` @@ -55,14 +55,14 @@ peer "" If your system uses ifconfig append ``` # On interface rise run -on up "ifconfig up"; -on down "ifconfig down"; +on up "ifconfig $INTERFACE up"; +on down "ifconfig $INTERFACE down"; ``` If your system uses ip append ``` -on up "ip link set dev up"; -on down "ip link set dev down"; +on up "ip link set dev $INTERFACE up"; +on down "ip link set dev $INTERFACE down"; ``` The template needs to have the following filled in: