tomeshnet / toronto-community-network

Organization, planning, and information related to Toronto's community network operation
https://tomesh.net/
21 stars 1 forks source link

Babed Default Route Routing Issue #115

Closed darkdrgn2k closed 3 years ago

darkdrgn2k commented 3 years ago

This initial comment is collaborative and open to modification by all.

Task Summary

🎟️ Re-ticketed from: # 📅 Due date: N/A 🎯 Success criteria:Blocked by: 👈 Depends on:

Unexpected path being taken by BABELD on Supernode 1

add route 7ffa78 prefix ::/0 from ::/0 installed yes id 70:18:84:07:fc:1d:ec:86 metric 160 refmetric 64 via fe80::a480:4bff:feff:893 if l2tpeth1
add route 7fa1a8 prefix ::/0 from ::/0 installed no id 70:18:84:07:fc:1d:ec:86 metric 352 refmetric 256 via fe80::c0b1:d9ff:fe37:26d2 if l2tpeth0
add route 7fa488 prefix 0.0.0.0/0 from 0.0.0.0/0 installed yes id 02:16:1c:ff:fe:1d:c7:81 metric 396 refmetric 300 via fe80::c0b1:d9ff:fe37:26d2 if l2tpeth0
add route 7ffaf0 prefix 0.0.0.0/0 from 0.0.0.0/0 installed no id 02:16:1c:ff:fe:1d:c7:81 metric 588 refmetric 492 via fe80::a480:4bff:feff:893 if l2tpeth1

image

To Do

darkdrgn2k commented 3 years ago

Network layout

Exit Node Config:

redistribute ip ::/0 le 0  proto 3
redistribute ip 0.0.0.0/0 le 0 proto 3
redistribute local deny
redistribute deny

EXIT1

l2tpeth0 - Path to Node1 l2tpeth56 - Path to Node2

add xroute ::/0-::/0 prefix ::/0 from ::/0 metric 300
add xroute 0.0.0.0/0-0.0.0.0/0 prefix 0.0.0.0/0 from 0.0.0.0/0 metric 300
add route 1710990 prefix ::/0 from ::/0 installed no id dc:b1:f3:24:ff:27:3b:71 metric 192 refmetric 96 via fe80::8dc:43ff:fe0a:8ec8 if l2tpeth56
add route 170efc0 prefix ::/0 from ::/0 installed no id dc:b1:f3:24:ff:27:3b:71 metric 192 refmetric 96 via fe80::e0d5:b1ff:fe51:9b6d if l2tpeth0
add route 1710a50 prefix 0.0.0.0/0 from 0.0.0.0/0 installed no id dc:b1:f3:24:ff:27:3b:71 metric 192 refmetric 96 via fe80::8dc:43ff:fe0a:8ec8 if l2tpeth56
add route 170f020 prefix 0.0.0.0/0 from 0.0.0.0/0 installed no id dc:b1:f3:24:ff:27:3b:71 metric 192 refmetric 96 via fe80::e0d5:b1ff:fe51:9b6d if l2tpeth0

Exit 2

l2tpeth1 - Path to Node1 l2tpeth63 - Path to Node2

add xroute ::/0-::/0 prefix ::/0 from ::/0 metric 0
add xroute 0.0.0.0/0-0.0.0.0/0 prefix 0.0.0.0/0 from 0.0.0.0/0 metric 0
add route 1db0fc0 prefix ::/0 from ::/0 installed no id 02:16:1c:ff:fe:1d:c7:81 metric 492 refmetric 396 via fe80::4487:7fff:fe08:b036 if l2tpeth1
add route 1db1970 prefix ::/0 from ::/0 installed no id 02:16:1c:ff:fe:1d:c7:81 metric 492 refmetric 396 via fe80::54dd:8ff:fe45:a60f if l2tpeth63
add route 1db12b0 prefix 0.0.0.0/0 from ::ffff:0.0.0.0/0 installed yes id 02:16:1c:ff:fe:1d:c7:81 metric 492 refmetric 396 via fe80::4487:7fff:fe08:b036 if l2tpeth1
add route 1db19d0 prefix 0.0.0.0/0 from ::ffff:0.0.0.0/0 installed no id 02:16:1c:ff:fe:1d:c7:81 metric 492 refmetric 396 via fe80::54dd:8ff:fe45:a60f if l2tpeth63

NODE1

l2tpeth0 = Path to EXIT 1 l2tpeth1 = Path to EXIT 2

add route 7ffa78 prefix ::/0 from ::/0 installed yes id 70:18:84:07:fc:1d:ec:86 metric 160 refmetric 64 via fe80::a480:4bff:feff:893 if l2tpeth1
add route 7fa1a8 prefix ::/0 from ::/0 installed no id 70:18:84:07:fc:1d:ec:86 metric 352 refmetric 256 via fe80::c0b1:d9ff:fe37:26d2 if l2tpeth0
add route 7fa488 prefix 0.0.0.0/0 from 0.0.0.0/0 installed yes id 02:16:1c:ff:fe:1d:c7:81 metric 396 refmetric 300 via fe80::c0b1:d9ff:fe37:26d2 if l2tpeth0
add route 7ffaf0 prefix 0.0.0.0/0 from 0.0.0.0/0 installed no id 02:16:1c:ff:fe:1d:c7:81 metric 588 refmetric 492 via fe80::a480:4bff:feff:893 if l2tpeth1

NODE2

l2tpeth56 - Path to Exit 1
l2tpeth63 - Path to Exit 2

add route d27e78 prefix ::/0 from ::/0 installed yes id 78:47:3e:8d:92:6f:63:42 metric 96 refmetric 0 via fe80::7466:22ff:fe0e:bfab if l2tpeth63
add route d2c370 prefix ::/0 from ::/0 installed no id 02:16:1c:ff:fe:1d:c7:81 metric 396 refmetric 300 via fe80::307c:eeff:fe5b:439e if l2tpeth56
add route d2e9f8 prefix 0.0.0.0/0 from ::ffff:0.0.0.0/0 installed yes id 78:47:3e:8d:92:6f:63:42 metric 96 refmetric 0 via fe80::7466:22ff:fe0e:bfab if l2tpeth63
add route d298b8 prefix 0.0.0.0/0 from ::ffff:0.0.0.0/0 installed no id 02:16:1c:ff:fe:1d:c7:81 metric 396 refmetric 300 via fe80::307c:eeff:fe5b:439e if l2tpeth56
darkdrgn2k commented 3 years ago

NODE1: ✅Installed IPv6 default path to EXIT2 ❓Installed IPv4 default path to EXIT1 ❌Very high metrics for IPv4 default Exit 2 path

NODE2: ✅Installed IPv6 path to EXIT2 ✅Installed IPv4 path to EXIT2

EXIT2: ❌ Babeld marked as installed - default ipv4 path through Node1

add route 1db12b0 prefix 0.0.0.0/0 from ::ffff:0.0.0.0/0 installed yes id 02:16:1c:ff:fe:1d:c7:81 metric 492 refmetric 396 via fe80::4487:7fff:fe08:b036 if l2tpeth1
darkdrgn2k commented 3 years ago

workaround

reject announcements of 0.0.0.0 and ::/0 on exit nodes

in ip 0.0.0.0/0 le 0 deny
in ip ::/0 le 0 deny
darkdrgn2k commented 3 years ago

Question:

Should xroute and route entries be listed for the same subnet

darkdrgn2k commented 3 years ago

Issue may have arose from incorrectly setup VRFs