How can I diagnose an unmanaged Ethernet switch and make sure it functions correctly?
To perform the initial diagnosis, you will need 2 computers connected to the switch. For testing, we will use the network utilities Ping (included in the operating systems Windows, Linux, MacOS, etc.) and iPerf3 (additional installation will be required).
We will use the following connection scheme:
[PC-A] ------------- [Unmanaged Switch] ------------- [PC-B]
IP: 192.168.1.1 IP: 192.168.1.2
1. To test the connection, launch ping from one computer to another.
Ping is a utility for testing connections on TCP / IP based networks.
In the command line of the PC-B computer, run:
If the switch is working properly, then during the test should be 0% loss of network packets and the time of reception and transmission of the packet in milliseconds (ms) should be less than 1 ms .
2. If you want to test the bandwidth of an unmanaged switch, you can perform a test using the special utility iPerf3 .
iPerf3 free software available for various operating systems: Windows, Linux, MacOS, Android, etc.
This is a cross-platform client-server console program - TCP, UDP and SCTP traffic generator for testing network bandwidth.
The official website of the program: http://software.es.net/iperf/
We will use the same topology, which is presented at the beginning of this article.
In the command line PC-A, execute:
iperf3 -s <key -s means that the computer will work as a server>
This command starts the server on the tcp / 5201 port by default. The server listens only to the tcp port, the choice of protocol (tcp / udp / sctp) is performed on the client side.
Go to the command line on PC-B and execute:
iperf3 -c 192.168.1.1 < -c key means that the computer will work as a client, and 192.168.1.1 - server IP address>
Testing takes place within 10 seconds. As a result of testing, you will see the bandwidth values of the active connection.
In our example, the testing used a five-port unmanaged ZyXEL ES-105A switch
to connect network devices at speeds up to 100 Mbps (Fast Ethernet). The capacity of our connection was ~ 94 Mbps (for the tcp protocol). For Gigabit Ethernet switches, bandwidth is ~ 940-950 Mbit / s (for TCP).
Attention! The throughput results will depend on a number of factors: which Ethernet cable is used (4 or 8-wire); what interface is used on the switch and devices involved in testing (Fast Ethernet - 100 Mbit / s or Gigabit Ethernet - 1 Gbit / s); the size of the MTU (Maximum Transmission Unit - the maximum size of the useful data block of one packet that can be transmitted by the protocol without fragmentation); on the size of the transmitted packets, on the protocol (tcp / udp / sctp), on the settings of the network adapter driver, etc.
The above bandwidth test option is quite sufficient for performing the initial diagnostics, however, the capabilities of the iPerf3 program are not limited to this. With the help of additional program options, you can set the test time, bandwidth, speed limits, determine the packet length and the amount of transmitted data, packet receive-receive direction, protocol and other parameters.
Question: Why are the obtained throughput values when testing less than the stated connection speed set by the standard?
Answer: As you know, for data transmission in Ethernet networks, the TCP / IP protocol stack is used, which includes four layers of the OSI network model: application (application), transport (transport), network (network) and channel (link). Top-level data is packaged in lower-layer OSI model packages. At the transport level, there are two main protocols: TCP and UDP.
TCP (Transfer Control Protocol) - transfer control protocol; TCP is used when guaranteed message delivery is required.
UDP (User Datagram Protocol) - user datagram protocol; UDP uses a simple transmission model, with no message delivery control, to ensure data reliability and integrity. Communication is achieved by transmitting information in one direction from the source to the recipient without checking the readiness or status of the recipient. Thus, UDP provides an unreliable service when datagrams may come out of order, be duplicated, or disappear altogether.
In an Ethernet network, data is transmitted in packets (frames). Network packets can contain up to 10% service information, but in a simple topology (without using vlan, 802.1p, additional options such as TCP timestamp, window scale) additional costs should not exceed 5-6%.
The maximum payload (TCP) of TCP over Ethernet is typically around 94-95%.
As for the test results that were obtained in our example. The maximum speed on the ports of the switch is 100 Mbps, and the resulting bandwidth is 94 Mbps; the difference is 6 Mbit / s, which is 6%. Thus, the results obtained correspond to normal values.
If the difference is more than 10%, then we can talk about some sub-optimal settings or errors in the work of network equipment or network configuration.
Dear customer, please be aware. Not all text may be translated accurately. If you are on the translated version, please review the original article here: Original Version