Lesson 10: Managing Networking Flashcards
How do you view your interfaces and their associated IP address ?
Use the “ip addr” command
What is DORA?
DORA is a acronym that explains the DHCP process - Discover, Offer, Request, Acknowledgement
What is TCP/IP?
IP - Internet protocol and is responsible for addressing
TCP - Transmission control Protocol, allows a computer to establish a session between computer and the next computer that it’s trying to talk to
UDP
User Datagram Protocol - (best effort protocol)
How do you look up the address to a system?
nslookup {host_name}
How can you view network sessions running in background?
Use command ss (socket statistics)
ss -an
- a view all session
- n don’t list no names
How do you view your default gateway?
use the command route or use ip route
What does the command dhclient do?
command dhclient turns on dhcp service
-r - restarts dhcp service release and renew
How do you restart entire network stack?
Use the following systemctl command: systemctl restart network.serrvice
Or on older systems: service network restart
Where are network configurations stored?
/etc/sysconfig/network-scripts folder which contains scripts files that run when an interface comes up or goes down
note.
or Debian distributions, network configuration files can be found in the /etc/network/ directory. Many Debian-based distributions use Network Manager, so editing the files in /etc/network/ is usually not necessary.
Or /etc/netplan/99_config.yaml
- Netplan apply to set changes
How do you configure a static IP?
Navigate to the network interface config file and set the following settings:
BOOTPROTO=none
IPADDR0={ip_address}
PERFIX0={SUBNET_8, 16, OR 24}
GATEWAY0={gateway_ip}
How do you set global network settings?
You can set global configurations in the systemctl/network file but keep in mind that the network interface config overrides the global config
What is contained in the /etc/resolv.conf file?
global setting for defining name servers
How do you change your hostname?
use the hostnamectl set-hostname {name}
What a Utility you can use to set network configurations?
The network manager utility: nmcli. The syntax of the nmcli command is nmcli [options] [subcommand] [arguments]
general statusView a summary of network connectivity data.connection showView identification information for each NIC.con up {device ID}Enable the specified NIC.con down {device ID}Disable the specified NIC.con edit {device ID}Enter interactive mode to configure the specifiedNIC.device statusDisplay the current status of each NIC.
nmcli connection edit {interface_name}
nmcli devices status -list devices
nmcli devices show {network_adapter} -will show adapter configuration
note.If you get error network is properly not running
How do you set a static IP address using the network manager?
nmcli connection edit {interface_name}
set ipv4.method manual
set ipv4.addr {ip_address such as 192.168.0.2/24}
nmcli connection reload
What network utility lets you send out a echo request and received a echo request in response?
ping {host_name}
ping6 {host_name} -to test ipv6
What command maps out all connections to a Host?
traceroute {hostname} or tracepath {hostname} (this is newer)
What does the command ip route do?
ip route - to see your router/gateway IP
What is a reason you would ping your own IP?
To check your network adapter and confirm IP address.
Aside from nslookup, what utility can you use to find issues with the DNS server?
dig {hostname}
note.allow take a look at the configuration in /etc/resolve.conf, dns can be overwriting in the /etc/hosts file
How do you see network traffic going in and out?
Use the command: ss
ss -atp -all session, tcp , actively listing
ss -tp sees active connection
ss.–route shows routing table or use ip route
ss –process show programs that are holding ports open