EXOS VM

  • 0
  • 1
  • Question
  • Updated 4 years ago
Can someone please take a look at these adapters and tell me what I am doing wrong in Virtualbox? 
I have named the switches SW2 and SW3. I want to be able to ping them and also connect them to gns3.


For SW2:
Adapter 1: PCnet-fast III (host-only adapter, virtual host-only ethernet adapter)
Adapter 2 PCnet-fast III (Internal network, 'BB_link1')
Adapter 3: PCnet-fast III (Internal network, 'port2_2')
Adapter 4: PCnet-fast III (Internal network, 'intnet')

For SW3:
Adapter 1: PCnet-fast III (host-only adapter, 'virtualbox-host-only ethernet adapter)
Adapter 2: PCnet-fast III (internal network, 'BB_link1')
Adapter 3: PCnet-fast III (internal network, 'port2_2')
Adapter 4: PCnet-fast III (internal network 'port2_3')

The ip address of SW2 is 10.0.0.2 and S/M 255.255.255.0

What ip address should I give to SW3? I tried entering a different address but it defaults to the one for SW2. 
 
My main goal will be creating 2 vlans and see if I can use gns3 to connect other devices.

Can someone please help? I am sure someone must have worked with VB and gns3 when practicing.

Thank you,
Ruthie
Photo of Ruthie

Ruthie

  • 408 Points 250 badge 2x thumb
  • excited

Posted 4 years ago

  • 0
  • 1
Photo of Stephane Grosjean

Stephane Grosjean

  • 762 Points 500 badge 2x thumb
you have 2 switches interconnected by 2 ports (1 & 2). With default config, each port is in the same vlan (default). You made a loop, unless you configured a LAG.

if you want to ping one each other, you need to set an IP on each VLAN on each side, in the same subnet. 10.0.0.3/24 on SW3 is fine.
Photo of Daniel Flouret

Daniel Flouret, Employee

  • 7,470 Points 5k badge 2x thumb
Hi Ruthie,

Login to SW2 and enter the following commands:

create vlan v0 tag 10
create vlan v1 tag 11
create vlan v2 tag 12
configure vlan default delete ports all
configure vlan v0 add ports 1
configure vlan v0 ipaddress 10.0.0.2/24
configure vlan v1 add ports 2
configure vlan v1 ipaddress 10.0.1.2/24
configure vlan v2 add ports 3
configure vlan v2 ipaddress 10.0.2.2/24
enable ipforwarding

These commands create three vlans (v0, v1 and v2), asigns 802.1Q tags, IP addresses and one port to each one, and enables routing between the vlans.


Login to SW3 and enter the following commands:

create vlan v0 tag 10
create vlan v1 tag 11
configure vlan default delete ports all
configure vlan v0 add ports 1
configure vlan v0 ipaddress 10.0.0.3/24
configure vlan v1 add ports 2-3
configure vlan v1 ipaddress 10.0.1.3/24
enable ipforwarding

These commands create two vlans (v0, v1 and v2), asigns 802.1Q tags, IP addresses and one port to v1 and two ports to v2, and enables routing between the vlans.

Notice the command to remove all ports from vlan default, a recommended best practice.

Regards, Daniel
Photo of Daniel Flouret

Daniel Flouret, Employee

  • 7,470 Points 5k badge 2x thumb
If you want to connect a VM to the "outer world", just select one of the adapters (adapters 2 to 4, because adapter 1 is assigned to the mgmt port) and configure it as "Bridged Adapter" and select the physical port in your PC (if you have several, like in my case).



If your screen looks different, don't worry. I use a Mac and the layout in OSX is different from the Windows version.
Photo of Ruthie

Ruthie

  • 408 Points 250 badge 2x thumb
There is a default vlan 1 which it created and also the management vlan which has an ip address of 192.168.1.50. I guess this is normal.
Photo of Ruthie

Ruthie

  • 408 Points 250 badge 2x thumb
My major problem is when I click on file, preferences and then go to Network and I click on host-only networks, what ip address am I supposed to enter into the adapter tab? I ping from the pc after taking the steps you mentioned but I am still unable to ping because I have some steps wrong and I cannot figure it out. Please help. 
Photo of Ruthie

Ruthie

  • 408 Points 250 badge 2x thumb
I have the management ip address on it which is 192.168.1.50
Photo of Daniel Flouret

Daniel Flouret, Employee

  • 7,470 Points 5k badge 2x thumb
The address for host-only networks is handled in VirtualBox Preferences.

In OSX they are named vboxnet0, vboxnet1, etc. In Windows they have a slightly longer name (VirtualBox Host-Only Ethernet Adapter).

Go to VirtualBox Preferences.


Select the Networks tab and you will see the available host-only adapters.


Then edit the adapter (with the screwdriver icon) and enter the desired ip address.


You can also configure a DHCP server for it


Since these adapters are usually shared by several VMs, it's best to change the ip address of the VM (unconfigure mgmt ipaddress / configure mgmt ipaddress 192.168.56.10/24) than the ip of the host-adapter.

Remember that this arrangement will give you access to the mgmt port of the switch, but will not allow you to ping the "public" side of the switch (the front ports).

Yo may want to add another host-only adapter, with an address belonging to vlan v1 (10.0.1.1/24, for example) and assign it to port 3 (adapter 4) of SW3.


Photo of Ruthie

Ruthie

  • 408 Points 250 badge 2x thumb
Thank you so much Daniel. I will have to try it and see if this works. I will like to know if the adapters are okay though. Once I configure the switches, I will let you know if I can ping the other and I should be able to run the command show edp port all, right?
Photo of Daniel Flouret

Daniel Flouret, Employee

  • 7,470 Points 5k badge 2x thumb
It will work in VirtualBox (not sure about gns3, never got to play with that).

I do a lot of labs with these VMs, specially to emulate a customer's network when they want to implement some change in the architecture and want to make sure there will be no "surprises".

Stick to the PCnet-Fast III adapters. The Intel ones remove the tags from the frames (they want to handle those themselves) so no trunk connections are possible with those adapters.

BTW, here's the OVA for the EXOS VM with the latest EXOS version (v15.5.2.9): https://www.dropbox.com/s/f4mkc2z3w106nfv/EXOS_VM-15.5.2.9.ova

Also, how's your spanish? Here's a quick installation guide for the VM, including how to configure 4 more adapters/ports through virtualBox CLI (vboxmanage): https://www.dropbox.com/s/ijksz8odg5w3xn0/Instalaci%C3%B3n%20EXOS-VM.pdf

Sorry, never got to translate it to english. Plenty of screenshots though...
Photo of Ruthie

Ruthie

  • 408 Points 250 badge 2x thumb
Thank you Daniel, I have created the vlans and using the "show vlan" commands been able to verify they are created. How do I make them route now. I believe the ipforwarding should be able to make them route to the different vlans. Should I be able to ping from one of the vlans to the other? 
Photo of Daniel Flouret

Daniel Flouret, Employee

  • 7,470 Points 5k badge 2x thumb
enable ipforwarding enables routing in all existing vlans.
enable ipforwarding <vlan_name> enables routing on the vlan indicated in the command.
After that, a ping to any of the ip addresses assigned to vlans should succeed, given the vlan has at least a single port active.
If you want to remove that restriction and make the interface always active (interface = vlan with an ip address), use the command
enable loopback-mode <vlan_name>
then the vlan will respond to pings even if no port is active.
Photo of Ruthie

Ruthie

  • 408 Points 250 badge 2x thumb
I was able to ping from SW2 switch to all of the vlans in it but not ping SW3 at all. The loopback command made that possible but I still cannot route between the vlans. Is it possible to route between vlans with the EXOS?
Photo of Daniel Flouret

Daniel Flouret, Employee

  • 7,470 Points 5k badge 2x thumb
Can you please paste the configuration of each switch (show configuration) and the output of vboxmanage showvminfo <vm_name>, also for each switch?

To execute the vboxmanage command you'll probably have to go to C:\Program Files\Oracle\VirtualBox or add that directory to the path (enter PATH=C:\Program Files\Oracle\VirtualBox;%PATH% in cmd)
(Edited)