mikrotik

Troubleshooting tools

Before, we look at the most significant commands for connectivity checking and troubleshooting, here is a little reminder on how to check the host computer's network interface parameters on.

Microsoft Windows have a whole set of helpful command-line tools that helps test and configure LAN/WAN interfaces. We will look only at commonly used Windows networking tools and commands.

All of the tools are being run from the windows terminal. Go to Start/Run and enter "cmd" to open a Command window.

Some of the commands on windows are:

ipconfig – used to display the TCP/IP network configuration values. To open it, enter "ipconfig" in the command prompt.

C:\>ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
   Connection-specific DNS Suffix  . : mshome.net
   Link-local IPv6 Address . . . . . : fe80::58ad:cd3f:f3df:bf18%8
   IPv4 Address. . . . . . . . . . . : 173.16.16.243
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 173.16.16.1

There are also a variety of additional functions for IP-config. To obtain a list of additional options, enter "ipconfig /?" or “ipconfig -?”.


net stat – displays the active TCP connections and ports on which the computer is listening, Ethernet statistics, the IP routing table, and statistics for the IP, ICMP, TCP, and UDP protocols. It comes with a number of options for displaying a variety of properties of the network and TCP connections “net stat –?”.

nslookup – is a command-line administrative tool for testing and troubleshooting DNS servers. For example, if you want to know what IP address is "www.google.com", enter "ns lookup www.google.com" and you will find that there are more addresses 74.125.77.99, 74.125.77.104, 74.125.77.147.

netsh – is a tool an administrator can use to configure and monitor Windows-based computers at a command prompt. It allows configuring interfaces, routing protocols, routes, routing filters and displays currently running configuration.

Very similar commands are available also on unix-like machines. Today in most of Linux distributions network settings can be managed via GUI, but it is always good to be familiar with the command-line tools. Here is the list of basic networking commands and tools on Linux:

ifconfig – it is similar like ipconfig commands on windows. It lets enable/disable network adapters, assigned IP address and netmask details as well as show currently network interface configuration.

iwconfig - iwconfig tool is like ifconfig and ethtool for wireless cards. That also view and set the basic Wi-Fi network details.

nslookup – give a host name and the command will return IP address.

netstat – print network connections, including port connections, routing tables, interface statistics, masquerade connections, and more. (netstat – r, netstat - a)

ip – show/manipulate routing, devices, policy routing and tunnels on linux-machine.

For example, check IP address on interface using ip command:

$ip addr show

You can add static route using ip following command:

ip route add {NETWORK address} via {next hop address} dev {DEVICE}, for example:

$ip route add 192.168.55.0/24 via 192.168.1.254 dev eth1

mentioned tools are only small part of networking tools that is available on Linux. Remember if you want full details on the tools and commands options use man command. For example, if you want to know all options on ifconfig write command man ifconfig in terminal.