I'm not sure how many of you have heard about this project, however I found FreeBSD ringmap implementation when I was googling and it seems to be interesting to me, I suggest you visit the link and read up the documentation/presentation.
I'm going to try it out whenever possible, right now it is ported to FreeBSD 8.1 stable, you can actually download the source code and test it out yourself.
http://code.google.com/p/ringmap/
You can also find a lot of information about high performance packet capture from the link below as well, I usually use the setting that is recommended over there for my FreeBSD sensor setup.
http://www.net.t-labs.tu-berlin.de/research/hppc/
By the way, FreeBSD already has zero copy bpf implemented, thanks to Robert Watson for that since he has done a lot of background works on it. To know more about zero copy bpf you can check the presentation slide here -
http://www.watson.org/~robert/freebsd/2007asiabsdcon/20070309-devsummit-zerocopybpf.pdf
Cheers (;])
Showing posts with label FBSD. Show all posts
Showing posts with label FBSD. Show all posts
Friday, December 24, 2010
FreeBSD: Virtual Network Switch
In the previous post, I have mentioned about I'm going to cover Open vSwitch and Vde implementation. However I think it is also interesting to cover how you can setup virtual switch with FreeBSD native system. As we all know bridging is actually software switching, therefore we can make use of bridge interface to achieve this. I will explain the 6 ports virtual network switch setup that is illustrated in the diagram below -

shell>ifconfig bridge0 create
shell>ifconfig tap0 create
shell>ifconfig tap1 create
shell>ifconfig tap2 create
shell>ifconfig tap3 create
shell>ifconfig tap4 create
shell>ifconfig tap5 create
shell>ifconfig bridge0 addm tap0 addm tap1 addm tap3 addm tap4 addm tap5 up
By now you have exact setup like what is shown in the diagram above, to make it permanent/persistent you need to add the following lines to /etc/rc.conf -
cloned_interfaces="bridge0 tap0 tap1 tap2 tap3 tap4 tap5"
ifconfig_bridge0="addm tap0 addm tap1 addm tap2 addm tap3 addm tap4 addm tap5 up"
Also add the following lines to /etc/sysctl.conf -
net.link.tap.up_on_open=1
net.link.tap.user_open=1
Once you have everything done, you can check if it is setup properly -
shell>ifconfig bridge0
bridge0: flags=8843 metric 0 mtu 1500
ether 0e:a5:28:73:f9:3b
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 32768 ifcost 0 port 0
member: tap5 flags=143
ifmaxaddr 0 port 9 priority 128 path cost 2000000
member: tap4 flags=143
ifmaxaddr 0 port 8 priority 128 path cost 2000000
member: tap3 flags=143
ifmaxaddr 0 port 7 priority 128 path cost 2000000
member: tap2 flags=143
ifmaxaddr 0 port 6 priority 128 path cost 2000000
member: tap1 flags=143
ifmaxaddr 0 port 5 priority 128 path cost 2000000
member: tap0 flags=143
ifmaxaddr 0 port 4 priority 128 path cost 2000000
To undo everything, just run
shell>ifconfig bridge0 deletem tap0 deletem tap1 deletem tap2 deletem tap3 deletem tap4 deletem tap5
shell>ifconfig tap0 destroy
shell>ifconfig tap1 destroy
shell>ifconfig tap2 destroy
shell>ifconfig tap3 destroy
shell>ifconfig tap4 destroy
shell>ifconfig tap5 destroy
The setup is complete, in the next blog post, I will talk about how you can setup similar virtual switch using FreeBSD ng_bridge implementation. Plus releasing the FreeBSD VM for you to try out the setup yourself.
Enjoy (;])

shell>ifconfig bridge0 create
shell>ifconfig tap0 create
shell>ifconfig tap1 create
shell>ifconfig tap2 create
shell>ifconfig tap3 create
shell>ifconfig tap4 create
shell>ifconfig tap5 create
shell>ifconfig bridge0 addm tap0 addm tap1 addm tap3 addm tap4 addm tap5 up
By now you have exact setup like what is shown in the diagram above, to make it permanent/persistent you need to add the following lines to /etc/rc.conf -
cloned_interfaces="bridge0 tap0 tap1 tap2 tap3 tap4 tap5"
ifconfig_bridge0="addm tap0 addm tap1 addm tap2 addm tap3 addm tap4 addm tap5 up"
Also add the following lines to /etc/sysctl.conf -
net.link.tap.up_on_open=1
net.link.tap.user_open=1
Once you have everything done, you can check if it is setup properly -
shell>ifconfig bridge0
bridge0: flags=8843
ether 0e:a5:28:73:f9:3b
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 32768 ifcost 0 port 0
member: tap5 flags=143
ifmaxaddr 0 port 9 priority 128 path cost 2000000
member: tap4 flags=143
ifmaxaddr 0 port 8 priority 128 path cost 2000000
member: tap3 flags=143
ifmaxaddr 0 port 7 priority 128 path cost 2000000
member: tap2 flags=143
ifmaxaddr 0 port 6 priority 128 path cost 2000000
member: tap1 flags=143
ifmaxaddr 0 port 5 priority 128 path cost 2000000
member: tap0 flags=143
ifmaxaddr 0 port 4 priority 128 path cost 2000000
To undo everything, just run
shell>ifconfig bridge0 deletem tap0 deletem tap1 deletem tap2 deletem tap3 deletem tap4 deletem tap5
shell>ifconfig tap0 destroy
shell>ifconfig tap1 destroy
shell>ifconfig tap2 destroy
shell>ifconfig tap3 destroy
shell>ifconfig tap4 destroy
shell>ifconfig tap5 destroy
The setup is complete, in the next blog post, I will talk about how you can setup similar virtual switch using FreeBSD ng_bridge implementation. Plus releasing the FreeBSD VM for you to try out the setup yourself.
Enjoy (;])
Sunday, December 14, 2008
FreeBSD ZFS
I have been listening people talking about ZFS, and it is ported to FreeBSD, I don't play with it until today.
It does seem that FreeBSD is getting solarish, ZFS, Dtrace and what else. Anyway here's simple screenshot of mine with ZFS setup -
It does seem that FreeBSD is getting solarish, ZFS, Dtrace and what else. Anyway here's simple screenshot of mine with ZFS setup -

I may spend more time playing with it, if you are interested in ZFS on FreeBSD, you should check out -
http://wiki.freebsd.org/ZFS
By the way, FreeBSD 7.1 RC1 is out, grab it while it's hot!
http://wiki.freebsd.org/ZFS
By the way, FreeBSD 7.1 RC1 is out, grab it while it's hot!
Cheers ;]
Subscribe to:
Posts (Atom)