The course is part of these learning paths
This course covers the essentials of networking with Linux. This course is part of the Linux Administration Bootcamp learning path, designed to get you up and running with Linux.
Learning Objectives
- Understand the TCP/IP protocol and the most important aspects of IP networking
- Learn how DNS, hostnames, and IP addresses are used in networking on Linux
- Learn about DHCP, as well as status and dynamic addressing
- Learn some of the most common tools you can use to perform network diagnostics
Intended Audience
- Anyone with basic knowledge of Linux who wants to learn more
- System administrators or IT professionals who want to learn more about networking on Linux
Prerequisites
This is an intermediate-level course so some knowledge of Linux is expected. If you're just starting out, then try our Linux Fundamentals course first.
In this lesson you will learn about the TCP/IP protocol and the most important aspects of IP networking. You'll also be introduced to network classes and classful networks. Additionally, you'll be learning about subnet mask and broadcast addresses. Next, you'll learn about Classless Inter-Domain Routing and finally you'll learn what IP addresses are meant to be used on private networks.
Today TCP/IP is the de facto standard for transmitting data over networks. TCP/IP stands for transmission control protocol and Internet protocol. TCP is responsible for establishing and maintaining network conversations so that two devices can exchange data. The Internet protocol is responsible for sending data from one device to another device on a network. Each one of these network devices is known as a host and has at least one IP address.
For a device on a network to communicate properly, it needs three pieces of information. It needs an IP address, a subnet mask, and a broadcast address. Each one of these numbers is comprised of four octet separated by a dot. An octet represents eight bits and therefore can have a value starting at zero and going up to 255 IP addresses are comprised of two parts. The first part of an IP address is the network address. And the second part is the host address.
The network portion of the IP address tells routers what network the host belongs to, and thus where to route data that is destined for that host. The host address tells routers the specific device that the data should be delivered to. For routing to work properly, each group of devices or network needs to have a unique network address. Also each device within that network needs to have a unique host address. The class of an address determines what portion is used as a network address and what portion is used for the host address.
By looking at the first octet of an IP address, you can tell what class it is. An IP address with a first octet that falls between a one and 127 is a class A IP address. For example, the IP address of 17.24.88.9 belongs to a class A network. Class B addresses begin with 128.0 and end at 191.255. For example, 183.194.46.31 belongs to a class B network. Class C addresses start with 192.0.0 and end with 233.255.255. An example IP address that belongs to a class C network is 199.83.131.186.
A class determines the possible number of networks and the addressable space per network. For example, a class A network can accommodate about 16 million hosts addresses. The class B network can have up to 65,536 hosts in it. And a class C network can address 255 hosts. This table lists the subnet mask use for each of the network classes. The network portion of an IP address corresponds to the 255s in the subnet mask. For example, the first octet of a class A network is the network portion, while the three remaining octets are the host portion.
For class B networks, the first two octets are for network addresses, while the last two octets are host addresses. Finally class C networks use the first three octets for the network and just the last octet for the host addresses. Let's take a look at the IP address of 183.194.46.31 as an example. That particular IP address is a class B network since it falls in the range of 128.0 to 191.255. The network portion of the address is 183.194. And the host portion is 46.31. The net mask is listed right above the IP address so you can see how the network portion aligns with a 255 values and the host portion aligns with the zero values of the subnet mask.
A broadcast address is a special logical address used to send data to all hosts on a given network. In addition to their own IP addresses, all network hosts receive data sent to the broadcast address. You can quickly determine the broadcast IP address by using the value of 255 in the octets where there are zeros in the subnet mask. This table list a few examples. For the class A network of 17.0.0.0 that uses a net mask of 255.0 0.0, the broadcast address is 17.255.255.255. The next two examples follow the same pattern as you might expect.
The class B network employees the default 255.255.0.0 subnet mask. And the class C network uses a 255.255.255.0 sub-net mask. CIDR sometimes pronounced CIDR stands for Classless Inter-Domain Routing. It allows networks to be subdivided regardless of their traditional class. These subdivided networks are called subnets. For example, the IP address of 121.67.198.94 falls in the class A network range. By default the network is 121.0.0.0. the sub-net mask is 255.0.0.0, and the broadcast address is 121.255.255.255. However, if you specify a subnet mask, you can alter the portion of the IP address that is used as the network and the portion that is used as the host address.
By specifying a 255.255.255.0 subnet with a 121.67.198.94 IP address the network becomes 121.67.198.0, and the broadcast address is 121.67.198.255. There are ranges of IP addresses that are dedicated for use in private networks. You'll often see these types of IP addresses being used in your company's internal network. And you'll most likely be using a range of these IP addresses for your home network as well.
These private addresses are also called non routable IPs since they are not routed through the public Internet. You'll also hear these IP addresses referred to as RFC 1918 addresses, which refers to the RFC 1918 standards document where these private ranges were initially defined. As you can see in the table, there is a dedicated range of non routable private address space for each network class. Keep in mind that you can subnet these networks however you like regardless of their associated traditional class.
In this lesson, you learned how the TCP/IP protocol is the defacto standard for transmitting data over a network. You also learned about class A, B, and C networks. You learned about the default subnet mask and broadcast addresses used by the various network classes. You also learned that you can specify a subnet mask to divide larger networks into smaller ones called subnets. Finally, you learn what IP addresses are dedicated for use in private networks and how these IP addresses are not routed over the public Internet.
Jason is the founder of the Linux Training Academy as well as the author of "Linux for Beginners" and "Command Line Kung Fu." He has over 20 years of professional Linux experience, having worked for industry leaders such as Hewlett-Packard, Xerox, UPS, FireEye, and Amazon.com. Nothing gives him more satisfaction than knowing he has helped thousands of IT professionals level up their careers through his many books and courses.