Linux Networking Flashcards
How would you check if a network device is working?
nmcli device status
How would you get more in-depth information on a network device functionality?
nmcli show DEVICE
How might you edit a network device (for IP for example)
nmcli connection edit DEVICE
Takes you to nmcli prompt then:
nmcli> set PARAMETER VARIABLE
Relaunch the full TCP/IP stack.
sudo systemctl restart network.service
How to start/restart dhcp?
dhclient
dhclient-r
How would you restart the network stack on an older (non sysd distro)?
service network restart
Where is the network config stored in RHEL and SysV based distros
/etc/sysconfig/network-scripts
Where would the network config be in Ubuntu? (2 potential locations)
/etc/network
Or
/etc/netplan
Look for file ending config_yaml
How would you tell a system running netplan to take network configuration changes
sudo netplan apply
How would you save an nmcli edit?
nmcli save persistent
Then
sudo nmcli connection reload
How to apply an ip with netplan
Edit /etc/netplan/01-netplan-manager-all.yaml
Then
sudo netplan apply
How to start up/enable SSH
sudo systemctl enable —now ssh
(sshd in rhel)
Where are RHEL network config files?
/etc/sysconfig/network-scripts
What is the minimum information needed to connect to network?
IP Address
Subnet Mask
Default Gateway
Host name
DNS
What does ss -anpt do?
Display processes that have active network ports open.