# VirtualBox and bridged nic?



## xiaoj (Sep 18, 2009)

I have read the link http://wiki.freebsd.org/VirtualBox about [tap interface networking]. I follow the instruction like this:

```
% VBoxManage modifyvm WinXP --nic1 bridged --bridgeadapter1 tap0
% su - 
# kldload if_tap if_bridge
# sysctl net.link.tap.user_open=1
# chown root:vboxusers /dev/tap0
# chmod 660 /dev/tap0
# ifconfig bridge0 create
# ifconfig bridge0 addm nfe0
# ifconfig tap0 192.168.1.111 netmask 255.255.255.0
# ifconfig bridge0 addm tap0


%ifconfig -a
nfe0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 02:aa:c7:8f:13:00
        inet 192.168.1.101 netmask 0xffffff00 broadcast 192.168.1.255
        inet 192.168.1.201 netmask 0xffffffff broadcast 192.168.1.201
        inet 192.168.1.202 netmask 0xffffffff broadcast 192.168.1.202
        inet 192.168.1.203 netmask 0xffffffff broadcast 192.168.1.203
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active

plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 
        inet6 ::1 prefixlen 128 
        inet 127.0.0.1 netmask 0xff000000 

tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:bd:88:b5:37:00
        inet 192.168.1.111 netmask 0xffffff00 broadcast 192.168.1.255

bridge0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether be:09:0a:c9:7a:85
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
        root id 00:00:00:00:00:00 priority 0 ifcost 0 port 0
        member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 4 priority 128 path cost 2000000
        member: nfe0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 1 priority 128 path cost 200000


%ls -lh tap0
crw-rw----  1 root  vboxusers    0, 110  9 18 08:13 tap0

# kldstat
Id Refs Address    Size     Name
 1   18 0xc0400000 9f89ec   kernel
 2    1 0xc0df9000 1ae38    snd_hda.ko
 3    2 0xc0e14000 4a64c    sound.ko
 4    1 0xc0e5f000 2ba54    vboxdrv.ko
 5    1 0xc0e8b000 6a45c    acpi.ko
 6    1 0xc44e1000 7000     linprocfs.ko
 7    1 0xc44e8000 22000    linux.ko
 8    1 0xc4e54000 5000     if_tap.ko
 9    1 0xc4e59000 9000     if_bridge.ko
10    1 0xc4e62000 6000     bridgestp.ko
```

then I start VirtualBox window, in mathine network setup, when I select "Bridged Adapter", in name box 3 nic names, nfe0, tap0 and bridge0 appears. I don't know which one I should select to realize the bridged NIC functionality.

I try to select each one of them one by one, but all failed, no matter which one of them i selected, the virtual mathine started failed with the massage "Failed to open/create the internal network 'HostInterfaceNetworking-tap0(nfe0, bridge0)'(VERR_SUPDRV_COMPONENT_NOT_FOUND)." and "Unknown error creating VM (VERR_SUPDRV_COMPONENT_NOT_FOUND)."

It seams this feature are implemented, how to config the bridge NIC?
Thinks.


----------



## xiaoj (Sep 18, 2009)

Reference to http://lists.freebsd.org/pipermail/freebsd-emulation/2009-September/006746.html

It has been done. the bridge network works great. I think I made a mistake. It need not be so complicated. All I need to do is load the vboxnetflt.ko kernel module and select nfe0. 

Thanks very much to all who have helped bring VirtualBox to FreeBSD!

BTW what is vboxnetadp.ko?


----------



## DutchDaemon (Oct 19, 2009)

http://forums.freebsd.org/showpost.php?p=45664&postcount=5


----------



## DaveQB (Nov 25, 2013)

That link doesn't work.

This does though.

viewtopic.php?p=45664


----------



## DutchDaemon (Feb 2, 2016)

Thanks, that link was from our old forum software back in 2009.


----------

