0

I am running Ubuntu 18.04.3 Server on VirtualBox (host - Windows 10) with bridged adapter (to connect VM and my host). Host connected to switch by Ethernet. I have this yaml in /etc/netplan:

network:
  version: 2
  renderer: networkd

  ethernets:
    enp0s3:
      dhcp4: yes
      dhcp6: no

  bridges:
    br0:
      interfaces: [enp0s3]
      addresses: [192.168.36.254/24]
      gateway4: 192.168.36.1
      nameservers:
        addresses: [8.8.8.8]
      parameters:
        stp: true
      dhcp4: no
      dhcp6: no

After editing i am running:

netplan generate
netplan apply

I can see that br0 is getting address 192.168.36.254 (from ifconfig). But i can't ping this VM from host neither host from this vm.

What i want to do is create GNS3 server on this VM and make Cisco devices get addresses available from whole network.

DenisNovac
  • 115
  • 4

1 Answers1

0

The bridged element is useful when the linux box is the host of virtual machines, when it comes to VM, you should configure its interface (enp0s3 in this case) with the address, gateway, etc. of the external network.

Anyway, it is a common practice (e.g. chef-kitchen) to configure multiple interfaces in the VM: one interface as NAT in order to allow an easy access to internet and others as bridged or host only networks. Bridged if you want the box to be accessible from other computers in the local network (including the host machine) and host only if you want communication between the VM, the host and possibly other VMs inside the same virtual environment.

J.M. Robles
  • 865
  • 6
  • 9
  • Actually yes. There is no sense in making bridge INSIDE the VM when we can do this in VirtualBox manager. I think, it'll work with any hypervisor. I made four bridged adapters in VirtualBox manager, made three of them promiscuous. Inside GNS3 i made cloud with one of three interfaces. Then i started dhcp client on this cloud connection inside cisco IOS and then started this interface in Ubuntu Server. It works without ip address in Linux at all. Thank you. – DenisNovac Nov 12 '19 at 09:59