Network Flashcards
lists all available network interfaces on your system
ip link show
view device and address info of device ens3
ip addr show ens3
show statistics about a specific network dev performance
ip -s link show ens3
tests connectivity to a machine
ping -c3 192.0.2.254
ping6 2001:db8:0:1::1
find other IPv6 nodes on the local network
ping6 ff02::1%ens4
show routing information
ip route
ip -6 route
trace the network traffic path to reach a remote host
tracepath access.redhat.com
mtr access.redhat.com
display socket statistics.
ss -ta
ss -plunt
Locate the network interface name that is associated with the 52:54:00:00:fa:0a Ethernet address
ip link
Display the current IP address and netmask for all interfaces
ip -br addr
Display the statistics for the enX interface.
ip -s link show enX
Display the listening TCP sockets on the local system
ss -lt
displays the status of all network devices
nmcli dev status
displays a list of all connections.
nmcli con show
displays a list of all active connections.
nmcli con show --active
adds an eno2 connection of the ethernet type for the eno2 network interface
nmcli con add con-name eno2 type ethernet ifname eno2
creates an eno3 connection of the ethernet type for the eno3 network interface with a static IPv4 network setting
nmcli con add con-name eno3 type ethernet ifname eno3 ipv4.method manual ipv4.addresses 192.168.0.5/24 ipv4.gateway 192.168.0.254
activates a network connection on the device that it is bound to
nmcli con up static-ens3
disconnects the network device and brings down the connection
nmcli dev disconnect ens3
list the current settings for a connection
nmcli con show static-ens3
update the static-ens3 connection to set the 192.0.2.2/24 IPv4 address and the 192.0.2.254 default gateway. automatically enable the connection at system boot.
nmcli con mod static-ens3 ipv4.addresses 192.0.2.2/24 ipv4.gateway 192.0.2.254 connection.autoconnect yes
update the static-ens3 connection to set the 2001:db8:0:1::a00:1/64 IPv6 address and the 2001:db8:0:1::1 default gateway
nmcli con mod static-ens3 ipv6.addresses 2001:db8:0:1::a00:1/64 ipv6.gateway 2001:db8:0:1::1
adds the 2.2.2.2 DNS server to the static-ens3 connection
nmcli con mod static-ens3 +ipv4.dns 2.2.2.2
loads all connection profiles
nmcli con reload