For BSDRP you need:
All hardware supported by FreeBSD 10.1 are supported by BSDRP with the exception of following drivers:
Wireless, PCMCIA cards, SCSI adapters, USB printer, fire wire, etc. drivers were removed from the FreeBSD kernel.
The BSDRP images use this filename convention:
The value image type can be:
The value arch can be:
The value console can be:
The *.mtree.xz files are used for system integrity check.
Here are the 2 steps for writing the image to a CF/USB removable media:
Connect your Compact Flash or USB disk and write down the device name (can be 'sd4' for an usb key under Linux or 'da0' under FreeBSD as exemple).
Then unzip the file and byte copy it to your drive (Warning: Double check that you had choosen the good destination disk!!!):
xzcat BSDRP_full_amd64_vga.1.0.img.xz | dd of=/dev/sd4 bs=256k
You can boot from this media now.
Insert the USB key, and run mount in a terminal (or disk utility if you prefer graphical method) to see what device OSX has assigned to your USB key. You should see something like this:
/dev/disk0s2 on / (hfs, local, journaled) devfs on /dev (devfs, local) fdesc on /dev (fdesc, union) map -hosts on /net (autofs, automounted) map auto_home on /home (autofs, automounted) /dev/disk3s1 on /Volumes/UNTITLED (msdos, local, nodev, nosuid, noowners)
The last line is your USB device. Unmount it and write the BSDRP image to it with:
sudo umount -f /dev/disk3s1 xzcat BSDRP_full_amd64_vga.1.0.img.xz | dd of=/dev/disk3 bs=256k
If successful, OSX will pop up an error dialog telling you it doesn't recognize the disk. Click 'Eject', remove the USB key, and you're done.
Boot BSDRP from the previously generated usb key, then from BSDRP, display the BSDRP system diskname:
[root@router]~# glabel status | grep BSDRP ufs/BSDRPs3 N/A da1s3 ufs/BSDRPs4 N/A da1s4 ufs/BSDRPs1a N/A da1s1a
⇒ On this example BSDRP is on disk da1 (USB key)
Display all the system disks:
[root@router]# sysctl kern.disks kern.disks: da1 da0 ada0
⇒ On this example, because da1 is the BSDRP disk, ada0 is the hard-drive where we want install BSDRP.
Then copy the BSDRP disk to the hard-drive:
[root@router]# system install ada0 Copying 487MB from da1 to ada0... 487+0 records in 487+0 records out 510656512 bytes transferred in 30.351293 secs (16824868 bytes/sec)
Reboot your system (and don't forget to remove the USB key).
Once rebooted from your hard drive, you can expand the /data slice for using all the free space:
For using BSDRP as a Virtual Machine, refers to chapter How to run in the Technical docs.
Once BSDRP is started for the first time, don't forget to lower the default kern.HZ value that is not optimized for a VM usage by entering this command:
The FreeBSD (BSDRP) bootloader default configuration isn't compatible with the WRAP: You need to change the bootloader mode before to use it on a WRAP platform. From a FreeBSD host, once you had installed the image on your CF, change the bootloader mode (replace daX by your device):
boot0cfg -o nopacket /dev/daX
Login as root with no password.
If you are using the serial version, serial port parameters are: 115200,8,N,1,MODEM.
Start by using the help:
Create a password for root (mandatory for SSH):
Enter in quagga mode:
Do your quagga configuration, and save quagga config and exit quagga cli:
Then save all changes:
All modifications done in configuration files (/etc/*, /usr/local/etc/*) need to be saved before a reboot.
Use the config command for saving configuration:
[root@R1]~#config BSD Router Project configuration tool Usage: /usr/local/sbin/config option - diff : Show diff between current and saved config - save : Save current config - apply : Apply current config - rollback : Revert to previous config - put : Put the saved config to a remote server - get : Get config from remote server - reset : Return to default configuration - help (h) [option] : Display this help message. If [option] given, display more detail about the option
Directly download and send output to xzcat+upgrade:
fetch 'http://URL/BSDRP-upgrade.image.xz' -o - | xzcat | upgrade
Same than previously, but using SSH:
ssh my-user@my-ssh-server cat /path-to/BSDRP-upgrade.image.xz | xzcat | upgrade
This method required:
Step 1: Creating the ram disk
On BSDRP, enter theses commands for creating a RAM drive:
set RAMDRIVE=`mdconfig -a -t malloc -s 60m` newfs -m 0 -n $RAMDRIVE mount /dev/$RAMDRIVE /mnt/
Step 2: Transferring image file + sha256 in the temporary RAM drive
Using your SCP client, send the BSDRP upgrade image to the router's /mnt folder.
Or download them from BSDRP:
cd /mnt fetch URL/BSDRP-upgrade.image.xz fetch URL/BSDRP-upgrade.image.sha256
Step 3: After transfer complete, On BSDRP, enter this command:
sha256 -c `cat BSDRP-upgrade.image.sha256 | cut -d ' ' -f 4` BSDRP-upgrade.image.xz && echo "good" || echo "bad" xzcat /mnt/BSDRP-upgrade.image.xz | upgrade umount /mnt
This method required a SSH client (all Linux/Unix should include it).
From the client, enter this command:
cat BSDRP_1.2_upgrade_amd64_vga.img.xz | ssh email@example.com "xzcat | upgrade"
SSH access with the root user is not available by default: You need to set-up a password for the root account before with the passwd command.
[root@R1]~# passwd Changing local password for root New Password: XXXXXXXX Retype New Password: XXXXXXXX
Reference mtree file are provided for checking the integrity of all your files on your router.
You can check your BSDRP system integrity using these references files by downloading the corresponding file into your router and using “system integrity” command.
As example, if you are using 0.35 amd64-serial release, from your BSDRP router (if it had DNS resolution and Internet access configured):
cd /tmp fetch http://downloads.sourceforge.net/project/bsdrp/BSD_Router_Project/0.35/BSDRP_0.35_amd64_serial.mtree.xz system integrity BSDRP_0.35_amd64_serial.mtree.xz
If you are using the vga release of BSDRP, you can enable the serial access (COM1) with the command
Serial port baud rate need to be modified in 2 different files:
For modifying the /boot.config file you need to mount RW the /:
mount -uw /
Change the speeed value just after the “-S” option (don't remove the other -D or/and -h options!) in the /boot.config file.
Check that you didn't have legacy values (boot_serial, comconsole_speed, console) configured on your /boot/loader.conf.local: There are useless with the use of /boot.config.
Once done, mount RO /:
mount -ur /
Then edit etc/ttys and change the baud rate in line ttyu0 (if you need to change the first serial port).
If you need to change the default serial port to use for console (like Supermicro that use COM2 for sol):
root@bsdrp# grep uart /var/run/dmesg.boot uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 uart0: console (38400,n,8,1) uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0 root@bsdrp# mount -uw / root@bsdrp# echo 'comconsole_port="0x2f8"' >> /boot/loader.conf.local root@bsdrp# mount -ur /
If you need to configure the local IPMI board, you have to load the IPMI drivers.
Edit /etc/rc.conf and check that module “ipmi” is declared on the kld_list variable:
You can load it from the shell too:
Then you can use ipmitool for configuring it.
For connecting with IPMI to serial port with IPMI SOL (Serial over lAN) from a remote machine, change the baud-rate of the serial line to 115200 and to connect to it (example with default password for IBM x3550):
ipmitool -H 192.168.1.11 -U USERID -P PASSW0RD sol set non-volatile-bit-rate 115.2 ipmitool -H 192.168.1.11 -U USERID -P PASSW0RD sol set volatile-bit-rate 115.2 ipmitool -H 192.168.1.11 -U USERID -P PASSW0RD -I lanplus -a sol activate
Add to /etc/rc.conf:
# Load Intel ICH watchdog interrupt timer driver kld_list='ichwd' # Start watchdogd dameon watchdogd_enable="yes"
And start it:
kldload ichwd service watchdogd start
If you already load ipmi module, watchdogd can use IPMI in place of ichwd.
Edit /etc/snmpd.config according to your needs and start the daemon:
service bsnmpd start
Then you can check it locally (it uses public as default snmp community):
[root@BSDRP]~# bsnmpget sysDescr.0 sysDescr.0 = router.bsdrp.net 2059309898 FreeBSD 9.1-RELEASE-p1
For generating syslog message, just edit /etc/syslog.conf and check the example:
# uncomment this to enable logging to a remote loghost named loghost #*.* @loghost
Then restart syslogd:
service syslogd restart
BSDRP is a FreeBSD, then you need to read how to configure a FreeBSD for using it.
Here is a list of useful documentations:
The root filesystem is in read-only mode, then you can't modify or create your own script on it.
For modify the existing script (don't forget to send us your improvement), use the “data” partition. Here is an example for customizing the config script:
mount /data cp /usr/local/bin/config /data vi /data/config
Now you can add your great patches to config script. And test it:
Then, don't forget to umount the /data partition:
You can modify the full filesystem by re-mount the active slice in read-write mode:
mount -uw /
Now you can modify all files or removing/installing package.
Here is how to remove bird as example:
[root@router]~#pkg_info | grep bird bird-1.2.1 Dynamic IP routing daemon [root@router]~#pkg_delete bird-1.2.1
After your changes, re-mount it in read-only mode:
mount -ur /
Polling can be used in 2 cases:
For enabling polling mode:
Check the FreeBSD forwarding Performance page for more information.
BSDRP can use some special features on somes NIC:
And only theses devices support these modes:
|ae||Attansic/Atheros L2 FastEthernet controller driver||no||yes|
|age||Attansic/Atheros L1 Gigabit Ethernet driver||no||yes|
|alc||Atheros AR813x/AR815x Gigabit/Fast Ethernet driver||no||yes|
|ale||Atheros AR8121/AR8113/AR8114 Gigabit/Fast Ethernet driver||no||yes|
|bce||Broadcom NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet adapter driver||no||yes|
|bfe||Broadcom BCM4401 Ethernet Device Driver||no||yes|
|bge||Broadcom BCM570x/5714/5721/5722/5750/5751/5752/5789 PCI Gigabit Ethernet adapter driver||yes||yes|
|cas||Sun Cassini/Cassini+ and National Semiconductor DP83065 Saturn Gigabit Ethernet driver||no||yes|
|cxgbe||Chelsio T4 and T5 based 40Gb, 10Gb, and 1Gb Ethernet adapter driver||no||yes|
|dc||DEC/Intel 21143 and clone 10/100 Ethernet driver||yes||yes|
|de||DEC DC21x4x Ethernet device driver||no||yes|
|ed||NE-2000 and WD-80×3 Ethernet driver||no||yes|
|em||Intel(R) PRO/1000 Gigabit Ethernet adapter driver||yes||yes|
|et||Agere ET1310 10/100/Gigabit Ethernet driver||no||yes|
|ep||Ethernet driver for 3Com Etherlink III (3c5x9) interfaces||no||yes|
|fxp||Intel EtherExpress PRO/100 Ethernet device driver||yes||yes|
|gem||ERI/GEM/GMAC Ethernet device driver||no||yes|
|hme||Sun Microelectronics STP2002-STQ Ethernet interfaces device driver||no||yes|
|igb||Intel(R) PRO/1000 PCI Express Gigabit Ethernet adapter driver||yes||needs IGB_LEGACY_TX|
|ixgb(e)||Intel(R) 10Gb Ethernet driver||yes||yes|
|jme||JMicron Gigabit/Fast Ethernet driver||no||yes|
|le||AMD Am7900 LANCE and Am79C9xx ILACC/PCnet Ethernet interface driver||no||yes|
|msk||Marvell/SysKonnect Yukon II Gigabit Ethernet adapter driver||no||yes|
|mxge||Myricom Myri10GE 10 Gigabit Ethernet adapter driver||no||yes|
|my||Myson Technology Ethernet PCI driver||no||yes|
|nfe||NVIDIA nForce MCP Ethernet driver||yes||yes|
|nge||National Semiconductor PCI Gigabit Ethernet adapter driver||yes||no|
|nve||NVIDIA nForce MCP Networking Adapter device driver||no||yes|
|qlxgb||QLogic 10 Gigabit Ethernet & CNA Adapter Driver||no||yes|
|re||RealTek 8139C+/8169/816xS/811xS/8101E PCI/PCIe Ethernet adapter driver||yes||yes|
|rl||RealTek 8129/8139 Fast Ethernet device driver||yes||yes|
|sf||Adaptec AIC‐6915 “Starfire” PCI Fast Ethernet adapter driver||yes||yes|
|sge||Silicon Integrated Systems SiS190/191 Fast/Gigabit Ethernet driver||no||yes|
|sis||SiS 900, SiS 7016 and NS DP83815/DP83816 Fast Ethernet device driver||yes||yes|
|sk||SysKonnect SK-984x and SK-982x PCI Gigabit Ethernet adapter driver||yes||yes|
|ste||Sundance Technologies ST201 Fast Ethernet device driver||no||yes|
|stge||Sundance/Tamarack TC9021 Gigabit Ethernet adapter driver||yes||yes|
|ti||Alteon Networks Tigon I and Tigon II Gigabit Ethernet driver||no||yes|
|txp||3Com 3XP Typhoon/Sidewinder (3CR990) Ethernet interface||no||yes|
|vge||VIA Networking Technologies VT6122 PCI Gigabit Ethernet adapter driver||yes||yes|
|vr||VIA Technologies Rhine I/II/III Ethernet device driver||yes||yes|
|xl||3Com Etherlink XL and Fast Etherlink XL Ethernet device driver||yes||yes|
Using others NIC will works too