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] How ping from h1(virtual host) to real host on LAN

Gregory Gee gee.developer at gmail.com
Tue Dec 31 12:45:08 PST 2013


   You pretty much have it.  You just need to have h1 do the DHCP 
request. The main par of the script should something like the following.

     info( '*** Add switches\n')
     s1 = net.addSwitch('s1')
     info( '*** Add eh1 to s1\n')
     Intf( 'eth1', node=s1 )

     info( '*** Add host\n')
     h1 = net.addHost('h1', ip='0.0.0.0')

     info( '*** Add links\n')
     net.addLink(h1, s1)

     info( '*** Starting network\n')
     net.start()
     info( '*** h1 get IP from DHCP server\n')
     h1.cmdPrint('dhclient '+h1.defaultIntf().name)
     CLI(net)
     net.stop()


Greg


On 31/12/2013 9:07 AM, Suresh wrote:
> Hi Bob,
>  Wish you happy new year..
> I need to handle two case which is following
> Case:1 How to ping real host to virtual host
> I have created topology like s1-h1;
> and I want to ping from h1(Virtual host h1) to real host or vice versa.
> I have create oracle VM is on my windows pc machine(10.222.41.37) 
> and mininet connected to using bridge network.
> I have added eh0,eh1  two interface, eth0 has got ip address form real 
> DHCP server on LAN which is 10.222.41.53
> also enable another network adapter i.e eth1 which has no any IP.
> mininet at mininet-vm:~/mininet/examples$ 
> <mailto:mininet at mininet-vm:%7E/mininet/examples$> ifconfig -a
> eth0      Link encap:Ethernet  HWaddr 08:00:27:23:98:a0
>           inet addr:10.222.41.53  Bcast:10.222.43.255 Mask:255.255.252.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:7537 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:7317 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:799580 (799.5 KB)  TX bytes:799234 (799.2 KB)
> eth1      Link encap:Ethernet  HWaddr 08:00:27:2b:b7:a7
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
>
> PC on LAN (10.222.41.1)
> |
> eth1 (VM's interface, bridged to LAN via VMware bridge (VMnet0))
> |
> s1 (OVS in Mininet VM)
> |
> h1 (Mininet host, 0.0.0.0 I don't know how take IP address from real 
> DHCP server on LAN)
> I need two-way ping.
> Case : I need create topology like PC1(real Host) --S1(virtual switch 
> on mininet )---h1(virtual host).
> I gone trough the following link but did not help me much.
> http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=FAQ;hb=HEAD
> can your help regarding this use sample snipe short.
> and also looked hwintf.py and nat.py
> P.S I am floodlight controller which running with forwarding enable mode.
> mininet version 2.1.0
> which has sudo ovs-vsctl -V
> ovs-vsctl (Open vSwitch) 1.9.0 version
>
> Thanks in advance
> ~Suresh
>
>
> _______________________________________________
> 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/20131231/c21765e5/attachment.html>


More information about the mininet-discuss mailing list