Measuring total bandwidth on a communication link

In this recipe, we will see how to measure the total bandwidth over a communication line. The first thing of course is to verify the communication line with the service provider. Check whether it is a symmetric or an asymmetric line, and if it is asymmetric, check what the bandwidth is in both directions.

Getting ready

There are two cases that you might need to test:

  • When you measure a communication line between two offices: in this case connect your laptop (or any PC on the network) to the LAN, and verify whether you have a server or another PC on the other side of the line
  • When you measure a communication line to the Internet, make sure you have a testing server on the Service Provider (SP) side or on the Internet Service Provider (ISP) side

How to do it...

To check the bandwidth on a communication line, follow these steps:

  1. Ask for the following details:
    1. Ask the SP what the line bandwidth is.
    2. If it is a line to the Internet, in addition to the preceding step ask the ISP what is the bandwidth to the Internet.
  2. Locate a server, a PC, or a laptop on the remote location.

    Tip

    When using a PC or laptop for the test, don't forget that the PC itself should be strong enough to generate the traffic. A standard Windows 7 is able to generate around 200 Mbps per TCP connection, and when opening several connections, you can get into other limitations such as disk performance and so on. Therefore, it is recommended to try the transfer first on a LAN, where there are no bandwidth limits (practically), and only then to test the SP or the ISP lines. If you are using FTP, use an efficient one (FileZilla, for example). The best way of course is to use test equipment, if it's available. Dedicated test equipments are available from many vendors such as VeEX, Fluke Networks, and IXIA.

    • In case you want to test the bandwidth between two sites, download and then upload a big file between nodes numbered as 1 and 2 or between nodes numbered as 1 and 3. A file big enough should load the line for a significant amount of time, that is, a minute or more. For example, if you want to test a 10 Mbps (Megabits per second) line, use a file of at least 10/8 = 1.25 MB (Megabytes).
    • In case you want to test your connection to the Internet, usually you can perform the test on your service provider (numbered as 1 to 4 in the following diagram), and then to your Internet service provider (numbered as 1 to 5 in the following diagram).

      Tip

      If possible, it is better to use the IP or UDP test, since when you copy a file, it is done over TCP, so you can get into TCP issues that influence the test. For this purpose, use Iperf or another testing tool that can generate IP or UDP traffic.

In the following illustration, you can see two local networks connected via a Service Provider (SP) line. The site on the left is connected to the Internet through a firewall. The connection to the Internet goes through the Service Provider (SP, Server 4) to the Internet Service Provider (ISP, Server 5).

How to do it...

Follow these steps to measure the bandwidth over the communication lines:

  1. Use Wireshark Statistics | IO Graphs for the test.

    Tip

    Don't forget that Wireshark has its own limitations when working with high bandwidth lines. In this case, you can configure it to use multiples files. Personally, I prefer to use other tools (Omnipeek, for example) when monitoring lines of 200-300 Mbps and higher.

  2. When testing your enterprise network, you can use software tools such as Iperf (http://sourceforge.net/projects/iperf/).

Following are the steps to measure network bandwidth with IPerf:

  1. Install Iperf on both ends of the connection.
  2. Configure one side as a client, and the other side as a server.
  3. Start the test and use I/O Graphs to verify that you have a stable bandwidth.

    Tip

    When downloading or uploading a file, do it with a single large file and not a directory of multiple files. When transferring many small-sized files, it will take time to open and transfer each one of them, so the test will not give good results.

When getting less bandwidth than expected, perform the following steps:

  1. When getting a value up to around 5% more or less than expected, it can be due to the reasons mentioned in the There's more... section in this recipe. Check the configurations and the technology that the line is running on (SDH/SONet, Carrier Ethernet, and so on)
  2. If you test the line with file copy, and in the IO graphs see sawtooth, there might be errors on the line. Check TCP retransmissions, and then check for errors in the switch/router port connected to the service provider.

    Tip

    To check switch or router port statistics, you can use console or telnet to connect to it and use the switch or router commands (for example, show interface commands in Cisco). You can also use SNMP management software or any MIB browser and browse the IfInErrors and InOutErrors objects.

  3. If you see a degradation of 80 to 90 percent of what you had expected (for example, you test a line of 100 Mbps and get 10 to 20 Mbps); in most of the cases, it is a duplex-mismatch problem. As shown in the How it works... section of this recipe.

    It isn't common, but it can also be that your service provider has a configuration problem. Check it with them. If none of the preceding cases are true, it can be that this is the reason.

How it works...

First, there are two different definitions; it is important to distinguish between:

  • Bandwidth: This is the total bits per second that can be transferred over a communications line
  • Throughput: This is the effective application bytes per second that is transferred between the two ends of a connection

To check the bandwidth of a communication line, you can ask the service provider for the line details, or you can simply transfer some traffic over it, use Wireshark or SNMP tool, and see what you get.

Most of the cases in which a duplex mismatch problem occurs is when you connect using Ethernet on one side with 100 Mbps full duplex, and the other side configured to auto-negotiate.

How it works...

As you see in the diagram, when you connect a device (a router in this example) to a switch, when both sides are manually configured, for example, to 100 Mbps Full Duplex (FDX), the intended configuration will take place (numbered 1 in the preceding diagram).

When you configure both sides to auto-negotiation (numbered 4 in the preceding diagram), it will also be fine, and will be automatically set to 1 Gbps (in the case of gigabit adapters).

In the case when one side is configured to 100 FDX and the other side to auto negotiate, the auto negotiate will be automatically set to 100 Mbps Half-Duplex (HDX). In this case, when one side is set to HD and the other to FD, many packets will be lost, and you will experience significant degradation in performance (numbered 2 and 3 in the preceding diagram).

There's more...

When we buy a line at a certain bandwidth, it can be that we'll get a little bit more or less of what we've bought. For example, when we buy 10 Mbps line, and the line runs over the Synchronous Digital Hierarchy (SDH) or Synchronous Optical Network (SONet) line; the 10 Mbps is made of 5 VC-12s, which is 5*2.176 Mbps, so the total bandwidth will be 10.88 Mbps.

On the other hand if, for example, we use site-to-site VPN over the Internet, and the line is 10 Mbps, even if we have a very good Internet connection (for example, when the two ends are connected to the same ISP), the encryption mechanisms of the VPN itself can take 5 to 10 percent of the line, and when measuring it, you will get somewhere between 9.0 to 9.5 Mbps. In this case, for example, when you transfer a file over the line, you will see that the line is loaded with 10 Mbps (that is, the bandwidth), while what is left for the file copy is usually between 9.0 to 9.5 Mbps (that is, the throughput).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.171.246