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] Python script get hang when using h1.cmd('dhclient '+h1.defaultIntf().name) API

Suresh skjaiswal79 at hotmail.com
Thu Dec 26 06:15:43 PST 2013


Hi All,
 
       I want to ping h1 virtual host to my physical host.
       and I have modified  hwintf.py file as following 

 
 28 if __name__ == '__main__':
 29     setLogLevel( 'info' )
 30
 31     # try to get hw intf from the command line; by default, use eth1
 32     intfName = sys.argv[ 1 ] if len( sys.argv ) > 1 else 'eth1'
 33     info( '*** Connecting to hw intf: %s' % intfName )
 34
 35     info( '*** Checking', intfName, '\n' )
 36     checkIntf( intfName )
 37
 38     info( '*** Creating network\n' )
 39     #net = Mininet( topo=TreeTopo( depth=1, fanout=2 ) )
 40     net = Mininet()
 41     c1 = net.addController( 'c1', ip='10.222.41.37')
 42     #switch = net.switches[ 0 ]
 43     s1 = net.addSwitch('s1')
 44     h1= net.addHost('h1', ip='0.0.0.0')
 45     net.addLink( h1, s1 )
 46
 47     info( '*** Adding hardware interface', intfName, 'to switch',
 48           s1, '\n' )
 49     _intf = Intf( intfName, node=s1 )
 50
 51     info( '*** Note: you may need to reconfigure the interfaces for '
 52           'the Mininet hosts:\n', net.hosts, '\n' )
 53
 54     net.start()
 55     h1.cmd('dhclient '+h1.defaultIntf().name)
 56     CLI( net )
 57     net.stop()
                                        

 
 
When I ran this script using  sudo python hwintf.py
then this got hang for some time(5-8 minute) and after that I got my mininet prompt .
when I see detail using dump then I found h1 not getting any ip from DHCP.
 
mininet> dump
<Host h1: h1-eth0:0.0.0.0 pid=15110>
<OVSSwitch s1: lo:127.0.0.1,s1-eth1:None,eth1:None pid=15103>
<Controller c1: 10.222.41.37:6633 pid=15095>
 
 
P.S I have added eth1 interface without any IP.
My mininet VM(10.222.41.53) on running windows desktop machine which have ip address 10.222.41.37 in a same subnet.
Add my floodlight controller running on 10.222.41.37 windows machine in forwarding enable mode no need to add any flow 
by default for ping.
 
can any one help me regarding this what I am doing wrong here.
 
Thanks in advance.
 
Suresh

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/mininet-discuss/attachments/20131226/70207f31/attachment.html>


More information about the mininet-discuss mailing list