Networking Fundamentals


Networking Fundamentals

Hope
Welcome to this networking fundamentals module from the Unifi Network Masterclass. Before we configure a Unifi Network, we need the foundation: how devices communicate, how local and internet traffic differ, and how addressing works. Networking is, at its core, devices talking to one another—whether that device is a smartphone, a PC, networking equipment, a Wi-Fi client, or something reaching the internet.

Michael
So let's begin with LAN and WAN, because that gives us the basic boundary of a network. A LAN, or local area network, is the part behind your firewall—the area you control as the network administrator. A WAN, or wide area network, is outside that firewall: your internet service provider and the wider internet.

Hope
Exactly. When a device communicates locally, it is using the LAN. When it needs to reach something beyond your firewall, such as an internet service or website, the traffic moves toward the WAN through your ISP. Most of this course focuses on layers two and three, which are the parts of networking that explain switching and routing.

Michael
Those layers come from the OSI network model, which has seven layers. From the bottom upward, they are physical, data link, network, transport, session, presentation, and application. A useful mnemonic is, 'Please do not throw sausage pizza away.' Another is, 'Please do not touch Steve's pet alligator.'

Hope
Let's walk through them. Layer one is the physical layer: the wires, RJ45 connectors, and anything else you can physically touch that helps a computer system or network work. Layer two is the data link layer, where most switching information happens and where MAC addresses are used.

Michael
Layer three is the network layer, where IP addresses live. Routers use IP addresses to move information between the LAN and WAN, including traffic going through your ISP. Layer four is the transport layer, which includes protocols such as TCP and UDP that help communication happen.

Hope
Layer five is the session layer. A router keeps track of communication in a session, or state table, as information moves through it. Layer six is the presentation layer, associated with what we see and interact with when information is presented on a screen, such as a YouTube video. Layer seven is the application layer, where applications such as Facebook Messenger and Signal operate.

Michael
And network administrators increasingly care about that application layer too, because routers and other devices can now detect application signatures. But for the practical networking work in this course, layers two and three are the main focus: layer two for switching and MAC addresses, and layer three for IP addressing and routing.

Hope
A simple way to remember the distinction is that layer two is the switching layer. A standard layer two switch forwards traffic based on information such as MAC addresses. Layer three is where routing happens, using IP addresses to decide where traffic should go.

Michael
That also explains the term layer three switch. It is still a switch, but it has some routing capabilities built in. For example, traffic moving from one VLAN to another can be routed inside the layer three switch instead of sending the packets all the way back to the firewall and having the firewall make that decision.

Hope
Switches are also very efficient at handling traffic. They use an ASIC, or application-specific integrated circuit, to process and forward traffic efficiently—at speeds that can reach more than a hundred gigabits per second. That efficiency is one reason switching and routing are treated as distinct functions.

Michael
Now let's focus on layer two and MAC addresses. Every Ethernet port has a MAC address, and devices such as smartphones use MAC addresses when connecting over Wi-Fi. At layer two, the MAC address helps the network identify which device is communicating.

Hope
A MAC address is often thought of as a burned-in identifier assigned to a network interface. It can be changed by someone who knows how, but a laptop, phone, or piece of network equipment generally has one assigned when it leaves the factory. MAC addresses are especially important to switches because they help determine where layer two traffic should be forwarded.

Michael
MAC addresses are commonly viewed as two sections. The first part is the OUI, or organizationally unique identifier, which identifies the manufacturer. The second part is specific to the network interface controller and should identify the individual device.

Hope
That is why a Unifi device list can often recognize that a client is an Apple, Google, or Ubiquiti device. It can look up the manufacturer associated with the OUI. The back half distinguishes the specific network interface.

Michael
There is an important complication with modern wireless clients. Phones such as iPhones can generate a random MAC address when connecting to Wi-Fi. That is useful for privacy, but it can complicate administration if you are creating rules or tracking a device by its MAC address and the device keeps changing it.

Hope
In that situation, a network administrator may need an organizational solution, such as a mobile device management controller, to turn that behavior off. Otherwise, a rule based on the original MAC address may no longer match the device.

Michael
Next, let's follow data as it is encapsulated. Imagine a piece of data, perhaps part of a video stream. That data is placed inside a segment, where transport information such as a TCP port number can be included. The segment is then contained inside a packet.

Hope
The packet is the layer three portion that includes IP addressing. It is what a router or layer three switch examines when deciding where the information should go. Around the packet is the frame, which is the layer two structure that a switch primarily cares about.

Michael
A frame includes information such as the sender's and receiver's MAC addresses, as well as details such as VLAN IDs. That layer two information is what makes switching efficient. Modern switches can maintain very large MAC address tables, although older or inexpensive equipment could hit limits and sometimes needed to be rebooted to clear the table.

Hope
At layer three, we work with IP addresses. In the familiar IPv4 format, an address has four octets, and each octet can have a value from zero through 255. Computers represent these values in binary, while people usually work with the decimal notation.

Michael
You may learn how to convert the octets into binary in a networking class, but it is not something most network administrators need to do regularly. Cheat sheets and subnet calculators are available when you need that detail, especially while planning subnets.

Hope
A subnet tells us how an IP address range is divided between the network portion and the host portion. For example, the mask 255.255.0.0 means the first two octets represent the network, while the last two octets are available for hosts. A very common mask is 255.255.255.0, which leaves the last octet for devices.

Michael
That 255.255.255.0 mask is also written in CIDR notation as slash 24, or /24. CIDR is a shorter way to express the size of the subnet. A /24 provides 256 total addresses in the range, although not all of them are usable for assigning to devices.

Hope
The David C subnet calculator is a useful planning tool. You can enter a network such as 192.168.0.0/16 and see the subnet address, the complete address range, the usable host range, and the number of possible hosts. It also lets you divide a larger network into smaller networks—for example, splitting a /16 into two /17 networks.

Michael
As you divide a subnet, the starting address of each smaller subnet changes. For example, one /25 subnet can begin at 192.168.0.0, while the next can begin at 192.168.0.128. The calculator is helpful because it displays those boundaries and usable ranges rather than making you calculate them manually.

Hope
The calculator can also combine adjacent smaller subnets. Two /25 networks can be put back together into a /24. That makes it easier to experiment with how much address space a network needs and how a larger range can be divided among different networks or VLANs.

Michael
A /24 is probably the most common subnet you will encounter. A typical example is 192.168.0.0/24, which provides about 254 usable IP addresses for devices. It is common because many consumer routers use that kind of network by default.

Hope
Smaller subnets are useful too. A /29 contains eight total addresses and six usable host addresses. When an ISP provides a block of five static IP addresses, it may give you a /29: one address is used for the ISP's gateway on its side, leaving five usable addresses for you.

Michael
At the other extreme, a single IP address can be represented as /32. For example, 192.168.0.1/32 describes one host address. Understanding these CIDR sizes helps you recognize how much address space a network or provider has allocated.

Hope
Now let's cover RFC 1918 private address ranges. These are IP ranges reserved for internal LAN use rather than direct public use on the internet. The three ranges are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.

Michael
The 192.168.0.0/16 range contains many possible /24 networks, including 192.168.0.0/24, 192.168.1.0/24, 192.168.2.0/24, and others. In practice, 192.168.0.0/24 and 192.168.1.0/24 are especially common because consumer routers often use them by default.

Hope
That popularity can cause conflicts. It is often better not to use those most common ranges when designing a network, especially if you expect to build a site-to-site VPN or connect to another network. If the same subnet exists on both sides, a router cannot reliably tell which side a destination belongs to.

Michael
A real example is Starlink or another upstream device using 192.168.1.0/24 on the outside of your firewall while your internal LAN also uses 192.168.1.0/24. The overlapping address space makes routing fail because the firewall sees the same network on both interfaces.

Hope
You also need to avoid using public address ranges internally. Some enterprise routers may technically allow that, but it creates problems. If you use a public range belonging to a service such as Netflix inside your LAN, the router may think Netflix is located behind your network instead of on the internet, so reaching the real service will not work correctly.

Michael
Finally, two services appear on almost every network: DHCP and DNS. DHCP means Dynamic Host Configuration Protocol. It automatically assigns IP addresses from a configured subnet to devices that connect to the network.

Hope
For example, when you plug a computer into Ethernet, it announces that it needs an address. DHCP responds with an available IP address and can also provide other settings, such as information about an NTP time server or a TFTP server. In a Unifi deployment, DHCP configuration will be an important part of setting up networks.

Michael
DNS means Domain Name System. It translates a human-friendly fully qualified domain name, or FQDN, into an IP address. Remembering google.com is much easier than remembering the IP address of Google's website, so DNS performs that translation for us.

Hope
DNS is also why people often say, 'It's always DNS' when something cannot be reached. If DNS is not working, a device may have network connectivity but still fail to find the IP address associated with the website or service it is trying to use.

Michael
So the key foundation is now in place: LAN describes the controlled local side, WAN describes the outside network, the OSI model organizes network functions into seven layers, layer two handles switching and MAC addresses, and layer three handles IP addressing and routing.

Hope
And on the addressing side, you should understand octets, subnet masks, CIDR notation, usable host ranges, private RFC 1918 space, and the risks of overlapping or inappropriate address ranges. Add DHCP for automatically assigning configuration and DNS for translating names into IP addresses, and you have the fundamentals needed to plan a reliable Unifi Network.

Michael
Keep these concepts close as we move into deployment planning. They are not just vocabulary: they explain how devices find one another, how switches forward traffic, how routers move traffic between networks, and why a carefully chosen addressing plan matters for a solid and secure network.

Ask anything
We've read this whole study set, so questions about it get the best answers.