🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

LPI-Learning-Material-102-500-en-375-477.pdf

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Transcript

LPIC-1 (102) (Version 5.0) | 108.4 Manage printers and printing printed more than once as all of the pages for each document will then be printed in order. Set this option to either true to enable it or false to disable it....

LPIC-1 (102) (Version 5.0) | 108.4 Manage printers and printing printed more than once as all of the pages for each document will then be printed in order. Set this option to either true to enable it or false to disable it. page-ranges This option can be used to select a single page to print, or a specific set of pages to print from a document. An example would look like: -o page-ranges=5-7,9,15. This would print pages 5, 6 and 7 then pages 9 and 15. fit-to-page Print the document so that the file is scaled to fit the paper. If no information about the page size is provided by the file to be printed, it is possible that the printed job will be scaled incorrectly and portions of the document could be scaled off the page or the document could be scaled too small. outputorder Print the document in either reverse order or normal to start the printing on page one. If a printer prints its pages face-down, the default is for the order to be -o outputorder=normal whereas printers that print with their pages facing up will print with -o outputorder=reverse. Taking a sampling of the options above, the following example command can be constructed: $ lpr -P ACCOUNTING-LASERJET -o landscape -o media=A4 -o two-sided-short-edge finance- report.pdf More than one copy of a document can be printed by using the number option in the following format: -#N where N is equal to the number of copies to print. Here is an example with the collate option where seven copies of a report are to be printed on the default printer: $ lpr -#7 -o collate=true status-report.pdf Aside from the lpr command, the lp command can also be used. Many of the options that are used with the lpr command can also be used with the lp command, but there are some differences. Be sure to consult the man page at lp(1) for reference. Here is how we can run the previous example lpr command using the syntax of the lp command while also specifying the destination printer with the -d option: $ lp -d ACCOUNTING-LASERJET -n 7 -o collate=true status-report.pdf Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 365 LPIC-1 (102) (Version 5.0) | Topic 108: Essential System Services Managing Print Jobs As stated earlier, each print job submitted to the print queue receives a job ID from CUPS. A user can view the print jobs that they have submitted with the lpq command. Passing in the -a option will show the queues of all printers that are managed by the CUPS installation: $ lpq -a Rank Owner Job File(s) Total Size 1st carol 20 finance-report.pdf 5072 bytes The same lpstat command used previously also has an option to view printer queues. The -o option by itself will show all print queues, or a print queue can be specified by name: $ lp -o ACCOUNTING-LASERJET-4 carol 19456 Wed 05 Aug 2020 04:29:44 PM EDT The print job ID will be prepended with the name of the queue where the job was sent, then the name of the user that submitted the job, the file’s size, and the time it was submitted. Should a print job get stuck on a printer or a user wishes to cancel their print job, use the lprm command along with the job ID found from the lpq command: $ lprm 20 All jobs in a print queue could be deleted at once by providing just a dash -: $ lprm - Alternatively, the CUPS cancel command could also be used by a user to stop their current print job: $ cancel A specific print job can be cancelled by its job ID prepended by the printer name: $ cancel ACCOUNTING-LASERJET-20 366 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 108.4 Manage printers and printing A print job can also be moved from one print queue to another. This is often helpful should a printer stop responding or the document to be printed requires features available on a different printer. Take note that this procedure typically requires a user with elevated privileges. Using the same print job from the previous example, we could move it to the queue of the FRONT-DESK printer: $ sudo lpmove ACCOUNTING-LASERJET-20 FRONT-DESK Removing Printers To remove a printer, it is often helpful to first list out all of the printers that are currently managed by the CUPS service. This can be done with the lpstat command: $ lpstat -v device for FRONT-DESK: socket://192.168.150.24 device for ENVY-4510: socket://192.168.150.25 device for PostScript_oc0303387803: ///dev/null The -v option not only lists out the printers but also where (and how) they are attached. It is good practice to first reject any new jobs going to the printer and provide a reason as to why the printer will not be accepting new jobs. This can be done with the following: $ sudo cupsreject -r "Printer to be removed" FRONT-DESK Note the use of sudo as this task requires a user with elevated privileges. To remove a printer, we utilize the lpadmin command with the -x option to delete the printer: $ sudo lpadmin -x FRONT-DESK Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 367 LPIC-1 (102) (Version 5.0) | Topic 108: Essential System Services Guided Exercises 1. A new printer was just installed on a local workstation named office-mgr. What command could be used to set this printer as the default for this workstation? 2. Which command and option would be used to determine what printers are available for printing from a workstation? 3. Using the cancel command, how would you remove a print job with ID 15 that is stuck in the queue for the printer named office-mgr? 4. You have a print job destined for a printer that does not have enough paper to print the full file. What command would you use to move the print job with ID 2 queued to print on the FRONT-DESK printer over to the print queue for the ACCOUNTING-LASERJET printer? 368 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 108.4 Manage printers and printing Explorational Exercises Using your distribution’s package manager, install the cups and the printer-driver-cups-pdf packages. Note that if you are using a Red Hat based distribution (such as Fedora) the CUPS PDF driver is called cups-pdf. Also install the cups-client package to utilize the System V style printing commands We will use these packages to practice managing a CUPS printer without physically installing a real printer. 1. Verify that the CUPS daemon is running, then verify that the PDF printer is enabled and set to the default. 2. Run a command that will print the /etc/services file. You should now have a directory named PDF within your home directory. 3. Use a command that will only disable the printer, then run a separate command that shows all status information to verify that the PDF printer is disabled. Then try to print a copy of your /etc/fstab file. What happens? 4. Now try to print a copy of the /etc/fstab file to the PDF printer. What happens? 5. Cancel the print job, then remove the PDF printer. Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 369 LPIC-1 (102) (Version 5.0) | Topic 108: Essential System Services Summary The CUPS daemon is a widely-used platform for printing to local and remote printers. While it supersedes the legacy LPD protocol it still provides backwards compatibility for its tools. The files and commands discussed in this lesson were: /etc/cups/cupsd.conf The primary configuration file for the CUPS service itself. This file also controls access to the web interface for CUPS. /etc/printcap A legacy file used by LPD that contains a line for each printer connected to the system. /etc/cups/printers.conf The configuration file used by CUPS for printer information. The CUPS web interface, which on a default installation can be found at http://localhost:631. Remember that the default network port for the web interface is 631/TCP. The following legacy LPD/LPR commands were also discussed: lpadmin Used to install and remove printers and printer classes. lpoptions Used to print out printer options and to modify a printer’s settings. lpstat Used to display status information of the printers connected to a CUPS installation. lpr Used to submit print jobs to a printer’s queue. lp Used to submit print jobs to a printer’s queue. lpq This command lists out the print jobs within the print queue. 370 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 108.4 Manage printers and printing lprm Used to cancel print jobs by ID. The ID for a job can be obtained with the output of the lpq command. cancel An alternative to the lprm command to cancel print jobs by their ID. Be sure to review the following man pages for the various tools and utilities for cups: lpadmin(8), lpoptions(1), lpr(1), lpq(1), lprm(1), cancel(1), lpstat(1), cupsenable(8) and cupsaccept(8). Reviewing the online help documentation at http://localhost:631/help is also recommended. Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 371 LPIC-1 (102) (Version 5.0) | Topic 108: Essential System Services Answers to Guided Exercises 1. A new printer was just installed on a local workstation named office-mgr. What command could be used to set this printer as the default for this workstation? $ lpoptions -d office-mgr 2. Which command and option would be used to determine what printers are available for printing from a workstation? $ lpstat -p The -p option lists out all available printers and if they are enabled for printing. 3. Using the cancel command, how would you remove a print job with ID 15 that is stuck in the queue for the printer named office-mgr? $ cancel office-mgr-15 4. You have a print job destined for a printer that does not have enough paper to print the full file. What command would you use to move the print job with ID 2 queued to print on the FRONT-DESK printer over to the print queue for the ACCOUNTING-LASERJET printer? $ sudo lpmove FRONT-DESK-2 ACCOUNTING-LASERJET 372 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 108.4 Manage printers and printing Answers to Explorational Exercises Using your distribution’s package manager, install the cups and the printer-driver-cups-pdf packages. Note that if you are using a Red Hat based distribution (such as Fedora) the CUPS PDF driver is called cups-pdf. We will use these packages to practice managing a CUPS printer without physically installing a real printer. 1. Verify that the CUPS daemon is running, then verify that the PDF printer is enabled and set to the default. One method to check the availability and status of the PDF printer would be to run the following command: $ lpstat -p -d printer PDF is idle. enabled since Thu 25 Jun 2020 02:36:07 PM EDTi system default destination: PDF 2. Run a command that will print the /etc/services file. You should now have a directory named PDF within your home directory. $ lp -d PDF /etc/services would work. You will now have a PDF version of this file within the PDF directory. 3. Use a command that will only disable the printer, then run a separate command that shows all status information to verify that the PDF printer is disabled. $ sudo cupsdisable PDF will disable the printer. Next run the lpstat -t command to get a full listing of the printer’s condition. It should look similar to the following output: $ scheduler is running system default destination: PDFi Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 373 LPIC-1 (102) (Version 5.0) | Topic 108: Essential System Services device for PDF: cups-pdf:/ PDF accepting requests since Wed 05 Aug 2020 04:19:15 PM EDTi printer PDF disabled since Wed 05 Aug 2020 04:19:15 PM EDT - Paused 4. Now try to print a copy of the /etc/fstab file to the PDF printer. What happens? After attempting the command lp -d PDF /etc/fstab you should get output showing the job ID information. However, if you check the PDF folder in your home directory, the new file is not there. You can then check the print queue with the lpstat -o command, and you will find your job listed there. 5. Cancel the print job, then remove the PDF printer. Using the output from the previous lp command, use the cancel command to delete the job. For example: $ cancel PDF-4 Then run the lpstat -o command to verify that the job has been deleted. Remove the PDF printer with the following: sudo lpadmin -x PDF. Then verify that the printer has been removed: lpstat -a. 374 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 375 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals 109.1 Fundamentals of internet protocols Reference to LPI objectives LPIC-1 version 5.0, Exam 102, Objective 109.1 Weight 4 Key knowledge areas Demonstrate an understanding of network masks and CIDR notation. Knowledge of the differences between private and public "dotted quad" IP addresses. Knowledge about common TCP and UDP ports and services (20, 21, 22, 23, 25, 53, 80, 110, 123, 139, 143, 161, 162, 389, 443, 465, 514, 636, 993, 995). Knowledge about the differences and major features of UDP, TCP and ICMP. Knowledge of the major differences between IPv4 and IPv6. Knowledge of the basic features of IPv6. Partial list of the used files, terms and utilities /etc/services IPv4, IPv6 Subnetting TCP, UDP, ICMP 376 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.1 Fundamentals of internet protocols 109.1 Lesson 1 Certificate: LPIC-1 Version: 5.0 Topic: 109 Networking Fundamentals Objective: 109.1 Fundamentals of internet protocols Lesson: 1 of 2 Introduction The TCP/IP (Transmission Control Protocol/Internet Protocol) is a stack of protocols used to enable communication between computers. Despite the name, the stack consists of several protocols such as IP, TCP, UDP, ICMP, DNS, SMTP, ARP and others. IP (Internet Protocol) The IP is the protocol responsible for the logical addressing of a host, enabling the packet to be sent from one host to another. For this each device on the network is assigned a unique IP address, and it is possible to assign more than one address to the same device. In the version 4 of the IP protocol, usually called IPv4, the address is formed by a set of 32 bits separated into 4 groups of 8 bits, represented in decimal form, called “dotted quad”. For example: Binary format (4 groups of 8 bits) 11000000.10101000.00001010.00010100 Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 377 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals Decimal format 192.168.10.20 In IPv4, the values for each octet can range from 0 to 255, which is the equivalent of 11111111 in binary format. Address Classes Theoretically, IP addresses are separated by classes, which are defined by the range of the first octet as shown in the table below: Class First Octect Range Example A 1-126 1.0.0.0 – 10.25.13.10 126.255.255.255 B 128-191 128.0.0.0 – 141.150.200.1 191.255.255.255 C 192-223 192.0.0.0 – 200.178.12.242 223.255.255.255 Public and Private IPs As mentioned earlier, for communication to occur each device on the network must be associated with at least one unique IP address. However, if each device connected to the Internet in the world had a unique IP address, there would not be enough IPs (v4) for everyone. For this, private IP addresses were defined. Private IPs are ranges of IP addresses that have been reserved for use in the internal (private) networks of companies, institutions, homes, etc. Within the same network, the use of an IP address remains unique. However, the same private IP address can be used within any private network. Thus, on the Internet we have data traffic using public IP addresses, which are recognizable and routed over the Internet, while within private networks these reserved IP ranges are used. The router is responsible for converting traffic from the private network to the public network and vice versa. The ranges of Private IPs, separated by classes, can be seen in the table below: 378 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.1 Fundamentals of internet protocols Class First Octet Range Private IPs A 1-126 1.0.0.0 – 10.0.0.0 – 126.255.255.255 10.255.255.255 B 128-191 128.0.0.0 – 172.16.0.0 – 191.255.255.255 172.31.255.255 C 192-223 192.0.0.0 – 192.168.0.0 – 223.255.255.255 192.168.255.255 Converting from Decimal Format to Binary For the subjects of this topic, it is important to know how to convert IP addresses between binary and decimal formats. The conversion from decimal format to binary is done through consecutive divisions by 2. As an example, let’s convert the value 105 by the following steps: 1. Dividing the value 105 by 2 we have: 105/2 Quotient = 52 Rest = 1 2. Divide the quotient sequentially by 2, until the quotient is equal to 1: 52/2 Rest = 0 Quotient = 26 26/2 Rest = 0 Quotient = 13 13/2 Rest = 1 Quotient = 6 6/2 Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 379 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals Rest = 0 Quotient = 3 3/2 Rest = 1 Quotient = 1 3. Group the last quotient followed by the remainder of all divisions: 1101001 4. Fill in 0s to the left until 8 bits are completed: 01101001 5. In the end, we have that the value 105 in decimal is equal to 01101001 in binary. Converting from Binary Format to Decimal In this example, we will use the binary value 10110000. 1. Each bit is associated with a value with a base power of two. The powers are started at 0, and are incremented from right to left. In this example we will have: 1 0 1 1 0 0 0 0 7 6 5 4 3 2 1 0 2 2 2 2 2 2 2 2 2. When the bit is 1, we assign the value of the respective power, when the bit is 0 the result is 0. 1 0 1 1 0 0 0 0 7 6 5 4 3 2 1 0 2 2 2 2 2 2 2 2 128 0 32 16 0 0 0 0 3. Add up all values: 128 + 32 + 16 = 176 4. Thus, 10110000 in binary is equal to 176 in decimal. 380 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.1 Fundamentals of internet protocols Netmask The network mask (or netmask) is used in conjunction with the IP address to determine which part of the IP represents the network and which represents the hosts. It has the same format as the IP address, that is, there are 32 bits in 4 groups of 8. For example: Decimal Binary CIDR 255.0.0.0 11111111.00000000.0000000 8 0.00000000 255.255.0.0 11111111.11111111.0000000 16 0.00000000 255.255.255.0 11111111.11111111.1111111 24 1.00000000 Using the 255.255.0.0 mask as an example, it indicates that in the IP associated with it, the first 16 bits (2 first decimals) identify the network/subnet and the last 16 bits are used to uniquely identify the hosts within the network. The CIDR (Classless Inter-Domain Routing) mentioned above is related to a simplified mask notation, which indicates the number of bits (1) associated with the network/subnet. This notation is commonly used to replace the decimal format, for example /24 instead of 255.255.255.0. It is interesting to note that each class of IP has a standard mask, as follows: Class First Octet Range Default Mask A 1-126 1.0.0.0 – 255.0.0.0 / 8 126.255.255.255 B 128-191 128.0.0.0 – 255.255.0.0 / 16 191.255.255.255 C 192-223 192.0.0.0 – 255.255.255.0 / 24 223.255.255.255 However, this pattern does not mean that this is the mask that will always be used. It is possible to use any mask with any IP address, as we will see below. Here are some examples of using IPs and Masks: 192.168.8.12 / 255.255.255.0 / 24 Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 381 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals Range 192.168.8.0 - 192.168.8.255 Network Address 192.168.8.0 Broadcast Address 192.168.8.255 Hosts 192.168.8.1 - 192.168.8.254 In this case we have the first 3 digits (first 24 bits) of the IP address define the network and the final digit identifies the addresses of the hosts, that is, the range of this network goes from 192.168.8.0 to 192.168.8.255. We now have two important concepts: Every network/subnet has 2 reserved addresses, the first address in the range is called the network address. In this case 192.168.8.0, which is used to identify the network/subnet itself. The last address in the range is called the broadcast address, in this case 192.168.8.255. This destination address is used to send the same message (packet) to all IP hosts on that network/subnet. The network and broadcast addresses cannot be used by the machines on the network. Therefore, the list of IPs that can be effectively configured ranges from 192.168.8.1 to 192.168.8.254. Now the example of the same IP, but with a different mask: 192.168.8.12 / 255.255.0.0 / 16 Range 192.168.0.0 - 192.168.255.255 Network Address 192.168.0.0 Broadcast Address 192.168.255.255 Hosts 192.168.0.1 – 192.168.255.254 382 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.1 Fundamentals of internet protocols See how the different mask changes the range of IPs that are within the same network/subnet. The division of networks by masks is not restricted to the default values (8, 16, 24). We can create subdivisions as desired, adding or removing bits in the network identification, creating the new subnets. For example: 11111111.11111111.11111111.00000000 = 255.255.255.0 = 24 If we want to subdivide the network above into 2, just add another bit to the network identification in the mask, like this: 11111111.11111111.11111111.10000000 = 255.255.255.128 = 25 We have then the following subnets: 192.168.8.0 - 192.168.8.127 192.168.8.128 - 192.168.8.255 If we further increase the subdivision of the network: 11111111.11111111.11111111.11000000 = 255.255.255.192 = 26 We will have: 192.168.8.0 - 192.168.8.63 192.168.8.64 - 192.168.8.127 192.168.8.128 - 192.168.8.191 192.168.8.192 - 192.168.8.255 Note that in each subnet we will have the reserved network (the first in the range) and broadcast (the last in the range) addresses, so the more the network is subdivided, the fewer IPs can be effectively used by the hosts. Identifying the Network and Broadcast Addresses Through an IP Address and a Mask, we can identify the network address and the broadcast Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 383 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals address, and thus define the range of IPs for the network/subnet. The network address is obtained by using a “Logical AND” between the IP address and the mask in their binary formats. Let’s take the example using IP 192.168.8.12 and mask 255.255.255.192. Converting from decimal to binary format, as we saw earlier, we have: 11000000.10101000.00001000.00001100 (192.168.8.12) 11111111.11111111.11111111.11000000 (255.255.255.192) With “Logical AND”, we have 1 and 1 = 1, 0 and 0 = 0, 1 and 0 = 0, so: 11000000.10101000.00001000.00001100 (192.168.8.12) 11111111.11111111.11111111.11000000 (255.255.255.192) 11000000.10101000.00001000.00000000 So the network address for that subnet is 192.168.8.0. Now to obtain the broadcast address, we must use the network address where all bits related to the host address to 1: 11000000.10101000.00001000.00000000 (192.168.8.0) 11111111.11111111.11111111.11000000 (255.255.255.192) 11000000.10101000.00001000.00111111 The broadcast address is then 192.168.8.63. In conclusion, we have: 192.168.8.12 / 255.255.255.192 / 26 Range 192.168.8.0 - 192.168.8.63 Network Address 192.168.8.0 Broadcast Address 192.168.8.63 384 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.1 Fundamentals of internet protocols Hosts 192.168.8.1 – 192.168.8.62 Default Route As we have seen so far, machines that are within the same logical network/subnet can communicate directly via the IP protocol. But let’s consider the example below: Network 1 192.168.10.0/24 Network 2 192.168.200.0/24 In this case, the 192.168.10.20 machine cannot directly send a packet to the 192.168.200.100, as they are on different logical networks. To enable this communication a router (or a set of routers) is used. A router in this configuration can also be called a gateway as it provides a gateway between two networks. This device has access to both networks as it is configured with IPs from both networks. For example 192.168.10.1 and 192.168.200.1, and for this reason it manages to be the intermediary in this communication. To enable this, each host on the network must have configured what is called the default route. The default route indicates the IP to which all packets whose destination is an IP that is not part of the host’s logical network must be sent. In the example above, the default route for machines on the 192.168.10.0/24 network will be the IP 192.168.10.1, which is the router/gateway IP, while the default route for machines on the 192.168.200.0/24 network will be 192.168.200.1. The default route is also used so that machines on the private network (LAN) have access to the Internet (WAN), through a router. Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 385 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals Guided Exercises 1. Using the IP 172.16.30.230 and netmask 255.255.255.224, identify: The CIDR notation for the netmask Network address Broadcast address Number of IPs that can be used for hosts in this subnet 2. Which setting is required on a host to allow an IP communication with a host in a different logical network? 386 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.1 Fundamentals of internet protocols Explorational Exercises 1. Why are the IP ranges starting with 127 and the range after 224 not included in the IP address classes A, B or C? 2. One of the fields belonging to an IP packet that is very important is TTL (Time To Live). What is the function of this field and how does it work? 3. Explain the function of NAT and when it is used. Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 387 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals Summary This lesson covered the main concepts for the IPv4 protocol, which is responsible for enabling communication between hosts on a network. The main operations that the professional must know in order to convert the IPs in different formats, and to be able to analyze and perform the logical configurations on networks and subnets were also studied. The following subjects were addressed: IP addresses classes Public and private IPs How to convert IPs from decimal to binary format, and vice versa The network mask (netmask) How to identify the network and broadcast addresses from IP and netmask Default route 388 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.1 Fundamentals of internet protocols Answers to Guided Exercises 1. Using the IP 172.16.30.230 and netmask 255.255.255.224, identify: The CIDR notation for the netmask 27 Network address 172.16.30.224 Broadcast address 172.16.30.255 Number of IPs that can be used for hosts in 30 this subnet 2. Which setting is required on a host to allow an IP communication with a host in a different logical network? Default route Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 389 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals Answers to Explorational Exercises 1. Why are the IP ranges starting with 127 and the range after 224 not included in the IP address classes A, B or C? The range that starts with 127 is reserved for loopback addresses, used for tests and internal communication between processes, such as the address 127.0.0.1. In addition, addresses above 224 are also not used as host addresses, but for multicast and other purposes. 2. One of the fields belonging to an IP packet that is very important is TTL (Time To Live). What is the function of this field and how does it work? TTL defines the lifetime of a packet. This is implemented through a counter in which the initial value defined at the source is decremented in each gateway/router through which the packet passes, which is also called a “hop”. If this counter reaches 0 the packet is discarded. 3. Explain the function of NAT and when it is used. The NAT (Network Address Translation) feature allows hosts on an internal network, which uses private IPs, to have access to the Internet as if they were directly connected to it, with the Public IP used on the gateway. 390 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.1 Fundamentals of internet protocols 109.1 Lesson 2 Certificate: LPIC-1 Version: 5.0 Topic: 109 Networking Fundamentals Objective: 109.1 Fundamentals of internet protocols Lesson: 2 of 2 Introduction At the beginning of this subtopic we saw that the TCP/IP stack is composed of a series of different protocols. So far we have studied the IP protocol, which allows communication between machines through IP addresses, masks, routes, etc. For a host to be able to access a service available on another host, in addition to the IP addressing protocol at the network layer, it will be necessary to use a protocol at the transport layer such as the TCP and UDP protocols. These protocols carry out this communication through network ports. So in addition to defining a source and destination IP, source and destination ports will be used to access a service. The port is identified by a 16-bit field thus providing a limit of 65,535 possible ports. The services (destination) use ports 1 to 1023, which are called privileged ports because they have root access to the system. The origin of the connection will use the range of ports from 1024 to 65,535, called non-privileged ports, or socket ports. The ports used by each type of service are standardized and controlled by IANA (Internet Assigned Numbers Authority). This means that on any system, port 22 is used by the SSH service, port 80 by Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 391 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals the HTTP service and so on. The table below contains the main services and their respective ports. Port Service 20 FTP (data) 21 FTP (control) 22 SSH (Secure Socket Shell) 23 Telnet (Remote connection without encryption) 25 SMTP (Simple Mail Transfer Protocol), Sending Mails 53 DNS (Domain Name System) 80 HTTP (Hypertext Transfer Protocol) 110 POP3 (Post Office Protocol), Receiving Mails 123 NTP (Network Time Protocol) 139 Netbios 143 IMAP (Internet Message Access Protocol), Accessing Mails 161 SNMP (Simple Network Management Protocol) 162 SNMPTRAP, SNMP Notifications 389 LDAP (Lightweight Directory Access Protocol) 443 HTTPS (Secure HTTP) 465 SMTPS (Secure SMTP) 514 RSH (Remote Shell) 636 LDAPS (Secure LDAP) 993 IMAPS (Secure IMAP) 995 POP3S (Secure POP3) On a Linux system, standard service ports are listed in the /etc/services file. The identification of the desired destination port in a connection is done using the character : (colon) after the IPv4 address. Thus, when seeking access to the HTTPS service that is served by the IP host 200.216.10.15, the client must send the request to the destination 392 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.1 Fundamentals of internet protocols 200.216.10.15:443. The services listed above, and all others, use a transport protocol according to the characteristics required by the service, where TCP and UDP are the main ones. Transmission Control Protocol (TCP) TCP is a connection-oriented transport protocol. This means that a connection is established between the client through the socket port, and the service through the service standard port. The protocol is in charge of ensuring that all packets are delivered properly, verifying the integrity and order of the packets, including the re-transmission of packets lost due to network errors. Thus the application does not need to implement this data flow control as it is already guaranteed by the TCP protocol. User Datagram Protocol (UDP) UDP establishes a connection between the client and the service, but does not control the data transmission of that connection. In other words, it does not check if packages have been lost, or if they are out of order, etc. The application is responsible for implementing the controls that are necessary. As there is less control, UDP enables better performance in the data flow which is important for some types of services. Internet Control Message Protocol (ICMP) ICMP is a network layer protocol in the TCP/IP stack and its main function is to analyze and control network elements, making it possible, for example: Traffic volume control Detection of unreachable destinations Route redirection Checking the status of remote hosts It is the protocol used by the ping command, which will be studied in another subtopic. IPv6 So far we have studied version 4 of the IP protocol, i.e. IPv4. This has been the standard version Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 393 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals used in all network and Internet environments. However it has limitations especially in regards to the number of available addresses, and with an already current reality that all devices will be somehow connected to the Internet (see IoT), it is becoming increasingly common to use version 6 of the IP protocol, commonly written as IPv6. IPv6 brings a series of changes, new implementations and features, as well as a new representation of the address itself. Each IPv6 address has 128 bits, divided into 8 groups of 16 bits, represented by hexadecimal values. For example: 2001:0db8:85a3:08d3:1319:8a2e:0370:7344 Abbreviations IPv6 defines ways to shorten addresses in some situations. Let’s review the following address: 2001:0db8:85a3:0000:0000:0000:0000:7344 The first possibility is to reduce strings from 0000 to just 0, resulting in: 2001:0db8:85a3:0:0:0:0:7344 In addition, in case of group strings with a value of 0, they can be omitted, as follows: 2001:0db8:85a3::7344 However, this last abbreviation can only be done once in the address. See the example: 2001:0db8:85a3:0000:0000:1319:0000:7344 2001:0db8:85a3:0:0:1319:0:7344 2001:0db8:85a3::1319:0:7344 394 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.1 Fundamentals of internet protocols IPv6 Address Types IPv6 classifies addresses into 3 types: Unicast Identifies a single network interface. By default, the 64 bits on the left identify the network, and the 64 bits on the right identify the interface. Multicast Identifies a set of network interfaces. A packet sent to a multicast address will be sent to all interfaces that belong to that group. Although similar, it should not be confused with broadcast, which does not exist in the IPv6 protocol. Anycast This also identifies a set of interfaces on the network, but the packet forwarded to an anycast address will be delivered to only one address in that set, not everyone. Differences between IPv4 and IPv6 In addition to the address several other differences can be pointed out between versions 4 and 6 of the IP. Here are some of them: Service ports follow the same standards and protocols (TCP, UDP), the difference is only in the representation of the IP and port set. In IPv6 the IP address must be protected with [] (brackets): IPv4 200.216.10.15:443 IPv6 [2001:0db8:85a3:08d3:1319:8a2e:0370:7344]:443 IPv6 does not implement the broadcast feature exactly as it exists in IPv4. However the same result can be achieved by sending the packet to the address ff02::1, reaching all hosts on the local network. Something similar to using 224.0.0.1 on IPv4 for multicasting as a destination. Through the SLAAC (Stateless Address Autoconfiguration) feature, IPv6 hosts are able to self- configure. The TTL (Time to Live) field of IPv4 has been replaced by the “Hop Limit” in the IPv6 header. All IPv6 interfaces have a local address, called link-local address, prefixed with fe80::/10. IPv6 implements the Neighbor Discovery Protocol (NDP), which is similar to the ARP used by Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 395 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals IPv4, but with much more functionality. 396 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.1 Fundamentals of internet protocols Guided Exercises 1. Which port is the default for the SMTP protocol? 2. How many different ports are available in a system? 3. Which transport protocol ensures that all packets are delivered properly, verifying the integrity and the order of the packets? 4. Which type of IPv6 address is used to sent a packet to all interfaces that belong to group of hosts? Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 397 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals Explorational Exercises 1. Mention 4 examples of services that use the TCP protocol by default. 2. What is the name of the field on IPv6 header package that implement the same resource of TTL on IPv4? 3. What kind of information Neighbor Discovery Protocol (NDP) is able to discover? 398 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.1 Fundamentals of internet protocols Summary This lesson covered the main transport protocols and services used on TCP/IP stack. Another important topic was the version 6 of IP Protocol, including the IPv6 addresses and the main differences with IPv4. The following subjects were addressed: The correlation between Port numbers and Services TCP (Transmission Control Protocol) UDP (User Datagram Protocol) ICMP (Internet Control Message Protocol) The IPv6 address and how it can be abbreviated IPv6 address types Main differences between IPv4 and IPv6 Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 399 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals Answers to Guided Exercises 1. Which port is the default for the SMTP protocol? 25 2. How many different ports are available in a system? 65535 3. Which transport protocol ensures that all packets are delivered properly, verifying the integrity and the order of the packets? TCP 4. Which type of IPv6 address is used to sent a packet to all interfaces that belong to group of hosts? Multicast 400 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.1 Fundamentals of internet protocols Answers to Explorational Exercises 1. Mention 4 examples of services that use the TCP protocol by default. FTP, SMTP, HTTP, POP3, IMAP, SSH 2. What is the name of the field on IPv6 header package that implement the same resource of TTL on IPv4? Hop Limit 3. What kind of information Neighbor Discovery Protocol (NDP) is able to discover? NDP is able to obtain various information from the network, including other nodes, duplicate addresses, routes, DNS servers, gateways, etc. Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 401 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals 109.2 Persistent network configuration Reference to LPI objectives LPIC-1 version 5.0, Exam 102, Objective 109.2 Weight 4 Key knowledge areas Understand basic TCP/IP host configuration Configure ethernet and wi-fi network configuration using NetworkManager Awareness of systemd-networkd Partial list of the used files, terms and utilities /etc/hostname /etc/hosts /etc/nsswitch.conf /etc/resolv.conf nmcli hostnamectl ifup ifdown 402 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.2 Persistent network configuration 109.2 Lesson 1 Certificate: LPIC-1 Version: 5.0 Topic: 109 Networking Fundamentals Objective: 109.2 Persistent network configuration Lesson: 1 of 2 Introduction In any TCP/IP network, every node must configure its network adapter to match the network requirements, otherwise they will not be able to communicate with each other. Therefore, the system administrator must provide the basic configuration so the operating system will be able to setup the appropriate network interface, as well as to identify itself and the basic features of the network every time it boots. Network settings are agnostic in regard to operating systems, but the latter have their own methods to store and apply these settings. Linux systems rely on configurations stored in plain text files under the /etc directory to bring up network connectivity during boot time. It is worth knowing how these files are used to avoid connectivity loss due to local misconfiguration. The Network Interface Network interface is the term by which the operating system refers to the communication channel configured to work with the network hardware attached to the system, such as an ethernet or wi- fi device. The exception to this is the loopback interface, which the operating system uses when it needs to establish a connection with itself, but the main purpose of a network interface is to Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 403 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals provide a route through which local data can be sent and remote data can be received. Unless the network interface is properly configured, the operating system will not be able to communicate with other machines in the network. For most cases, the correct interface settings are either defined by default or customized during the installation of the operating system. Nevertheless, these settings often need to be inspected or even modified when the communication isn’t working properly or when the interface’s behavior requires customization. There are many Linux commands to list which network interfaces are present on the system, but not all of them are available in all distributions. Command ip, however, is part of the basic set of networking tools bundled with all Linux distributions and can be used to list the network interfaces. The complete command to show the interfaces is ip link show: $ ip link show 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: enp3s5: mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 link/ether 00:16:3e:8d:2b:5b brd ff:ff:ff:ff:ff:ff If available, command nmcli device can also be used: $ nmcli device DEVICE TYPE STATE CONNECTION enp3s5 ethernet connected Gigabit Powerline Adapter lo loopback unmanaged -- The commands shown in the examples do not modify any settings in the system, so they can be executed by an unprivileged user. Both commands list two network interfaces: lo (the loopback interface) and enp3s5 (an ethernet interface). Desktops and laptops running Linux usually have two or three predefined network interfaces, one for the loopback virtual interface and the others assigned to the network hardware found by the system. Servers and network appliances running Linux, on the other hand, may have tens of network interfaces, but the same principles apply to all of them. The abstraction provided by the operating system allows for the setup of network interfaces using the same methods, regardless of the underlying hardware. However, knowing the details about the underlying hardware of an interface can be useful to 404 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.2 Persistent network configuration better understand what is going on when the communication is not working as expected. In a system where many network interfaces are available, it could not be obvious which one corresponds to the wi-fi and which one corresponds to the ethernet, for example. For this reason, Linux uses an interface naming convention that helps identify which network interface corresponds to which device and port. Interface Names Older Linux distributions named ethernet network interfaces as eth0, eth1, etc., numbered according to the order in which the kernel identifies the devices. The wireless interfaces were named wlan0, wlan1, etc. This naming convention, however, does not clarify which specific ethernet port matches with the interface eth0, for example. Depending on how the hardware was detected, it was even possible for two network interfaces to swap names after a reboot. To overcome this ambiguity, more recent Linux systems employ a predictable naming convention for network interfaces, making up a closer relationship between the interface name and the underlying hardware connection. In Linux distributions that use the systemd naming scheme, all interface names start with a two- character prefix that signifies the interface type: en Ethernet ib InfiniBand sl Serial line IP (slip) wl Wireless local area network (WLAN) ww Wireless wide area network (WWAN) From higher to lower priority, the following rules are used by the operating system to name and number the network interfaces: 1. Name the interface after the index provided by the BIOS or by the firmware of embedded devices, e.g. eno1. Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 405 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals 2. Name the interface after the PCI express slot index, as given by the BIOS or firmware, e.g. ens1. 3. Name the interface after its address at the corresponding bus, e.g. enp3s5. 4. Name the interface after the interface’s MAC address, e.g. enx78e7d1ea46da. 5. Name the interface using the legacy convention, e.g. eth0. It is correct to assume, for example, that the network interface enp3s5 was so named because it did not fit the first two naming methods, so its address in the corresponding bus and slot was used instead. The device address 03:05.0, found in the output of the lspci command, reveals the associate device: $ lspci | fgrep Ethernet 03:05.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet (rev 10) Network interfaces are created by the Linux kernel itself, but there are many commands that can be used to interact with them. Normally, the configuration happens automatically and there is no need to change the settings manually. Nonetheless, with the name of the interface, it is possible to tell the kernel how to proceed in configuring it if necessary. Interface Management Over the years, several programs have been developed to interact with the networking features provided by the Linux kernel. Although the old ifconfig command can still be used to do simple interface configurations and queries, it is now deprecated due to its limited support of non- ethernet interfaces. The ifconfig command was superseded by the command ip, which is capable of managing many other aspects of TCP/IP interfaces, like routes and tunnels. The many capabilities of the ip command can be overkill for most ordinary tasks, so there are auxiliary commands to facilitate the activation and configuration of the network interfaces. Commands ifup and ifdown may be used to configure network interfaces based on interface definitions found in the file /etc/network/interfaces. Although they can be invoked manually, these commands are normally executed automatically during system boot. All network interfaces managed by ifup and ifdown should be listed in the /etc/network/interfaces file. The format used in the file is straightforward: lines beginning with the word auto are used to identify the physical interfaces to be brought up when ifup is executed with the -a option. The interface name should follow the word auto on the same line. All interfaces marked auto are brought up at boot time, in the order they are listed. 406 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.2 Persistent network configuration Network configuration methods used by ifup and ifdown are not standardized throughout all Linux distributions. CentOS, for example, keeps WARNING the interface settings in individual files in the /etc/sysconfig/network- scripts/ directory and the configuration format used in them is slightly different from the format used in /etc/network/interfaces. The actual interface configuration is written in another line, starting with the word iface, followed by the interface name, the name of the address family that the interface uses and the name of the method used to configure the interface. The following example shows a basic configuration file for interfaces lo (loopback) and enp3s5: auto lo iface lo inet loopback auto enp3s5 iface enp3s5 inet dhcp The address family should be inet for TCP/IP networking, but there is also support for IPX networking (ipx), and IPv6 networking (inet6). Loopback interfaces use the loopback configuration method. With the dhcp method, the interface will use the IP settings provided by the network’s DHCP server. The settings from the example configuration allow the execution of command ifup using interface name enp3s5 as its argument: # ifup enp3s5 Internet Systems Consortium DHCP Client 4.4.1 Copyright 2004-2018 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Listening on LPF/enp3s5/00:16:3e:8d:2b:5b Sending on LPF/enp3s5/00:16:3e:8d:2b:5b Sending on Socket/fallback DHCPDISCOVER on enp3s5 to 255.255.255.255 port 67 interval 4 DHCPOFFER of 10.90.170.158 from 10.90.170.1 DHCPREQUEST for 10.90.170.158 on enp3s5 to 255.255.255.255 port 67 DHCPACK of 10.90.170.158 from 10.90.170.1 bound to 10.90.170.158 -- renewal in 1616 seconds. In this example, the method chosen for the enp3s5 interface was dhcp, so the command ifup called a DHCP client program to obtain the IP settings from the DHCP server. Likewise, command ifdown enp3s5 can be used to turn the interface off. Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 407 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals In networks without a DHCP server, the static method could be used instead and the IP settings provided manually in /etc/network/interfaces. For example: iface enp3s5 inet static address 192.168.1.2/24 gateway 192.168.1.1 Interfaces using the static method do not need a corresponding auto directive, as they are brought up whenever the network hardware is detected. If the same interface has more than one iface entry, then all of the configured addresses and options will be applied when bringing up that interface. This is useful to configure both IPv4 and IPv6 addresses on the same interface, as well as to configure multiple addresses of the same type on a single interface. Local and Remote Names A working TCP/IP setup is just the first step towards full network usability. In addition to being able to identify nodes on the network by their IP numbers, the system must be able to identify them with names more easily understood by human beings. The name by which the system identifies itself is customizable and it is good practice to define it, even if the machine is not intended to join a network. The local name often matches the network name of the machine, but this isn’t necessarily always true. If the file /etc/hostname exists, the operating system will use the contents of the first line as its local name, thereafter simply called the hostname. Lines starting with # inside /etc/hostname are ignored. The /etc/hostname file can be edited directly, but the machine’s hostname can also be defined with the hostnamectl command. When supplied with sub-command set-hostname, command hostnamectl will take the name given as an argument and write it in /etc/hostname: # hostnamectl set-hostname storage # cat /etc/hostname storage The hostname defined in /etc/hostname is the static hostname, that is, the name which is used to initialize the system’s hostname at boot. The static hostname may be a free-form string up to 64 characters in length. However, it is recommended that it consists only of ASCII lower-case characters and no spaces or dots. It should also limit itself to the format allowed for DNS domain name labels, even though this is not a strict requirement. 408 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.2 Persistent network configuration Command hostnamectl can set two other types of hostnames in addition to the static hostname: Pretty hostname Unlike the static hostname, the pretty hostname may include all kinds of special characters. It can be used to set a more descriptive name for the machine, e.g. “LAN Shared Storage”: # hostnamectl --pretty set-hostname "LAN Shared Storage" Transient hostname Used when the static hostname is not set or when it is the default localhost name. The transient hostname is normally the name set together with other automatic configurations, but it can also be modified by the command hostnamectl, e.g. # hostnamectl --transient set-hostname generic-host If neither the --pretty nor --transient option is used, then all three hostname types will be set to the given name. To set the static hostname, but not the pretty and transient names, the option --static should be used instead. In all cases, only the static hostname is stored in the /etc/hostname file. Command hostnamectl can also be used to display various descriptive and identity bits of information about the running system: $ hostnamectl status Static hostname: storage Pretty hostname: LAN Shared Storage Transient hostname: generic-host Icon name: computer-server Chassis: server Machine ID: d91962a957f749bbaf16da3c9c86e093 Boot ID: 8c11dcab9c3d4f5aa53f4f4e8fdc6318 Operating System: Debian GNU/Linux 10 (buster) Kernel: Linux 4.19.0-8-amd64 Architecture: x86-64 This is the default action of the hostnamectl command, so the status sub-command can be omitted. Regarding the name of the remote network nodes, there are two basic ways the operating system can implement to match names and IP numbers: to use a local source or to use a remote server to translate names into IP numbers and vice versa. The methods can be complementary to each Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 409 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals other and their priority order is defined in the Name Service Switch configuration file: /etc/nsswitch.conf. This file is used by the system and applications to determine not only the sources for name-IP matches, but also the sources from which to obtain name-service information in a range of categories, called databases. The hosts database keeps track of the mapping between host names and host numbers. The line inside /etc/nsswitch.conf beginning with hosts defines the services accountable for providing the associations for it: hosts: files dns In this example entry, files and dns are the service names that specify how the lookup process for host names will work. First, the system will look for matches in local files, then it will ask the DNS service for matches. The local file for the hosts database is /etc/hosts, a simple text file that associates IP addresses with hostnames, one line per IP address, e.g.: 127.0.0.1 localhost The IP number 127.0.0.1 is the default address for the loopback interface, hence its association with the localhost name. It is also possible to bind optional aliases to the same IP. Aliases can provide alternate spellings, shorter hostnames and should be added at the end of the line, for example: 192.168.1.10 foo.mydomain.org foo The formatting rules for the /etc/hosts file are: Fields of the entry are separated by any number of blanks and/or tab characters. Text from a # character until the end of the line is a comment and is ignored. Host names may contain only alphanumeric characters, minus signs and periods. Host names must begin with an alphabetic character and end with an alphanumeric character. IPv6 addresses may also be added to /etc/hosts. The following entry refers to the IPv6 loopback address: 410 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.2 Persistent network configuration ::1 localhost ip6-localhost ip6-loopback Following the files service specification, the dns specification tells the system to ask a DNS service for the desired name/IP association. The set of routines responsible for this method is called the resolver and its configuration file is /etc/resolv.conf. The following example shows a generic /etc/resolv.conf containing entries for Google’s public DNS servers: nameserver 8.8.4.4 nameserver 8.8.8.8 As shown in the example, the nameserver keyword indicates the IP address of the DNS server. Only one nameserver is required, but up to three nameservers can be given. The supplementary ones will be used as a fallback. If no nameserver entries are present, the default behaviour is to use the name server on the local machine. The resolver can be configured to automatically add the domain to names before consulting them on the name server. For example: nameserver 8.8.4.4 nameserver 8.8.8.8 domain mydomain.org search mydomain.net mydomain.com The domain entry sets mydomain.org as the local domain name, so queries for names within this domain will be allowed to use short names relative to the local domain. The search entry has a similar purpose, but it accepts a list of domains to try when a short name is provided. By default, it contains only the local domain name. Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 411 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals Guided Exercises 1. What commands can be used to list the network adapters present in the system? 2. What is the type of network adapter whose interface name is wlo1? 3. What role does the file /etc/network/interfaces play during boot time? 4. What entry in /etc/network/interfaces configures interface eno1 to obtain its IP settings with DHCP? 412 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.2 Persistent network configuration Explorational Exercises 1. How could the hostnamectl command be used to change only the static hostname of the local machine to firewall? 2. What details other than hostnames can be modified by command hostnamectl? 3. What entry in /etc/hosts associates both names firewall and router with IP 10.8.0.1? 4. How could the /etc/resolv.conf file be modified in order to send all DNS requests to 1.1.1.1? Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 413 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals Summary This lesson covers how to make persistent changes to the local network configuration using standard Linux files and commands. Linux expects the TCP/IP settings to be in specific places and it may be necessary to change them when the default settings are not appropriate. The lesson goes through the following topics: How Linux identifies network interfaces. Interface activation during boot and basic IP configuration. How the operating system associates names with hosts. The concepts, commands and procedures addressed were: Interface naming conventions. Listing network interfaces with ip and nmcli. Interface activation with ifup and ifdown. Command hostnamectl and the /etc/hostname file. Files /etc/nsswitch.conf, /etc/hosts and /etc/resolv.conf. 414 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.2 Persistent network configuration Answers to Guided Exercises 1. What commands can be used to list the network adapters present in the system? Commands ip link show, nmcli device and the legacy ifconfig. 2. What is the type of a network adapter whose interface name is wlo1? The name starts with wl, so it is a wireless LAN adapter. 3. What role does the file /etc/network/interfaces play during boot time? It has the configurations used by command ifup to activate the corresponding interfaces during boot time. 4. What entry in /etc/network/interfaces configures interface eno1 to obtain its IP settings with DHCP? The line iface eno1 inet dhcp. Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 415 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals Answers to Explorational Exercises 1. How could the hostnamectl command be used to change only the static hostname of the local machine to firewall? With the --static option: hostnamectl --static set-hostname firewall. 2. What details other than hostnames can be modified by command hostnamectl? hostnamectl can also set the default icon for the local machine, its chassis type, the location and the deployment environment. 3. What entry in /etc/hosts associates both names firewall and router with IP 10.8.0.1? The line 10.8.0.1 firewall router. 4. How could the /etc/resolv.conf file be modified in order to send all DNS requests to 1.1.1.1? Using nameserver 1.1.1.1 as its only nameserver entry. 416 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.2 Persistent network configuration 109.2 Lesson 2 Certificate: LPIC-1 Version: 5.0 Topic: 109 Networking Fundamentals Objective: 109.2 Persistent network configuration Lesson: 2 of 2 Introduction Linux supports virtually every network technology used to connect servers, containers, virtual machines, desktops and mobile devices. The connections between all these network nodes can be dynamic and heterogeneous, thus requiring appropriate management by the operating system running in them. In the past, distributions developed their own customized solutions for managing dynamic network infrastructure. Today, tools like NetworkManager and systemd provide more comprehensive and integrated features to meet all the specific demands. NetworkManager Most Linux distributions adopt the NetworkManager service daemon to configure and control the system’s network connections. NetworkManager’s purpose is to make the network configuration as simple and automatic as possible. When using DHCP, for example, NetworkManager arranges route changes, IP address fetching and updates to the local list of DNS servers, if necessary. When both wired and wireless connections are available, NetworkManager prioritizes the wired connection by default. NetworkManager will try to keep at least one connection active all the time, Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 417 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals whenever it is possible. A request using DHCP (Dynamic Host Configuration Protocol) is usually sent through the network adapter as soon as the link to the network is established. The NOTE DHCP server that is active on the network then responds with the settings (IP address, network mask, default route, etc.) which the requester must use to communicate via IP protocol. By default, the NetworkManager daemon controls the network interfaces not mentioned in the /etc/network/interfaces file. It does so to not interfere with other configuration methods that may be present as well, thus modifying the unattended interfaces only. The NetworkManager service runs in the background with root privileges and triggers the necessary actions to keep the system online. Ordinary users can create and modify network connections with client applications that, albeit not having root privileges themselves, are capable of communicating with the underlying service in order to perform the requested actions. Client applications for NetworkManager are available for both the command line and the graphical environment. For the latter, the client application comes as an accessory of the desktop environment (under names like, nm-tray, network-manager-gnome, nm-applet or plasma-nm) and it is usually accessible through an indicator icon at the corner of the desktop bar or from the system configuration utility. In the command line, NetworkManager itself provides two client programs: nmcli and nmtui. Both programs have the same basic features, but nmtui has a curses-based interface while nmcli is a more comprehensive command that can also be used in scripts. Command nmcli separates all network related properties controlled by NetworkManager in categories called objects: general NetworkManager’s general status and operations. networking Overall networking control. radio NetworkManager radio switches. connection NetworkManager’s connections. 418 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.2 Persistent network configuration device Devices managed by NetworkManager. agent NetworkManager secret agent or polkit agent. monitor Monitor NetworkManager changes. The object name is the main argument to command nmcli. To show the overall connectivity status of the system, for example, the object general should be given as the argument: $ nmcli general STATE CONNECTIVITY WIFI-HW WIFI WWAN-HW WWAN connected full enabled enabled enabled enabled Column STATE tells whether the system is connected to a network or not. If the connection is limited due to external misconfiguration or access restrictions, then the CONNECTIVITY column will not report the full connectivity status. If Portal appears in the CONNECTIVITY column, it means that extra authentication steps (usually through the web browser) are required to complete the connection process. The remaining columns report the status of the wireless connections (if any), either WIFI or WWAN (Wide Wireless Area Network, i.e. cellular networks). The HW suffix indicates that the status corresponds to the network device rather than the system network connection, that is, it tells if the hardware is enabled or disabled to save power. In addition to the object argument, nmcli also needs a command argument to execute. The status command is used by default if no command argument is present, so the command nmcli general is actually interpreted as nmcli general status. It is hardly necessary to take any action when the network adapter is connected directly to the access point through cables, but wireless networks require further interaction to accept new members. nmcli facilitates the connection process and saves the settings to connect automatically in the future, hence it is very helpful for laptops or any other mobile appliances. Before connecting to wi-fi, it is convenient to first list the available networks in the local area. If the system has a working wi-fi adapter, then the device object will use it to scan the available networks with command nmcli device wifi list: $ nmcli device wifi list IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURITY 90:F6:52:C5:FA:12 Hypnotoad Infra 11 130 Mbit/s 67 ▂▄▆_ WPA2 Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 419 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals 10:72:23:C7:27:AC Jumbao Infra 1 130 Mbit/s 55 ▂▄__ WPA2 00:1F:33:33:E9:BE NETGEAR Infra 1 54 Mbit/s 35 ▂▄__ WPA1 WPA2 A4:33:D7:85:6D:B0 AP53 Infra 11 130 Mbit/s 32 ▂▄__ WPA1 WPA2 98:1E:19:1D:CC:3A Bruma Infra 1 195 Mbit/s 22 ▂___ WPA1 WPA2 Most users will probably use the name in the SSID column to identify the network of interest. For example, command nmcli can connect to the network named Hypnotoad using the device object again: $ nmcli device wifi connect Hypnotoad If the command is executed inside a terminal emulator in the graphical environment, then a dialog box will appear asking for the network’s passphrase. When executed in a text only console, the password may be provided together with the other arguments: $ nmcli device wifi connect Hypnotoad password MyPassword If the wi-fi network hides its SSID name, nmcli can still connect to it with the extra hidden yes arguments: $ nmcli device wifi connect Hypnotoad password MyPassword hidden yes If the system has more than one wi-fi adapter, the one to be used may be indicated with ifname. For example, to connect using the adapter named wlo1: $ nmcli device wifi connect Hypnotoad password MyPassword ifname wlo1 After the connection succeeds, NetworkManager will name it after the corresponding SSID (if it is a wi-fi connection) and will keep it for future connections. The connections names and their UUIDs are listed by command nmcli connection show: $ nmcli connection show NAME UUID TYPE DEVICE Ethernet 53440255-567e-300d-9922-b28f0786f56e ethernet enp3s5 tun0 cae685e1-b0c4-405a-8ece-6d424e1fb5f8 tun tun0 Hypnotoad 6fdec048-bcc5-490a-832b-da83d8cb7915 wifi wlo1 4G a2cf4460-0cb7-42e3-8df3-ccb927f2fd88 gsm -- 420 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.2 Persistent network configuration The type of each connection is shown — which can be ethernet, wifi, tun, gsm, bridge, etc. — as well as the device to which they are associated with. To perform actions on a specific connection, its name or UUID must be supplied. To deactivate the Hypnotoad connection, for example: $ nmcli connection down Hypnotoad Connection 'Hypnotoad' successfully deactivated Likewise, the command nmcli connection up Hypnotoad can be used to bring the connection up, as it is now saved by NetworkManager. The interface name can also be used to reconnect, but in this case the device object should be used instead: $ nmcli device disconnect wlo2 Device 'wlo1' successfully disconnected. The interface name can also be used to reestablish the connection: $ nmcli device connect wlo2 Device 'wlo1' successfully activated with '833692de-377e-4f91-a3dc-d9a2b1fcf6cb'. Note that the connection UUID changes every time the connection is brought up, so it is preferable to use its name for consistency. If the wireless adapter is available but it is not being used, then it can be turned off to save power. This time, the object radio should be passed to nmcli: $ nmcli radio wifi off Of course, the wireless device can be turned on again with command nmcli radio wifi on. Once the connections are established no manual interaction will be required in the future, as NetworkManager identifies available known networks and automatically connects to them. If necessary, NetworkManager has plugins that can extend its functionalities, like the plugin to support VPN connections. systemd-networkd Systems running systemd can optionally use its built-in daemons to manage network connectivity: systemd-networkd to control network interfaces and systemd-resolved to manage the local name resolution. These services are backwards compatible with legacy Linux configuration Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 421 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals methods, but the configuration of network interfaces in particular has features that are worth knowing. The configuration files used by systemd-networkd to setup network interfaces can be found in any of the following three directories: /lib/systemd/network The system network directory. /run/systemd/network The volatile runtime network directory. /etc/systemd/network The local administration network directory. The files are processed in lexicographic order, so it is recommended to start their names with numbers to make the ordering easier to read and set. Files in /etc have the highest priority, whilst files in /run take precedence over files with the same name in /lib. This means that if configuration files in different directories have the same name, then systemd-networkd will ignore the files with lesser priority. Separating files like that is a way to change the interface settings without having to modify the original files: modifications can be placed in /etc/systemd/network to override those in /lib/systemd/network. The purpose of each configuration file depends on its suffix. File names ending in.netdev are used by systemd-networkd to create virtual network devices, such as bridge or tun devices. Files ending in.link set low-level configurations for the corresponding network interface. systemd- networkd detects and configures network devices automatically as they appear — as well as ignore devices already configured by other means — so there is little need to add these files in most situations. The most important suffix is.network. Files using this suffix can be used to setup network addresses and routes. As with the other configuration file types, the name of the file defines the order in which the file will be processed. The network interface to which the configuration file refers to is defined in the [Match]` section inside the file. For example, the ethernet network interface enp3s5 can be selected within the file /etc/systemd/network/30-lan.network by using the Name=enp3s5 entry in the [Match] section: [Match] 422 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.2 Persistent network configuration Name=enp3s5 A list of whitespace-separated names is also accepted to match many network interfaces with this same file at once. The names can contain shell-style globs, like en*. Other entries provide various matching rules, like selecting a network device by its MAC address: [Match] MACAddress=00:16:3e:8d:2b:5b The settings for the device are in the [Network] section of the file. A simple static network configuration only requires the Address and Gateway entries: [Match] MACAddress=00:16:3e:8d:2b:5b [Network] Address=192.168.0.100/24 Gateway=192.168.0.1 To use the DHCP protocol instead of static IP addresses, the DHCP entry should be used instead: [Match] MACAddress=00:16:3e:8d:2b:5b [Network] DHCP=yes The systemd-networkd service will try to fetch both IPv4 and IPv6 addresses for the network interface. To use IPv4 only, DHCP=ipv4 should be used. Likewise, DHCP=ipv6 will ignore IPv4 settings and use the provided IPv6 address only. Password-protected wireless networks can also be configured by systemd-networkd, but the network adapter must be already authenticated in the network before systemd-networkd can configure it. Authentication is performed by WPA supplicant, a program dedicated to configure network adapters for password protected networks. The first step is to create the credentials file with command wpa_passphrase: # wpa_passphrase MyWifi > /etc/wpa_supplicant/wpa_supplicant-wlo1.conf Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 423 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals This command will take the passphrase for the MyWifi wireless network from the standard input and store its hash in the /etc/wpa_supplicant/wpa_supplicant-wlo1.conf. Note that the filename should contain the appropriate name of the wireless interface, hence the wlo1 in the file name. The systemd manager reads the WPA passphrase files in /etc/wpa_supplicant/ and creates the corresponding service to run WPA supplicant and bring the interface up. The passphrase file created in the example will then have a corresponding service unit called [email protected]. Command systemctl start [email protected] will associate the wireless adapter with the remote access point. Command systemctl enable [email protected] makes the association automatic during boot time. Finally, a.network file matching the wlo1 interface must be present in /etc/systemd/network/, as systemd-networkd will use it to configure the interface as soon as WPA supplicant finishes the association with the access point. 424 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.2 Persistent network configuration Guided Exercises 1. What is the meaning of the word Portal in the CONNECTIVITY column in the output of command nmcli general status? 2. In a console terminal, how can an ordinary user use the command nmcli to connect to the MyWifi wireless network protected by the password MyPassword? 3. What command can turn the wireless adapter on if it was previously disabled by the operating system? 4. Custom configuration files should be placed in what directory when systemd-networkd is managing the network interfaces? Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 425 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals Explorational Exercises 1. How can a user run the command nmcli to delete an unused connection named Hotel Internet? 2. NetworkManager scans wi-fi networks periodically and command nmcli device wifi list only lists the access points found in the last scan. How should the nmcli command be used to ask NetworkManager to immediately re-scan all available access points? 3. What name entry should be used in the [Match] section of a systemd-networkd configuration file to match all ethernet interfaces? 4. How should the wpa_passphrase command be executed to use the passphrase given as an argument and not from the standard input? 426 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.2 Persistent network configuration Summary This lesson covers the common tools used in Linux to manage heterogeneous and dynamic network connections. Although most configuration methods do not require user intervention, sometimes that is necessary and tools like NetworkManager and systemd-networkd can reduce the hassle to a minimum. The lesson goes through the following topics: How NetworkManager and systemd-networkd integrate with the system. How the user can interact with NetworkManager and systemd-networkd. Basic interface configuration with both NetworkManager and systemd-networkd. The concepts, commands and procedures addressed were: NetworkManager’s client commands: nmtui and nmcli. Scanning and connecting to wireless networks using nmcli appropriate commands. Persistent wi-fi network connections using systemd-networkd. Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 427 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals Answers to Guided Exercises 1. What is the meaning of the word Portal in the CONNECTIVITY column in the output of command nmcli general status? It means that extra authentication steps (usually through the web browser) are required to complete the connection process. 2. In a console terminal, how can an ordinary user use the command nmcli to connect to the MyWifi wireless network protected by the password MyPassword? In a text-only terminal, the command would be $ nmcli device wifi connect MyWifi password MyPassword 3. What command can turn the wireless adapter on if it was previously disabled by the operating system? $ nmcli radio wifi on 4. Custom configuration files should be placed in what directory when systemd-networkd is managing the network interfaces? In the local administration network directory: /etc/systemd/network. 428 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.2 Persistent network configuration Answers to Explorational Exercises 1. How can a user run the command nmcli to delete an unused connection named Hotel Internet? $ nmcli connection delete "Hotel Internet" 2. NetworkManager scans wi-fi networks periodically and command nmcli device wifi list only lists the access points found in the last scan. How should the nmcli command be used to ask NetworkManager to immediately re-scan all available access points? The root user can run nmcli device wifi rescan to make NetworkManager re-scan available access points. 3. What name entry should be used in the [Match] section of a systemd-networkd configuration file to match all ethernet interfaces? The entry name=en*, as en is the prefix for ethernet interfaces in Linux and systemd-networkd accepts shell-like globs. 4. How should the wpa_passphrase command be executed to use the passphrase given as an argument and not from the standard input? The password should be given just after the SSID, as in wpa_passphrase MyWifi MyPassword. Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 429 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals 109.3 Basic network troubleshooting Reference to LPI objectives LPIC-1 version 5.0, Exam 102, Objective 109.3 Weight 4 Key knowledge areas Manually configure network interfaces, including viewing and changing the configuration of network interfaces using iproute2. Manually configure routing, including viewing and changing routing tables and setting the default route using iproute2. Debug problems associated with the network configuration. Awareness of legacy net-tools commands. Partial list of the used files, terms and utilities ip hostname ss ping ping6 traceroute traceroute6 tracepath tracepath6 430 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.3 Basic network troubleshooting netcat ifconfig netstat route Version: 2023-07-13 | Licensed under CC BY-NC-ND 4.0. | learning.lpi.org | 431 LPIC-1 (102) (Version 5.0) | Topic 109: Networking Fundamentals 109.3 Lesson 1 Certificate: LPIC-1 Version: 5.0 Topic: 109 Networking Fundamentals Objective: 109.3 Basic network troubleshooting Lesson: 1 of 2 Introduction Linux has very flexible and powerful network capabilities. In fact, Linux based operating systems are often used on common network devices, including expensive commercial equipment. Linux networking could be a certification in itself. With this mind, this lesson is only going to cover a few basic configuration and troubleshooting tools. Be sure to review the lessons on internet protocols and persistent network configuration prior to this lesson. Within this lesson, we will be covering tools to configure and troubleshoot IPv4 and IPv6 networking. While not an official objective, packet sniffers such as tcpdump are useful troubleshooting tools. Packet sniffers allow you to view and record packets coming into or out of a network interface. Tools such as hex viewers and protocol analyzers can be used to view these packets in more detail than a packet sniffer will typically allow. It wouldn’t hurt to at least be aware of such programs. About the ip Command The ip command is a fairly recent utility used to view and configure just about anything relating 432 | learning.lpi.org | Licensed under CC BY-NC-ND 4.0. | Version: 2023-07-13 LPIC-1 (102) (Version 5.0) | 109.3 Basic network troubleshooting to network configurations. This lesson covers some of the most used subcommands of ip, but it barely scratches the surface of what is available. Learning to read the documentation will help you be much more efficient with it. Each subcommand of ip has its own man page. The SEE ALSO section of the ip man page has a list of them: $ man ip... SEE ALSO ip-address(8), ip-addrlabel(8), ip-l2tp(8), ip-link(8), ip-maddress(8), ip-monitor(8), ip-mroute(8), ip-neighbour(8), ip-netns(8), ip- ntable(8), ip-route(8), ip-rule(8), ip-tcp_metrics(8), ip-token(8), ip- tunnel(8), ip-xfrm(8) IP Command reference ip-cref.ps... Instead of looking at this every time you need the man page, simply add - and the name of the subcommand to ip, e.g. man ip-route. Another source of information is the help function. To view the built-in help, add help after the subcommand: $ ip address help Usage: ip address {add|change|replace} IFADDR dev IFNAME [ LIFETIME ] [ CONFFLAG-LIST ] ip address del IFADDR dev IFNAME [mngtmpaddr] ip address {save|flush} [ dev IFNAME ] [ scope SCOPE-ID ] [ to PREFIX ] [ FLAG-LIST ] [ label LABEL ] [up] ip address [ show [ dev IFNAME ] [ scope SCOPE-ID ] [ master DEVICE ] [ type TYPE ] [ to PREFIX ] [ FLAG-LIST ] [ label LABEL ] [up] [ vrf NAME ] ] ip address {showdump|restore} IFADDR :=

Tags

linux printing computer systems
Use Quizgecko on...
Browser
Browser