SCIENTIFIC-LINUX-USERS Archives

April 2016

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Wed, 6 Apr 2016 10:34:37 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (93 lines)
On Wed, Apr 6, 2016 at 7:19 AM, Yasha Karant <[log in to unmask]> wrote:
>
> I have now resolved the cause of the lack of NAT Internet connection
> on a Virtual Box MS Win 7 guest.  After I installed SL 7.2 on my
> wife's new laptop, I restored (via a cp from an external USB hard
> drive that held all of the files that were not SL installed, including
> all of the Virtual Box guest files) the Virtual Box guest files from
> her previous laptop to the new machine.  I installed the Virtual Box
> EL7 RPM, configured VirtualBox to recognize the restored guest files,
> and the NAT network functioned over the 802.11 WNIC controlled by SL 7
> Network Manager -- everything worked (indeed, any statements that NAT
> would not work with 802.11 in "new" kernels were indeed red herrings).

Not at all. I even posted the kernel code where bridging's disabled for wifi.

VirtualBox doesn't use the Linux kernel's bridging.

This is from the VirtualBox documentation:

Bridging to a wireless interface is done differently from bridging to
a wired interface, because most wireless adapters do not support
promiscuous mode. All traffic has to use the MAC address of the host's
wireless adapter, and therefore VirtualBox needs to replace the source
MAC address in the Ethernet header of an outgoing packet to make sure
the reply will be sent to the host interface. When VirtualBox sees an
incoming packet with a destination IP address that belongs to one of
the virtual machine adapters it replaces the destination MAC address
in the Ethernet header with the VM adapter's MAC address and passes it
on. VirtualBox examines ARP and DHCP packets in order to learn the IP
addresses of virtual machines.

And this is from a laptop with a running VirtualBox VM. There's no
Linux bridge on the host (or a tun/tap interface either):

th@localhost:~$ VBoxManage list runningvms
"lubuntu" {65a3e709-e368-4717-8cd2-41e8751449ce}

th@localhost:~$ VBoxManage showvminfo lubuntu | grep "NIC 1"
NIC 1:           MAC: 080027A018CE, Attachment: Bridged Interface
'wlp18s0', Cable connected: on, Trace: off (file: none), Type:
82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy:
deny, Bandwidth group: none

th@localhost:~$ VBoxManage list bridgedifs
Name:            wlp18s0
GUID:            31706c77-7338-4030-8000-c0cb380f865a
DHCP:            Disabled
IPAddress:       192.168.1.223
NetworkMask:     255.255.255.0
IPV6Address:     2a02:1205:c6a3:b7d0:c2cb:38ff:fe0f:865a
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: c0:cb:38:0f:86:5a
MediumType:      Ethernet
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-wlp18s0

th@localhost:~$ sudo ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
3: wlp18s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
pfifo_fast state UP mode DORMANT group default qlen 1000
    link/ether c0:cb:38:0f:86:5a brd ff:ff:ff:ff:ff:ff

th@localhost:~$ sudo bridge l

th@localhost:~$ sudo ip -4 a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
3: wlp18s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
pfifo_fast state UP group default qlen 1000
    inet 192.168.1.223/24 brd 192.168.1.255 scope global wlp18s0
       valid_lft forever preferred_lft forever

th@localhost:~$ ssh 192.168.1.224

th@yasha:~$ sudo ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP mode DEFAULT group default qlen 1000
    link/ether 08:00:27:a0:18:ce brd ff:ff:ff:ff:ff:ff

So "lubuntu" is running with an interface bridged using VirtualBox's
internal bridging and accessible from the host.

You were pointed at various ways to do this with Linux and KVM but
you'd have had to install and configure extra software to do so and it
never seemed to interest you.

ATOM RSS1 RSS2