Managing network interfaces
Assuming our server's hardware has been properly detected, we'll have one or more network interfaces available for us to use. We can view information regarding these interfaces and manage them with the ip
command. For example, we can use ip addr
show to view our currently assigned IP address:
ip addr show
If for some reason you're not fond of typing, you can shorten this command all the way down to simply ip a
. The output will be the same in either case. From the output, we can see several useful tidbits, such as the IP address for each device (if it has one), as well as its MAC address.
Using the ip
command, we can also manage the state of an interface. We can bring a device down (remove its IP assignment and prevent it from connecting to networks), and then back up again:
# ip link set enp0s3 down # ip link set enp0s3 up
In that example, I'm simply toggling the state for interface enp0s3
. First, I'm bringing...