1.3 Given a scenario, configure and verify network connection parameters Flashcards
Five address classes
The five address classes are as follows:
Class A: From 1 to 126; each of these permits up to 16,777,216 host addresses. There can be 126 Class A networks.
Class B: From 128 to 191; each of these permits up to 65,536 host addresses. There can be 16,382 Class B networks.
Class C: From 192 to 223; each of these permits up to 254 host addresses. There can be 2,097,150 Class C networks.
Class D: From 224 to 239; this range is reserved for activities such as multicast and is not usually available for host addresses.
Class E: From 240 to 254; this range is reserved for future use
Address class ranges come with their own built-in default subnet masks; only one can be the default per range
Class A: 255.0.0.0 or /8 for the number of bits that represent the network mask
Class B: 255.255.0.0 or /16 for the number of bits that represent the network mask
Class C: 255.255.255.0 or /24 for the number of bits that represent the network mask
Ping
The ping command is used to verify that a remote host can respond to a network connection
By default, the ping command will continuously send “pings” to the remote system until the user cancels the command (Ctrl-C). The -c option specifies a count of how many ping requests to send
ping -c 4 google.com
netstat
The netstat command is useful for displaying a variety of network information. It is a key utility when troubleshooting network issues. The following table describes common options for the netstat command
the following command will display all active TCP connections:
netstat -ta
nslookup
The nslookup command is designed to perform simple queries on DNS servers
nslookup google.com
dig
The dig command is useful for performing DNS queries on specific DNS servers
dig google.com
-f file
Use the content of file to perform multiple lookups; the file should contain one hostname per line.
-4
Only perform IPv4 queries.
-6
Only perform IPv6 queries.
-x address
Perform a reverse lookup (return the hostname when provided an IP address).
host
The host command is normally used to perform simple hostname-to-IP-address translation operations (also called DNS queries)
route
the route command can be used to display the routing table
This information can also be displayed with the ip command:
ip route show
What command can be used to modify the default router?
route add default gw 192.168.1.10
ip
The ip command is a newer command that is designed to replace a collection of commands related to network interfaces
ip [options] object command
ethtool
The ethtool command is used to display and configure network device settings, such as the transmission speed and duplex value. Typically these settings are automatically configured through a process called auto-negotiation. With auto-negotiation, two network devices determine the best speed and duplex value and use that value automatically; however, these settings can also be manually set. The ethtool command also displays or modifies other useful network device settings
ss
The ss command is used to display socket information
iwconfig
The iwconfig command is used to display or set information about wireless network interfaces
f no arguments are provided, this command displays all network interfaces
nmcli
The nmcli command is used to configure NetworkManager, a tool designed to detect and configure network connections
brctl
The brctl command is used to create, modify, or view an Ethernet bridge. An Ethernet bridge connects separate networks into a single network from the perspective of users
nmtui
The nmtui command provides a text-based interface to configure NetworkManager
/etc/sysconfig/network-scripts/
This directory is found on Red Hat–based distributions, such as Red Hat Enterprise Linux, CentOS, and Fedora. It contains a collection of files that are used to configure network devices
/etc/sysconfig/network
This file is found on Red Hat–based distributions, such as Red Hat Enterprise Linux, CentOS, and Fedora. It contains basic networking information:
/etc/hosts
The /etc/hosts file is where hostname-to-IP-address translation is defined
In most cases, this file is only used for the local host itself or hosts on the local network. Normally hostname-to-IP-address translation is handled by a DNS server
/etc/network
The /etc/network directory is the traditional location where Debian-based network files are stored. This include the Debian, Ubuntu, and MintOS distributions
Note that on some systems, such as Ubuntu, /etc/network/interfaces has been replaced by configuration files in the /etc/netplan directory
/etc/nsswitch.conf
The Name Service Switch (NSS) configuration file, /etc/nsswitch.conf, is used by applications to determine the sources from which to obtain name service information, as well as in what order
/etc/resolv.conf
The /etc/resolv.conf file contains a list of the DNS servers for the system. A typical file looks like the following
If you are using a utility such as NetworkManager to configure your network settings or are using a DHCP client, then this file is normally populated by those utilities. For servers, this file is typically manually defined
/etc/netplan
The /etc/netplan directory is the new location where network configuration files are stored on Ubuntu and some other Debian-based distributions. The format of these files is YAML (YAML Ain’t Markup Language), a file format that is similar to JSON
/etc/sysctl.conf
The /etc/sysctl.conf file is used to specify which kernel settings to enable at boot