Bridged Network dont work

Discussions related to using VirtualBox on Linux hosts.
Post Reply
HansAlbers
Posts: 2
Joined: 22. Aug 2016, 15:23

Bridged Network dont work

Post by HansAlbers »

Hello,

I try to setup a Ubuntu 16 Server as VirtualBox guest on a Ubuntu 16 Server as host.
Both machines are headless, so i got cli access only.

I configured the guest with following command:

Code: Select all

VBoxManage modifyvm "Web-Server" --nic1 bridged --bridgeadapter1 enp2s0
/etc/network/interface of host:

Code: Select all

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp2s0
iface enp2s0 inet static
        address 192.168.1.199
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.1
        dns-nameserver 192.168.1.1

ifconfig of the host system:

Code: Select all

enp2s0    Link encap:Ethernet  HWaddr 30:5a:3a:76:82:f4
          inet addr:192.168.1.199  Bcast:192.168.1.1  Mask:255.255.255.0
          inet6 addr: fe80::325a:3aff:fe76:82f4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8205 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6659 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:998110 (998.1 KB)  TX bytes:1294357 (1.2 MB)
          Memory:dc100000-dc17ffff

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:160 errors:0 dropped:0 overruns:0 frame:0
          TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:11840 (11.8 KB)  TX bytes:11840 (11.8 KB)
/etc/network/interfaces of guest:

Code: Select all

 auto lo
iface lo inet loopback

auto enp0s3
iface enp0s3 inet static
    address 192.168.1.201
    network 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
    dns-nameserver 192.168.1.1
ifconfig of guest:

Code: Select all

enp0s3    Link encap:Ethernet HWaddr 08:00:27:1f:c8:49
              inet addr:192.168.1.201   Bcast:192.168.1.255    mask:255.255.255.0
              UP BROADCAST MULTICAST   MTU:1500    Metric:1
etc... I have to type the guest codes because i cant c&p in remote desktop.

Code: Select all

VBoxManage showvminfo Web-Server--details
shows:

Code: Select all

NIC 1:           MAC: 0800271FC849, Attachment: Bridged Interface 'enp2s0', Cable connected: off, Trace: off (file: none), Type: Am79C973, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
I cant get any connection from guest to other machines or from others to the guest.

Where is my error?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Bridged Network dont work

Post by Perryg »

Code: Select all

Cable connected: off
You need to enable the port ( on ) to be able to use it.
HansAlbers
Posts: 2
Joined: 22. Aug 2016, 15:23

Re: Bridged Network dont work

Post by HansAlbers »

Worked! Thx a lot!

Code: Select all

VBoxManage modifyvm "Web-Server" --nic1 bridged --bridgeadapter1 enp2s0  --cableconnected1 on
Post Reply