Posts Tagged Under: Networking

Using arp

arp translates ip address to mac addresses.

The arp command let’s you see which one of your interfaces has access to the default gateway, and therefore can access the internet.

the following shows which interface has access to the the default gateway:

$ arp
Address                  HWtype  HWaddress           Flags Mask            Iface             ether   08:00:27:88:f1:e5   C                     enp0s10   															

The DHCP server

A dhcp (dynamic host configuration protocol) server provides configuration to boxes that joins it’s network.

The dhcp often acts as the default gateway too.

Using mtr

Sometimes that ping and traceroute command doesn’t work due to network security reasons:

Note: I couldn’t get arping to work either.

That’s where mtr can come in handy. mtr is a combination of the ping and traceroute command.

$ yum install mtr

Then do:

$ mtr

This starts up a text based display (a bit like how the top command does) that is constantly refreshing. It looks something like this:

                                     My traceroute  [v0.85]
localhost.localdomain (                      															

Network troubleshooting process

What’s the first step you take when you encounter problem such as ‘firefox isn’t working’?

This article outlines a standard set of steps to take to try to identify which part of the whole setup is causing the problem.

At it’s heart, the troubleshooting process we take is in line with the OSI model. In that respect our approach involves isolating in which network layer the problem resides in. The OSI network layer is

  1. Physical Layer – e.g. cable not plugged in properly, or network adapters have developed a physical fault
  2. Data Link Layer – e.g. does ‘ip addr show’ shows ip addresss for each network. also try using ping to ping other devices in the same box, e.g. the default gateway. then trying pinging outside the network. Also try ‘arp -a’
  3. Network Layer –

Linux Networking Introduction

This is gives a practical hands on walkthrough on understanding, configuring, and troubleshooting network related problems. We will be exclusively using CentOS throughout this series.

Using netstat

The netstat (network statistics) command is often used for checking what ports your CentOS machine is listening on. A commonly used command is:

 netstat -tulpen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name
tcp        0      0   *               LISTEN      0