Linux Net Commands
Linux Net Commands
To help you find and solve networking problems, this article describes some Linux utilities and their
commonly used options and parameters. Usage examples for the utilities are also provided. For more
information on any of the following utilities, see their man pages.
ip
The ip tool is a TCP/IP interface configuration and routing utility. Use it to configure and view routing,
devices, policy routing, and tunnels. You can also use it to configure network interfaces. To display all
the options for this command, enter ip at the CLI.
ip a
Displays the list of used network interfaces (physical and virtual) with their assigned MAC addresses.
ip r g
Displays information about the device that is bound to the specified IP address.
ip a a dev
The IP address is removed again when the network or the Barracuda NG Firewall is restarted. A
device route is only added if a netmask has been given with the IP address.
ip a d dev
If you use this command to remove a server or box IP address, the Control daemon will take
action and reintroduce the deleted IP addresses.
tcpdump
To inspect packets, use the tcpdump utility. It is a sniffer tool that captures packets off a network
interface and interprets them. It prints out the headers of packets on a network interface that match
the Boolean expression. It understands all basic Internet protocols. It can also be used to save entire
packets for later inspection.
OPTIONS
Use the following options to specify which network interfaces you want to inspect:
-i [interface] | any
Specifies an interface name. To execute tcpdump on all available interfaces, use any . To
combine multiple devices, use and/or .
host
Specifies a host IP address. To combine multiple hosts, use and/or .
port
Specifies a queried port. To combine multiple ports, use and/or .
[root@winix:/]# tcpdump -i eth0 -nnn -s0 host 10.0.10.10 and host 10.0.10.11
and port 801 [root@winix:/]# tcpdump -v -vv -n -nn -s0 -i any host
192.168.10.1 and 212.72.195.42 and port 443 [root@winix:/]# tcpdump -v -vv -n
-nn -s0 -i any -w /tmp/dump.cap host 192.168.10.1 and 212.72.195.42 and port
443
fsck
If HDD/MEM tests are passing without errors, use the fsck utility with the following options to check
and repair file systems:
fsck -A -y
These options solve most of the possible errors after a power outage because the utility checks all file
systems and attempts to fix most detected file system corruption.
rpm
To check the kernel module architecture, use the rpm utility with the following options:
© Barracuda Networks Inc., 2019 The information contained within this document is confidential and proprietary to Barracuda Networks Inc. No
portion of this document may be copied, distributed, publicized or used for other than internal documentary purposes without the written consent of
an official representative of Barracuda Networks Inc. All specifications are subject to change without notice. Barracuda Networks Inc. assumes no
responsibility for any inaccuracies in this document. Barracuda Networks Inc. reserves the right to change, modify, transfer, or otherwise revise this
publication without notice.