def launch():
    # Start the DHCP server (for assigning IP addresses)
    from misc.dhcpd import default
    default()

    # Add keepalive to avoid connection drops
    from openflow.keepalive import launch
    launch()

    # Add basic switch functionality
    from forwarding.l2_learning import launch
    launch()

    # This is a handler that will be called when the switch connects
    #  to this controller
    def start_switch(event):
        log.debug("Controlling %s" % (event.connection, ))
        # Create in instance of our Flow creator, and pass
        #  it the switch connection so we can add handlers
        #  when packets come in
        # Add basic switch functionality
        Flow(event.connection)

    # Tell POX to use the above handler when the switch connection
    #  is alive
    core.openflow.addListenerByName("ConnectionUp", start_switch)
def launch ():
  # Start the DHCP server (for assigning IP addresses)
  from misc.dhcpd import default
  default()

  # Add keepalive to avoid connection drops
  from openflow.keepalive import launch
  launch()

  # Add basic switch functionality
  from forwarding.l3_learning import launch
  launch()

  # This is a handler that will be called when the switch connects
  #  to this controller
  def start_switch (event):
    log.debug("Controlling %s" % (event.connection,))
    # We want the entire body of the packet
    core.openflow.miss_send_len = 0xffff
    # Create in instance of our protocol handler, and pass
    #  it the switch connection so we can add handlers
    #  when packets come in
    Proto(event.connection)

  # Tell POX to use the above handler when the switch connection
  #  is alive
  core.openflow.addListenerByName("ConnectionUp", start_switch)
Exemple #3
0
def launch():
    # Start the DHCP server (for assigning IP addresses)
    from misc.dhcpd import default
    default()

    # Add keepalive to avoid connection drops
    from openflow.keepalive import launch
    launch()

    # This is a handler that will be called when the switch connects
    #  to this controller
    def start_switch(event):
        log.debug("Controlling %s" % (event.connection, ))
        # We want the entire body of the packet
        core.openflow.miss_send_len = 0xffff
        # Create in instance of our packet injector, and pass
        #  it the switch connection so we can add handlers
        #  when packets come in
        Injector(event.connection)

    # Tell POX to use the above handler when the switch connection
    #  is alive
    core.openflow.addListenerByName("ConnectionUp", start_switch)
Exemple #4
0
def launch():
    keepalive.launch()
Exemple #5
0
def launch():
    keepalive.launch()