Wednesday, December 29, 2010

Using FreeNAS 8.0 as a Bridge

I have installed and tested this on FreeNAS 8.0 Beta

My FreeNAS server and one workstation are in the same room and I needed a way to connect them to the LAN to allow for fast file transfers between all computers in my network.

Since I lacked a switch, I needed to convert FreeNAS into a bridging device. It was just a matter of installing a spare NIC into the FreeNAS server and doing the following:

Make my CF card readable (you might skip this step if you installed FreeNAS on a mechanical Hard drive).

mount -t ufs -w /dev/ufs/FreeNASs1a /

Insert a FreeBSD 8.0 disk into your cd-rom drive and copy the files as shown:

mkdir /mnt/cdrom
Mount cdrom: mount -t cd9660 /dev/acd0 /mnt/cdrom/

Copy files across:

cp /mnt/cdrom/boot/kernel/if_bridge.ko /boot/kernel/
cp /mnt/cdrom/boot/kernel/bridgestp.ko /boot/kernel/

ee /boot/loader.conf

Add the following line:


Save and exit

Restart the server with "reboot"

Create the bridge and add interfaces:

ifconfig bridge create
ifconfig bridge addm em0 addm em1
ifconfig em0 up
ifconfig em1 ip

dhclient bridge0 (or ifconfig bridge0 inet 192.168.xx.xx netmask

The name of your interfaces might vary. Check with ifconfig.

Note: You can start the bridge automatically at startup. Refer to the FreeBSD Handbook Chapter 31.5 to see how its done.

P.S. You may do this on FreeNAS 7.x as well. You just need to get FreeBSD 7.x's bridge modules for that kernel. They can obtained from or from a FreeBSD 7.x iso image.

Friday, December 24, 2010

Merry Christmas and Happy New Year

Greetings All,
I would like to seize this opportunity to wish you all a most Merry Christmas and very Happy New Year. 
I pray that the New Year brings you bleesed joy, prosperity and success.
Have a wonderful celebration...
With much festive spirit,