# FreeBSD in virtual box and nic alias



## fluca1978 (Jan 24, 2012)

Hi all,
I'm running a FreeBSD 8.2 release in a virtual box hosted in a Linux system (no harsh comments please!). From the Linux box I've got:


```
$ ifconfig vboxnet0
vboxnet0  Link encap:Ethernet  HWaddr 0a:00:27:00:00:00  
          inet addr:192.168.200.1  Bcast:192.168.200.255  Mask:255.255.255.0
          inet6 addr: fe80::800:27ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1


$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.200.0   0.0.0.0         255.255.255.0   U     0      0        0 vboxnet0
```

and from the guest FreeBSD I've got:


```
# ifconfig em1
em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 08:00:27:d8:de:c4
        inet 192.168.200.200 netmask 0xffffff00 broadcast 192.168.200.255
        inet 192.168.200.2 netmask 0xffffff00 broadcast 192.168.200.255
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active

# netstat -nr
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            10.0.2.2           UGS         1       21    em0
10.0.2.0/24        link#1             U           0        0    em0
10.0.2.15          link#1             UHS         0        0    lo0
127.0.0.1          link#3             UH          0        1    lo0
192.168.200.0/24   link#2             U           1      306    em1
192.168.200.2      link#2             UHS         0        0    lo0
192.168.200.200    link#2             UHS         0        1    lo0
```

what is strange is that from the Linux box I can SSH only into the em1 alias address, and not into the primary address. Such alias was used for a jail that is now disabled in rc.conf, so it should not be anything related to that. Am I missing something here?


----------



## fluca1978 (Jan 24, 2012)

Apparently it is a problem of Virtual Box, since if after a couple of virtual box restart the network seems to work on both NICs. I've noted that between virtualbox restart the primary address does not respond and sometimes it responds. Not sure if it can depend on something related to the guest OS or the host OS or only the virtual box program. I'm upgrading virtual box to the latest release and I will report if the problem is fixed.


----------

