aboutsummaryrefslogtreecommitdiff
path: root/content/en/blog/news
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2020-02-16 21:04:47 +0100
committerDimitri Staessens <dimitri@ouroboros.rocks>2020-02-16 21:04:47 +0100
commitec124e7f21d3c89f20807dc4f6bcff1779b7ae12 (patch)
tree15b846ec07ec67af5f3e34e689429a8c61f26549 /content/en/blog/news
parent3b31cb81d3b569977aead01eecd30d92246a0da3 (diff)
downloadwebsite-ec124e7f21d3c89f20807dc4f6bcff1779b7ae12.tar.gz
website-ec124e7f21d3c89f20807dc4f6bcff1779b7ae12.zip
blog: Add quick ECMP example
Diffstat (limited to 'content/en/blog/news')
-rw-r--r--content/en/blog/news/20200216-ecmp.md118
1 files changed, 118 insertions, 0 deletions
diff --git a/content/en/blog/news/20200216-ecmp.md b/content/en/blog/news/20200216-ecmp.md
new file mode 100644
index 0000000..0a37552
--- /dev/null
+++ b/content/en/blog/news/20200216-ecmp.md
@@ -0,0 +1,118 @@
+---
+date: 2020-02-16
+title: "Equal-Cost Multipath (ECMP) routing"
+linkTitle: "Equal-Cost multipath (ECMP) example"
+description: "A very quick example of ECMP"
+author: Dimitri Staessens
+---
+
+As promised, I added equal cost multipath routing to the Ouroboros
+unicast IPCP. I will add some more explanations later when it's fully
+tested and merge into the master branch, but you can already try it.
+You will need to pull the _be_ branch. You will also need to have
+_fuse_ installed to monitor the flows from _/tmp/ouroboros/_. The
+following script will bootstrap a 4-node unicast network on your
+machine that routes using ECMP:
+
+```bash
+#!/bin/bash
+
+# create a local IPCP. This emulates the "Internet"
+irm i b t local n local l local
+
+#create the first unicast IPCP with ecmp
+irm i b t unicast n uni.a l net routing ecmp
+
+#bind the unicast IPCP to the names net and uni.a
+irm b i uni.a n net
+irm b i uni.a n uni.a
+
+#register these 2 names in the local IPCP
+irm r n net l local
+irm r n uni.a l local
+
+#create 3 more unicast IPCPs, and enroll them with the first
+irm i e t unicast n uni.b l net
+irm b i uni.b n net
+irm b i uni.b n uni.b
+irm r n uni.b l local
+
+irm i e t unicast n uni.c l net
+irm b i uni.c n net
+irm b i uni.c n uni.c
+irm r n uni.c l local
+
+irm i e t unicast n uni.d l net
+irm b i uni.d n net
+irm b i uni.d n uni.d
+irm r n uni.d l local
+
+#connect uni.b to uni.a this creates a DT flow and a mgmt flow
+irm i conn name uni.b dst uni.a
+
+#now do the same for the others, creating a square
+irm i conn name uni.c dst uni.b
+irm i conn name uni.d dst uni.c
+irm i conn name uni.d dst uni.a
+
+#register the oping application at 4 different locations
+#this allows us to check the multipath implementation
+irm r n oping.a i uni.a
+irm r n oping.b i uni.b
+irm r n oping.c i uni.c
+irm r n oping.d i uni.d
+
+#bind oping program to oping names
+irm b prog oping n oping.a
+irm b prog oping n oping.b
+irm b prog oping n oping.c
+irm b prog oping n oping.d
+
+#good to go!
+```
+
+In order to test the setup, start an irmd (preferably in a terminal so
+you can see what's going on). In another terminal, run the above
+script and then start an oping server:
+
+```bash
+$ ./ecmpscript
+$ oping -l
+Ouroboros ping server started.
+```
+
+This single server program will accept all flows for oping from any of
+the unicast IPCPs. Ouroboros _multi-homing_ in action.
+
+Open another terminal, and type the following command:
+
+```bash
+$ watch -n 1 'grep "sent (packets)" /tmp/ouroboros/uni.a/dt.*/6* | sed -n -e 1p -e 7p'
+```
+
+This will show you the packet statistics from the 2 data transfer
+flows from the first IPCP (uni.a).
+
+On my machine it looks like this:
+
+```
+Every 1,0s: grep "sent (packets)" /tmp/ouroboros/uni.a/dt.*/6* | sed -n -e 1p -e 7p
+
+/tmp/ouroboros/uni.a/dt.1896199821/65: sent (packets): 10
+/tmp/ouroboros/uni.a/dt.1896199821/67: sent (packets): 6
+```
+
+Now, from yet another terminal, run connect an oping client to oping.c
+(the client should attach to the first IPCP, so oping.c should be the
+one with 2 equal cost paths) and watch both counters increase:
+
+```bash
+oping -n oping.c -i 100ms
+```
+
+When you do this to the other destinations (oping.b and oping.d) you
+should see only one of the flow counters increasing.
+
+Hope you enjoyed this little demo!
+
+Dimitri