GithubHelp home page GithubHelp logo

letmein's Introduction

Let Me In

This container is used with a VOLTHA deployment that leverages an OVS switch to enable upstream communication with a back end DHCP and/or IGMP system.

Description

This container does a synchronization between ONOS and the managed OVS switch. It polls the device information from ONOS and evaluates the accessDevice object under each device entry. From the accessDevice object it collects the vlan values.

The container then queries the flows on the managed OVS switch, which it created as identified by the appId associated with the flow. The existing flows are evaluated to understand if there exists the required flow for each VLAN. If there exists a rule that is no longer needed, it is deleted.

Finally, for those VLANs for which there is no existing rule a new flow rule is POSTed to ONOS.

The Rule

The rule POSTed to ONOS does a packet in to ONOS for traffic that arrives on on port 1 and and matches the VLAN ID of those discovered from the ONOS network configuration. The rule is generated from the following template file:

{
    "priority": 32768,
    "appId" : "{{.AppId}}",
    "timeout": 0,
    "isPermanent": true,
    "deviceId": "{{.DPID}}",
    "treatment": {
        "instructions": [
            {
                "type": "OUTPUT",
                "port": "CONTROLLER"
            }
        ]
    },
    "selector": {
        "criteria": [
            {
                "type": "IN_PORT",
                "port": "1"
            },
            {
                "type": "VLAN_VID",
                "vlanId": "{{.VlanId}}"
            }
        ]
    }
}

configuration

This container is configured via environment variables

KEY VALUE DESCRIPTION
ONOS_CONNECT_URL http://karaf:karaf@onos:8181 URL with which to connect to ONOS
OVS_DPID :discover DPID of switch to manager
OVS_PORT :discover Port on OVS switch to provision
CREATE_FLOW_TEMPLATE /var/templates/create.tmpl Template file used to create flow rule in ONOS
INTERVAL 30s Frequency to check for correct flows
VERIFY false When true, just log changes that would be made, but don't make changes
LOG_LEVEL info detail level for logging
LOG_FORMAT text log output format, text or json

The value :discover for the options OVS_DPID and OVS_PORT is used to indicate to the container that heuristics should be used to identify the OVS switch and its port in ONOS. The heuristics used are:

  • OVS_DPID - based on the device attributes, as queried from ONOS, the first switch found where the "hw" value is "Open vSwitch", the "driver" value is "ovs", and the device is "available" is selected.
  • OVS_PORT - based on the port attributes, as queried from ONOS, the first port on the selected switch where the port is not "local" and it is "enabled" is selected.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.