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

Bob Lantz rlantz at cs.stanford.edu
Mon Jul 11 14:35:16 PDT 2016


I don't recommend doing what you're doing - modifying mininet proper is unnecessary and usually undesirable.

Better approaches would be simply subclassing Mininet, or adding a new CLI command in a custom.py file.

That being said, "make develop" creates symlinks from the source tree to the installed version.


> On Jul 8, 2016, at 5:02 PM, Johanes Lim <johanes.lim8 at gmail.com> wrote:
> 
> 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 <http://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.
> _______________________________________________
> mininet-discuss mailing list
> mininet-discuss at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/mininet-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/mininet-discuss/attachments/20160711/4e96d19f/attachment.html>


More information about the mininet-discuss mailing list