1. First of all MAC addresses have a lot of reserved numbers, so take care https://www.iana.org/assignments/ethernet-numbers/ethernet-numbers.xhtml
I suggest you to copy first 6 hex numbers from Virtualbox generated MAC addresses and only setup last numbers. Can’t your program generate proper MAC addresses? (because if you by mistake use a wrong Broadcast-reserved MAC address, things will not work). 2.a. Yes, just connect all your VMs either to bridge mode to Ethernet adapter. (Promiscuous mode = allow all) VM - Settings - Mode = Bridge, Promiscuous mode = allow all. 2.b. or you can try internal network (a.k.a vSwitch) (called “intnet”) - mode = Internal network. 2.c. Disable firewall inside VMs (Windows Firewall or Linux iptables) other notes: Your vRouters may also need a default gateway or a routing protocol running to connect to each other. Or they are in Layer2 switchmode? If in L2 mode, then default gateway on hosts h1,2 (guests^2, really) is not required. best wishes, On Thu, 13 Sep 2018 at 8:41 Pynbiang Hadem <pynbiang.ha...@yahoo.com> wrote: > 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.stop > > How can we establish a connection from host h1 in VM1 to h3 in VM2?. Is > this possible?. > > Thanks > Hadem > > On Monday, 10 September, 2018, 6:28:08 PM IST, Alexey Eromenko < > al4...@gmail.com> 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 <pynbiang.ha...@yahoo.com> > 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.stop > > Thanks > Hadem > > On Monday, 10 September, 2018, 5:12:32 PM IST, Alexey Eromenko < > al4...@gmail.com> 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 < > vbox-users-community@lists.sourceforge.net> 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. > > Thanks > Hadem > On Monday, 10 September, 2018, 11:51:51 AM IST, Olivier < > olivier.nic...@cs.ait.ac.th> 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 > VBox-users-community@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/vbox-users-community > _______________________________________________ > Unsubscribe: mailto:vbox-users-community-requ...@lists.sourceforge.net > ?subject=unsubscribe > > -- > -Alexey Eromenko "Technologov" > > -- > -Alexey Eromenko "Technologov" > -- -Alexey Eromenko "Technologov"
_______________________________________________ VBox-users-community mailing list VBox-users-community@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vbox-users-community _______________________________________________ Unsubscribe: mailto:vbox-users-community-requ...@lists.sourceforge.net?subject=unsubscribe