Throughput testing with iperf

Iperf is a nice utility to test links between switches, remote sites–anything that you have control of. It’s a Unix based utility that can be installed directly on a *nix OS or on Windows using Cygwin. It can give you an idea of the general speed, latency of the link or how many threads can be run at a time before the link gets over utilized.

I’ll cover how to install it using Cygwin since that’s how I use it most often. (Most *nix folks can easily install iperf with apt or yum).

1. Download and begin the installer for Cygwin. 

NOTE: You need two instances of iperf to do the test. Set up a host on one end of the link you want to test, and one on the other.

2. Once the installer starts there is an easy way to install iperf.

  • Click Next on the main screen
  • Click Install from Internet
  • Enter the root directory you’d like to use and user options.
  • Click Next
  • Enter your proxy settings
  • On the packages page type iperf in the search box and click the Skip button to install it
  • Cygwin will install with the core platform with iperf installed.

3. Once it’s installed open Cygwin on both ends.

4. On the receiving end (the end of the link you will most likely download from) enter the following.

$ iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------

You will see that the server listens on TCP port 5001 by default. If you have firewalls in between sites you can change this (check with iperf –help)

5. On the client end run your test. In my example I am testing to the endpoint for 30 seconds using 5 threads. It can be tweaked as needed (iperf –help)

$ iperf -c 10.255.252.68 -t 30 -P 5
------------------------------------------------------------
Client connecting to 10.255.252.68, TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------
[ 7] local 10.255.254.103 port 35488 connected with 10.255.252.68 port 5001
[ 6] local 10.255.254.103 port 35487 connected with 10.255.252.68 port 5001
[ 5] local 10.255.254.103 port 35486 connected with 10.255.252.68 port 5001
[ 4] local 10.255.254.103 port 35485 connected with 10.255.252.68 port 5001
[ 3] local 10.255.254.103 port 35484 connected with 10.255.252.68 port 5001
[ ID] Interval Transfer Bandwidth
[ 6] 0.0-30.1 sec 29.8 MBytes 8.30 Mbits/sec
[ 3] 0.0-30.1 sec 28.2 MBytes 7.88 Mbits/sec
[ 5] 0.0-30.1 sec 23.6 MBytes 6.58 Mbits/sec
[ 4] 0.0-30.2 sec 26.6 MBytes 7.39 Mbits/sec
[ 7] 0.0-30.5 sec 26.8 MBytes 7.35 Mbits/sec
[SUM] 0.0-30.5 sec 135 MBytes 37.1 Mbits/sec

You will see you get the speed per thread and the summarized speed. Use this as a generalization, not a definitive test of your link. It is a good way to test how much traffic you can pump through your links or to see if an ISP is giving you what you pay for…

Advertisements
Throughput testing with iperf

Change Clariion SP IP address – without SP Reboot!

Oh no, your network has updated and you have to change the IP address of your storage processors on your Clariion series array!!  I’ve done this on two separate CX SAN arrays without an issue. Follow these steps and you wont have a problem. This will work on a CX, CX3 and CX4 series storage array. 

First you need to download the Clariion CLI Software. In my scenario I am connecting to the SP’s on a Windows host. There are also downloads for *nix, HP-UX, Solaris, etc.

Download CLI Tools

If you dont have the CLI tools installed on a management box in your datacenter, now is the time to do it. If you have the CLI tools installed, you can skip this.

If you have an EMC SAN you should have access to Powerlink.

  • Download the Navisphere CLI Software for your respective OS.
  • Install on the machine that you will be connecting to the SP’s from.
  • Follow the default install steps.

Storage Domain Steps

Start by removing the storage system from a domain (if you dont know what this means or your SAN is in it’s own domain skip this step).

If the storage system to be reconfigured is the Master of a domain that contains other storage systems, assign a new master and remove the storage system to be reconfigured from its domain as follows:

  • Change the domain master:
    • Use Navisphere Manager to connect to one of the other arrays in the domain.
    • From the Navisphere Manager main menu, select File > Set Up Domain > Select Master. The Configure Domain dialog box appears.
    • In the Select Master window, highlight the new domain master and click OK

Note: If you are not logged into the new domain master, you may be asked to log into the array to be set as the domain master before the operation completes.

  • Remove the storage system from the domain:
    • Use Navisphere Manager to connect to one of the other arrays in the domain.
    • From the Navisphere Manager main menu, select File > Set Up Domain > Configure Domain. The Configure Domain dialog box appears.
    • In the Selected Systems field, highlight the storage system whose SP IP addresses you want to change, and click the arrow to send it to the Available Systems field.
    • Click Apply, and then click OK.
    • Exit Navisphere Manager.

If the storage system to be reconfigured is part of a domain that contains other storage systems, remove the storage system to be reconfigured from its domain as follows:

  • Use Navisphere Manager to connect to one of the other arrays in the domain.
    • From the Navisphere Manager main menu, select File > Set Up Domain > Configure Domain.  The Configure Domain dialog box appears.
    • In the Selected Systems field, highlight the storage system whose SP IP addresses you want to change, and click the arrow to send it to the Available Systems field.
    • Click Apply, and then click OK.
    • Exit Navisphere Manager.

Reset Security

Reset the security and domain information for SP A as follows:

  • Open a web browser and go to the setup page for SP A:

http://<Current_IP_Address_of_SP_A>/setup

    • Scroll to the bottom of the screen and click Destroy Security and Domain Information.
    • A warning screen will appear.  Select Yes and set click Submit to reset the security and domain information for SP A.
    • Wait for the management server to stop and then restart.
    • Go back to the setup page for SP A:

http://<Current_IP_Address_of_SP_A>/setup

    • Scroll down and click Restart Management Server.
    • A warning screen will appear.  Select Yes and click Submit to restart the management server.
    • Repeat the previous step to reset the security and domain information for SP B.

After the management server has been restarted on SP B, the array’s security and domain information will be in an un-initialized state, similar to the way it is shipped from the factory.

Change the IP

  • Open a command prompt
  • cd to the directory where the Navisphere naviseccli executable is installed (ie C:\Program Files\EMC\Navisphere CLI)
  • Run the following command based on your configuration (the x.x.x.x is your old SP IP address, the y.y.y.y is the new IP and gateway). If you are not changing gateways, then remove the -gateway y.y.y.y portion.
naviseccli -h x.x.x.x -user admin -password myPass -scope 0 networkadmin
 -set -address y.y.y.y -gateway y.y.y.y
  • You will get a prompt similar to this based on the commands:
Changing the IPv4 Address on SP A, Port 0, Virtual Port 0 from 192.168.1.60 to 192.168.10.60
Changing the IPv4 Gateway Address on SP A, Port 0, Virtual Port 0 from 192.168.1.1 to 192.168.10.1
This operation will cause a management server restart!
Do you wish to continue? (y/n) y
  • Hit “y” to commit the changes.
  • At this point you may have lost connectivity to your SP. One of two things will happen:
    • If it’s on the same segment, once the management server reboots you should be able to connect.
    • If it’s on a different network segment, you will probably have to change the VLAN assignment of the port. Instructions are below.

Change the VLAN

If you are switching VLAN’s, you will need to update the access port assignment that the SP plugs into. (The following is for Cisco devices).

  • Log into the switch
  • If you aren’t sure where the SP plugs into run these commands to find out.
  • Switch#conf t
  • Switch(config)#interface gi 2/10
  • Switch(config-if)#switchport access vlan 50

Troubleshooting

If your peer IP isnt updating, follow these steps:

  • Log into https://spa/setup
  • Scroll down and click Restart Management Server. No need to change the Peer IP in the GUI!

Finish up

  • Log into Unisphere with https://spa
  • Re-initialize global security by clicking Yes at the first prompt.

  • Add your old admin user credentials.

If you are using Unisphere you are done!! Document your changes and grab a coffee!!

Final steps if you are using Navisphere:

  • From the Navisphere Manager main menu, select File > Set Up Domain > Select Master. The Select Master dialog box appears.
  • Highlight the IP address of SP A and click OK.
Change Clariion SP IP address – without SP Reboot!

What port am I plugged in to?

Sometimes you don’t have access to physically trace (or the patience) to determine what physical switch port you are plugged in to. These steps can help you (applying to a Cisco switch). This is very useful for modular layer 3 switches as well as appliance switches.

NOTE: If your switch is a layer 2 switch and your management IP is on a different subnet than the host you are trying to figure out, you might not be able to do this. In this case the arp table is stored on the host and not the switch so you wont be able to use this method.

  1. Log into your switch/router. You don’t need privileged rights to do this.
  2. Ping the device (this isn’t mandatory if your host is in the ARP table, but I do it just in case)
Switch#ping 192.168.1.50

Sending 5, 100-byte ICMP Echos to 192.168.1.50, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

3. Find the mac-address of the host

Switch#sh arp | inc 192.168.1.50
Internet 192.168.1.50 2 0061.1624.ab69 ARPA Vlan50

4. Take the mac-address and compare to the arp-table

Switch#sh mac-address-table | inc 0061.1624.ab69
* 50 0061.1624.ab69 dynamic Yes 15 Gi2/5

Bam!! You’ve got the port!! In my example my server is on VLAN 50 and I’m plugged into module 2 port 5.

If you know the server will be staying in this port–do yourself a favor and update your documentation and switchport description!!

What port am I plugged in to?