Below is a simplified diagram of the different network layers:
To get information about the link layer - Hardware -, we would use the below command to check if the interface is running:
We could turn on the interface - if it is down - using the below command:
Another command for checking interfaces would be:
For layer 2, which is concerned with MAC addresses, we could check the ARP table using the below command:
To delete a wrong entry from the ARP table, we could use the below command:
The layer 3 handles the IP addressing. For that layer, we could use the below command to check the IP routing information:
We could also use the "traceroute" command to check the route to a specific destination:
Or check our DNS using the below command:
We can check if the remote host is up and running, using the below command:
The TCP/UDP layers could be checked using the below commands.
For TCP sockets, we would use:
For UDP sockets, we would use the below:
To display the listening sockets we could use:
Comments