Skip to content

Mininet OpenNAC

Jim Burns edited this page Sep 7, 2015 · 3 revisions
  1. Configure Mininet Switch to use RESTCONF API (it is a prerequisite for OpenNAC API)

  2. Now you need to configure OpenNAC parameters on the SDN Developer Lab

    1. On SDN Developer Lab, you need to add the switch on the Devices table (if you already added the device then you do not need to add it again, just double check the values and then 'Reconnect Device').

      1. On the Devices table click Add Device
      2. Enter the values about your device from following table (see below table on how to obtain these values), when complete click save.
      Add Device Field Value To Enter
      Friendly Name Enter a string that will mean something to you. (e.g. MyHPSwitch)
      Local IPv4 Address LOCAL-IP
      Local MAC LOCAL-MAC
      Gateway IP Address GW-IP
      Gateway Mask GW-MASK
      Gateway MAC GW-MAC
      PORTS PORTS
      WAN PORT WAN-PORT
      Datapath Id DPID
  3. In Mininet, print the route table and in the output, on the line with a destination of 'default' collect the IP Address for Gateway (call this GW-IP) and the Interface (call this GW-IFACE). In the example below the GW-IP is 10.0.2.2 and the GW-IFACE is eth0.

    route
    1. Mininet route Command Output
  4. In Mininet, output the configuration of the GW-IFACE using ifconfig. In this output obtain the Mask (call this GW-MASK). In the example GW-MASK is 255.255.255.0.

    ifconfig
    1. Mininet ifconfig Command Output
  5. In Mininet, obtain the MAC address for GW-IP using arp command (call this GW-MAC). In the example below our GW-IP is 10.0.2.2 and the result from the arp command for this is 52:54:00:12:35:02

    arp -a 10.0.2.2
    1. Mininet arp Command Output
  6. Notice that when you ran FirstSwitch.py (see Mininet RESTCONF) it provided output that had information about the switch that you will need. Here you will find LOCAL-IP, LOCAL-MAC and DPID. In the example above the LOCAL-IP is 10.0.2.15, LOCAL-MAC is 4e:59:61:94:10:ee and DPID is 4e59619410ee.

  7. At mininet> prompt enter the ports command. This will output the port numbers for Mininet switch. One of these is the WAN port, one is the LOCAL port and the rest are the ports to which end-user devices are connected. If you followed the steps above then the port number next to 'eth2' is the WAN port (call this WAN-PORT). The LOCAL port will be next to 'lo', and may be ignored. The remaining port numbers are for end-user devices (call these PORTS). In the example the WAN-PORT is 2 and PORTS is 1. If there had been another end-user port (say 3) then PORTS would have been 1,3.

    ports
    1. Mininet FirstSdnAppSwitch.py Command Output
  8. Verify or reconnect switch

Clone this wiki locally