Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[mininet-discuss] collecting link information with ryu controller

nail göksel nailgoksel1985 at gmail.com
Tue May 8 12:48:59 PDT 2018


Hello everyone,

I'm new on ryu. I want to collect port statistics and match them connected
hosts for a security project. However, i couldn't find any method for
collecting information about hosts and corresponding switch ports
(including host mac and switch dpid-port).

Below my code, I can collect host information, learn mac address of the
host and corresponding dpid. But the portid is always "1". I need the
correct connected switch port information.

self.raw_switches = copy.copy(get_switch(self, None))
self.raw_links = copy.copy(get_link(self, None))
self.raw_hosts = copy.copy(get_host(self, None))

self.logger.info(" \t" + "Current Links:")
        for l in self.raw_links:
            print(" \t\t" + str(l))

self.logger.info(" \t" + "Current Hosts:")
        for h in self.raw_hosts:
            print(" \t\t PortHw:" + str(h.port.hw_addr) + " Port Dpid:" +
str(h.port.dpid) + " Port Name:" + str(h.port.name) + " Host Mac:" +
str(h.mac))

The output is like this

          PortHw:72:6f:15:ea:f5:33Port Dpid:3 Port Name:s3-eth1 Host
Mac:00:00:00:00:00:03
          PortHw:7e:ca:7c:3a:59:38Port Dpid:4 Port Name:s4-eth1 Host
Mac:00:00:00:00:00:02
          PortHw:7e:ca:7c:3a:59:38Port Dpid:4 Port Name:s4-eth1 Host
Mac:00:00:00:00:00:01
          PortHw:72:6f:15:ea:f5:33Port Dpid:3 Port Name:s3-eth1 Host
Mac:00:00:00:00:00:04

As you can see the connected port is always "eth1" independent from which
switch port is connected.

And from the get_link method, the link information are never collected.

Where am i wrong, can you help me?

Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/mininet-discuss/attachments/20180508/aeaed146/attachment.html>


More information about the mininet-discuss mailing list