Friday, March 26, 2010

XenServer Install: The network speed

After installing I was confused if the network was actually 1GBit or not. My switch says 1Gbit, eth-tool says gigabit (from console: ethtool eth0), mii-tool says 100Mbit and the funniest of all; the NIC Speed LED shows orange and claims 100Mbit. To be sure I had to do some testing.

So I installed netcat on the XenServer to test. found the netcat software here: Downloaded the i386.rpm version (did not find a 64-bit version). PS! you can use wget from the xenserver console, so you do not have to scp the file over after downloading.
Install the rpm:
rpm -i

XenServer protects itself with firewall on all non-used ports, so to test netcat, you have to open the firewall. I added these two lines (since I am not sure if it is udp or tcp):

-A RH-Firewall-1-INPUT -p udp -m udp --dport 31233 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 31233 -j ACCEPT

I added the lines, right after this line: -A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
you need to do a :
service iptables restart
to reload the firewall settings

then I could fire up a netcat like this:
nc -v -v -l -n -p 31233 >/dev/null
Then from my laptop (with cabled network ofcourse):
time yes|nc -v -v -n 31233 >/dev/null
(be sure to change the IP to your servers IP address)
Let it run for 10 secs and press CTRL+c
Then on the XenServer you can see how much data was transferred. If it ran for 10seconds, it must be well over 100MByte. (Mine was 420MByte)

After this is done you can close down the firewall changes, if you like.
Conclusion for me was that the speed is >100Mbit, so the ethernet card is in 1Gbit as I want it to be.

No comments:

Post a Comment