Discussion:
help with bridge-networking fedora20host, fedora19guest
lux-integ
2014-03-11 14:25:09 UTC
Permalink
Greetings,

I am new to this list and VirtualBox.

I have a setup with these.

--cpu amd64 3 cores, 8Gbytes RAM, single ethernet Interface
--Host OS; Feroda20 (linux-3.11.something), VirtualBox-4.3.8
--Guest (for virtualBox) Fedora19

I am attempting to enable bidge-networking. The host sees the adapter as p5p1
-by using the ifconfig command.


When I start the VM and do ifconfig I see a device called p2p1 ( not p5p1 as
with the host ) and with a different mac-address from the host.
There is no ipv4 address but an ipv6 multicast address begining with fe80::.
If I set an ipv4 ipaddress manually (by ifconfig p2p1 someIPv4adress up );
I ( unexpectedly ) cannot ping between the host and the VM.

I do not know if I need to have an ipv4-enabled-dhcp server on the host
before I start the VM ( or whatever ) to get bridge-based (ipv4) networking
organised on fedora20 host and fedora19 guest in VirtualBox.


Advice would be appreciated

sincerely
LuxIneg
Allan
2014-03-11 22:18:56 UTC
Permalink
Post by lux-integ
Greetings,
I am new to this list and VirtualBox.
I have a setup with these.
--cpu amd64 3 cores, 8Gbytes RAM, single ethernet Interface
--Host OS; Feroda20 (linux-3.11.something), VirtualBox-4.3.8
--Guest (for virtualBox) Fedora19
I am attempting to enable bidge-networking. The host sees the adapter as p5p1
-by using the ifconfig command.
When I start the VM and do ifconfig I see a device called p2p1 ( not p5p1 as
with the host ) and with a different mac-address from the host.
First of all - what you see in guest, and see in host are completely different things,
and have nothing to do with each other. Running a guest is like having another
computer. The names are not shared in any way.

What you do, when you connect a guest as bridged - is connect directly to
the lan cable of the host nic. As such, it uses its own MAC address, and has to
use its own IPv4 adress too. The IPv4 adress can be setup in the guest the usual
ways - either DHCP or fixed - but will never be same as host. Remember - the guest
is a 'different computer'.
Post by lux-integ
There is no ipv4 address but an ipv6 multicast address begining with fe80::.
If I set an ipv4 ipaddress manually (by ifconfig p2p1 someIPv4adress up );
I ( unexpectedly ) cannot ping between the host and the VM.
You need to make sure IP adress is within netmask of the host, or instead setup
a route to the host. Think of the guest as another computer plugged into same
switch as the host.
Post by lux-integ
I do not know if I need to have an ipv4-enabled-dhcp server on the host
before I start the VM ( or whatever ) to get bridge-based (ipv4) networking
organised on fedora20 host and fedora19 guest in VirtualBox.
It is up to you, you want these '2 computers' to work. Setting it up with a fixed
IP/netmask and a default route - is one way, setting up the host with a dhcp server
and a guest with dhcp client will give same result.

Again bridged mode is like a virtual switch between the guest and the whole network;
are you sure that is what you want ?
--
Allan.

It is better to close your mouth, and look like a fool,
than to open it, and remove all doubt.
Freek de Kruijf
2014-03-11 23:24:18 UTC
Permalink
Post by lux-integ
Greetings,
I am new to this list and VirtualBox.
I have a setup with these.
--cpu amd64 3 cores, 8Gbytes RAM, single ethernet Interface
--Host OS; Feroda20 (linux-3.11.something), VirtualBox-4.3.8
--Guest (for virtualBox) Fedora19
I am attempting to enable bidge-networking. The host sees the adapter as
p5p1 -by using the ifconfig command.
When I start the VM and do ifconfig I see a device called p2p1 ( not p5p1
as with the host ) and with a different mac-address from the host.
There is no ipv4 address but an ipv6 multicast address begining with
fe80::. If I set an ipv4 ipaddress manually (by ifconfig p2p1
someIPv4adress up ); I ( unexpectedly ) cannot ping between the host
and the VM.
I do not know if I need to have an ipv4-enabled-dhcp server on the host
before I start the VM ( or whatever ) to get bridge-based (ipv4)
networking organised on fedora20 host and fedora19 guest in VirtualBox.
When using bridge-networking it looks as if your interface has two MAC-
addresses, one used in the host and one used in the guest. Your Ethernet
interface is enabled to take all packages (promiscuous mode) and the filtering
for the right MAC address is done in the host. The MAC address used for the
guest is more or less randomly chosen when initializing the guest. You can
change the address when (re)configuring the guest in the host.

The name of the interface is chosen based on the hardware position of the
interface. In the guest it is based on the virtual hardware position, so it is
quite possible to have another name than the interface in the host.

The IP address of your host is apparently a fixed address, so you do not use a
DHCP server in your network. In case you do not have a DHCP server in your
network, apparently you do not have one, you have to configure the same type
of parameters in your guest as in your host. Logically you have two separate
systems in your hardware, which need both the same type of configuration. So
you need to configure, without a DHCP server, the IP address, the netmask, the
default gateway and the DNS address(es) in both the guest as in the host.
Obviously the IP addresses of the host and the guest must be different, but
part of the same subnetwork.
--
fr.gr.

Freek de Kruijf
lux-integ
2014-03-12 19:33:50 UTC
Permalink
Post by Freek de Kruijf
The IP address of your host is apparently a fixed address, so you do not
use a DHCP server in your network. In case you do not have a DHCP server
in your network, apparently you do not have one, you have to configure the
same type of parameters in your guest as in your host. Logically you have
two separate systems in your hardware, which need both the same type of
configuration. So you need to configure, without a DHCP server, the IP
address, the netmask, the default gateway and the DNS address(es) in both
the guest as in the host. Obviously the IP addresses of the host and the
guest must be different, but part of the same subnetwork.
I have done everything manually ( I am used to using /sbin/ifconfig and
/sbin/route but I still cant ping between host and VM.. I did not set dns-
servers (in /etc/resolv.conf for the guest but I reasoned that should not
matter to test network connection ( Am I correct in this assumption ? )

Cant ping.... could this be a firewall problem on the fedora machines?
Loading...