iface command lists all available network interfaces on your system along with their hardware addresses and IP addresses.
Syntax
Description
This command displays all network interfaces available on your system, including their names, MAC addresses, and assigned IP addresses (both IPv4 and IPv6). This information is essential when configuring paqet, as you need to specify the correct interface name in your configuration file.The
iface command does not require root privileges and can be run as a regular user.Usage Example
Example Output
Understanding the Output
For each interface, you’ll see:- Interface Name: The system name for the interface (e.g.,
eth0,wlan0) - Hardware Address: The MAC address of the interface (6 pairs of hex digits)
- IP Addresses: All IPv4 and IPv6 addresses assigned to the interface with their subnet masks
Common Interface Names
lo: Loopback interface (127.0.0.1) - not suitable for paqeteth0,eth1: Ethernet interfaceswlan0,wlan1: Wireless interfacesens33,enp0s3: Modern systemd-style Ethernet namingdocker0,br-*: Virtual bridge interfaces created by Dockertun0,tap0: VPN tunnel interfaces
Why You Need This
When configuring paqet, you must specify which network interface to use for sending/receiving raw packets. The interface name must match exactly what your system uses.In Your Config File
Use the interface name frompaqet iface output in your configuration:
If you’re unsure which interface to use, look for the one with a non-127.0.0.1 IP address that matches your network. Typically this is
eth0 for wired connections or wlan0 for wireless.When to Use Iface
Runpaqet iface when:
- Setting up paqet: Before creating your configuration file
- Troubleshooting: If paqet reports “interface not found” errors
- Multi-homed systems: When your server has multiple network interfaces
- After network changes: When network configuration has been modified
- In containers: To identify the correct interface in Docker or other containerized environments
Choosing the Right Interface
Select an interface that:- Has a valid IP address (not just 127.0.0.1)
- Is connected to the network you want to use
- Can route to the client/server you’re connecting to
- Isn’t a virtual or temporary interface (unless intentional)
In cloud environments, the interface name might be different from typical systems. AWS EC2 instances often use
eth0 or ens5, while some providers use other naming schemes.