Network diagnostics for a dedicated server
If you encounter network problems, perform diagnostics. After diagnostics, you will be able to resolve some common issues on your own.
If the problem persists, create a ticket. In the ticket, describe the problem and attach the diagnostic results. The diagnostic method depends on the problem you have encountered.
Network issues and diagnostic methods
Perform a route trace
Perform a route trace if you encounter:
- low connection speed;
- high network latency;
- connection losses;
- packet loss during data transmission;
- server unavailability from a specific external network.
Traceroute must be performed in two directions—from the dedicated server to a point outside the Servercore infrastructure and back. For this, you will need an external server—any server with a public IP address and internet access that is located outside the Servercore infrastructure.
We recommend performing a traceroute using the mtr (WinMTR for Windows) utility. The utility allows you to track the full path and traffic latency, and find out at which stage of the route delays or packet loss occur.
- Run a trace from the dedicated server to an external server.
- Run a trace from an external server to the dedicated server.
1. Run a trace from the dedicated server to an external server
Linux
Windows
macOS
-
Install the
mtrutility on the dedicated server. Learn more on GitHub mtr. -
Optional: prepare the dedicated server for tracing — turn off utilities and applications that might affect the trace result:
- OS firewall rules;
- application-layer (L7, application layer) applications — web servers, mail servers, file servers, name servers, peer-to-peer network clients and servers, etc.
-
Run a trace to the external server address:
mtr -b <remote_ip_address>Specify
<remote_ip_address>— the IP address of the external server. -
Wait for the utility to complete the trace and display information about the route and latency.
-
Stop the trace:
q
2. Run a trace from an external server to the dedicated server
-
Install the utility on the external server depending on the OS used:
- for Linux —
mtr, more details on GitHub mtr; - for Windows —
WinMTR.
- for Linux —
-
Optional: prepare the external server for tracing — turn off utilities and applications that might affect the trace result:
- OS firewall rules;
- application-layer (L7) applications — web servers, mail servers, file servers, name servers, peer-to-peer network clients and servers, etc.
-
Run a traceroute to the dedicated server's IP address. You can find the dedicated server's IP address in the control panel: in the top menu, click Products → Dedicated Servers → Servers → server page → tab Operating System → field IP.
Measure data transfer speed
If you encounter issues with low data transfer speed, measure the connection speed.
Measure data transfer speed in two directions—from the dedicated server to a point outside the Servercore infrastructure and back. For this, you will need an external server—any server with a public IP address and internet access that is located outside the Servercore infrastructure.
We recommend using the iperf3 utility to measure speed.
1. Prepare the dedicated server for speed measurement
-
Boot the server into recovery and diagnostic mode to exclude the influence of OS processes on diagnostic results.
-
Install the
iperf3utility on the dedicated server, see the iPerf documentation for more details. -
Run the
iperf3utility. The utility must run until data transfer speed measurement is complete.iperf3 -s
2. Measure data transfer speed
-
Open the CLI on the external server.
-
Install the
iperf3utility on the external server, see the iPerf documentation for more details. -
Measure the speed from the external server to the dedicated server. The command will perform a measurement with 20 parallel streams to maximize the link load.
iperf3 -c <ip_address> -P20 -t60 -i10Specify
<ip_address>— the public IP address of the dedicated server. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → Servers → server page → tab Operating System → field IP. -
Perform a measurement in the reverse direction — add the
-Rkey to the command:iperf3 -c <ip_address> -P20 -t60 -i10 -RSpecify
<ip_address>— the public IP address of the dedicated server. You can view it in the control panel: in the top menu, click Products → Dedicated Servers → Servers → server page → tab Operating System → field IP.
Check the status of network interfaces
Check the status of network interfaces if the server has no internet access.
Linux
Windows
macOS
-
Check the status of the network interfaces:
ip aInformation about the network interfaces will appear in the response. For example:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group defaultlink/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00inet 127.0.0.1/8 scope host lovalid_lft forever preferred_lft foreverinet6 ::1/128 scope hostvalid_lft forever preferred_lft forever2: enp0s1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000link/ether 1c:1b:0d:12:34:56 brd ff:ff:ff:ff:ff:ffinet 192.168.1.100/24 brd 192.168.1.255 scope global dynamic enp0s1valid_lft 604675sec preferred_lft 604675secinet6 fe80::1234:abcd:5678:9ef0/64 scope linkvalid_lft forever preferred_lft forever3: enp0s2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000link/ether 1c:1b:0d:65:43:21 brd ff:ff:ff:ff:ff:ffinet 203.0.113.10/24 brd 203.0.113.255 scope global dynamic enp0s2valid_lft 604675sec preferred_lft 604675secinet6 fe80::abcd:1234:5678:9ef0/64 scope linkvalid_lft forever preferred_lft foreverWhere:
enp0s1— the name of the network interface on the local port;enp0s2— the name of the network interface on the internet port;UP— the status of the network interface.
-
If the network interface is in the
DOWNstatus, enable it. Learn more in the IP Command Set instruction in the iproute2 documentation—this is a package of utilities that includes theiputility.ip link set dev <eth_name> upSpecify
<eth_name>— the name of the network interface you obtained in step 2.
Check routing settings
Check routing settings if:
- there is no internet access on the server;
- the server is unreachable over the network;
- the server is unreachable from a specific external network.
Linux
Windows
macOS
-
Check routing settings:
ip rA route table will appear in the response. For example:
default via 203.0.113.1 dev enp0s2 proto dhcp metric 100203.0.113.0/24 dev enp0s2 proto kernel scope link src 203.0.113.10 metric 100192.168.1.0/24 dev enp0s1 proto kernel scope link src 192.168.1.100 metric 100Where:
-
default via 203.0.113.1 dev enp0s2— the default route, internet traffic goes through gateway203.0.113.1via theenp0s2interface; -
203.0.113.0/24 dev enp0s2— the route to the public subnet203.0.113.0/24, traffic to this subnet goes via theenp0s2interface; -
192.168.1.0/24 dev enp0s1— the route to the private subnet192.168.1.0/24, traffic to this subnet goes via theenp0s1interface.
-
Collect a network traffic dump
If the server is unreachable from a specific external network or you observe short-term connection losses, collect a network traffic dump.
A network traffic dump is a process of recording and saving the network traffic that passes through a network or device. The dump contains information about network protocols, transmitted packets, their content, and data sources and recipients.
Linux
Windows
macOS
-
Install
tcpdump—a utility for capturing and analyzing network traffic. Learn more in the tcpdump documentation.apt updateapt install -y tcpdump -
Look up the name of the network interface for which you need to record a dump; to do this, list the network interfaces:
ip aInformation about the network interfaces will appear in the response. For example:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group defaultlink/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00inet 127.0.0.1/8 scope host lovalid_lft forever preferred_lft foreverinet6 ::1/128 scope hostvalid_lft forever preferred_lft forever2: enp0s1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000link/ether 1c:1b:0d:12:34:56 brd ff:ff:ff:ff:ff:ffinet 192.168.1.100/24 brd 192.168.1.255 scope global dynamic enp0s31f6valid_lft 604675sec preferred_lft 604675secinet6 fe80::1234:abcd:5678:9ef0/64 scope linkvalid_lft forever preferred_lft forever3: enp0s2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000link/ether 1c:1b:0d:65:43:21 brd ff:ff:ff:ff:ff:ffinet 203.0.113.10/24 brd 203.0.113.255 scope global dynamic enp0s2valid_lft 604675sec preferred_lft 604675secinet6 fe80::abcd:1234:5678:9ef0/64 scope linkvalid_lft forever preferred_lft foreverWhere
enp0s2is the name of the network interface on the internet port. -
Launch
tcpdump:sudo tcpdump -i <eth_name> -w <file_name>Specify:
<eth_name>— the name of the network interface you obtained in step 3;<file_name>— the name of the file to save the network traffic capture to, for exampledump.pcap.
-
Wait for the required amount of data to be collected.
-
Stop the recording by pressing Ctrl + C.
Restart network services
Restart network services if on the server:
- there is no internet access;
- alternatively, if the server is unreachable from a specific external network.
Linux
Windows
macOS
-
Restart network services:
systemctl restart networking
Check filtering rules
If the server is unreachable over the network, check the firewall filtering rules in the server OS.
Linux
Windows
macOS
-
View the list of firewall rules:
iptables -L -n -vA list of rules will appear in the response. For example:
Chain INPUT (policy DROP 1234 packets, 98765 bytes)pkts bytes target prot opt in out source destination2045 187K ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/01087 159K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED120 8400 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:220 0 DROP all -- * * 192.168.1.100 0.0.0.0/0Chain FORWARD (policy DROP 0 packets, 0 bytes)pkts bytes target prot opt in out source destinationChain OUTPUT (policy ACCEPT 3456 packets, 456789 bytes)pkts bytes target prot opt in out source destinationWhere:
-
Chain— a list of rules for packets of a specific direction:INPUT— for incoming packets;FORWARD— for forwarded packets;OUTPUT— for outgoing packets;
-
policy— the action of the rule, for exampleACCEPTorDROP.
-
Scan ports
If the server is unavailable over the network or from a specific external network, scan the ports. Ports can be scanned using the nmap utility.
Linux
Windows
macOS
-
Install
nmap; for more details, see the Linux Distributions section of the nmap documentation. -
Scan ports:
nmap -p <port> <ip_address>Specify:
- optional:
<port>— ports separated by commas, for example22,80,443, or a range of ports, for example20-30; <ip_address>— IP address of the dedicated server. You can view the IP address of the dedicated server in the control panel in the Servers and Hardware section → Servers → server card → field IP address.
- optional:
Check host network availability and measure latency
If the server is unavailable over the network, or if you notice high network latency or packet loss, check the server's availability and measure latency using the ping utility. The ping utility is part of the standard set of network tools and is pre-installed in most operating systems.
You can perform the check using the public or private IP address of the server, or the domain name linked to the server's IP address.
To perform this check, you will need a second server from which you will conduct the test. If you are testing to a private IP address, the servers must be connected via a private network.
-
Open CLI on the server from which you will perform the check.
-
Perform the check:
ping <ip_address>Specify
<ip_address>— the IP address or domain name of the server. You can view the dedicated server's IP address in the control panel: in the top menu, click Products → Dedicated Servers → Servers → server page → tab Operating System → field IP.
Check access from the OS in recovery and diagnostic mode
To ensure OS settings do not affect server performance and diagnostics:
-
Connect to the server via SSH or a KVM console:
- if the server responds and you can connect to it, the problem is in the software on the server. Reboot the server to restart network services. If the issue is software-related, it will be resolved when you revert to the previous OS boot template;
- if the server is unavailable in recovery and diagnostic mode, create a ticket with a description of the issue.