Introduction
This page details the steps to utilize the EdgeVPN software to spin up two overlay networks using a single instance. As of now Bounded Flood SDN protocol supports only one overlay, so other overlays will have to rely on STP protocol.
Getting the controller code and tincan executable
Clone the following repository.
git clone https://github.com/EdgeVPNio/evio.git
copy controller directory into a folder of your choice, also copy the tincan executable. In the following example both of them have been copied to the path "/home/osboxes/Downloads/EVPN/".
Create a config file for supporting two overlays, notice several modules have two sections corresponding to the two overlays. Keep in mind that the overlays should have non conflicting private IP subnets and the XMPP ID's used to bootstrap the two overlays should not be friends with each other. Shown below is a populated sample config file "mconfig.json".
{
"CFx": {
"Model": "Default",
"Overlays": [
"A1A111A",
"B1B111B"
],
"NodeId": ""
},
"Logger": {
"LogLevel": "DEBUG",
"Device": "File",
"Directory": "/home/osboxes/Downloads/EVPN/",
"CtrlLogFileName": "ctrl.log",
"TincanLogFileName": "tincan_log",
"MaxFileSize": 10000000,
"MaxArchives": 1
},
"Signal": {
"Enabled": true,
"Overlays": {
"A1A111A": {
"HostAddress": "192.168.81.133",
"AuthenticationMethod": "PASSWORD",
"Port": "5222",
"Username": "sam@local",
"Password": "sam"
},
"B1B111B": {
"HostAddress": "192.168.81.133",
"AuthenticationMethod": "PASSWORD",
"Port": "5222",
"Username": "sam2@local",
"Password": "sam2"
}
}
},
"Topology": {
"PeerDiscoveryCoalesce": 1,
"Overlays": {
"A1A111A": {
"Name": "SymphonyRing",
"Description": "Scalable Symphony Ring Overlay for Bounded Flooding.",
"MaxSuccessors": 2,
"MaxOnDemandEdges": 1,
"MaxConcurrentEdgeSetup": 5,
"Role": "Switch"
},
"B1B111B": {
"Name": "SymphonyRing",
"Description": "Scalable Symphony Ring Overlay for Bounded Flooding.",
"MaxSuccessors": 2,
"MaxOnDemandEdges": 1,
"MaxConcurrentEdgeSetup": 5,
"Role": "Switch"
}
}
},
"LinkManager": {
"Dependencies": [
"Logger",
"TincanInterface",
"Signal"
],
"Stun": [
"stun.l.google.com:19302",
"stun1.l.google.com:19302"
],
"Overlays": {
"A1A111A": {
"Type": "TUNNEL",
"TapName": "tnl-"
},
"B1B111B": {
"Type": "TUNNEL",
"TapName": "chnl-"
}
}
},
"OverlayVisualizer": {
"Enabled": false,
"TimerInterval": 25,
"WebServiceAddress": "34.209.33.166:5000",
"NodeName": "nd-001"
},
"BridgeController": {
"Dependencies": [
"Logger",
"LinkManager"
],
"BoundedFlood": {
"OverlayId": "A1A111A",
"LogDir": "/home/osboxes/Downloads/EVPN/",
"LogFilename": "bf.log",
"LogLevel": "INFO",
"BridgeName": "evio",
"DemandThreshold": "100M",
"FlowIdleTimeout": 60,
"FlowHardTimeout": 60,
"MulticastBroadcastInterval": 60,
"MaxBytes": 10000000,
"BackupCount": 0,
"ProxyListenAddress": "",
"ProxyListenPort": 5802,
"MonitorInterval": 60,
"MaxOnDemandEdges": 0
},
"Overlays": {
"A1A111A": {
"NetDevice": {
"AutoDelete": true,
"Type": "OVS",
"SwitchProtocol": "BF",
"NamePrefix": "evio",
"MTU": 1410,
"AppBridge": {
"AutoDelete": true,
"Type": "OVS",
"NamePrefix": "brl",
"IP4": "10.10.100.1",
"PrefixLen": 16,
"MTU": 1410,
"NetworkAddress": "10.10.100.0/16"
}
},
"SDNController": {
"ConnectionType": "tcp",
"HostName": "127.0.0.1",
"Port": "6633"
}
},
"B1B111B": {
"NetDevice": {
"AutoDelete": true,
"Type": "OVS",
"SwitchProtocol": "STP",
"NamePrefix": "evio",
"MTU": 1410
}
}
}
}
}
Note, here we have two overlays with overlay ID's "A1A111A","B1B111B" respectively. While "A1A111A" uses SDN BoundedFlood, "B1B111B" uses STP. Another key difference between the two overlays is the fact that while "A1A111A" has a IPv4 address setup by the controller, "B1B111B" does not.
Starting the instance
Assuming that the XMPP server has been setup and the XMPP ID's are also properly configured invoke the below commands on terminal. Make sure that the IP4 addresses under the overlay section for nodes are different as well as the NodeID in the CFx section in the mconfig.json file.
osboxes@godev:~/Downloads/EVPN$ ls
bf.log config.json controller ctrl.log ctrl.log.1 mconfig.json tincan tincan_log_0
osboxes@godev:~/Downloads/EVPN$
Start the tincan and controller processes manually.
sudo ./tincan &
cd controller
sudo python3 Controller.py -c ../mconfig.json &
If the invocations are successful one must see something like the below, in the illustrated setup two nodes are participating in both the overlays so we expect to see two tunnels, one for each overlay respectively.
osboxes@godev:~/Downloads/EVPN/controller$ ifconfig -a
br-e1260902faf7: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.18.0.1 netmask 255.255.0.0 broadcast 172.18.255.255
ether 02:42:cc:89:bf:dc txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
brlA1A111A: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1410
inet 10.10.100.1 netmask 255.255.0.0 broadcast 0.0.0.0
inet6 fe80::4c70:45ff:fe2d:b341 prefixlen 64 scopeid 0x20<link>
ether 4e:70:45:2d:b3:41 txqueuelen 1000 (Ethernet)
RX packets 38 bytes 3308 (3.3 KB)
RX errors 0 dropped 2 overruns 0 frame 0
TX packets 54 bytes 6124 (6.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
chnl-a100001: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1410
inet6 fe80::4455:61ff:fe5d:cdc5 prefixlen 64 scopeid 0x20<link>
ether 46:55:61:5d:cd:c5 txqueuelen 1000 (Ethernet)
RX packets 91 bytes 6655 (6.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 27 bytes 3152 (3.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
inet6 fe80::42:75ff:feea:57d2 prefixlen 64 scopeid 0x20<link>
ether 02:42:75:ea:57:d2 txqueuelen 0 (Ethernet)
RX packets 520 bytes 326451 (326.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 687 bytes 266258 (266.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.81.133 netmask 255.255.255.0 broadcast 192.168.81.255
inet6 fe80::2d1a:e4da:134c:9b0e prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:ef:a1:94 txqueuelen 1000 (Ethernet)
RX packets 7438 bytes 8377918 (8.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4352 bytes 433616 (433.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
evioA1A111A: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1410
inet6 fe80::7041:32ff:fedf:9a45 prefixlen 64 scopeid 0x20<link>
ether 72:41:32:df:9a:45 txqueuelen 1000 (Ethernet)
RX packets 26 bytes 2532 (2.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 27 bytes 3152 (3.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
evioB1B111B: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1410
inet6 fe80::fc81:b6ff:fe08:844b prefixlen 64 scopeid 0x20<link>
ether fe:81:b6:08:84:4b txqueuelen 1000 (Ethernet)
RX packets 8 bytes 596 (596.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 28 bytes 3222 (3.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 2006 bytes 579037 (579.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2006 bytes 579037 (579.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ovs-system: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 0a:77:75:07:33:b7 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tnl-a100001: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1410
inet6 fe80::d413:d2ff:fe87:6d7e prefixlen 64 scopeid 0x20<link>
ether d6:13:d2:87:6d:7e txqueuelen 1000 (Ethernet)
RX packets 59 bytes 8445 (8.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 32 bytes 3752 (3.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
veth77ee010: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::ecb4:86ff:fead:a88e prefixlen 64 scopeid 0x20<link>
ether ee:b4:86:ad:a8:8e txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 70 bytes 8560 (8.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vethbb4645d: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::5483:15ff:fe51:3ebf prefixlen 64 scopeid 0x20<link>
ether 56:83:15:51:3e:bf txqueuelen 0 (Ethernet)
RX packets 520 bytes 333731 (333.7 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 688 bytes 265775 (265.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
osboxes@godev:~/Downloads/EVPN/controller$ sudo ovs-vsctl show
[sudo] password for osboxes:
f269da11-336f-43cc-ae9d-692fb4098c0f
Bridge "evioB1B111B"
Port "chnl-a100001"
Interface "chnl-a100001"
Port "evioB1B111B"
Interface "evioB1B111B"
type: internal
Bridge "brlA1A111A"
Port "brl-pp0"
Interface "brl-pp0"
type: patch
options: {peer="evi-pp0"}
Port "brlA1A111A"
Interface "brlA1A111A"
type: internal
Bridge "evioA1A111A"
Controller "tcp:127.0.0.1:6633"
is_connected: true
Port "evi-pp0"
Interface "evi-pp0"
type: patch
options: {peer="brl-pp0"}
Port "evioA1A111A"
Interface "evioA1A111A"
type: internal
Port "tnl-a100001"
Interface "tnl-a100001"
ovs_version: "2.9.2"
Note that as specified in the config file - we have a network ("evioA1A111A") and app-bridge ("brlA1A111A") for the overlay "A1A111A". Tunnels for this overlay have a prefix - "tnl". Overlay "B1B111B" is configured to have only a netDevice bridge ("evioB1B111B"), and tunnels for this overlay have a prefix "chnl" as configured. In the shown set up we have two tunnels "tnl-a100001", "chnl-a100001" attached to the respective bridges of their overlays. We can test the tunnel by verifying ICMP between the two nodes on the overlay.
osboxes@godev:~/Downloads/EVPN/controller$ ping 10.10.100.2
PING 10.10.100.2 (10.10.100.2) 56(84) bytes of data.
64 bytes from 10.10.100.2: icmp_seq=1 ttl=64 time=12.4 ms
64 bytes from 10.10.100.2: icmp_seq=2 ttl=64 time=0.653 ms
64 bytes from 10.10.100.2: icmp_seq=3 ttl=64 time=0.494 ms
^C
--- 10.10.100.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2016ms
rtt min/avg/max/mdev = 0.494/4.540/12.473/5.609 ms