Networking Flashcards
Show devices set on a system
nmcli dev show
Show network configuration settings on a system
nmcli con show
Turn off the connection
nmcli con down “Wired conn” [name of conn, ex- eth0]
Delete connection
nmcli con del “wired conn” [name of connection, ex eth0]
Check status of network devices
nmcli dev status
Show specified network device details
nmcli dev show eth0
Add new connection
nmcli con add con-name “backup” type ethernet ip4 192.168.0.122/24 gw4 192.168.0.1 ifname eth0 auroconnect
Edit current connection
nmcli con edit (which will prompt you for each setting and here you can enter in
each item based on the list printed out)
Add dns value for specified connection
nmcli con mod eth0 ipv4.dns “192.168.0.2”
Show dns field for specified connection
nmcli -f ipv4.dns con show backup/eth0
Display ip-address info
ip addr show
Display routing table
ip route show
Add/delete ip-address to specified interface
ip addr add/del 192.168.0.100/24 dev eth0
Show ip-address for specified interface
ip addr show eth0
ip addr show dev eth0
Switch on/off ip link
ip link set eth0 up/down
Add/delete route
ip route add/del default via 192.168.1.2 dev eth0
ip route add/del 10.10.0.0/16 via 192.168.1.2 dev eth0
Set host name for the system
hostnamectl set-hostname “CetnosWK”
Get hostname
hostname
Legacy networking tools- need to install package
yum install net-tools
Legacy: ip info details of configured interfaces
ifconfig