I was looking for a nice, light weighting, full functional router which can be integrated into my ESXi VMs. I already have ASA, Checkpoint, Juniper Router, vyatta, monowall, pfsense installed. Also on my Windows 2008 Hyper-v server, I got my gns3 network up with cisco stuff in it. Occationly, there is a router needed between ESXi VMs to emulate a WAN connection. I would like to get a really light weighting router between VMs.
BSDRP is the best one so far I found. With a 64M memory allocated, it can run in VM without any problem to support main routing protocols.
From its official web page, "BSD Router Project (BSDRP) is a open source router distribution based on FreeBSD, supporting all majors routing protocols (RIP, OSPF, BGP, PIM, etc..) that fit on a 256Mb Compact Flash/USB."
The original manual is demonstrating how to do installation on Qemu or virtual box which not fit my esx settings. After one or two hours reading and searching, finally it is up and running well . Here is a list of simple steps to show how.
1. Download BSDRP image from http://bsdrp.net/downloads , ex. BSDRP_1.0_full_i386_serial.img.xz
2. Decompress the BSDRP image file with 7-Zip to get BSDRP_1.0_full_i386_serial.img. It will be converted to vmdk file for hooking up into Vmware environment.
3. Download qemu-img file from Qemu-0.15.1-windows-Medium.zip
unzip Qemu-0.15.1-windows-Medium.zip file and move qemu-img.exe into same folder as BSDRP_1.0_full_i386_serial.img
Type following command to do converting from RAW file to VMDK file.
qemu-img convert -f raw -O vmdk BSDRP_1.0_full_i386_serial.img BSDRP_1.0_full_i386_serial.vmdk
4. Create a vm in VMWARE and add BSDRP_1.0_full_i386_serial.vmdk as disk. Here is vm setting example: 64M memory, 2 network adapter, 1 serial port using named pipe.
5. Login into local port 2000 according to your named pipe settings:
6. Username is root, no password needed.
----------------------------------------------------------------------------------------
login: root
Jan 5 21:55:48 router login: ROOT LOGIN (root) ON ttyu0
BSD Router project (BSDRP) (c) 2009-2011, The BSDRP Development Team
All rights reserved.
BSDRP is under the Simplified BSD license.
Documentation: http://bsdrp.net
Discover BSDRP tools with "help" command
root has logged on ttyu0 from local.
[root@router]~#
------------------------------------------------------------------------------------------
7. Type cli command to enter into command line which is similiar as Juniper Junos.
--------------------------------------------------------------------------
[root@router]~# cli
Hello, this is Quagga (version 0.99.20).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
router.bsdrp.net#
---------------------------------------------------------------------------
8. Other more detailed configuration example please check following two links:
http://bsdrp.net/documentation/examples/simple_bgp-rip-ospf_lab
router2.bsdrp.net# conf t
router2.bsdrp.net(config)# interface em0
router2.bsdrp.net(config-if)# ip address 192.168.12.2/24
router2.bsdrp.net(config-if)# ipv6 address 2001:db8:12::2/64
router2.bsdrp.net(config)# interface lo1
router2.bsdrp.net(config-if)# ip address 192.168.20.2/24
router2.bsdrp.net(config-if)# ipv6 address 2001:db8:20::2/64
router2.bsdrp.net(config-if)# exit
router2.bsdrp.net# conf t
router2.bsdrp.net(config)# interface em0
router2.bsdrp.net(config-if)# ip address 192.168.12.2/24
router2.bsdrp.net(config-if)# ipv6 address 2001:db8:12::2/64
router2.bsdrp.net(config)# interface lo1
router2.bsdrp.net(config-if)# ip address 192.168.20.2/24
router2.bsdrp.net(config-if)# ipv6 address 2001:db8:20::2/64
router2.bsdrp.net(config-if)# exit
router2.bsdrp.net(config)# router ospf
router2.bsdrp.net(config-router)# router-id 2.2.2.2
router2.bsdrp.net(config-router)# network 192.168.12.0/24 area 0
router2.bsdrp.net(config-router)# network 192.168.20.0/24 area 0
router2.bsdrp.net(config-router)# exit
router2.bsdrp.net(config)# router ospf6
router2.bsdrp.net(config-ospf6)# router-id 2.2.2.2
router2.bsdrp.net(config-ospf6)# interface em0 area 0.0.0.0
router2.bsdrp.net(config-ospf6)# interface lo1 area 0.0.0.0
router.bsdrp.net(config-if)# exit
router.bsdrp.net(config)# exit
router.bsdrp.net# wr
Building Configuration...
Configuration saved to /usr/local/etc/quagga/zebra.conf
Configuration saved to /usr/local/etc/quagga/ripd.conf
Configuration saved to /usr/local/etc/quagga/ripngd.conf
Configuration saved to /usr/local/etc/quagga/ospfd.conf
Configuration saved to /usr/local/etc/quagga/ospf6d.conf
Configuration saved to /usr/local/etc/quagga/bgpd.conf
Configuration saved to /usr/local/etc/quagga/isisd.conf
[OK]
router.bsdrp.net# sh run
Building configuration...
Current configuration:
!
!
debug ospf6 lsa unknown
!
interface le0
ip address 11.11.11.12/24
ipv6 nd suppress-ra
!
interface le1
ipv6 nd suppress-ra
!
interface lo0
!
router rip
!
ip forwarding
ipv6 forwarding
!
line vty
!
end
Great stuff, thank you heaps for posting it. Especially grateful for the part about creating a working VMware image.
ReplyDelete