Hi Alexey,
I have now corrected the MAC address with standard values. The Script for VM1
is shown below. A similar script for VM2 is created with hosts h3 (IP:
10.0.2.1) and h4 (IP: 10.0.2.2).class Approach2Topo(Topo):
def __init__(self, cpu=.1, max_queue_size=None, **params):
# Initialize topo
Topo.__init__(self, **params)
# Hosts and switches
s1 = self.addSwitch('s1')
h1 = self.addHost('h1')
h2 = self.addHost('h2')
# Wire h1 and h2 to s1
self.addLink(h1, s1)
self.addLink(h2, s1)
def setup():
topo = Approach2Topo()
# We use Open vSwitch and OpenFlow 1.3
switch = partial(OVSSwitch, protocols='OpenFlow13', datapath='user')
#controller
net = Mininet(topo, controller=RemoteController,
switch=switch, cleanup=True)
# Setting up hosts
net['h1'].setIP('10.0.1.1/24')
net['h1'].setMAC('00:00:00:00:00:01')
net['h1'].cmd('route add default gw 10.0.1.100')
net['h2'].setIP('10.0.1.2/24')
net['h2'].setMAC('00:00:00:00:00:02')
net['h2'].cmd('route add default gw 10.0.1.100')
# Setting up routers
net['s1'].setIP('10.0.1.100/24')
net['s1'].cmd('ifconfig s1-eth3 hw ether 00:00:00:00:00:03')
net.start()
CLI(net)
net.stopHow can we establish a connection from host h1 in VM1 to h3 in
VM2?. Is this possible?.
ThanksHadem
On Monday, 10 September, 2018, 6:28:08 PM IST, Alexey Eromenko
<[email protected]> wrote:
uhh ohh? are you setting a non standard MAC address? why?Anyway there’s so
called promiscuous mode, and you need to enable in VirtualBox to allow this.By
default, Virtualbox blocks all unknown MAC addresses.
so your hosts are not hosts at all, they are rather second level guests g^2.
(VM in VM)
Vbox VM settings, network, promiscuous mode = allow all.
On Mon, 10 Sep 2018 at 14:51 Pynbiang Hadem <[email protected]> wrote:
Hi Alexey,
I'm running a script as below on each VMs to create the virtual topologies.from
mininet.topo import Topo
from mininet.net import Mininet
from mininet.log import setLogLevel
from mininet.cli import CLI
from mininet.node import RemoteController
from functools import partial
from mininet.node import OVSSwitch
class Approach2Topo(Topo):
def __init__(self, cpu=.1, max_queue_size=None, **params):
# Initialize topo
Topo.__init__(self, **params)
# Hosts and switches
s1 = self.addSwitch('s1')
h1 = self.addHost('h1')
h2 = self.addHost('h2')
# Wire h1 and h2 to s1
self.addLink(h1, s1)
self.addLink(h2, s1)
def setup():
topo = Approach2Topo()
# We use Open vSwitch and OpenFlow 1.3
switch = partial(OVSSwitch, protocols='OpenFlow13', datapath='user')
#controller
net = Mininet(topo, controller=RemoteController,
switch=switch, cleanup=True)
# Setting up hosts
net['h1'].setIP('10.0.1.1/24')
net['h1'].setMAC('00:00:00:00:01:01')
net['h1'].cmd('route add default gw 10.0.1.100')
net['h2'].setIP('10.0.1.2/24')
net['h2'].setMAC('00:00:00:00:01:02')
net['h2'].cmd('route add default gw 10.0.1.100')
# Setting up routers
net['s1'].cmd('ifconfig s1-eth3 hw ether 00:00:00:11:11:11')
net.start()
CLI(net)
net.stopThanksHadem
On Monday, 10 September, 2018, 5:12:32 PM IST, Alexey Eromenko
<[email protected]> wrote:
what are h1,2,3,4? those are hosts or guests (VMs)? What are r1,r2?You have
two VMs on separate hosts? (1 guest on each host?)
Bridging guests on hosts Etherenet port will work, if the hosts are connected.
-Technologov
On Mon, 10 Sep 2018 at 14:37 Pynbiang Hadem via VBox-users-community
<[email protected]> wrote:
Hi Oliver,
I have the following scenario/network environment on the same physical system.
VM1: VM2:h1 ------------r1
r2-------------h3 | |
h2 h4
I want to ping h3 from h1. The above virtual topologies are created using
custom Mininet/Python scripts. I have also set up internal interfaces on both
the VMs.However ping is not working from h1 to h3.Pls advice how to get the
ping/connectivity working.
ThanksHadem On Monday, 10 September, 2018, 11:51:51 AM IST, Olivier
<[email protected]> wrote:
> Pls let me know how can i ping a virtual host in one VM from another virtual
> host in another VM.
> The virual hosts and switches are created by a python script using Mininet.
If both your VM are created on the same physical system, there should
not be any reason that prevent it.
If the VM are created on different physical systems, it depends how your
network is configured: bridged, yes, NATed, no.
Best regards,
Olivier
_______________________________________________
VBox-users-community mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vbox-users-community
_______________________________________________
Unsubscribe:
mailto:[email protected]?subject=unsubscribe
--
-Alexey Eromenko "Technologov"
--
-Alexey Eromenko "Technologov" _______________________________________________
VBox-users-community mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vbox-users-community
_______________________________________________
Unsubscribe:
mailto:[email protected]?subject=unsubscribe