LPIC-1: iproute2 and NetworkManager

The restructuring of the networking objectives is one of the major changes in LPIC-1 version 5.0. The entire topic 109 is dedicated to the connectivity of your system. The new structure divides the topic into networking fundamentals (109.1), persistent network configuration (109.2), troubleshooting and runtime configuration (109.3) and DNS name resolution (109.4). Unlike before, each command is now exclusively assigned to one of these topics, which makes the preparation for the exam easier.

Objective 109.1 covers fundamentals of the internet protocols. It covers IP addresses, subnetting and important TCP and UDP ports. Although is has been on the exam before, make sure you have a fair understanding of IPv6. Focus on the most important aspects of IPv6, make sure you understand the addresses and their components and try to apply your IPv4 subnetting knowledge to IPv6. However, don’t get lost in the numerous additions to IPv6. Be prepared to solve the aspects mentioned in the objectives by using either IPv4 or IPv6.

Persistent network configuration is the focus of objective 109.2. Nowadays, most desktop Linux distributions use NetworkManager as the main network configuration tool. You have probably seen one of its widgets on your Linux desktop. Beyond those widgets, NetworkManager can be controlled from the command line using the program nmcli or the curses interface nmtui.

Taking a closer look at nmcli provides you insights in how NetworkManager structures the network configuration. The Fedora Networking Guide does a great job in explaining nmcli. Chapter 2.4 introduces nmcli, including some examples, explaining how to connect to a network and how to configure static routes. Don’t underestimate NetworkManager. Is is a flexible tool, and it is the core of a weight-four objective. Make sure you practice how to connect to an ethernet and wifi using NetworkManager from the command line.

If you want to learn more about nmcli beyond the LPIC-1 objectives, review the nmcli(1) manpage and the examples in the ArchLinux wiki.

Besides NetworkManager, objective 109.2 includes hostnamectl and awareness of systemd-networkd, which we already covered last week. The objective also includes ifup and ifdown, which are part of the traditional networking configuration of many distributions.

Internally, NetworkManager, ifup and ifdown, all configure parameters of your Linux system. You can review, or even manually create or change these options. This kind of troubleshooting and runtime configuration is covered in objective 109.3.

Historically, the net-utils package provided commands such as ifconfig and route. On Linux, iproute2 offers a modern replacement for these tools. After more than a decade of coexistence, iproute2 finally becomes the standard tool on most distributions. In LPIC-1 version 5.0, you’re supposed to be proficient in using iproute2 and some other new tools such as ss. The older net-utils are covered at awareness level, meaning that you should have a basic idea about these tools. If you’re new to the topic and started using iproute2 right away, you should be fine. If you’re still in the net-utils comfort zone, it’s time to switch to iproute2 now. Red Hat’s IP Command Cheatsheet provides a great comparison of net-utils and iproute2 commands. Again, focus on what’s on the LPIC-1 objectives and experiment with interfaces, addresses (both IPv4 and IPv6!) and routes. If you want to go beyond the LPIC-1 objectives, take a look at the iproute2 user guide, which is a collection of examples even for less commonly used iproute2 tasks.

Finally, Objective 109.4 covers client aspects of DNS. Most of this objective was not changed in version 5.0. As we’re already seen in last week’s posting, systemd-resolvd was added to this objective. In general, make sure you understand not only how to configure a DNS client, but also how to configure how your system tries to resolve names and how to resolve a name from your system’s perspective, which might include more than just DNS.

I’ve already mentioned practicing once or twice. You won’t gain proficiency from pure reading. Networking is a particularly demanding topic and requires real hands-on experience. Try to set up a test lab with a couple of virtual machines and configure their networking according to the LPIC-1 objectives, both with IPv4 and IPv6, both using NetworkManager and iproute2. As we will see next week, you will be able to leverage your virtualization experience for another new LPIC-1 topic as well.

Previous post | Next post

About Fabian Thorns:

Fabian Thorns is the Director of Product Development at Linux Professional Institute, LPI. He is M.Sc. Business Information Systems, a regular speaker at open source events and the author of numerous articles and books. Fabian has been part of the exam development team since 2010. Connect with him on LinkedIn, XING or via email (fthorns at www.lpi.org).

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *