« December 2008 | Main | March 2009 »

February 2009 Archives

February 13, 2009

Usage of ports


In the discussions on IPv6 roll-out in various provider and end-user environments, there have been discussions and proposals on how to allow IPv4 only nodes (nodes that can not get an IPV6 address due to old software and hardware for example) to continue to work, while allowing the providers to migrate their core and access networks to IPV6.

In a discussion regarding some of these scenarios that where dependent on address sharing (where ports would need to be used for demuxing) at a meeting in the fall, we started discussing how many ports a client actually would need. This intrigued me a bit and so I wrote a small shell script that runs every 20 minutes on my laptop and from netstat pulls the number of ports in a particular status, and then plots these.

The first plot that I have been running since November the 16th looks like

portstats.gif

I am not sure what I had come to expect, but I was somewhat surprised at the high-numbers. Two things that might be worth observing is that from December the 18th to the end of January, I was more or less on vacation, so utilization was lower. But what is more interesting is that during this time I have not used any Bittorrent or other peer-to-peer client. So this is purely the usage on my Mac.

I am not sure what conclusions can be drawn, if any, but I thought it was a good data point. And the number of ESTABLISHED ports surprised me.

If you want to do the same experiment here is the shell script and the perl script for graphing. In my crontab I have

0,20,40 * * * * /Users/kurtis/src/shell/portstats.sh 11 0 * * * /Users/kurtis/src/perl/plotports.pl

Please share any data you have!

About February 2009

This page contains all entries posted to Kurtis's Blog in February 2009. They are listed from oldest to newest.

December 2008 is the previous archive.

March 2009 is the next archive.

Many more can be found on the main index page or by looking through the archives.