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] Mininet Ping Command Modification

Johanes Lim johanes.lim8 at gmail.com
Fri Jul 8 17:02:36 PDT 2016


Dear all,

currently I'm developing multi-tenant app, where hosts on different tenant
can have same IP address, I want to modify how the pingall command works in
mininet, I already added some changes in ~/mininet/mininet/net.py, which
check the ip address of the hosts rather than only name when do the ping,
but when I run mininet, there's no changes shown even it didn't print the
words I'm added, am I modifying the right file?

    def ping( self, hosts=None, timeout=1000 ):
        """Ping between all specified hosts.
           hosts: list of hosts
           timeout: time to wait for a response, as string
           returns: ploss packet loss percentage"""
        # should we check if running?
        packets = 0
        lost = 0
        ploss = None
        if not hosts:
            hosts = self.hosts
            output( '*** Ping: testing ping reachability TEST\n' )
        for node in hosts:
            output( '%s -> ' % node.name )
            for dest in hosts:
                print "Source IP: ",node.IP()
                print "DIP      : ",dest.IP()
                if node.IP() != dest.IP():
                    print "****CONTINUE***"
      ......

Thanks & Best Regards,
Johanes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/mininet-discuss/attachments/20160709/79e8b488/attachment-0001.html>


More information about the mininet-discuss mailing list