Ouroboros Tutorial 02
The description of this tutorial uses a debug build.
The objective for this tutorial is to create a 2-layer network. We will add a simple 2-node unicast Layer on top of a local Layer and will ping an oping server from an oping client over this network.
Initially, this will probably sound like gibberish, especially if configuring VLANs and defining IP subnets are your bread and butter, but once the concepts of flow allocation and binding / registering names become familiar, this will all 'click'.
We recommend opening a couple of terminal windows for this tutorial.
First, we will create a local loopback network like in the previous tutorial:
$ irm ipcp bootstrap type local name local-ipcp layer local-layer
Now we will create the 2-node unicast network on top of this Local Layer 'network'.
To create this small unicast network, we bootstrap the first IPCP; and then enroll a second IPCP with that first IPCP.
$ irm ipcp bootstrap type unicast name uni-1 layer unicast-layer
Let's quickly have a look at the IRMd log, which shows the following output:
==07907== irmd(II): Created IPCP 8030. ==08030== ipcpd/ipcp(II): Bootstrapping... ==08030== unicast-ipcp(II): IPCP got address 3241766228. ==08030== ca(DB): Using multi-bit ECN. ==08030== link-state-routing(DB): Using link state routing policy. ==08030== pff(DB): Using simple PFF policy. ==08030== pff(DB): Using simple PFF policy. ==08030== pff(DB): Using simple PFF policy. ==08030== ipcpd/ipcp(II): Finished bootstrapping: 0. ==07907== irmd(II): Bootstrapped IPCP 8030 in layer unicast-layer. ==07907== irmd(DB): New instance (8030) of ipcpd-unicast added. ==07907== irmd(DB): This process accepts flows for:
To be able to enroll, the second IPCP will need to allocate a flow to the first one (over the local Layer). To be able to allocate the flow, the first IPCP will need to be bound to a name that is registered into the local Layer. When creating layers, we will leverage Ouroboros' anycast: instead of binding the IPCP to a single name, we will bind it to two names: the first name will be unique for each IPCP and can be used to create flows to that specific IPCP, the second name will be common for all IPCPs in the layer. This is useful for enrollment, as the new IPCP can enroll with any IPCP in the network.
$ irm bind ipcp uni-1 name uni-1
$ irm bind ipcp uni-1 name unicast-layer
$ irm name register uni-1 layer local-layer
$ irm name register unicast-layer layer local-layer