Thank you.
So according to the manual it should be possible to have network with host and guest (host -only network). So I assume that this network can be bridged to one of the guest's network.
I am trying to do that bridging host only network to guest's Green (LAN) interface and add green0 interface for the bridge with address 192.168.2.1.
So far with no success
.
In the testing environment I have one machine on guest's LAN (Green0) and one machine host ubuntu (on eth3 host only network).
So I expect to see two rows in the 'Current dynamic LAN leases' list starting with: 192.168.2.XX
I set host only network 192.168.4.1 in virtualbox (without DHCP, Promissuous Mode: Deny) and prepared starting script for set the bridge on guest side:
Code: Select all
#!/bin/sh
. /etc/sysconfig/rc
. ${rc_functions}
case "${1}" in
start)
boot_mesg "Create bridge for green net..."
# down green0
ip link set green0 down
# rename green0 to eth1
ip link set green0 name eth1
# create new bridge green0
brctl addbr green0
# wait 2 seconds because udev try to rename the nics
# if the real green nic was added to fast...
sleep 2
# Add real green nic and the unused ones
brctl addif green0 eth1
brctl addif green0 eth3
# Bring nic's up; set static ip for eth3
ip link set eth1 up
ifconfig eth3 192.168.4.10 netmask 255.255.255.0 up
;;
stop)
boot_mesg "Remove bridge for green net......"
# Bring nic's down
ip link set eth1 down
#ip link set eth2 down
ip link set eth3 down
# Bring bridge down
ip link set green0 down
# Delete Bridge
brctl delbr green0
# rename eth1 to green0
ip link set eth1 name green0
;;
*)
echo "Usage: ${0} {start|stop}"
exit 1
;;
esac
# End $rc_base/init.d/bridge
eth3 interface is VM interface. I would like to connect VM host to IPFire's Green.
After a bridge set I have following net interfaces on guest side:
Code: Select all
[root@ipfire ~]# ifconfig -a
blue0 Link encap:Ethernet HWaddr 08:00:27:46:16:66
inet addr:192.168.3.1 Bcast:192.168.3.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:152 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9120 (8.9 Kb) TX bytes:0 (0.0 b)
eth1 Link encap:Ethernet HWaddr 08:00:27:0E:E5:4C
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22589 errors:0 dropped:0 overruns:0 frame:0
TX packets:24896 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2867668 (2.7 Mb) TX bytes:20516405 (19.5 Mb)
eth3 Link encap:Ethernet HWaddr 08:00:27:31:95:0E
inet addr:192.168.4.10 Bcast:192.168.4.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:295 errors:0 dropped:0 overruns:0 frame:0
TX packets:5648 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:21838 (21.3 Kb) TX bytes:364449 (355.9 Kb)
green0 Link encap:Ethernet HWaddr 08:00:27:0E:E5:4C
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22734 errors:0 dropped:0 overruns:0 frame:0
TX packets:19224 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2561668 (2.4 Mb) TX bytes:17695930 (16.8 Mb)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:456 errors:0 dropped:0 overruns:0 frame:0
TX packets:456 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:110939 (108.3 Kb) TX bytes:110939 (108.3 Kb)
red0 Link encap:Ethernet HWaddr 08:00:27:C2:52:B3
inet addr:192.168.0.29 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MTU:1500 Metric:1
RX packets:14512 errors:0 dropped:0 overruns:0 frame:0
TX packets:15535 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:16379670 (15.6 Mb) TX bytes:1239112 (1.1 Mb)
[root@ipfire ~]#
The bridge seems to works OK:
Code: Select all
[root@ipfire ~]# brctl show
bridge name bridge id STP enabled interfaces
green0 8000.0800270ee54c no eth1
eth3
I see a mac address of virtualbox host '0a:00:27:00:00:00' from eth3 which I want to bridge to GREEN:
Code: Select all
[root@ipfire ~]# brctl showmacs green0
port no mac addr is local? ageing timer
1 08:00:27:0e:e5:4c yes 0.00
2 08:00:27:31:95:0e yes 0.00
2 0a:00:27:00:00:00 no 103.76
1 6c:62:6d:2c:fc:9f no 0.00
[root@ipfire ~]#
However on the Current dynamic leases list I see only one row from eth1/green0:
192.168.2.10 6c:62:6d:2c:fc:9f
and no virtualbox host (with mac: 0a:00:27:00:00:00).
Command 'arp' on guest side gives me:
Code: Select all
[root@ipfire ~]# arp
Address HWtype HWaddress Flags Mask Iface
gateway ether 40:61:86:4a:c2:d6 C red0
192.168.4.1 (incomplete) eth3
home.localdomain ether 6c:62:6d:2c:fc:9f C green0
As you can see above 192.168.4.1 (mac: 0a:00:27:00:00:00) - virtualbox host has a status 'incomplete'.
How could i diagnose and fix this?
I will be grateful for any guidance.
TIA