scieee AI-readable full text Open interactive document viewer

Deployment of a GPON-SDN solution in a server using Docker

Neupane, Anil

Abstract

Grado en Ingeniería de Tecnologías Específicas de Telecomunicación

Full text

UNIVERSIDAD DE VALLADOLID E.T.S.I. TELECOMUNICACIÓN TRABAJO FIN DE GRADO GRADO EN INGENIERÍA DE TECNOLOGÍAS ESPECÍFICAS DE TELECOMUNICACIÓN Deployment of a GPON-SDN solution in a server using Docker Autor: Don Anil Neupane Tutor: Doña Noemí Merayo Álvarez Don Juan Carlos Aguado Manzano TÍTULO: Deployment of a GPON-SDN solution in a server using Docker AUTOR: Don Anil Neupane TUTOR: Doña Noemí Merayo Álvarez DEPARTAMENTO: Teoría de la Señal y Comunicaciones e Ingeniería Telemática TRIBUNAL PRESIDENTE: Ignacio de Miguel Jiménez SECRETARIO: Noemí Merayo Álvarez VOCAL: Juan Carlos Aguado Manzano SUPLENTE: Ramón J. Durán Barroso SUPLENTE: Patricia Fernández del Reguero FECHA: 23 de Junio de 2020 CALIFICACIÓN: Este Trabajo Final de Grado ha sido desarrollado por el estudiante dentro de una movilidad del programa ERASMUS+. Dado que la carga lectiva del proyecto fin de carrera en su universidad origen es de 30 ECTS, se ha diseñado un programa en la UVa que también implique la realización de 30 ECTS por un trabajo equivalente (en nuestro caso, trabajo fin de grado). Esto conlleva a la realización de un trabajo de 30 ECTS (un cuatrimestre completo) y la presentación del mismo en dos TFGs, en concreto el TFG para el Grado en Ingeniería en Tecnologías de Telecomunicación (6 ECTS) y el TFG del Grado en Ingeniería en Tecnologías Específicas de Telecomunicación (12 ECTS). Para no duplicar esfuerzos se ha incluido todo el trabajo en una única memoria para ambos TFGs. Abstract The research carried out in this Project focuses on the transformation of a GPON network to an SDN network using the OpenFlow protocol (SDN-GPON). With this we achieve a dissociation between the control plane in charge of routing the packets and the data plane in the access network. For this, a Linux-based router has been implemented in the central computer and several OVS (Open Virtual Switch) virtual switches have been installed that can use the OpenFlow protocol and communicate with an OpenFlow central controller, in our case OpenDayLight and ONOS located in the backbone. Through this new SDN network scenario we will be able to configure and manage services and subscriber profiles in the access network through OpenFlow. During the project we tried to virtualize most of the applications we needed using the Docker technology, some of the virtualizations were forced upon us because of the unforeseen circumstances (Covid-19, unable to access the labs) but in the end we managed to make it work as much the circumstances allowed us to. Keywords SDN (Software-designed networks), GPON (Gigabit-capable Passive Optical Networks), OLT (Optical Line Termination), ONU (Optical Network Unit), OpenFlow, OpenDayLight, Open Network Operating System. Acknowledgement This work has not been made in complete solitude. Without the support of many people in my direct and indirect surrounding, this thesis would have never happened. It was not something I was familiar with and I hope I present something that’s interesting to read. First of all I want to thank my supervisor Prof. Noemí who consistently guided me in the right direction whenever I had trouble finding solutions, I’m also grateful to my supervisor Prof. dr. Juan Carlos, for his valuable guidance and for sharing their expertise and even researching new topics which sometimes were also new for him. Both the professors were always ready to answer any questions I had, and helped a lot with the proof reading and I am really grateful for that. Secondly, I want to thank my friends, who, despite not always understanding what I was talking about, kept listening to my ramblings and reasoning, and helped me to find where they were wrong. Just by talking to them I made a lot of new breakthroughs. I especially want to thank Jelle Debuyzere, Robin Spruytte and Thomas Van Giel aiding me with some of these reasonings. Finally, I must express my very profound gratitude to my family and all other friends for providing me with unfailing support and continuous encouragement throughout my years of study and through the process of researching and writing this thesis. This accomplishment would not have been possible without them. Thank you. The research developed in this Final Degree Project has been funded by the Ministerio de Ciencia, Innovación y Universidades in the National Projects ONOFRE-2 (TEC2017- 84423-C3-1-P) and Go2Edge (RED2018-102585-T), by the Consejería de Educación de la Junta de Castilla y León in the Project ROBIN (VA085G19), and by the European Regional Development Fund FEDER by means of the Proyect DISRUPTIVE within the framework of the program Interreg V-A España-Portugal (POCTEP) 2014-2020. Opinions are the sole responsibility of the author who issues them. Index vii Acknowledgement ......................................................................... v! Index of figures ............................................................................. x! 1!Introduction ............................................................................... 1! 1.1!Motivation ........................................................................................................... 1! 1.2!Objectives ........................................................................................................... 2! !General Objective ........................................................................................... 2! !Specific Objectives ......................................................................................... 2! 1.3!Stages of the Project ........................................................................................... 3! !Analysis stage ................................................................................................. 3! !Implementation stage ...................................................................................... 4! !Testing Stage .................................................................................................. 4! !Reporting stage ............................................................................................... 4! 2!Methodology and Software tools ............................................. 6! 2.1!Introduction ......................................................................................................... 6! 2.2!GPON testbed in the Optical Communication laboratory .................................. 7! 2.3!Docker ................................................................................................................. 9! 2.4!SDN (Software Defining Networking) ............................................................. 11! 2.5!OpenFlow standard ........................................................................................... 12! 2.6!SDN controllers ................................................................................................ 13! !OpenDayLight .............................................................................................. 13! !Open Network Operating System (ONOS) .................................................. 14! 2.7!Open Virtual Switch (Open vSwitch – OVS) ................................................... 15! 2.8!POSTMAN ....................................................................................................... 16! 2.9!IPERF ............................................................................................................... 17! 2.10!Methodology ..................................................................................................... 17! Index viii !Linux Routing programming and a DHCP server .................................... 17! !Installation of the OVS ............................................................................. 18! !Connection of OVS with controllers (ODL and ONOS) .......................... 18! !Programming and display of flow tables .................................................. 19! 2.11!Summary ........................................................................................................... 20! 3!IPERF tests and Initial DOCKER Configuration ............... 21! 3.1!Introduction ....................................................................................................... 21! 3.2!IPERF and IPERF3 ........................................................................................... 21! !TCP Tests ...................................................................................................... 23! !UDP tests ...................................................................................................... 28! 3.3!Docker introduction and initial configurations ................................................. 32! 3.4!Conclusion ........................................................................................................ 43! 4!SDN Scenario in the server .................................................... 44! 4.1!Introduction ....................................................................................................... 44! 4.2!Global Description of the SDN scenario deployed in the server ...................... 44! 4.3!Router and DHCP server deployment .............................................................. 48! !Programming Linux Kernel Routing and a DHCP server ............................ 48! !Deployment of the router and DHCP server ................................................. 48! 4.4!Installation and deployment of the Open vSwitch in the server ....................... 59! 4.5!Installation of OpenDayLight (ODL) in docker ............................................... 67! 4.6!Connection between the Open vSwitch and ODL ............................................ 69! 4.7!Configuration of Postman with ODL ............................................................... 74! 4.8!Configuration of flows and meters in ODL with Postman ............................... 76! !Configuration of normal flows ..................................................................... 77! !Configuration of flows to forward packets for specific ports ....................... 80! !Configuration of flows from one specific Mac Address .............................. 81! !Configuration of flows for specific Network Address ................................. 83! Index ix !Configuration of meters in ODL ................................................................... 84! !Adding a meter to a configured flow ............................................................ 86! 4.9!Tests with flows and meters in ODL ................................................................ 87! !Test 1: Normal flows created in the OVS ..................................................... 87! !Test 2: Flow entry for specific ports ............................................................. 88! !Test 3: Flow entry for specific network address ........................................... 89! !Test 4: A flow entry with different meters ................................................... 89! 4.10!Installation and Configuration of ONOS in docker .......................................... 94! 4.11!Configuration of flows and meters in ONOS ................................................. 100! !Configuration of flows for specific Network Address ........................... 101! !Configuration of flows for specific Mac Address .................................. 105! !Configurations of meters ........................................................................ 106! !Configuration of flows with meters ........................................................ 107! 4.12!Tests with flows and meters in ONOS ........................................................... 109! 4.13!Conclusions ..................................................................................................... 110! 5!Conclusions and Future lines ............................................... 112! 5.1!Conclusions ..................................................................................................... 112! 5.2!Future lines ..................................................................................................... 113! 6!Docker commands Cheat sheet ............................................ 115! 7!Reference ............................................................................... 118! Deployment of a GPON-SDN solution in a server using Docker 4 Implementation stage This phase aims to implement the different programs or machines necessary to meet specific objectives. Before each implementation, the necessary specific analysis will be carried out. For this, we will need to optimally manage the Linux operating system, since many of the implementations are based on commands and utilities specific to this operating system, such as iptables or vconfig. Testing Stage In this final phase of the project, a test task will be carried out to observe the performance of the real network thanks to two tools, iperf and Wireshark. With the first we are going to be able to measure the network speed and the real up and down traffic on our network. With the second one we will be able to observe the OpenFlow messages and we will be able to obtain graphs on the performance of TCP communications thanks to tcptrace, a utility included within Wireshark. Reporting stage In this phase, the project reports are carried out. Deployment of a GPON-SDN solution in a server using Docker 5 Deployment of a GPON-SDN solution in a server using Docker 6 2 Methodology and Software tools 2.1 Introduction In this chapter, a descriptive analysis of the main components used in this Project will be carried out, i.e. the GPON access network, the OpenFlow protocol, the OpenDayLight controller, the ONOS controller, the Docker virtualization tool and the Open vSwitch. In addition, the methodology used to carry out this work will also be described. The GPON access network (from the manufacturer Telnet Redes Inteligentes [2]) is located in the Optical Communications laboratory (2L007) of the Higher Technical School of Telecommunications Engineers at the University of Valladolid. The main elements of this network are the OLT (Optical Line Termination) and the ONUs / ONTs (Optical Network Unit / Terminal) where the OLT provides its services. These services can be configured in two different ways: by using the visual TGMS interface (TELNET GPON Management System) or directly, by accessing the OLT via CLI (Command Line Interface) through its configuration port. However, in this project, we are going to configure and manage the services and subscriber profiles of residential users (connected to ONTs) using the OpenFlow protocol [2]. For this part, OpenFlow is a standard that allows the creation of experimental protocols based on the separation it makes between data path (sending from one place to another) and control path (decision-making), which allows SDN to be introduced in networks. These terms would be like the control plane and the data plane. OpenFlow has several versions and controllers, being version 1.3 and the OpenFlow OpenDayLight [3] and the ONOS controller will be used in this work. Finally, the Open vSwitch virtual switch [4] is an open source virtual switch, with various functions currently under development that allows us to implement an OpenFlow switch transparently to the user and the network in general. This virtual switch allows connecting to OpenFlow controllers to be easily and transparently managed by them through the OpenFlow protocol. This new Deployment of a GPON-SDN solution in a server using Docker 7 network scenario is the one we want to implement in our GPON real optical access network. 2.2 GPON testbed in the Optical Communication laboratory This section of the chapter will describe both the structure and components of the access network and the different management modes available to the GPON network deployed in the laboratory. An access network is a set of elements that allow end users to connect with service providers, so that they can give said users the services they have contracted. Our GPON optical access network has a tree topology, where one OLT serves multiple ONUs / ONTs. In the case of our laboratory network, the OLT serves a total of 4 ONTs on port 0, being expandable up to a maximum of 64 ONTs per port. Since the OLT has a total of 4 ports, the OLT can support a total of up to 256 ONTs. Other elements of the network will be the single-mode optical fiber that connects the different optical components together and the splitters (optical dividers), responsible for dividing the signal so that each of the ports of the service OLT to various ONUs. The optical fiber deployed in this testbed can reach 25 km (according to the GPON standard), and the optical splitters are in a 1: 8 ratio (two are available, although one is currently connected). The general appearance of the GPON access network is shown in the image in Figure 1. Deployment of a GPON-SDN solution in a server using Docker 8 Figure 1 : General diagram of the GPON access network deployed in the laboratory The components of the access network have been manufactured by the company TELNET Redes Inteligentes [2], so that compatibility between them is guaranteed. Depending on the direction that the data takes, one can speak of two different flows or channels: • Downstream channel: known as downstream, it is the flow that carries data from the central office (OLT) to the end users (ONUs). According to the GPON standard, the maximum downstream rate allowed is 2.5 Gbps and the wavelength is 1490 nm. • Upstream channel: known as upstream, it is the flow that carries data from users to the central office (the ONU is the source). According to the GPON standard, the maximum rate allowed in the upstream is 1.25 Gbps and the wavelength is 1310 nm. It is important to consider these two channels, since the total sum of the upstream and downstream rates given to each of the services provided to the different ONTs / ONUs Deployment of a GPON-SDN solution in a server using Docker 9 cannot exceed the maximum imposed by the GPON standard. Otherwise, the network will trigger an error in its configuration and start-up. 2.3 Docker Docker is a virtualization tool designed to make it easier to create, deploy, and run applications by using containers [5]. Containers allow a developer to package up an application with all the parts it needs, such as libraries and other dependencies, and deploy it as one package. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that the machine might have that is different from the machine, the code or the application was written on. In a way, Docker is a bit like a virtual machine. But unlike a virtual machine, rather than creating a whole virtual operating system, Docker allows applications to use the same Linux kernel as the host system that they're running on and only requires applications be shipped with things not already running on the host computer. This gives a significant performance boost and reduces the size of the application. There are two main internal components of docker: images and containers. 2.3.1.1 Images Images are read-only templates with instructions to create a docker container. Images can be pulled from the Docker Hub. Docker Hub is very similar to GitHub for the users who are more familiar with it. Most open source communities including onos, node, Debian and many others have prebuilt updated docker-images available for the developers on the Docker Hub. Instead of using a pre-built images by the organizations a Docker image can also be created using a Dockerfile. Dockerfile is a simple text file with a set of commands or instructions. These instructions are executed successively to perform actions on the base image to create a new docker image. These commands or instructions include installing packages, dependencies, exposing a specific host port to run the webserver application and running a script (For example: instruction to run a NodeJS script, if the user is building an image for NodeJS application). Deployment of a GPON-SDN solution in a server using Docker 10 In the scenario where the image is self-built, the workflow looks like it can be observed in Fig 2. Figure 2 : The workflow when the image is built from Dockerfile • Create a Dockerfile and mention the instructions to create a docker image. • Run docker build command which will build a docker image. • Now the docker image is ready to be used, use docker run command to create container. In this project we will mainly focus on using pre-built images as building your own images for the complex software tools like SDN controllers and the virtual switches could use up a lot of time and it is easier and faster to use the pre-built images. 2.3.1.2 Containers A container is a standard unit of software that packages up code and all its dependencies, so the application runs quickly and reliably from one computing environment to another. A Docker image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings. An image becomes a container at runtime. Available for both Linux and Windows-based applications, containerized software will always run the same, regardless of the infrastructure of the Docker host [5]. Containers share the machine’s OS system kernel and therefore do not require an OS per application, driving higher server efficiencies and reducing costs. Containers and traditional virtual machines have similar resource isolation and allocation benefits, but function differently because containers virtualize the operating system instead of hardware. Containers are more portable and efficient. Deployment of a GPON-SDN solution in a server using Docker 11 2.4 SDN (Software Defining Networking) The basis for the most precise definition of what SDN would be the idea of programmability. A technology that separates the control plane management of network devices from the underlying data plane that forwards the network traffic [1]. SDN architectures feature software-defined overlays or controllers that are abstracted from the underlying network hardware, offering intent-or policy-based management of the network. This results in a datacenter network that is better aligned with the needs of application workloads through automated (thereby faster) provisioning, and programmatic network management. SDN promises to reduce the complexity of statically defined networks; make automating network functions much easier and allow for simpler provisioning and management of networked resources. At its heart SDN has a centralized or distributed intelligent entity that has an entire view of the network, that can make routing and switching decisions based on that view. Typically, network routers and switches only know about their neighboring network gear. But with a properly configured SDN environment, that central entity can control everything, from easily changing policies to simplifying configuration and automation across the enterprise. Figure 3 shows how different switches are controlled by a single SDN controller. Figure 3 : The control plane remains in the hands of the controller Deployment of a GPON-SDN solution in a server using Docker 12 2.5 OpenFlow standard OpenFlow is an emerging and open communications protocol that allows the creation of new protocols thanks to the division it makes between transmitting data from one point to another and making routing decisions within a switch or router. With OpenFlow, a part of the data path resides on the same switch, but high-level routing decisions are made by a controller. Both elements communicate through the OpenFlow protocol. This methodology, known as SDN, allows greater effectiveness in the use of network resources than in a conventional network. In classic routers and switches, the data path (sending data from one place to another) and the control path (routing decision-making) occurs on the same computer [2]. Using OpenFlow, the control path can be moved to a controller that will communicate with the switch or router where the data path still resides using OpenFlow messages. One of the great advantages of this design is that a single Controller could operate on different switches or routers simultaneously, allowing the connections and interactions between them to vary, depending on the state of the network. The basic operation is as follows: an OpenFlow controller, responsible for routing decisions, connects to an OpenFlow switch or router with several terminals connected on its different ports. This controller constantly communicates with the switch or router through the sending of OpenFlow messages, so that it can configure the connections between the hosts connected to the switch or router based on data that reaches it from there. For example, imagine two different hosts A and B connected to ports 1 and 2 of a switch respectively, and that the switch has no configuration set. If host A wants to send something to host B, in principle it could not due to this lack of configuration. However, thanks to OpenFlow, the switch can detect that it has a packet on port 1 that must go to port 2, send a notification to the controller in the form of an OpenFlow message, and receive in response one or more OpenFlow tables with the necessary configuration for hosts A and B can communicate without any problem. On the other hand, there has been talk of setting up OpenFlow tables. An OpenFlow table is an entity that contains different flows, which are used by the switch to perform different operations (instructions) if certain conditions are met (match). In the previous Deployment of a GPON-SDN solution in a server using Docker 13 example, one of the OpenFlow tables that the controller sends to the switch could be one with a flow that says that if the input port to the switch of the packet is 1, the packet is sent through port 2. In addition, they can nest tables and flows with different priority orders, so that the switch can consider many different parameters when processing the messages that arrive [6]. 2.6 SDN controllers The OpenFlow controller is the "brain" that dictates to the switch or router what to do with the incoming and outgoing data, using different types of OpenFlow messages also known as flow entries. A single controller can manage multiple routers or switches in real time, allowing you to radically change the connections of a network based, for example, on parameters such as traffic passing through certain points [6]. Currently there are several types of controllers that differ in the versions of the OpenFlow standard that they support and in the programming language in which the different applications available in each of them are written. The OpenDayLight controller was used for this work [3], as this controller is the one implemented in previous works, which is a continuation of the research carried out in it. Finally, ONOS [7] controller will also be used to test the same features similar to the ODL. OpenDayLight The OpenDayLight controller is a versatile driver programmed in Java and supporting OpenFlow versions 1.0 and 1.3. This controller is not intended exclusively for the use of OpenFlow, since OpenFlow is just one of several protocols and standards that are part of Software Defined Networks (SDN), networks that can vary their functionality by using of different programs [2]. However, in this work we will limit ourselves to using its OpenFlow aspect. To allow administration, OpenDaylight offers two APIs. An OSGI (Java) API for applications in the same address space and an ordinary REST API. The command line is only for installing packages or features and getting very basic information about the driver, not the network. Unlike ONOS, the OpenDaylight (DLUX) graphical interface is not very friendly. In addition to displaying a simple graph with the network topology, the Deployment of a GPON-SDN solution in a server using Docker 20 through these OpenFlow flows. Therefore, once the different flows and tables have been configured, it will be proven that the services and traffic of the GPON network are managed efficiently and automatically by means of these configured flows. To do this, the relevant tests will be launched and observed in the real GPON network, the results of which will be shown in Chapter 4. For example: different flows could be created on different tables for a specific packet. A flow entry on table 0 will forward any packet coming from specific NA (for example:192.168.3.0/24) to table 1, then on the table 1 the packet will be moved on to table 2 if the packet’s destination address is 192.168.4.5, finally in the table 3 then flow entry could be configured so that specific packet gets outputted through one of the ports on the switch and eventually even apply a meter to it if it is needed. This method could be used to apply security measures to the packets passing through an OVS bridge just like it is done in traditional routers to discard specific packets. 2.11 Summary In this chapter, the tools that will be used in this Project have been described, as well as the work methodology to achieve the final objective, that is, implement an SDN layer using the OpenFlow protocol in a real GPON model. Specifically, the steps to carry out said implementation have been explained. To do this, we need to implement a router with DHCP, we need to install a virtual switch, finally, each switch will be connected to the SDN controllers. With this implementation, flows can be programmed in the controllers in order to manage the traffic of the different services assigned in each ONT (user). Deployment of a GPON-SDN solution in a server using Docker 21 3 IPERF tests and Initial DOCKER Configuration 3.1 Introduction In this chapter we will mainly focus on studying how ifperf works and how we can use it properly to conduct accurate tests that will be required to troubleshoot any problems we might face during this project. After the iperf tests, we will also study the Docker documentation and test the usual docker commands and explain their working. Docker is the technology that will be used to virtualize this project and it is necessary to understand its working related to networking and its efficiency in general. 3.2 IPERF and IPERF3 As we discussed before in Chapter 2, iperf can be used to perform speed test between remote machines. It works in a client server model. To install the iperf and iperf 3, it can be done with simple command: apt-install -y iperf iperf3. In this way, Figure 6 shows the current connection and IP configuration that exists between the two servers where the Iperf tests will be done. During these tests we will check if the servers are able to give the bandwidth installed on them i.e. 10 Gbps. To perform these tests, we use the iperf command and the iperf3 command, over TCP and over UDP. The iperf is older version of iperf3 and during these tests we will also decide which one of them will be used during the tests after the SDN scenario has been installed. Deployment of a GPON-SDN solution in a server using Docker 22 Figure 6 : Current connection between the two servers via optical interface enp6s0f0 Before going ahead with the test, lets understand some networking concepts related to speed test. Network Throughput: Transfer rate of data from one place to another with respect to time is called as throughput. Throughput is considered a quality measuring metric for hard disks, network etc. Its measured in Kbps (Kilobits per second), Mbps (Megabits per second), Gbps (Giga bits per second.) TCP Window: TCP (Transmission Control Protocol), is a reliable transport layer protocol used for network communications. How TCP works, is beyond the scope of this project. TCP works on a reliable manner, by sending messages and waiting for acknowledgement from the receiver. Whenever two machines are communicating with each other, then each of them will inform the other about the number of bytes it is ready to receive at one time. In other words, the maximum amount of data that a sender can send the other end, without an acknowledgement is called as Window Size. This TCP window size affects network throughput very badly sometimes. If you increase the Window size a little bit to tune TCP, it can bring significant difference to the throughput achieved. This will be easier to understand during the tests. TCP Window Size will be modified during the TCP tests with -w parameter if necessary. Deployment of a GPON-SDN solution in a server using Docker 23 TCP Tests 3.2.1.1 Iperf2 For these tests we make Chron 2 (Figure 7) our iperf server with the command iperf -s. Figure 7 : Making Chron 2 a server for iperf On the Chron 3 the command iperf -c 192.168.1.1 -t 30 can be typed to make it an iperf client that needs to connect to the server with IP 192.168.1.1 as it can be seen on Figure 8. Figure 8 : Making Chron 3 an iperf client Deployment of a GPON-SDN solution in a server using Docker 24 From the output in Figure 8, we can see that we got a speed of 9.35 Gbps. The speed is in the expected Range of 10Gbps. The output shows some more parameters that are explained below. Interval: Interval specifies the time duration for which the data is transferred. This is specified by adding t followed by any number the user wants the interval to be with the iperf command on the client (see Figure 8). Transfer: All data transferred using iperf is through memory and is flushed out after completing the test. So, there is no need to clear the transferred file after the test. This column shows the transferred data size. Bandwidth: This shows the rate of speed with which the data is transferred. In the next tests, we will be forcing TCP to have certain bandwidth instead of allowing the system to work at the maximum throughput of 10 Gbps. The server side remains the same and we can keep it running, we need to change a few details on the command executed on the client side: iperf -c 192.168.1.1 -t 30 -b 2000m. We are asking the client to only throughput 2Gbps as it can be seen in Figure 9. Figure 9 : TCP test with iperf for 2Gbps Figure 9 shows that we received the exact amount of bandwidth we requested. To test if this works for all instances, we will be running these same tests from 1-10Gbps in the next steps. Deployment of a GPON-SDN solution in a server using Docker 25 Requested BW (Gbps) 1 2 3 4 5 6 7 8 9 10 Received BW (Gbps) 1.0 2.0 0.0 0.0 0.7 1.7 0.0 0.0 0.4 1.4 Figure 10 : TCP iperf tests from 1-10Gbps From the data in the table above and Figure 10 we can see that the results after the 2 Gbps are not good. It is as if iperf only works efficiently when its executed at its default max rate (the maximum bandwidth of the optical cards) and not so well when the user forces what bandwidth it needs to throughput. Even when we tell the client to throughput 10 Gbps by specifying it (which is its maximum Bandwidth), it does not act as intended. In the next steps we shall be running the same tests done above using iperf3. 3.2.1.2 Iperf3 iPerf3 is a tool for active measurements of the maximum achievable bandwidth on IP networks. It supports tuning of various parameters related to timing, buffers and protocols (TCP, UDP, SCTP with IPv4 and IPv6). For each test it reports the bandwidth, loss, and other parameters. Iperf was originally developed by NLANR/DAST. iPerf3 is principally developed by ESnet/Lawrence Berkeley National Laboratory [14]. Deployment of a GPON-SDN solution in a server using Docker 26 The server side with iperf3 remains almost identical to iperf, so it can be started with command iperf3 -s (see Figure 11). Figure 11 : make Chron 2 iperf3 server The client side is also identical with tiny change in the command: iperf3 -s 192.168.1.1 -t 30 as it can be observed in Figure 12. Figure 12: iperf3 client side on Chron 3 At the maximum rate of 10 Gbps the results were a bit below regarding the previous reached bit rate, 8.75Gbps (see Figure 12). In the next step we shall try to redo the same tests done with iperf by indicating the bandwidth starting from 1-10 Gbps. Deployment of a GPON-SDN solution in a server using Docker 27 Required BW (Gbps 1 2 3 4 5 6 7 8 9 10 Received BW (Gbps) 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 9.4 Conclusion: The problems we had using iperf when the bandwidth was indicated has disappeared, using iperf3 is strongly recommended when forcing a specific bandwidth as the iperf caused some errors that we were not able to fix. I could not find the exact reasons to why the indicated Bandwidth caused problems with iperf and not with the iperf3 other than that iperf is multithreaded and iperf3 is single thread and it is probably the reason behind it. According to a blog on access agility [15] “iPerf2 was orphaned in the late 2000s at version 2.0.5, despite some known bugs and issues. After spending some time trying to fix iperf2’s problems, ESnet decided by 2010 that a new, simpler tool was needed, and began development of iperf3. The goal was to make the tool as simple as possible, so others could contribute to the code base. For this reason, it was decided to make the tool single threaded, and not worry about backwards compatibility with iperf2. Then in 2014, Bob (Robert) McMahon from Broadcom restarted development of iperf2. He fixed many of the problems with iperf2 and added several new features like iperf3. iperf2.0.8, released in 2015, made iperf2 a useful tool. iPerf2’s current development is focused on using UDP for latency testing, as well as broad platform support.” After the above quote it can be concluded that iperf2 is only being developed as a tool for UDP tests and our issue could be related to the TCP bugs that never got fixed. Deployment of a GPON-SDN solution in a server using Docker 28 UDP tests 3.2.2.1 Iperf2 In this section we will be testing the behavior of the infrastructure when we use the UDP protocol. UDP is a connectionless oriented protocol so it’s not only necessary to specify the server we are working on, but it is also mandatory to specify the bandwidth. To start the test on the server side we input the following command: iperf -s -u. The -u is compulsory to let the client know that it only wants UDP packets. The command and output can be observed in Figure 13. Figure 13 : starting iperf server for UDP On the client side the following command is needed iperf -c 192.168.1.1 -t 30 -b 1000m -u. As it can be seen in the command for the UDP transfer we have to specify to the client directly that we want to throughput a specific Bandwidth. In Figure 13 and 14 we can also see that in UDP mode the iperf returns jitter, packet loss along with the bandwidth. One important parameter we now have that we did not before is the number of packets that are lost in communication. It is relevant to note that some websites advises to use TCP to measure the bandwidth while UDP is advised to use it to measure reliability, which means that when using TCP in iperf the bandwidth that is returned may not be very real, because it could be including forwarded packages. Deployment of a GPON-SDN solution in a server using Docker 29 Figure 14 : Client-side outputs iperf with UDP In the next step we test at different Bandwidth starting from 1 Gbps to 10 Gbps. The outputs can be observed in Figure 15. Figure 15 : Output UDP 1-10Gbps Even though the packet loss stays stable around 0.013% the Bandwidth never gets higher than 2.9 Gbps. It is an improvement compared to the TCP where it went to 0 multiple times but the reason behind the 2.9 Gbps cap needs to be researched further. 3.2.2.2 Iperf3 An important difference between iperf3 and iperf with UDP is that the -u option is not necessary on the server. A basic configuration shall remain the same: Server: iperf3 -s Client: iperf3 -c 192.168.1.1 -t 30 -b 0 -u Deployment of a GPON-SDN solution in a server using Docker 36 TCP tests with iperf2 The methodology behind the iperf tests remains the same. Figure 23 (Client: Container 1) and Figure 24 (Server: Container 2) show the client side and server side of the tests respectively. Figure 23 :Client side of the iperf inside a container Figure 24 :Server side of the iperf inside a container At the maximum available rate, we get 6.15 Gbps throughput. This is significantly lower to the test done on the physical servers. Next we force the TCP to certain bandwidth starting from 1-10Gbps. The results received on the containers when the iperf client indicates exactly how much it wants to send is identical to the results received on the Physical Server. The same issues persist, the bandwidth received after 2 Gbps is not good. Request Bandwidth 1 2 3 4 5 6 7 8 9 10 Rececived Bandwidth 1.0 2.0 0.0 0.0 0.7 1.7 0.0 0.0 0.4 1.4 In the next step we test if the errors persist with Iperf3 as well. Deployment of a GPON-SDN solution in a server using Docker 37 TCP tests with IPERF3 The commands to start a client and the servers remain identical. At the maximum available rate, the BW is capped at 6.58 Gbps and when the bandwidth is specified the results are as follows: Request Bandwidth 1 2 3 4 5 6 7 8 9 10 Rececived Bandwidth 1.0 2.0 3.0 4.0 5.0 6.0 6.2 6.2 6.2 6.3 The results are capped around 6.3 Gbps. The docker bridge seems to be losing throughput of about 3Gbps when compared to the tests done on the physical servers. UDP tests with iperf3 A basic configuration shall remain the same: On the Client: iperf3 -c 172.17.0.4 -t 30 -b 0 On the Server : iperf3 -s From the result that we can see in Figure 25, that the UDP through put is much worse than TCP. It is stuck at 760 Mbps. Deployment of a GPON-SDN solution in a server using Docker 38 Figure 25: Iperf3 result with UDP (containers) In the next step we apply the same parameters we applied we applied during the first tests to improve the performance i.e. increase!the!clunk!length!value!“-l”:! iperf3 -c 172.17.0.4 -t 30 -b 0 -u -l 63k Figure 26 : UDP test with Iperf3 with -l parameter The results of Figure 26 shows that the throughput improved by 300% and it is now capped at 2.54Gbps. After talking with the mentor, we decided that the bridge networking is not the best option for the project as the loss in throughput is too huge for the final test, and we research further into Docker Networking for an alternative. Deployment of a GPON-SDN solution in a server using Docker 39 We found out that bridge networking doesn’t allow conenctions between the containers on the different hosts. If we want to run iperf tests on two containers on different hosts (Chron2 and Chron 3), we must run the containers on host networking mode so they have connection to each other, but running them on the host mode also means that we are just using the physical interfaces, the iperf tests on the physical interfaces have been done earlier (section 3.2) and the results would be exactly (were) the same, we found no reasons to include them in this report. 3.3.1.3 Docker Networking When docker is installed, if the network interfaces are checked, we can see that a new interface has been created called “docker0” as it can also be seen in Figure 27. Figure 27 : docker0 default docker bridge This is because Docker, when installed, creates a Linux bridge to which it by default connects all containers that are created. This bridge behaves like a multi-level traditional switch in which a NAT address translation is performed between the Docker virtual network (default 172.17.0.0/16) and the network your host is connected to. Figure 28 shows how the network model works when the containers are connected to each other in a docker. Deployment of a GPON-SDN solution in a server using Docker 40 Figure 28 : Default network model of Docker containers In this way, the containers can connect to the Internet, but are not exposed. This is because the IP to which external traffic is routed is that of your host machine. To understand this concept better, you can imagine a private network with a router that does NAT with Internet. Devices on the internal network can access the Internet thanks to the public IP from the router, but the Internet is not able to see the devices within the network, only the router. In this case something similar happens, the private network is the Docker network and the public IP is the one assigned to the host interface (which, in most cases, is a private NA, so NAT is done twice, once to translate between the Docker network and the private network on the host, and another on the router of that private network to a public address from Internet) [17]. If you want to expose services, you need to tell the container which ports you want to publish/expose so that when packets destined for those ports reach the host, it produces a redirect to the container. We will see later when running the SDN controller inside a container, how this redirection is performed. For example: To run a SDN controller inside a container with a host port published we add: -p <host-ports-ip>:8181 along the docker run commands to get access to the controller on the browser (chrome, Firefox etc.). Deployment of a GPON-SDN solution in a server using Docker 41 When a container is created without specifying any specific network information, it automatically receives an IP from the docker0 network as we saw earlier during the Iperf tests. This also means that the containers created on Chron2 are isolated from Chron3 when the docker0 network is being used. In the context of this project, the goal is for an SDN controller to oversee managing the network, so it is not very useful for Docker to oversee creating the switches and connecting the virtual machines. The goal is for the OpenFlow switches to be in charge of routing traffic through controller orchestration. Therefore, Open vSwitch (OVS) switches need to be added somewhere in the topology. Therefore, Open vSwitch (OVS) switches should be configured with some other network configuration that is not a docker bridge. From the above research we can conclude that the docker-bridge network can only be used for the SDN controller, and a webserver if we build/need one, we will create our own docker-bridge network instead of using the docker0 in the later steps as the default bridge has some limitations that a user created bridge wimm not have [19]. We need to look for an alternative if we want to run the OVS and a router inside a container as it does not seem possible with bridge networking. In comparison to a tradition virtual machines where NAT is used, docker uses bridge networking. A bridge provides a host internal network in which containers on the same host may communicate, but the IP addresses assigned to each container are not accessible from outside the host. Bridge networking leverages iptables for NAT and port-mapping, which provide single-host networking. Bridge networking is the default Docker network type (i.e., docker0), where one end of a virtual network interface pair is connected between the bridge and the container whereas in a virtual machine hardware level virtualisations takes place which also means the network components are virtualized so the virtual machines also receive the IP address from the same network as the host, this is not possible inside a docker unless we use the host networking. At this point only other solution available seems to be host networking. If we use the host network mode for a container, that container’s network stack is not isolated from the Docker host (the container shares the host’s networking namespace), and the container Deployment of a GPON-SDN solution in a server using Docker 42 does not get its own IP-address allocated. For instance, if you run a container which binds to port 80 and you use host networking, the container’s application is available on port 80 on the host’s IP address. This also means we do not need to run the iperf tests again as the container is just using the host’s network and the results would be identical to the tests done on the physical servers. To start a container in host mode we simply add --network host along with the docker run command [17]. Running a container in host modes womes with risk, if the user is not careful the changes made inside the container regarding the networking can effect the host.As we are using the host interface, changing iptales, iproute, default routes means we are also adjusting the same thing on the physical servers. It is recommended to be careful during these steps if the project is being run on a device which is also used for other purposes in the lab. So, we will be creating our own docker bridge that will be used on the containers for SDN controllers and we shall use host networking for all the other containers that need to connect to a different host. To create a docker bridge of our own we follow the instructions provided by the official docker pages [17]: docker network create --subnet 10.1.0.0/16 --gateway 10.1.0.1 --ip-range 10.1.4.0/24 bridge_test The above command creates our own docker-bridge network named bridge_test and the rest of the parameters on the bridge are self-explanatory. To start a container using this bridge networking we just add --network bridge_test along with the docker run command when we start the container. Just like the “docker0” bridge, this bridge_test has automatic configured connection to all interfaces on the device and the internet. To check if the bridge has been created correctly, we can type the command docker network inspect bridge_test as shown in Figure 29. Deployment of a GPON-SDN solution in a server using Docker 43 Figure 29 : docker bridge bridge_test 3.4 Conclusion In this chapter, we ran iperf tests with iperf2 and iperf3 on the physical servers, investigated improving the throughput performance and finally did the same tests on the docker containers. We also did a brief research on docker in general and what type of networking we shall use in the further steps of this project. We investigated few important docker commands, created few containers, created our own docker-bridge network. For more information about docker and docker commands we refer to the official docker documentation on the website [17]. Deployment of a GPON-SDN solution in a server using Docker 44 4 SDN Scenario in the server 4.1 Introduction In this chapter we will carry out an analysis on the state of the art related to SDN technologies in PON networks, to later describe the implementation of our specific SDN scenario. Then, the steps to follow to implement our SDN solution will be described sequentially, from the implementation of a router and DHCP server in a container, to the configuration of virtual switch (OVS). We will finish with the connection and start-up of the OVS with the OpenDayLight controller, and ONOS necessary for the configuration and management of OpenFlow flows. In this way the management and the configuration of services and data traffic will be implemented in the GPON network using the OpenFlow protocol. 4.2 Global Description of the SDN scenario deployed in the server We propose an SDN-GPON solution that permits to configure a GPON by means of OpenFlow using an external SDN controller and several OpenFlow switches. The architectural solution is shown in Fig. 30. To turn legacy OLTs and ONTs into OpenFlow controllable devices, an SDN hardware abstraction layer must be implemented. Therefore, we propose to use OpenFlow Virtual Switches (OVS) connected to the OLT and to ONTs, and an OpenDayLight (ODL) [20] controller (Fig. 30). However, other SDN controllers, such as ONOS [21]could also be used. In this network scenario, the SDN controller will be able to dynamically modify services according to real network traffic or user requirements, allowing a flexible control of the GPON capabilities. Therefore, the SDN controller belongs to ISPs/Network Operators that provide Internet connections and services to their customers. Moreover, as GPONs operate in two channels with different wavelengths, the downstream channel (from the OLT to ONTs) and the upstream channel (from ONTs to the OLT), the SDN controller has to deal with the traffic in both channels, Deployment of a GPON-SDN solution in a server using Docker 45 so that the contracted services of the network subscribers comply with the corresponding QoS requirements (e.g., guaranteed bandwidth). Ideally, the OpenFlow switches (OVS) should be integrated inside the OLT and the ONTs (SDN based OLT/ ONTs). However, as SDN-based OLTs and ONTs are not yet available, the OVSs can be embedded in an external hardware like Raspberry Pi, Banana Pi, mini-computer or a computer. One OVS should be implemented in a computer logically co-located with the OLT (Central OVS, COVS) to emulate the SDN layer of the OLT, and thus to control the downstream traffic of the entire GPON (Fig. 30). On the other hand, at the users’ side, an OVS (Remote OVS, ROVS) lies beside each ONT to control the upstream traffic requirements of each subscriber. These devices will handle a lower computation load than the COVS, so cheaper devices than computers can be used for ROVS, like Raspberry Pi, as shown in ONT1 and ONT2 in Fig. 30. To set an SDN configuration, the ODL controller sends OpenFlow messages to every ROVS through the conventional GPON channels and to the COVS through a direct connection. First, the SDN controller sends flow tables to the virtual switches (COVS, ROVS) to configure the services (Internet, HDTV, VoIP) and their QoS requirements. In fact, the OpenFlow tables are programmed by the SDN controller (that belongs to ISPs/Network Operators) and their entries are modified in real-time each time residential users demand new services or any modification in their QoS requirements. Then, two flows are created for each service as the GPON operates in two channels: one for managing the downstream QoS requirements and another for the upstream QoS requirements. The former flow is created in the COVS and the later in the ROVS. The match instructions and fields of each flow differ depending on the channel and on the developed functionalities, as it will be explained in the next sections. For example, if the maximum bandwidth is going to be controlled by means of SDN, the bandwidth rate assigned to each service (at both channels) is measured with OpenFlow meters. A meter measures the rate of packets assigned to it and enables controlling the rate of those packets. Meters are attached directly to flow entries. In our proposal each meter entry consists of a meter identifier and a meter band. The meter band specifies the maximum rate associated with that flow (band rate) and the way to process the packets of the flow (band type). Besides, some band types have optional arguments (drop, dscp remark) called type specific arguments and we use the drop Deployment of a GPON-SDN solution in a server using Docker 52 vconfig add enp6s0f1 833 vconfig add enp6s0f1 806 Figure 33 : Creation of VLANs Finally, the address of each virtual interface (192.168.0.1/24 and 10.19.59.1/24) are added with the commands: ifconfig enp6s0f1.833 192.168.3.1 netmask 255.255.255.0 ifconfig enp6s0f1.806 10.19.59.1 netmask 255.255.255.0 After the above steps are completed, we must provide IP address to all connected devices on those interfaces. To provide IP address to the connected devices, the DHCP server will be used. The DHCP server can be installed with the command apt-get install - y isc-dhcp-server [27]. After the DHCP server has been installed few files needs to be configured to get the dhcp server working. The first file can be found in path /etc/dhcp/dhcpd.conf and few rules needs to be added to it. In this file we add different subnets to configure, being able to create more. The features to be configured are the following: • range (range) • domain name servers (DNS) • domain name (domain-name) • router subnet (router) • broadcast address (broadcast) • default lease time (default-lease-time) • and maximum grant time (max-lease-time) In fact, the exact configuration of this file is the next: Deployment of a GPON-SDN solution in a server using Docker 53 subnet 192.168.3.0 netmask 255.255.255.0 { range 192.168.3.100 192.168.3.250; option domain-name-servers 157.88.129.90; option domain-name "RouterTFGLab7-833"; option routers 192.168.3.1; option broadcast-address 192.168.3.255; default-lease-time 600; max-lease-time 7200; } subnet 10.19.59.0 netmask 255.255.255.0 { range 10.19.59.100 10.19.59.200; option domain-name-servers 157.88.129.90; option domain-name "RouterTFGLab7-806"; option routers 10.19.59.1; option broadcast-address 10.19.59.255; default-lease-time 600; max-lease-time 7200; } The second file is found in the path /etc/default/isc-dhcp-server and the he following rules are added to the file: INTERFACESv4="enp6s0f1.833 enp6s0f1.806 " With this command, the server is being asked to accept DHCP requests on those virtual interfaces and the dhcp server is ready. After all the above changes has been made the DHCP server on the chron2can be started with command service isc-dhcp-server start. Due to unforeseen circumstances (covid-19) it is impossible to go to the lab and configure OLT so the DHCP server and routing cannot be tested that way. Therefore, we decided to alter our topology in order to be able to test the working of the configurations without any trouble. The altered version of the topology can be found on Figure 34. Deployment of a GPON-SDN solution in a server using Docker 54 Figure 34 : New topology to test the routing and DCHP server. In order to test this configuration, the same VLANs needs to be created on Chron3 and IPTABLE rules regarding the new eno2 connection to Chron4 needs to be added to the iptables. This can be done the same way as done earlier with the next commands. On the terminal of Chron 3 we type: • vconfig add enp6s0f1 833 and vconfig add enp6s0f1 806 • route add -net 192.168.6.0 netmask 255.255.255.0 gw 192.168.2.3 The first command creates the virtual interfaces that will be enabled as DHCP clients later and the second command adds a static route to the routing table of CHRON3 asking the CHRON3 to use 192.168.2.3 (enp6s0f0) as its gateway to reach the network 192.168.6.0 that connects the CHRON 2 and CHRON 4 to each other. The above information is easier to visualize when observed together with figure 5. On the terminal of CHRON2 we type: • iptables -t nat -A POSTROUTING -s192.168.6.0/24 -o enp6s0f0 -j MASQUERADE on CHRON 2 The 192.168.6.0/24 will be the subnet that the new interface eno2 will contain. The iptables rule is like the ones added earlier for the virtual interfaces. Deployment of a GPON-SDN solution in a server using Docker 55 4.3.2.1 DHCP Server and DHCP Client tests In figure 35 we once again repeat the topology that has been adjusted to run the tests (as previously mention, because we cannot access the labs anymore). To test the DHCP server, we type on the Chron3 (so it emulates a real device such as the OLT in the GPON) and send the dhcp server (located in Chron 2) for DHCP request on the interface enp6s0f1.833 with the command: dhclient enp6s0f1.833 Figure 35 : Topology created to test the DHCP server and the router Figure 36: DHCP ACK 833 Figure 36 shows that the 833 interface’s request for IP address has been acknowledged and has been given 192.168.3.100. This is within the range, that was configured earlier on the dhcp server. Moreover, Figure 37 shows that the DHCP request from the interface 806 (with the command dhclient enp6s0f1.806) has also been accepted as dhcp client and given the IP address 10.19.59.100. Deployment of a GPON-SDN solution in a server using Docker 56 Figure 37: DHCP ACK 806 To make sure if the IPs are configured, it is done with the command ip -a as it is shown in Figure 38. Figure 38: IP Check on the 806 and 833 interfaces The next step is to check the connection between the Chron 3 and Chron 2 via the virtual interfaces. The interfaces on the Chron 2 are pinged from Chron 3 as shown in Figure 39. Deployment of a GPON-SDN solution in a server using Docker 57 Figure 39 : Connection between virtual interfaces on chron3 and chron2 To make sure and check if the right interfaces are being pinged, the command tcpdump -i enp6s0f1.833 can be done on the Chron2. 4.3.2.2 Routing Test The DHCP server is working as intended, but we must check the performance of the router. For this, the Gigabit interface eno2 will be used on the Chron2 and Chron 4. Then, both interfaces are given an IP address with the command: • On Chron2: Ifconfig eno2 192.168.6.2 netmask 255.255.255.0 • On Chron 4: ifconfig eno2 192.168.6.4 netmask 255.255.255.0 After the ifconfigs, the connection is tested with pings. Then, the three Chron servers are connected to each other as shown in Figure 40 in order to test the performance. Figure 40: Topology for testing the Router performance First, the Chron 4 is pinged from Chron 2 (router) as it is shown in Figure 41 and we can observe that the connection is working. Deployment of a GPON-SDN solution in a server using Docker 58 Figure 41: Chron 4 pinged from Chron 2 To test the complete how the router performs, the Chron 2 will be pinged from Chron 3 first as shown in Figure 42 and the connection is working as intended. Figure 42 :Chron 2 pinged from Chron 3 Finally, the Chron 4 server will be pinged from the Chron 3 as it can be seen on Figure 43 and it can be noticed that the connection is working as intended. Therefore, the DHCP server and the Router are working perfectly, and we can move on to the next steps of the project. Deployment of a GPON-SDN solution in a server using Docker 59 Figure 43 :Chron 4 pinged from Chron 3. 4.4 Installation and deployment of the Open vSwitch in the server The Open vSwitch will be installed on the same container as the DHCP server. After the container has been started, the necessary packages the switch needs be able to install and implement the Open vSwitch inside a container will be installed. The list and steps can be found on the official documentation of the Open vSwitch [28]. All packages can be installed with one command: apt-get install -y wget net-tools nano iproute2 iputils-ping ifupdown vlan iperf iperf3 git curl python-simplejson python-qt4 python-twisted-conch python3.6 automake autoconf gcc uml-utilities libtool build-essential pkg-config libssl-dev iproute2 tcpdump It is possible that some packets have been installed in the earlier steps, but this command will make sure that the latest version are updated. This command downloads and installs all the dependencies and necessary tools that are necessary to install implement and test the Open vSwitch. After all the preparations are done, the latest version of open virtual switch is cloned from the official GIT repository https://github.com/openvswitch/ovs.git. The link clones the files from the master branch from the GitHub. During this project the supported version is ovs.2.13. To make the OVS works properly, we need to make sure the folder “build” exists in the path “lib/modules/VERSION_KERNEL/build”. The VERSION_KERNEL in the path should match the output of the command “uname -r”. This was not the case for us, and this Deployment of a GPON-SDN solution in a server using Docker 60 problem can be solved by installing the correct Linux-headers with the command: apt-get install -y ´uname -r´ or just apt-get install -y linux-headers-4.19.0-6-amd64 in this case. When the correct headers have been installed and the git repository of the OVS has been cloned, navigating to the folder with the command cd ovs will be the next step. Running the ./boot.sh will build the configuration script that is then executed afterwards with the command ./configure --with-linux=/lib/modules/$(uname -r)/build. Then, the apply the make command and then the make install command. It is recommended to install the modules (make modules install) if the kernel version was built in the earlier steps, but the docker container lacking kernels of their own and the need for them to use the host kernel to be able to run any kernel-based software’s caused unsolvable complexity in this situation. The user modules can be installed with the command make install. The kernel modules was primarily thought to be needed to make the meters on the switch work properly but because the installation process of the kernel module on the container had few problems and the meters worked fine on the user space, we decided to move on with the user modules. To make sure if the meter can be configured to work better than performance achieved during this project, more research needs to be done regarding kernel module installation of OVS in a Docker Container. Open vSwitch includes a shell script, and helpers, called ovs-ctl which automates much of the tasks for starting and stopping ovsdb-server, and ovs-vswitchd. After installation, the daemons can be started by using the ovs-ctl utility. This will take care to setup initial conditions and start the daemons in the correct order. Before starting ovsvswitchd itself, it is necessary to start its configuration database, ovsdb-server. Each machine on which Open vSwitch is installed should run its own copy of ovsdb-server. Before ovsdb-server itself can be started, we must configure a database that it can use [28]: $ mkdir -p /usr/local/etc/openvswitch $ ovsdb-tool create /usr/local/etc/openvswitch/conf.db \ vswitchd/vswitch.ovsschema The ovsdb-server is then configured to use the database just created with the next commands: Deployment of a GPON-SDN solution in a server using Docker 61 $ mkdir -p /usr/local/var/run/openvswitch $ ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \ --remote=db:Open_vSwitch,Open_vSwitch,manager_options \ --private-key=db:Open_vSwitch,SSL,private_key \ --certificate=db:Open_vSwitch,SSL,certificate \ --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \ --pidfile --detach --log-file Once the previous steps are done, the ovs can be finally started with the next commands and the result is shown in Figure 44. $ export PATH=$PATH:/usr/local/share/openvswitch/scripts $ ovs-ctl start Figure 44: OVS start For the next steps it is necessary to have a good understanding of how the open virtual switch works. Virtual switches act as bridges to which different interfaces can be connected and the packets passing through this bridge then can be managed and manipulated before getting passed through, as it can be observed in Figure 45. . Figure 45 : Working of OVS bridge Open vSwitch consists two sets of commands, one of which starts with ovs-vsctl and the other one with ovs-ofctl. The functionality of each of them can be summarized as: Deployment of a GPON-SDN solution in a server using Docker 68 very first step is to browse the official Open Daylight website and read through the documentation regarding the installation and configuration [20]. Then, the tar file can be then installed with the command: wget https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/int egration/opendaylight/0.11.2/opendaylight-0.11.2.tar.gz The above-mentioned link is provided by ODL official documentation [20] that links the user to the installation files of OpenDayLight directly. This wget combined with the link downloads the tar file of sodium version of OpenDayLight inside the working folder. It can be seen on the link as 0.11.2, which means that it is the 11th version and the 11th element of the periodic table i.e. Sodium. After the download, the tar file needs to be extracted with the command: Tar -xf opendaylight-0.11.2.tar.gz Then navigate to the directory with command cd opendaylight-0.11.2 . This is the directory where all the installations files and other important files along with the startup script regarding the ODL can be found. The ODL start script will be run here. On the other hand, the latest version of java needs to be installed on the machine for the latest version of ODL. The latest version can be installed with command apt install -y default-jre. After the latest version of java has been installed, run ./bin/karaf inside the current directory and the script starts and the Open Daylight will be installed, started and ready to be configured further, as it can be observed in Figure 54. Deployment of a GPON-SDN solution in a server using Docker 69 Figure 54 : First Start of the Open Daylight 4.6 Connection between the Open vSwitch and ODL The connection between the controller and the OVS can be done in two steps: • First step: On the OVS command line we set up the IP of the ODL container as its master. This is done with the command ovs-vsctl set-controller mybridge tcp:10.1.4.0:6633. • Second Step: We start the ODL inside the container by navigating to the directory opendaylight-0.11.2 and running the script ./bin/karaf inside the directory the ODL has been installed into. This starts the ODL as it can also be seen in Figure 54. After this process the connection between controller and the switch needs to be tested by just pinging to each other. If the SDN controller can ping to the interface (host interface in this case) this means the controller has connected to the OVS and taken over the functions from the switch. This can be checked by using the ovs-vsctl show command on the open vSwitch, as it is shown in Figure 55. In this figure the “is_connected” option is true, which means the controller is now the master of the switch and responsible for further flows creations and configurations. Deployment of a GPON-SDN solution in a server using Docker 70 Figure 55 : Controller accepted by the switch To be able to configure flows with ODL, some few features need to be installed on the controller. The list of available features can be seen with feature:list command on the ODL and the pre-installed features with feature:list -i. Moreover, the search for a specific feature can be done with feature:list | grep <feature-name>. In this case we only need the open-flow plugin and the restconf [32], that provides the next functionalities: • The OpenFlow-plugin provides the following functions: flow management, group management, meter management and statistics polling • The restconf allows us to access to the RESTCONF API. The RESTCONF protocol allows web applications to be used to access data inside a network element. In this case the Open vSwitch. The installation of restconf is simple using the command feature:install odlrestconf-all as it is done in Figure 56. Figure 56 : feature installation restconf The OpenFlow plugin can be installed in a similar way with the command: feature:install odl-openflowplugin-app-lldp-speaker odl-openflowplugin-flow-services- rest odl-openflowplugin-drop-test as it is done in Figure 57. Figure 57: feature installation OpenFlow plugin Deployment of a GPON-SDN solution in a server using Docker 71 After the installation of these features, it is possible to view the topology and the current flow entries that have been created on the switch by surfing to the controller IP address. Normally, when the controller is being run on a virtual machine or in a physical machine, the switch information and flow configuration could be accessed on any web browser with the controller ip address. In contrast, in our case the controller is being run on a docker container and the docker container are isolated, so it needs one host port to be open. For more information about docker networking and opening ports refer to the Chapter 2 section about Docker. Then, in order to open one of host port for the docker container, extra port information is needed during the start process [17]. Then, in the next example, port 8181 is being opened on the host and the IP that will be used to surf during the switch configuration is also the port of the host that is connected to the internet. The IP address 10.1.4.0 will still be used as the controller address on the OVS but to view the REST API data on the browser, the IP address 10.0.103.73 will be used because this is the IP on the port/interface that the container will use to be able to launch on the web browser. Refer to Chapter 2 about Docker on more regarding opening host ports for containers. docker run -t -i --cap-add SYS_ADMIN --network <docker-bridge-name> -- name=<container-name> -p 10.0.103.73:8181:8181 --privileged <image-name> Therefore, the OVS still has 10.1.4.0 as its controller and the master but the container where the odl is installed uses the port with IP 10.0.103.73 to connect to the outside world so the IP 10.0.103.73 will be used during the flow configurations and other tests. Now the connection part has been figured out, the next part is to find out the switch id or the node id. Most official documents indicate it has the id openflow:1 but this is not always the case. Therefore, to access to the topology data of the switch the following link needs to be posted on any browser: http://10.0.103.73:8181/restconf/operational/network-topology:network-topology/topolo gy/flow:1 Putting the link on any browser (i.e. google chrome, Firefox, edge) uses the GET function and outputs the xml-format data of the switch topology, as it can be seen in Figure Deployment of a GPON-SDN solution in a server using Docker 72 58. This lets the user to see basic switch information that will be used in the further steps. If the user is asked for authentication username: admin and password: admin will suffice. Figure 58 : Switch topology data The screen capture of the Figure 58 provides many valuable information, such as the node-id is openflow:269285126111858 and there are two ports connected to this node (833 and 806 interfaces). The switch labels them as connector 1 and connector 2 in its database. Regarding each node named with the node id, the information about the flows that were created during the open vSwitch configuration can be accessed. This is done with the next command that displays all flow-entries on the switch as the output and it can be observed in Figure 59. http://10.0.103.73:8181/restconf/operational/opendaylight-inventory:nodes/node/openflo w:269285126111858/table/0 Deployment of a GPON-SDN solution in a server using Docker 73 Figure 59 : Display flow entries in one specific node of the topology In the screen capture of Figure 59 we can see one of the flows that is currently running on the switch with flow id: 1 and the related parameters of the flow i.e. priority :1200, table-id: 0. On the other hand, the link that was used to access this data restconf/operational/... means that all data are operational, and they are running on the switch. This tree is readonly and to add new configurations to the switch, the operational in the link needs to be replaced by config. Then, the config tree allows the user to PUT, DEL and GET the information on the switch whereas the operational tree provides read-only feature [32]. Finally, in order to configure the flows and meters we will use the application POSTMAN [33]. Deployment of a GPON-SDN solution in a server using Docker 74 4.7 Configuration of Postman with ODL To be able to configure the flow entries on flow tables, it is very important to have a good understanding of how POSTMAN works. This part will only cover the installation and the configuration of the software so it can be used as we intend with the ODL controller. The application can be downloaded by simply clicking on the download button on the official website of POSTMAN as it can be seen on Figure 60. The installation process runs simple and smooth as any other application being installed on a windows operating system. Figure 60 : Postman Homepage After the installation has been successful, a new collection can be created by clicking on the new option available on the top left corner of the application as seen on Figure 61. Figure 61 : Postman create new collection Deployment of a GPON-SDN solution in a server using Docker 75 The next step is to choose a name for the collection and select a basic authentication type, as it is done in Figure 62. Figure 62 : Postman collection name Authentication The final step to get the Postman working is to adjust the headers. Postman already contains some default headers, but two more needs to be added. As seen in Figure 63 Content-Type: application/xml and Accept: application/xml have been added to the headers. The Content-type tells Postman that the user will send data to the rest API in XML format and the Accept lets the Postman know that the user is accepting any result it acquires from the REST API using the GET function in XML format as well. Figure 63 : Postman Headers Deployment of a GPON-SDN solution in a server using Docker 76 After the previous steps, Postman is ready to be used and as it can be noticed in the Figure 64, we can insert the URL that was used earlier on a browser to GET, PUT, or DELETE any data to the switch. Together with the field for the link, Postman shows two bodies as it can be seen in Figure 64. The upper body is where the data that needs to be inserted to the API is typed, and the lower body is where the GET functions outputs the data. Basic information such as the time the function takes to execute or status messages (200 ok, 404 errors) are also visible on the screen capture. Figure 64 : Post man upper and lower Body 4.8 Configuration of flows and meters in ODL with Postman Before creating flow entries, it is necessary to understand how a flow entry is built. Therefore, each flow table entry contains [34] the next components: • Match fields: to match against packets. These consist of the ingress port and packet headers, and optionally metadata specified by a previous table. • Priority: matching precedence of the flow entry. • Counters: updated when packets are matched. • Instructions: to modify the action set or pipeline processing. • timeouts: maximum amount of time or idle time before one flow is expired by the switch. Deployment of a GPON-SDN solution in a server using Docker 77 • Cookie: opaque data value chosen by the controller. May be used by the controller to filter flow statistics, flow modification and flow deletion. It is not used when processing packets. A flow table entry is identified by its match fields and priority, so the match fields and the priority taken together identify a unique flow entry in the flow table [34]. The proper working of flow can also be observed in the flowchart available as Figure 65. Figure 65 : Flowchart detailing packet flow through an OpenFlow switch In the next steps the user will create some flow entries and send them via postman to the switch. Configuration of normal flows During the early stages we talked about the operational tree and the config tree to access the flow data and configure the flows. Operational tree allows us to view the flows currently running on the switch and config allows the user to configure or add new flows. Using GET function to output those operational flows on the Postman can be very useful so those flows created on the switch can be used as templates to create new flows via the config tree. In order to create a normal flow with XML format using Postman we must insert some code as the next one: <flow xmlns="urn:opendaylight:flow:inventory"> <id>1</id> Deployment of a GPON-SDN solution in a server using Docker 84 </instructions> At this moment the flow instructs the switch to output the packets destined for any IP’s in the network 192.168.3.0/24 through the node-connector 1 (this is the same node as in the previous example). However, more instructions like meters and timeouts can be added in the future to test the working of it in details. All the flows created earlier can be edited and changed if the priority, timeout or flow id needs to be changed. The PUT function on the Postman replaces the older one with the newer flow entry if the link matches. Finally, deleting a flow entry is also possible by selecting the DELETE option on postman as it can be observed in Figure 68. Figure 68 : Different options available i.e. put, delete and get Configuration of meters in ODL To create a meter a different link is used on the Postman. The PUT function is still at work but the link goes as follows: http://10.0.103.73:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:269285126111858/ meter/1 Then, the corresponding xml-code to create a meter is the next one: <meter xmlns="urn:opendaylight:flow:inventory"> <meter-id>1</meter-id> <meter-band-headers> <meter-band-header> <band-id>0</band-id> <meter-band-types> <flags>ofpmbt-drop</flags> Deployment of a GPON-SDN solution in a server using Docker 85 </meter-band-types> <drop-rate>30000</drop-rate> <drop-burst-size>30000</drop-burst-size> </meter-band-header> </meter-band-headers> <flags>meter-kbps</flags> </meter> The above meter has been configured with the id “1” and it is limiting any packets going through it to 30000 kbps (30 Mbps). It is also necessary to check if the switch has accepted the new meter with the command ovs-ofctl -O OpenFlow13 dump-meters mybridge and it is shown in Figure 69. Figure 69 : Newly created meters check on the vSwitch For the test purposes few more meters with higher drop-rate shall be created. It is necessary to change the meter id in the xml-code and the link on the postman in order to create new meters. The meter 2 will have /meter/2 in its link and so on. Five meters have been created for the test purpose starting from 50 Mbps and going up to 5 Gbps. Unlike the flow entries, changing data inside a meter cannot be done with the PUT function. The meter must be deleted with DELETE function on the postman first, if changes needs to be made on the meter. Once the existing meter has been deleted, we must change the xml-code and create the new meter with correct the inputs using the PUT option. Deployment of a GPON-SDN solution in a server using Docker 86 Adding a meter to a configured flow To add the recently created meter to a flow entry, the following xml-snippet needs to be added in the instruction field: <instruction> <order>1</order> <meter> <meter-id>1</meter-id> </meter> </instruction> Therefore, a normal flow with meter id “1” will look as follows the meter has been added to it (in that case the meter that has been configured previously): <flow xmlns="urn:opendaylight:flow:inventory"> <id>1</id> <priority>32768</priority> <table_id>0</table_id> <cookie_mask>0</cookie_mask> <hard-timeout>0</hard-timeout> <match/> <cookie>0</cookie> <flags/> <instructions> <instruction> <order>0</order> <apply-actions> <action> <order>0</order> <output-action> Deployment of a GPON-SDN solution in a server using Docker 87 <max-length>0</max-length> <output-node-connector>NORMAL</output-node-connector> </output-action> </action> </apply-actions> </instruction> <instruction> <order>1</order> <meter> <meter-id>1</meter-id> </meter> </instruction> </instructions> <idle-timeout>0</idle-timeout> </flow> If the flow has been configured with meter “1” it can also be checked on the open vSwitch with the command ovs-ofctl -O OpenFlow13 dump-flows mybridge as it can be observed in Figure 70. This confirms that the normal flow has been configured with meter ‘1’ (actions=meter:1) as it can be observed in Figure 70. Figure 70 : Output with dump-flows command 4.9 Tests with flows and meters in ODL In the next steps, we will test the performance of a set of flows and meters. This will be done step by step in the same order as in the previous section. Test 1: Normal flows created in the OVS Firstly, it is necessary to checked if the switch has accepted the flow entry as it is shown in Figure 71, in that case a normal flow with priority 1200. Deployment of a GPON-SDN solution in a server using Docker 88 Figure 71 : normal flow test After the flow entry has been confirmed, a test can be done by pinging the other side of the interface to check the statistics of packets in the flow (Figure 72). In that figure it can be noticed that the flow entry has been hit and 10 packets passed through the bridge. Figure 72 : normal flow statistics after the ping In the next step the priority of a flow entry will be checked. A normal flow has been created (copy of the first one), but this time the flow has a higher priority of 1800, so we have two different flows with different priority (Figure 73). Figure 73 : Two flows created with different priority The same interface is pinged again to look for changes. After the pings, it can be seen on Figure 74 that the flow with the higher priority (1800) is being used since packets are being only transferred through this flow entry. Figure 74 : Flow stats with different priority Test 2: Flow entry for specific ports In this flow entry, the switch was asked to forward packets from enp6s0f1.833 through the enp6s0f1.806 port. Then, it is necessary to check if the switch has accepted the flow. After the previous condition has been confirmed, the port is then pinged, and the results are shown in Figure 75. Therefore, it can be seen on flow the statistics that the flow Deployment of a GPON-SDN solution in a server using Docker 89 entry has been hit (there are packets though this flow), so the flow entry configuration is correct. Figure 75 : Flow entry check for specific port Test 3: Flow entry for specific network address In the first step we must check if the flow entry has been accepted by the switch using the command shown in Figure 76. Figure 76 : Flow entry for specific Network Address After the flow entry has been conformed, the network 192.168.3.0 is pinged to see if the flow entry works as intended. Figure 77 confirms that the flow entry works as intended since the flow permits packets to pass through. Figure 77 : Flow statistics check after the pings Test 4: A flow entry with different meters As mentioned earlier, five meters have been created on the switch to do several tests. In the next steps the flow is configured with different meters and the performance of meters are tested. The drop rate of meters is configured with meter ID 1, 2, 3, 4, 5 with limited rates of 30 Mbps, 50 Mbps, 100 Mbps, 500 Mbps and 5 Gbps, respectively. 4.9.4.1 Performance of meters of 30 Mbps The flow entry has been configured with meter with identifier 1 (id) that correspond with a limited drop rate of 30 Mbps as it can be observed in Figure 78. Figure 78 : Flow entry with Meter 1 Deployment of a GPON-SDN solution in a server using Docker 90 The throughput is then tested with a tool named iperf3. To test the through put with iperf3 we need a client side and the server side. The virtual interface on chron2 will be used as the client-side to start the iperf and the interfaces on the Chron3 will be used as the server-side to receive the data sent from the client (Figure 79). Refer to Chapter 3 on more information regarding the working of Iperf and its configurations. The meters are not precise as it is still a new technology in development, but it is working as intended, since the throughput is around 30 Mbps as it is expected from the first meter (Figure 79. Figure 79 : perf3 test with Meter 1 (30 Mbps) 4.9.4.2 Performance of meters of 50 Mbps The flow is then configured with meter 2 of a higher data rate of 50Mbps, as it can be observed in Figure 80. Figure 80 : Flow entry with Meter 2 (50 Mbps) We make sure if the switch has accepted the changes on the flow. After the conformation we can run the same iperf process again. The meter 2 works as intended limiting the throughput around 50 Mbps, as this performance can be observed in Figure 81. Deployment of a GPON-SDN solution in a server using Docker 91 Figure 81 : Iperf3 test with Meter 2 (50 Mbps) 4.9.4.3 Performance of meters of 100 Mbps The flow entry is configured with meter 3, related to 100Mbps (see Figure 82). The iperf is being run on the interface as it can be noticed in Figure 83. Moreover, Figure 83 shows that the throughput is around 100 Mbps as it was configured on the meter 3. Figure 82 : Flow entry with Meter 3 (100 Mbps) Figure 83 : Iperf3 with Meter 3 (100 Mbps) Deployment of a GPON-SDN solution in a server using Docker 92 4.9.4.4 Performance of meters of 500 Mbps The flow entry is configured with meter 4, that correspond with a maximum data rate of 500 Mbps, as it can be observed in Figure 84. The same iperf test is being run again and Figure 85 shows that meter permits more data through it (790 Mbps) that it is allowed. The meters start to get more and more inaccurate as the bit rate goes higher. Figure 84 : Flow entry with Meter 4 (500 Mpbs) Figure 85 : Iperf3 with Meter 4 (500 Mbps) Deployment of a GPON-SDN solution in a server using Docker 93 To check at what point the meters starts to act incorrectly, few more meters are created using the same methodology as earlier and the results are shown in the table below. METER (Mbps) IPERF3: RESULTs ( Mbps ) 30 33.8 Mbps 50 55 Mbps 100 118 Mbps 150 206 Mbps 200 329 Mbps 250 439 Mbps 300 561 Mbps 350 675 Mbps 400 790 Mbps 450 870 Mbps 500 940 Mbps 550 954 Mbps 600 1,10 Gbps The results are good and precise in the lower bitrate but after 150Mbps they start getting less and less accurate. If this is related to the switch or the meters being new technology in general needs to be investigated. 4.9.4.5 Performance of meters of 5 Gbps The flow entry is configured with meter 5 (5 Gbps). Figure 86 shows that when the meter is asked to let only 5 Gbps through the bridge, the throughput is capped at 1.14 Gbps. After multiple tests with higher bitrate meters (up to 10 Gbps) it can be confirmed that the switch itself does not allow higher throughput than 1.15 Gbps through its bridge. When there are no meters configured on the switch, the max throughput is still stuck at 1.15 Gbps. Whether the switch being run on the user space module is the cause behind it needs to be researched. Deployment of a GPON-SDN solution in a server using Docker 100 After the normal connection has been configured on the bridge the next step is to create flow entries and test the meters. 4.11 Configuration of flows and meters in ONOS Unlike ODL, with ONOS it is possible to create flows via the graphical user interface. Both use the REST API so most of the parameters during the creation and configuration of flow entries remains the same. The flow entries will be created using the GUI that is available on the APIDOCS page. The page to create and view the flows on the onos can be opened with the link http://10.0.103.73:8181/onos/v1/docs/#/ on any browser such as Google Chrome or Firefox. The same authentication is used here (username: onos password: rocks). After the authentication succeeds, a list of available options appears on the page as it can be seen on Figure 94. Out of all the available features, only two features with the arrows pointed to them on Figure 94 will be used. They are used to configure flows and meters. Figure 94 : ONOS Core REST API list of available features. Deployment of a GPON-SDN solution in a server using Docker 101 In the next steps we will use the above features to configure flows and meters with different parameters. Configuration of flows for specific Network Address Out of the available features on the Rest API Documents we navigate to the flows by clicking on the it in the Figure 94. Then, we have several options as it can be observed in Figure 95. Figure 95 : All options available with the feature FLOWS The options speak for themselves. GET lets the user get the existing flow or table data, DELETE lets the user delete them and POST lets the user create a new flow entry. We select the POST option to start creating a new flow entry, after clicking on the post the following option appears as seen in Figure 96. Deployment of a GPON-SDN solution in a server using Docker 102 Figure 96 : Creation of flows with GUI The user gets three input fields. The data for this input field are self-explanatory. The device id is the id of the switch that can be found on the topology table as it was shown earlier in Figure 91 (of:0000f04da23cb980). The appID is the name of the application that was enabled in Figure 92 (org.onosproject.fwd). Finally, the stream field will contain the rules and instruction for the flow the user wants to create. As it can also be seen on the right side of Figure 96, the REST API also provides with an example flow that can be used to create a new flow. We use that example flow as a template for a new flow. Then, to create a flow that is used for the packet’s destination for IP’s in the Network Address 192.168.3.0/24 the following stream is used: { "flows": [ { "priority": 50000, "timeout": 0, "isPermanent": true, "deviceId": "of:0000f04da23cb980", Deployment of a GPON-SDN solution in a server using Docker 103 "treatment": { "instructions": [ { "type": "OUTPUT", "port": "1" }]}, "selector": { "criteria": [ { "type": "ETH_TYPE", "ethType": "2048"},{ "type": "IPV4_DST", "ip": "192.168.3.0/24" } ] } } ] } With the three input fields being filled, the flow can be uploaded with the button Try it out! as seen in Figure 96. The flow entry is very similar to the one that was created with the ODL. For the ONOS controller, the json format is being used because the example flow that the REST API provides is also on the json format. The flow has 40000 priority and will forward all data destined for 192.168.3.0 through its port 1(enp6s0f1.833 is saved as Port 1 in the switch database, this was also mentioned during the flow configurations with ODL). This flow is very similar to the flow we created with ODL, only the formats are different, xml format with ODL and json format with ONOS. To check if the OVS has accepted the flow, similar tests can be done as it was done during the flow creations with ODL. With the command ovs-ofctl -O OpenFlow13 dumpflows mybridge, the switch is asked to output all its flows as seen in Figure 97. Deployment of a GPON-SDN solution in a server using Docker 104 Figure 97 : Dump-flows on OVS In this figure, the recently created flow for the network address 192.168.3.0/24 (the last flow in Figure 97), along with four default flows created by the ONOS are available. Three of the default flows are created during the initial connection between the OVS and ONOS. They are necessary for the controller to work. The fourth flow is the flow that is enabled when we installed the fwd application earlier. The default flows are hidden on the ODL but ONOS lets the user know by just displaying them along with other flows even though the users cannot change or delete them. To test if the flow works as it is expected we ping on the network 192.168.3.0/24. On the last flow of Figure 98 the flow entry is being hit when the user pings through it, as the n_packets changes from 0 to 4, so the flow works. Figure 98 : Connection test on the newly created flow. Deployment of a GPON-SDN solution in a server using Docker 105 Configuration of flows for specific Mac Address The steps are the same as above, only a few details needs to be changed in the stream input field, as it is observed in Figure 99. As seen in this figure 99 the rest of the code remains the same for the mac address and the source and destination is also inserted according to our device mac address. The parameters of the flow, the connection and its working tests are very similar to the tests done with ODL. Figure 99 : Flow entry for specific MAC id Deployment of a GPON-SDN solution in a server using Docker 106 Configurations of meters To create a meter via the REST API of the ONOS GUI, we navigate by clicking on it, to the meters feature on the earlier Figure 94. The options available with the feature meters in this figure 100 are self-explanatory. GET lets the user view the existing meter, DELETE lets the user delete it and POST lets the user create a new meter. Figure 100 : Options on the meters feature. The Post option on Figure 100 asks the user to fill information in two input fields with information. The first field asks the user for the switch id and the second one asks the user for the meter rules and instructions. The REST API docs also provides the user with a meter example as it can be observed on the right part of Figure 101. This example meter can be used as a template for our meters. Figure 101 : Creation of meters in ONOS Deployment of a GPON-SDN solution in a server using Docker 107 A typical meter can be created with the following json stream: { "deviceId": "of:0000f04da23cb980", "unit": "KB_PER_SEC", "burst": true, "bands": [{ "type": "DROP", "rate": "30000", "burstSize": "0", "prec": "0" } ]} The above json stream creates a meter that will only allow a throughput of 30 Mbps on the flow entry where this meter has been added to. For test purpose we will create multiple meters from 30 Mbps up to 5 Gbps by just replacing the rate in the code. The meter value and tests will be the same as ODL tests. To check if the meters have been accepted by the switch the same steps can be followed with the command ovs-ofctl -O OpenFlow13 dump-meters mybridge. Configuration of flows with meters Now the flows and meters have been created, the meters can be added to a flow by adding 2 extra line of code on the flow’s json stream, in the next way: { "type": "METER", "meterId": 1 } The, a flow-entry with a meter configured into it looks as Figure 102. This figure shows the json-stream used to configure the flow with the meter added into it and Figure 103 shows that the flow has been configured with meter 1. During the test phase, the same flow will be used multiple times while only changing the meter ID from 1 to 15 in order to test the meters’ performance with ONOS and comparing it with ODL. Deployment of a GPON-SDN solution in a server using Docker 108 Figure 102 : Configuration of a flow with meter into it Figure 103 : Check the flow entry on the ovs Deployment of a GPON-SDN solution in a server using Docker 109 4.12 Tests with flows and meters in ONOS The test process of the meters and flows are the same as they were with ODL and to avoid repeating the same figures and commands in the report only one example will be shown here. Figure 104 : Iperf test with meter 1 enabled As it was the case with ODL earlier, the meter 1 has been enabled with drop rate of 30Mbps. Figure 104 shows the meter is working as intended on the flow. Finally, the following table summarized the results of different meters with different drop rates and enabled on the same flow entry. METER (Mbps) IPERF RESULTS (Mbps) 30 32 Mbps 50 54 Mbps 100 119 Mbps 150 215 Mbps 200 342 Mbps 250 452 Mbps 300 553 Mbps Deployment of a GPON-SDN solution in a server using Docker 116 docker network create --subnet 10.1.0.0/16 --gateway 10.1.0.1 --ip-range 10.1.4.0/24 bridge_test Create your own dockerbridge network named bridge_test with NA 10.1.0.0/16 docker run -t -i -d --cap-add SYS_ADMIN --network host -- name=ovs_router_dhcp --privileged <image-name:tag> Start a docker container from an image in privileged most with host networking and admin permissions. service isc-dhcp-server start Once inside the container start the dhcp-server with this command ovsdb-server -- remote=punix:/usr/local/var/run/openvswitch/db.sock \ -- remote=db:Open_vSwitch,Open_vSwitch,manager_options \ --private-key=db:Open_vSwitch,SSL,private_key \ --certificate=db:Open_vSwitch,SSL,certificate \ --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \ --pidfile --detach --log-file To configure ovsdbserver to use database Deployment of a GPON-SDN solution in a server using Docker 117 docker run -t -i -d --cap-add SYS_ADMIN --network bridge_test --name=onos -p 8101:8101 -p 5005:5005 -p 830:830 -p 10.0.103.73:8181:8181 --privileged <imagename:tag> To run the onos image and start a container using bridge_test network and publish port 8181 so the user can access the controller on web browser. Image name in our case was onos:1.1 but it’s a subject for change when the images are updated after enabling new applications into them. docker run -t -i --cap-add SYS_ADMIN --network bridge_test --name=odl -p 10.0.103.73:8181:8181 -- privileged <image-name:tag> To run the odl image and start a container cd opendaylight-0.11.2 ./bin/karaf Once inside the ODL container navigate to the directory and run the script to start the ODL For more information regarding docker commands we refer to the cheat sheet on the website dockerlabs. [35] Deployment of a GPON-SDN solution in a server using Docker 118 7 Reference [1] M. Cooney, „What is SDN?,” 2019. [2] A. Amokrane, „Software defined enterprise passive optical network,” in 10th International Conference on Network and Service Management (CSNM), Rio de Janeiro, 2014. [3] Webpage for controller OpenDayLight,” [Online]. Available: https://www.opendaylight.org/. [4] Linux Foundation, „Open vSwitch Documentation,” [Online]. Available: http://docs.openvswitch.org/en/latest/. [Geopend 11 Mayo 2018]. [5] D. Foundation, „Get started with Docker,” [Online]. Available: www.docker.com. [6] OpenFlow Standard 1.3,” [Online]. Available: https://www.opennetworking.org/images/stories/downloads/sdnresources/onf-specifications/openflow/openflow-spec-v1.3.0.pdf. [7] O. N. Foundation, „ONOS,” 2020. [8] J. K. S. v. d. M. S. W. Andrei Bondkovskii, „Qualitative Comparison of Open-Source,” Trinity College Dublin, 2016. [9] The Linux Foundation, „Open vSwitch Documentation,” 2018. [Online]. Available: http://docs.openvswitch.org/en/latest/. [Geopend 2018]. Deployment of a GPON-SDN solution in a server using Docker 119 [10 ] P. Göransson, Software defined networks: a comprehensive approach, 2014. [11 ] Creative Commons BY-SA, „Learning Postman”. [12 ] S. Pillai, „IPERF: How to test network Speed,Performance,Bandwidth,” 2013. [13 ] The Linux Foundation, „Open vSwitch on Linux, FreeBSD and NetBSD,” 2018. [Online]. Available: http://docs.openvswitch.org/en/latest/intro/install/general/. [Geopend 26 Abril 2018]. [14 ] S. E. B. A. M. J. P. K. P. Jon Dugan. [15 ] Z. Kaleem, „iPerf vs iPerf3,” 2017. [16 ] J. Dugan, S. Elliott, B. A. Mah, J. Poskanzer en K. Prabhu, „iPerf - The ultimate speed test tool for TCP, UDP and SCTP,” [Online]. Available: https://iperf.fr. [Geopend 23 Mayo 2018]. [17 ] Docker, „Container-networking,” [Online]. Available: https://docs.docker.com/config/containers/container-networking/. [Geopend May 2020]. [18 ] Debian Project, „Debian -- Packages,” 19 07 2019. [Online]. Available: https://www.debian.org/distrib/packages. [Geopend 20 02 2020]. [19 ] Pi-Hole, „Docker DHCP and Network Modes,” 2020. Deployment of a GPON-SDN solution in a server using Docker 120 [20 ] O. Project, „OpenDaylight Documentation,” 2020. [21 ] OnosProject, „onosproject/onos,” DockerHub. [22 ] E. Nemeth, G. Snyder, T. R. Hein, B. Whaley en D. Mackin, Unix and Linux system administration handbook, 5th edition red., Boston: Addison- Wesley, 2018. [23 ] S. Biradar, „The Ultimate Docker cheatsheet,” [Online]. Available: http://dockerlabs.collabnix.com/docker/cheatsheet/. [24 ] Tianon, Paultag, "Dockerhub," Debian, 1 5 2020. [Online]. Available: https://hub.docker.com/_/debian. [Accessed 02 5 2020]. [25 ] S. Seth en M. A. Venkatesulu, TCP/IP Architecture, Design and Implementation in Linux, Wiley-IEEE Press eBook Chapters, 2008. [26 ] „vconfig(8) - Linux man page,” [Online]. Available: https://linux.die.net/man/8/vconfig. [Geopend 7 Mayo 2018]. [27 ] Internet Systems Consortium, „ISC's open source DHCP software system,” 2003. [Online]. Available: https://www.isc.org/downloads/dhcp/. [Geopend 21 Mayo 2018]. [28 ] The Linux Foundation, „Installing Open vSwitch,” 2018. [Online]. Available: http://docs.openvswitch.org/en/latest/intro/install/. [Geopend 26 April 2020]. [29 ] D. C, „Open vSwitch Cheat Sheet”. Deployment of a GPON-SDN solution in a server using Docker 121 [30 ] PICA8, „PICA8-Documentation,” [Online]. Available: https://docs.pica8.com/pages/viewpage.action?pageId=5112035. [Geopend April 2020]. [31 ] O. N. Foundation, „OpenFlow Switch Specification,” 2012. [32 ] O. Project, „OpenFlow Plugin Project User Guide”. [33 ] P. inc. [34 ] O. N. Foundation, „OpenFlow Switch Specification,” 2012. [35 ] S. Biradar, „The Ultimate Docker Cheat Sheet”. [36 ] D. Molloy, Raspberry Pi® a fondo para desarrolladores, Madrid: Marcombo, D.L., 2017. [37 ] Z. Hu, „A Comprehensive Security Architecture for SDN,” 18th International Conference on Intelligence in Next Generation Networks. [38 ] S. W. e. a. Lee, Design and implementation of a GPON-based virtual OpenFlow-enabled SDN switch, vol. 34. [39 ] R. e. a. Gu, „Software defined flexible and efficient passive optical networks for intra-datacenter communications,” Optical Switching Networking, vol. 14, p. 289, 2014. Deployment of a GPON-SDN solution in a server using Docker 122 [40 ] H. Kahlili, D. Rincón en S. Sallent, „Towards and integrated SDN NFV architecture for EPON networks,” in Advances in Communication Networking (LNCS 8846), Cham, 2014. [41 ] L. Youngsuk, „A design of 10 Gigabit Capable Passive Optical Network(XG-PON1) architecture based on Software Defined Network (SDN),” in International Conference on Information Networking (ICOIN), 2015. [42 ] P. Parol en M. Pawlowski, „Towards networks of the future: SDN paradigm introduction to PON networking for business applications,” in Federated Conference on Computer Science and Information Systems, Krakow, 2013. [43 ] IEEE, „802.1Q-2011 - IEEE Standard for Local and metropolitan area networks--Media Access Control (MAC) Bridges and Virtual Bridged Local Area Networks”. 31 Agosto 2011. [44 ] „vconfig(8) - Linux man page,” [Online]. Available: https://linux.die.net/man/8/vconfig. [Geopend 9 Mayo 2018]. [45 ] The Apache Software Foundation, „Versión 2.4 de la documentación del Servidor de HTTP Apache,” [Online]. Available: http://httpd.apache.org/docs/2.4/. [Geopend 23 Mayo 2018]. [46 ] Raspberry Pi Foundation, „Raspberry Pi 3 Model B Specifications,” [Online]. Available: https://www.raspberrypi.org/products/raspberry-pi-3- model-b/. [Geopend 23 Mayo 2018]. [47 ] „iperf(1) - Linux man page,” [Online]. Available: https://linux.die.net/man/1/iperf. [Geopend 23 Mayo 2018]. [48 ] G. Combs, „Wireshark,” 1998. [Online]. Available: https://www.wireshark.org. [Geopend 23 Mayo 2018]. Deployment of a GPON-SDN solution in a server using Docker 123 [49 ] T. B. O. M. F. T. a. TTPs, „Open Networking Foundation,” 2 Febrero 2015. [Online]. Available: https://www.opennetworking.org/wpcontent/uploads/2014/10/TR_Multiple_Flow_Tables_and_TTPs.pdf. [Geopend 29 Mayo 2018]. [50 ] Y. U. I. i. OpenDayLight, „OpenDayLight Summit,” 29 Julio 2015. [Online]. Available: https://events.static.linuxfound.org/sites/events/files/slides/YANGUI-metz- malachovsky-sebin-ODL-Summit-final-July29.pdf. [Geopend 30 Mayo 2018]. [51 ] R. 6. YANG, „IETF,” Octubre 2010. [Online]. Available: https://tools.ietf.org/html/rfc6020. [Geopend 30 Mayo 2018]. [52 ] E. Dai en W. Dai, „Towards SDN For Optical Access Networks,” Spring Technical Forum Proceedings, 2016. [53 ] O. Project, „OpenStack,” [Online]. Available: https://www.openstack.org. [Geopend 8 Junio 2018]. [54 ] I. S. C. i. M. Networks, „Department of Computer Science,” [Online]. Available: http://yuba.stanford.edu/~sd2/Ch_5.pdf. [Geopend 12 Junio 2018]. [55 ] Tianon ; Paultag, "Debian Official Images," 10 05 2020. [Online]. Available: https://hub.docker.com/_/debian. [56 ] C. R. o. openflowplugin.git, „OpenDayLight,” 18 Septiembre 2013. [Online]. Available: https://git.opendaylight.org/gerrit/gitweb?p=openflowplugin.git;f=model/mo del-flow-base/src/main/yang/opendaylight-meter- types.yang;a=blob;hb=refs/heads/stable/boron. [Geopend 2018]. Pehrs, 2012. Deployment of a GPON-SDN solution in a server using Docker 124 Deployment of a GPON-SDN solution in a server using Docker 125