Configure Networking: Difference between revisions
Prabuanand (talk | contribs) m (updated links) |
Prabuanand (talk | contribs) |
||
Line 13: | Line 13: | ||
* <code>setup-ntp</code> | * <code>setup-ntp</code> | ||
All the above utilities are interactive. | All the above utilities are interactive. | ||
{{:Ethernet}} | |||
For a versatile networking front end refer [[NetworkManager]]. If you're needs are more advanced, you have to refer to the following detailed guides for manual configuration. | |||
== Setting hostname == | |||
To set the system hostname:{{Cmd|# echo "shortname" > /etc/hostname}} | |||
To set the system hostname: | |||
{{Cmd|# echo "shortname" > /etc/hostname}} | |||
Then, to activate the change: | Then, to activate the change: {{Cmd|# hostname -F /etc/hostname}} | ||
{{Cmd|# hostname -F /etc/hostname}} | |||
If you're using IPv6, you should also add the following special IPv6 addresses to your {{path|/etc/hosts}} file: | If you're using IPv6, you should also add the following special IPv6 addresses to your {{path|/etc/hosts}} file:{{cat|/etc/hosts|... | ||
{{cat|/etc/hosts|... | |||
::1 localhost ipv6-localhost ipv6-loopback | ::1 localhost ipv6-localhost ipv6-loopback | ||
fe00::0 ipv6-localnet | fe00::0 ipv6-localnet | ||
Line 40: | Line 37: | ||
For a static IP configuration, it's common to also add the machine's hostname you just set (above) to the {{path|/etc/hosts}} file. | For a static IP configuration, it's common to also add the machine's hostname you just set (above) to the {{path|/etc/hosts}} file. | ||
Here's an IPv4 example: | Here's an IPv4 example:{{cat|/etc/hosts|... | ||
{{cat|/etc/hosts|... | |||
192.168.1.150 shortname.domain.com | 192.168.1.150 shortname.domain.com | ||
... | ... | ||
}} | }} | ||
And here's an IPv6 example: | And here's an IPv6 example:{{cat|/etc/hosts|... | ||
{{cat|/etc/hosts|... | |||
2001:470:ffff:ff::2 shortname.domain.com | 2001:470:ffff:ff::2 shortname.domain.com | ||
... | ... | ||
Line 53: | Line 48: | ||
== Configuring DNS == | == Configuring DNS == | ||
{{Tip|'''For users of IPv4 DHCP:''' Please note that {{path|/etc/resolv.conf}} will be completely overwritten with any nameservers provided by DHCP. | {{Tip|'''For users of IPv4 DHCP:''' Please note that {{path|/etc/resolv.conf}} will be completely overwritten with any nameservers provided by DHCP. | ||
If DHCP does not provide any nameservers, then {{path|/etc/resolv.conf}} will still be overwritten, but will not contain any nameservers!}} | If DHCP does not provide any nameservers, then {{path|/etc/resolv.conf}} will still be overwritten, but will not contain any nameservers!}} | ||
Line 72: | Line 68: | ||
{{Tip|If you decide to use Hurricane Electric's nameserver, be aware that it is 'Google-whitelisted'. What does this mean? It allows you access to many of Google's services via IPv6. (Just don't add other, non-whitelisted, nameservers to {{path|/etc/resolv.conf}} — ironically, such as Google's Public DNS Servers.) Read [https://www.google.com/intl/en/ipv6/ here] for more information.}} | {{Tip|If you decide to use Hurricane Electric's nameserver, be aware that it is 'Google-whitelisted'. What does this mean? It allows you access to many of Google's services via IPv6. (Just don't add other, non-whitelisted, nameservers to {{path|/etc/resolv.conf}} — ironically, such as Google's Public DNS Servers.) Read [https://www.google.com/intl/en/ipv6/ here] for more information.}} | ||
== Interface | == Interface configuration == | ||
=== Loopback | === Loopback configuration === | ||
{{Note|The loopback configuration must appear first in {{path|/etc/network/interfaces}} to prevent networking issues.}} | |||
To configure loopback, add the following to a new file {{path|/etc/network/interfaces}}: | {{Note|The loopback configuration is mandatory and must appear first in {{path|/etc/network/interfaces}} to prevent networking issues.}} | ||
{{cat|/etc/network/interfaces|... | |||
To configure loopback, add the following to a new file {{path|/etc/network/interfaces}}: {{cat|/etc/network/interfaces|... | |||
auto lo | auto lo | ||
iface lo inet loopback | iface lo inet loopback | ||
Line 84: | Line 81: | ||
The above works to set up the IPv4 loopback address (127.0.0.1), and the IPv6 loopback address (<code>::1</code>) — if you enabled IPv6. | The above works to set up the IPv4 loopback address (127.0.0.1), and the IPv6 loopback address (<code>::1</code>) — if you enabled IPv6. | ||
=== Wireless | === Wireless configuration === | ||
Alpine Linux supports two wireless daemons i.e [[iwd]] | Alpine Linux supports two wireless daemons i.e [[Wi-Fi#wpa_supplicant|wpa_supplicant]] and [[iwd]]. <code>setup-interfaces</code> script uses [[Wi-Fi#wpa_supplicant|wpa_supplicant]] to configure wireless interface. | ||
{{Note| Using both wireless daemons simultaneously lead to conflicts.}} | |||
=== Ethernet configuration === | |||
For the following Ethernet configuration examples, we will assume that you are using Ethernet device <code>eth0</code>. | For the following Ethernet configuration examples, we will assume that you are using Ethernet device <code>eth0</code>. | ||
==== Initial | ==== Initial configuration ==== | ||
Add the following to the file {{path|/etc/network/interfaces}}, above any IP configuration for <code>eth0</code>: | Add the following to the file {{path|/etc/network/interfaces}}, above any IP configuration for <code>eth0</code>: | ||
{{cat|/etc/network/interfaces|... | {{cat|/etc/network/interfaces|... | ||
Line 98: | Line 98: | ||
}} | }} | ||
==== IPv4 DHCP | ==== IPv4 DHCP configuration ==== | ||
Add the following to the file {{path|/etc/network/interfaces}}, below the <code>auto eth0</code> definition: | Add the following to the file {{path|/etc/network/interfaces}}, below the <code>auto eth0</code> definition: | ||
{{cat|/etc/network/interfaces|... | {{cat|/etc/network/interfaces|... | ||
Line 132: | Line 132: | ||
... | ... | ||
}} | }} | ||
===== Additional IP addresses ===== | ===== Additional IP addresses ===== | ||
Line 161: | Line 160: | ||
Alpine's use of ifupdown-ng supports three DHCP clients: udhcpc, dhclient, and dhcpcd. Of these, only dhcpcd can interact with both DHCP and DHCPv6 from the same process, which ifupdown-ng requires. Thus the IPv4 DHCP configuration given above will also result in the use of DHCPv6, but only if you install the dhcpcd package. (The ifupdown-ng scripts prioritize dhclient over udhcpc, and they prioritize dhcpcd over dhclient; see {{path|/usr/libexec/ifupdown-ng/dhcp}}.) | Alpine's use of ifupdown-ng supports three DHCP clients: udhcpc, dhclient, and dhcpcd. Of these, only dhcpcd can interact with both DHCP and DHCPv6 from the same process, which ifupdown-ng requires. Thus the IPv4 DHCP configuration given above will also result in the use of DHCPv6, but only if you install the dhcpcd package. (The ifupdown-ng scripts prioritize dhclient over udhcpc, and they prioritize dhcpcd over dhclient; see {{path|/usr/libexec/ifupdown-ng/dhcp}}.) | ||
=== IPv6 Stateless Autoconfiguration === | ==== IPv6 Stateless Autoconfiguration ==== | ||
Add the following to the file {{path|/etc/network/interfaces}}, below the <code>auto eth0</code> definition: | Add the following to the file {{path|/etc/network/interfaces}}, below the <code>auto eth0</code> definition: | ||
{{cat|/etc/network/interfaces|... | {{cat|/etc/network/interfaces|... | ||
Line 228: | Line 227: | ||
}} | }} | ||
Changes made to {{path|/etc/network/interfaces}} can be activated by running: {{Cmd|# rc-service networking restart}} | |||
: {{Cmd|# | |||
== Firewall== | |||
Alpine Linux provides multiple firewall software. Some of the prominent ones are listed below: | |||
* [https://git.alpinelinux.org/awall/about/ Alpine Wall User's Guide] | |||
* [[Iptables]] | |||
* [[nftables]] | |||
* [[Uncomplicated Firewall]] | |||
== Troubleshooting == | |||
=== | === Connectivity testing === | ||
Test if networking is configured properly by attempting to ping out: | |||
{{Cmd|<nowiki>$ ping www.google.com | {{Cmd|<nowiki>$ ping www.google.com | ||
PING www.l.google.com (74.125.47.103) 56(84) bytes of data. | PING www.l.google.com (74.125.47.103) 56(84) bytes of data. | ||
Line 302: | Line 267: | ||
9 yw-in-x67.1e100.net (2001:4860:8009::67) 101.545 ms 109.675 ms 99.431 ms | 9 yw-in-x67.1e100.net (2001:4860:8009::67) 101.545 ms 109.675 ms 99.431 ms | ||
}} | }} | ||
=== iproute2 === | === iproute2 === | ||
Install the {{pkg|iproute2}} package which provides the 'ss' command which is IMHO a 'better' version of netstat.: {{Cmd|# apk add iproute2}} | |||
{{Cmd| | Show listening tcp ports:{{Cmd|$ ss -tl}} | ||
Show listening tcp ports and associated processes:{{Cmd|$ ss -ptl}} | |||
Show listening tcp | Show listening and established tcp connections:{{Cmd|$ ss -ta}} | ||
{{Cmd|$ ss - | |||
Show | Show socket usage summary:{{Cmd|$ ss -s}} | ||
{{Cmd|$ ss - | |||
Show more options:{{Cmd|$ ss -h}} | |||
Show more options: | |||
{{Cmd|$ ss -h}} | |||
=== drill === | === drill === | ||
Install {{pkg|drill}} (it will also install the 'ldns' package) which is a superior (IMHO) replacement for nslookup and dig etc: {{Cmd|# apk add drill}} | |||
{{Cmd|# apk add drill}} | |||
Then use it as you would for dig: | Then use it as you would for dig: {{Cmd|$ drill alpinelinux.org @8.8.8.8}} | ||
{{Cmd|$ drill | To perform a reverse lookup (get a name from an IP) use the following syntax: {{Cmd|$ drill -x 8.8.8.8 @208.67.222.222}} | ||
=== Missing interface === | |||
Sometimes networking interface will not be detected by the installation media. In this case, you may have to use an alternate interface for installation (e.g. a usb to ethernet adapter) upon which after install / reboot the interface will display. You may also try installing any missing packages that contain the drivers. | |||
== | == See also == | ||
You may also wish to review the following network related articles: | You may also wish to review the following network related articles: | ||
* [[NetworkManager]] - Front-end to Networking | |||
* [[VLAN|VLAN setup]] | * [[VLAN|VLAN setup]] | ||
* [[Bonding|Bonding setup]] | * [[Bonding|Bonding setup]] | ||
* [[Bridge|Network bridge setup]] | * [[Bridge|Network bridge setup]] | ||
* [[udhcpc|udhcpc configuration]] | * [[udhcpc|udhcpc configuration]] | ||
* [[Wifi#wpa_supplicant|wpa_supplicant]] - Default wifi daemon | * [[Wifi#wpa_supplicant|wpa_supplicant]] - Default wifi daemon | ||
* [[Iwd|iwd]] - An alternate | * [[Iwd|iwd]] - An alternate wifi daemon | ||
[[Category:Networking]] | [[Category:Networking]] |
Revision as of 06:02, 10 January 2025
This page will assist you in setting up networking on Alpine Linux.
Network setup-scripts
Among the alpine setup scripts that are installed as part of alpine-conf
, the following network related scripts are available.
setup-hostname
setup-interfaces
setup-dns
setup-proxy
setup-ntp
All the above utilities are interactive. This page will assist you in setting up networking on Alpine Linux.
Network setup-scripts
Among the alpine setup scripts that are installed as part of alpine-conf
, the following network related scripts are available.
setup-hostname
setup-interfaces
setup-dns
setup-proxy
setup-ntp
All the above utilities are interactive. Template loop detected: Ethernet
For a versatile networking front end refer NetworkManager. If you're needs are more advanced, you have to refer to the following detailed guides for manual configuration.
Setting hostname
To set the system hostname:
# echo "shortname" > /etc/hostname
Then, to activate the change:
# hostname -F /etc/hostname
If you're using IPv6, you should also add the following special IPv6 addresses to your /etc/hosts file:
Contents of /etc/hosts
For a static IP configuration, it's common to also add the machine's hostname you just set (above) to the /etc/hosts file.
Here's an IPv4 example:
Contents of /etc/hosts
And here's an IPv6 example:
Contents of /etc/hosts
Configuring DNS
For a static IP address and static nameservers, use one of the following examples.
For IPv4 nameservers, edit your /etc/resolv.conf file to look like this:
The following example uses Google's Public DNS servers.
Contents of /etc/resolv.conf
For IPv6 nameservers, edit your /etc/resolv.conf file to look like this:
The following example uses Hurricane Electric's public DNS server.
Contents of /etc/resolv.conf
You can also use Hurricane Electric's public IPv4 DNS server:
Contents of /etc/resolv.conf
Interface configuration
Loopback configuration
To configure loopback, add the following to a new file /etc/network/interfaces:
Contents of /etc/network/interfaces
The above works to set up the IPv4 loopback address (127.0.0.1), and the IPv6 loopback address (::1
) — if you enabled IPv6.
Wireless configuration
Alpine Linux supports two wireless daemons i.e wpa_supplicant and iwd. setup-interfaces
script uses wpa_supplicant to configure wireless interface.
Ethernet configuration
For the following Ethernet configuration examples, we will assume that you are using Ethernet device eth0
.
Initial configuration
Add the following to the file /etc/network/interfaces, above any IP configuration for eth0
:
Contents of /etc/network/interfaces
IPv4 DHCP configuration
Add the following to the file /etc/network/interfaces, below the auto eth0
definition:
Contents of /etc/network/interfaces
By default, the busybox DHCP client (udhcpc) requests a static set of options from the DHCP server. If you need to extend this set, you can do so by setting some additional command line options for the DHCP client, via the udhcpc_opts
in your interface configuration. The following example requests
domain-search
option:
Contents of /etc/network/interfaces
For a complete list of command line options for udhcpc, see this document.
IPv4 Static Address Configuration
Add the following to the file /etc/network/interfaces, below the auto eth0
definition:
Contents of /etc/network/interfaces
Since Alpine 3.13 (and only if you have ifupdown-ng
installed) must be:
Contents of /etc/network/interfaces
Additional IP addresses
Contents of /etc/network/interfaces
Since Alpine 3.13 (and only if you have ifupdown-ng
installed) must be:
Contents of /etc/network/interfaces
IPv6 DHCP Configuration
Alpine's use of ifupdown-ng supports three DHCP clients: udhcpc, dhclient, and dhcpcd. Of these, only dhcpcd can interact with both DHCP and DHCPv6 from the same process, which ifupdown-ng requires. Thus the IPv4 DHCP configuration given above will also result in the use of DHCPv6, but only if you install the dhcpcd package. (The ifupdown-ng scripts prioritize dhclient over udhcpc, and they prioritize dhcpcd over dhclient; see /usr/libexec/ifupdown-ng/dhcp.)
IPv6 Stateless Autoconfiguration
Add the following to the file /etc/network/interfaces, below the auto eth0
definition:
Contents of /etc/network/interfaces
IPv6 Static Address Configuration
Add the following to the file /etc/network/interfaces, below the auto eth0
definition:
Contents of /etc/network/interfaces
Since Alpine Linux 3.13 (and only if you have ifupdown-ng
installed) must be as:
Contents of /etc/network/interfaces
Example: Dual-Stack Configuration
This example shows a dual-stack configuration.
Contents of /etc/network/interfaces
Take care since Alpine 3.13 (and only if you have ifupdown-ng
installed) must be as:
Contents of /etc/network/interfaces
Changes made to /etc/network/interfaces can be activated by running:
# rc-service networking restart
Firewall
Alpine Linux provides multiple firewall software. Some of the prominent ones are listed below:
Troubleshooting
Connectivity testing
Test if networking is configured properly by attempting to ping out:
$ ping www.google.com PING www.l.google.com (74.125.47.103) 56(84) bytes of data. 64 bytes from yw-in-f103.1e100.net (74.125.47.103): icmp_seq=1 ttl=48 time=58.5 ms 64 bytes from yw-in-f103.1e100.net (74.125.47.103): icmp_seq=2 ttl=48 time=56.4 ms 64 bytes from yw-in-f103.1e100.net (74.125.47.103): icmp_seq=3 ttl=48 time=57.0 ms 64 bytes from yw-in-f103.1e100.net (74.125.47.103): icmp_seq=4 ttl=48 time=60.2 ms ^C --- www.l.google.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3007ms rtt min/avg/max/mdev = 56.411/58.069/60.256/1.501 ms
For an IPv6 traceroute run traceroute6
:
$ traceroute6 ipv6.google.com traceroute to ipv6.l.google.com (2001:4860:8009::67) from 2001:470:ffff:ff::2, 30 hops max, 16 byte packets 1 2001:470:ffff:ff::1 (2001:470:ffff:ff::1) 3.49 ms 0.62 ms 0.607 ms 2 * * * 3 * * * 4 pr61.iad07.net.google.com (2001:504:0:2:0:1:5169:1) 134.313 ms 95.342 ms 88.425 ms 5 2001:4860::1:0:9ff (2001:4860::1:0:9ff) 100.759 ms 100.537 ms 89.907 ms 6 2001:4860::1:0:5db (2001:4860::1:0:5db) 115.563 ms 102.946 ms 106.191 ms 7 2001:4860::2:0:a7 (2001:4860::2:0:a7) 101.754 ms 100.475 ms 100.512 ms 8 2001:4860:0:1::c3 (2001:4860:0:1::c3) 99.272 ms 111.989 ms 99.835 ms 9 yw-in-x67.1e100.net (2001:4860:8009::67) 101.545 ms 109.675 ms 99.431 ms
iproute2
Install the iproute2 package which provides the 'ss' command which is IMHO a 'better' version of netstat.:
# apk add iproute2
Show listening tcp ports:
$ ss -tl
Show listening tcp ports and associated processes:
$ ss -ptl
Show listening and established tcp connections:
$ ss -ta
Show socket usage summary:
$ ss -s
Show more options:
$ ss -h
drill
Install drill (it will also install the 'ldns' package) which is a superior (IMHO) replacement for nslookup and dig etc:
# apk add drill
Then use it as you would for dig:
$ drill alpinelinux.org @8.8.8.8
To perform a reverse lookup (get a name from an IP) use the following syntax:
$ drill -x 8.8.8.8 @208.67.222.222
Missing interface
Sometimes networking interface will not be detected by the installation media. In this case, you may have to use an alternate interface for installation (e.g. a usb to ethernet adapter) upon which after install / reboot the interface will display. You may also try installing any missing packages that contain the drivers.
See also
You may also wish to review the following network related articles:
- NetworkManager - Front-end to Networking
- VLAN setup
- Bonding setup
- Network bridge setup
- udhcpc configuration
- wpa_supplicant - Default wifi daemon
- iwd - An alternate wifi daemon
For a versatile networking front end refer NetworkManager. If you're needs are more advanced, you have to refer to the following detailed guides for manual configuration.
Setting hostname
To set the system hostname:
# echo "shortname" > /etc/hostname
Then, to activate the change:
# hostname -F /etc/hostname
If you're using IPv6, you should also add the following special IPv6 addresses to your /etc/hosts file:
Contents of /etc/hosts
For a static IP configuration, it's common to also add the machine's hostname you just set (above) to the /etc/hosts file.
Here's an IPv4 example:
Contents of /etc/hosts
And here's an IPv6 example:
Contents of /etc/hosts
Configuring DNS
For a static IP address and static nameservers, use one of the following examples.
For IPv4 nameservers, edit your /etc/resolv.conf file to look like this:
The following example uses Google's Public DNS servers.
Contents of /etc/resolv.conf
For IPv6 nameservers, edit your /etc/resolv.conf file to look like this:
The following example uses Hurricane Electric's public DNS server.
Contents of /etc/resolv.conf
You can also use Hurricane Electric's public IPv4 DNS server:
Contents of /etc/resolv.conf
Interface configuration
Loopback configuration
To configure loopback, add the following to a new file /etc/network/interfaces:
Contents of /etc/network/interfaces
The above works to set up the IPv4 loopback address (127.0.0.1), and the IPv6 loopback address (::1
) — if you enabled IPv6.
Wireless configuration
Alpine Linux supports two wireless daemons i.e wpa_supplicant and iwd. setup-interfaces
script uses wpa_supplicant to configure wireless interface.
Ethernet configuration
For the following Ethernet configuration examples, we will assume that you are using Ethernet device eth0
.
Initial configuration
Add the following to the file /etc/network/interfaces, above any IP configuration for eth0
:
Contents of /etc/network/interfaces
IPv4 DHCP configuration
Add the following to the file /etc/network/interfaces, below the auto eth0
definition:
Contents of /etc/network/interfaces
By default, the busybox DHCP client (udhcpc) requests a static set of options from the DHCP server. If you need to extend this set, you can do so by setting some additional command line options for the DHCP client, via the udhcpc_opts
in your interface configuration. The following example requests
domain-search
option:
Contents of /etc/network/interfaces
For a complete list of command line options for udhcpc, see this document.
IPv4 Static Address Configuration
Add the following to the file /etc/network/interfaces, below the auto eth0
definition:
Contents of /etc/network/interfaces
Since Alpine 3.13 (and only if you have ifupdown-ng
installed) must be:
Contents of /etc/network/interfaces
Additional IP addresses
Contents of /etc/network/interfaces
Since Alpine 3.13 (and only if you have ifupdown-ng
installed) must be:
Contents of /etc/network/interfaces
IPv6 DHCP Configuration
Alpine's use of ifupdown-ng supports three DHCP clients: udhcpc, dhclient, and dhcpcd. Of these, only dhcpcd can interact with both DHCP and DHCPv6 from the same process, which ifupdown-ng requires. Thus the IPv4 DHCP configuration given above will also result in the use of DHCPv6, but only if you install the dhcpcd package. (The ifupdown-ng scripts prioritize dhclient over udhcpc, and they prioritize dhcpcd over dhclient; see /usr/libexec/ifupdown-ng/dhcp.)
IPv6 Stateless Autoconfiguration
Add the following to the file /etc/network/interfaces, below the auto eth0
definition:
Contents of /etc/network/interfaces
IPv6 Static Address Configuration
Add the following to the file /etc/network/interfaces, below the auto eth0
definition:
Contents of /etc/network/interfaces
Since Alpine Linux 3.13 (and only if you have ifupdown-ng
installed) must be as:
Contents of /etc/network/interfaces
Example: Dual-Stack Configuration
This example shows a dual-stack configuration.
Contents of /etc/network/interfaces
Take care since Alpine 3.13 (and only if you have ifupdown-ng
installed) must be as:
Contents of /etc/network/interfaces
Changes made to /etc/network/interfaces can be activated by running:
# rc-service networking restart
Firewall
Alpine Linux provides multiple firewall software. Some of the prominent ones are listed below:
Troubleshooting
Connectivity testing
Test if networking is configured properly by attempting to ping out:
$ ping www.google.com PING www.l.google.com (74.125.47.103) 56(84) bytes of data. 64 bytes from yw-in-f103.1e100.net (74.125.47.103): icmp_seq=1 ttl=48 time=58.5 ms 64 bytes from yw-in-f103.1e100.net (74.125.47.103): icmp_seq=2 ttl=48 time=56.4 ms 64 bytes from yw-in-f103.1e100.net (74.125.47.103): icmp_seq=3 ttl=48 time=57.0 ms 64 bytes from yw-in-f103.1e100.net (74.125.47.103): icmp_seq=4 ttl=48 time=60.2 ms ^C --- www.l.google.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3007ms rtt min/avg/max/mdev = 56.411/58.069/60.256/1.501 ms
For an IPv6 traceroute run traceroute6
:
$ traceroute6 ipv6.google.com traceroute to ipv6.l.google.com (2001:4860:8009::67) from 2001:470:ffff:ff::2, 30 hops max, 16 byte packets 1 2001:470:ffff:ff::1 (2001:470:ffff:ff::1) 3.49 ms 0.62 ms 0.607 ms 2 * * * 3 * * * 4 pr61.iad07.net.google.com (2001:504:0:2:0:1:5169:1) 134.313 ms 95.342 ms 88.425 ms 5 2001:4860::1:0:9ff (2001:4860::1:0:9ff) 100.759 ms 100.537 ms 89.907 ms 6 2001:4860::1:0:5db (2001:4860::1:0:5db) 115.563 ms 102.946 ms 106.191 ms 7 2001:4860::2:0:a7 (2001:4860::2:0:a7) 101.754 ms 100.475 ms 100.512 ms 8 2001:4860:0:1::c3 (2001:4860:0:1::c3) 99.272 ms 111.989 ms 99.835 ms 9 yw-in-x67.1e100.net (2001:4860:8009::67) 101.545 ms 109.675 ms 99.431 ms
iproute2
Install the iproute2 package which provides the 'ss' command which is IMHO a 'better' version of netstat.:
# apk add iproute2
Show listening tcp ports:
$ ss -tl
Show listening tcp ports and associated processes:
$ ss -ptl
Show listening and established tcp connections:
$ ss -ta
Show socket usage summary:
$ ss -s
Show more options:
$ ss -h
drill
Install drill (it will also install the 'ldns' package) which is a superior (IMHO) replacement for nslookup and dig etc:
# apk add drill
Then use it as you would for dig:
$ drill alpinelinux.org @8.8.8.8
To perform a reverse lookup (get a name from an IP) use the following syntax:
$ drill -x 8.8.8.8 @208.67.222.222
Missing interface
Sometimes networking interface will not be detected by the installation media. In this case, you may have to use an alternate interface for installation (e.g. a usb to ethernet adapter) upon which after install / reboot the interface will display. You may also try installing any missing packages that contain the drivers.
See also
You may also wish to review the following network related articles:
- NetworkManager - Front-end to Networking
- VLAN setup
- Bonding setup
- Network bridge setup
- udhcpc configuration
- wpa_supplicant - Default wifi daemon
- iwd - An alternate wifi daemon