GithubHelp home page GithubHelp logo

of_l2ls's Introduction

Overview

License Build status Code coverage Code-quality score

The of_l2ls application is used in basic operation of switches. It implements the algorithm known as L2 Learning Switch, which aims to figure out which host is attached to which switch port. The switch keeps a table that stores a tuple containing the mac address (hardware address) and port number. So, the switch can forward the packets directly to the destination host. Initially this table is empty, so the first step, when a host tries to send a packet to another host, is to add an entry pointing to the source host. Next, the switch sends the packet to all ports, except to the port of the source host. The destination host will answer to that packet and once the packet is received, the switch adds an entry to the table mapping the mac address of the destination host to a port. This process is repeated until all ports with a host connected are mapped. This algorithm can be used to update the table when a change is detected.

Installing

All of the Kytos Network Applications are located in the NApps online repository. To install this NApp, run:

$ kytos napps install kytos/of_l2ls

Requirements

  • kytos/flow_manager
  • kytos/of_core
  • kytos/topology

Advanced

L2 Learning Switch Operation

At the switch startup, it does not know which hosts are attached to its ports. So, when some host A sends a frame addressed to host B, the switch will broadcast this frame to all ports, except to the port from where the frame has arrived. At same time, the switch learns at which port host A is attached. A table is stored in switch's local memory mapping the host mac address and port number.

When the host B answers the request, the switch adds to this table an entry mapping the mac address of host B to the port in which it is connected. This process goes on until the switch learns which port all hosts are connected.

Events

Listened

kytos/topology.switch.(enabled|disabled)

Listen when a switch was enabled or disabled.

Content

{
  'dpid': <switch.id>
}

kytos/of_core.v0x0[14].messages.in.ofpt_packet_in

Listen PacketIn Event.

Content

{
  'message': <object>, # instance of python-openflow PacketIn message
  'source': <object> # instance of kytos.core.switch.Connection class
}

Generated

kytos/of_l2ls.messages.out.ofpt_packet_out

Standard "message out" event with a PacketOut message to the switch containing a of_l2ls packet inside it.

Content

{
  'message': <object>, # instance of python-openflow PacketOut message
  'source': <object> # instance of kytos.core.switch.Connection class
}

of_l2ls's People

Contributors

abaruchi avatar beraldoleal avatar cemsbr avatar cmagnobarbosa avatar diraol avatar erickvermot avatar gleybersonandrade avatar hdiogenes avatar josemauro avatar llgoncalves avatar macartur avatar raphaelmcobe avatar renanrodrigo avatar

Watchers

 avatar

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.