Basic Network Tools

Alpine Linux Network Tools #

Busybox Network Tools #

Alpine Linux employs BusyBox to provide essential network tools such as ping or wget. Most of the commands supplied by BusyBox are stripped-down versions of their original (GNU) implementation and do not support all parameters and use cases.

When building BusyBox, you can configure which commands you want your version to support, and Alpine chooses to support only a subset of all available commands.

The following table lists the network commands supported by the generic version of BusyBox, whether included in the bespoke Alpine version, and which package contains the “original” version of the tool.

CommandPathDescriptionAlpine BusyBoxPackage with original
arp/sbinManipulate ARP cache✔️net-tools
arping/usr/sbinSend ARP requests/replies✔️iputils
brctl/usr/sbinManage ethernet bridges✔️bridge-utils
dhcprelayRelay DHCP requests between clients and serverdhcrelay
dnsdSmall static DNS server daemon
dnsdomainname/bin✔️net-tools
dumpleasesDisplay DHCP leases granted by udhcpd
ftpdftpd should be used as an inetd service.
ftpgetRetrieve a remote file via FTP
ftpputStore a local file on a remote machine via FTP
hostname/binGet or set hostname or DNS domain name✔️net-tools
httpdListen for incoming HTTP requests
ifconfig/sbinConfigure a network interface✔️net-tools
ifdown/sbinifdown [-ainmvf] ifaces…✔️ifupdown-ng ifupdown
ifenslave/sbinConfigure network interfaces for parallel routing✔️?
ifplugdNetwork interface plug detection daemon
ifup/sbinifup [-ainmvf] ifaces…✔️ifupdown-ng ifupdown
inetdListen for network connections and launch programs✔️busybox-extras
ip/sbin✔️iproute2-minimal
ipaddr/sbin✔️iproute2-minimal
ipcalc/binCalculate IP network settings from a IP address✔️?
iplink/sbin✔️iproute2-minimal
iproute/sbin✔️iproute2-minimal
iprule/sbin✔️iproute2-minimal
iptunnel/sbin✔️net-tools
nameif/sbinRename network interface while it in the down state✔️net-tools
nc/usr/bin✔️netcat-openbsd
netstat/binDisplay networking information✔️net-tools
nslookup/usr/bin✔️bind-tools
ping/binSend ICMP ECHO_REQUEST packets to network hosts✔️iputils
ping6/binSend ICMP ECHO_REQUEST packets to network hosts✔️iputils
popmaildirFetch content of remote mailbox to local maildir
route/sbinEdit kernel routing tables✔️net-tools
rxReceive a file using the xmodem protocol
sendmail/usr/sbinRead email from stdin and send it✔️postfix ssmtp opensmtpd
slattach/sbinAttach network interface(s) to serial line(s)✔️net-tools
tcpsvdCreate TCP socket, bind to IP:PORT and listen for incoming connection.
telnetConnect to telnet server
telnetdHandle incoming telnet connections
tftpTransfer a file from/to tftp server
tftpdTransfer a file on tftp client’s request
traceroute/usr/bin✔️traceroute
udhcpc/sbin✔️dhclient dhcpcd
udhcpdDHCP serverdhcp-server-vanilla
udpsvdCreate UDP socket, bind to IP:PORT and wait for incoming packets.
wget/usr/binRetrieve files via HTTP or FTP✔️wget

To replace the most commonly used BusyBox network commands with their originals, execute:

apk add bind-tools dhclient net-tools net-tools bridge-utils ifupdown-ng iputils iproute2-minimal netcat-openbsd traceroute wget 

Some of these packages do not just install the command listed above but also deploy other tools. For example, the entire content of the package net-tools is here and of iproute2-minimal here.

The package iproute2 depends on and hence installs: iproute2-minimal, iproute2-ss and iproute2-tc (see below for details). Its own additional tools are here.

Other Network Tools #

Other important network tools which are not part of BusyBox are:

CommandPathDescriptionPackage with original
dig/usr/binTool for interrogating DNS name serversbind-tools
mdig/usr/binMultiple/pipelined query version of digbind-tools
iptables/sbinAdministration tool for IPv4 packet filtering and NATiptables
ip6tables/sbinAdministration tool for IPv6 packet filtering and NATip6tables
ss/sbinAnother Utility to investigate socketsiproute2-ss
tcpdump/usr/binPrints contents of packets on a network interfacetcpdump
tc/sbinTraffic controliproute2-tc
dhcping/usr/binDhcp daemon ping programdhcping

Install them all by running:

apk add bind-tools iptables ip6tables iproute2 tcpdump dhcping

Support

If you found this content valuable, please support my work here

License

This text is available under the Creative Commons Attribution-ShareAlike License