Chapter 1  Introduction / Scope Welcome to Networking Basics 101! Hopefully by the end of this document you will have a general knowledge of how to configure and potentially troubleshoot common common small office / home office network setups. For the purposes of brevity, this document is intentionally limited only to the most common protocols you are likely to encounter in a small office/home environment as of 2019 - it is not aimed at certification or software development. Chapter 2  Layers In order to be modular and adaptable to different situations (without needing to re-implement everything), the modern network is built upon "layers". An application for example does not need to know or implement all layers of the network “stack”, as due to the “layered” design it can rely on other parts of the operating system to deal with lower level concerns. There are a number of different “models” to represent the network layer system and others may be appropriate depending on your focus. However, without getting into too much history, in 2019 the most appropriate layering model for us as network technicians is the "Internet model" which consists of four main layers to concern ourselves with. These layers shall be outlined below. Section 1  Physical Layer This is your networking cables/sockets/plugs, etc. "Is it plugged in?" Is a "layer 1" problem / troubleshooting question. If you hear others talking about “layer 1” problems, its generally a cabling technician problem to sort. Think: electrical interference, cable breaks, cabling length problems, etc. If there is a problem with layer 1 (e.g., broken cable), then all other layers that build upon it will have problems. This is why layer 1 is often a good place to check for problems first if you don’t know where to start. Wireless is somewhat special as there is no physical wires, but power to your wireless AP, and antennas being attached/pointing in the right direction(if directional) could be considered “layer 1” as well. Section 2  Network Layer (Ethernet) The network layer is where data is encoded for transport over the physical layer (layer 1). This could be wired ethernet or connectivity to your wireless SSID. This layer also includes other non ethernet protocols such as PPPoE, PPPoA, frame-relay, ATM, etc., however most of these are gradually being replaced with various forms of ethernet, and they are becoming increasingly irrelevant for home or small office use. For most modern home/small office networks, layer 2 covers ethernet and the associated devices such as network switches and wireless access points*. Layer 2 is handled by the operating system kernel - at the device driver level. Your network adapter’s driver is responsible for layer 2. Ethernet, the most common layer 2 protocol in 2019, deals with “frames”. Frames are the smallest fragment of traffic that ethernet will transmit. Ethernet frames contain both a source and destination “MAC” address, which a switch or other ethernet device will examine to determine whether or not it is addressed to itself. An ethernet frame can only be forwarded to a device that exists on the same ethernet network. In order for data to get from one network to another, it must be re-encoded and re-transmitted by a “layer 3” device such as a router (or bridge) that exists on 2 or more layer 2 networks (e.g., your home lan, and the internet - or two different local ethernet VLANs). Section 3  Internet Layer (IP) Layer 3 is where your logical IP network design comes into play. IP addresses, subnets, routing and firewalls are all considered “layer 3”. If you hear somebody talking about a layer 3 problem, it is to do with the above. Layer 3 is generally handled by the operating system kernel, in the case of TCP/IP - by the kernel’s TCP/IP stack. IP deals in “packets”. An IP “packet” is typically sized such that it will fit inside an ethernet “frame” for transport. A packet contains source and destination information, a size, an IP protocol (e.g., UDP or TCP), a checksum and a “payload” which is the actual data we want to transmit. The non-payload information in an IP packet is contained in the “header”. When layer 3 traffic is processed, the IP header is examined to determine the next hop for the packet, and then it is re-encoded with a new header and sent to the next destination. This process is repeated by every layer 3 device in the path until it ends up at the final destination or is unable to be forwarded further. This process of disassembly and re-assembly of packets, for forwarding onto the next destination is called “routing”. Hence, any device that performs this operation is technically a “router”. Section 4  Application Layer On top of all this, sits the application, and any application specific protocol(s). An example of an application protocol that sits on top of the other layers is HTTP/HTTPS as used by your web browser. The “application layer” is, as per the name, handled by the application you are using. Perhaps using shared operating system libraries. Every “application layer” protocol is wrapped up in a layer 3 packet (e.g., TCP/IP) which is in turn encapsulated within a layer 2 protocol (e.g., ethernet frame) for processing by the network. Chapter 3  Device Types In order to support the multi-layered network model, we have various devices that perform functions relevant to each layer of the network. Some common device types, and the layers that they process are listed below. Section 1  Switches Before ethernet switches existed, we had network hubs (which basically wires together all ports), and prior to that, coaxial ethernet cable. In both scenarios, all network adapters share the same media. Ethernet was originally designed to work in this “shared media” environment. All ethernet frames are sent to the shared media. The machine that has the address the frame was destined for processes the frame. But there is nothing to stop any other machine on the network also seeing that traffic, and due to the shared media, only one machine can send traffic at a time. If two machines attempt to send at the same time a “collision” occurs and they both attempt to re-transmit after a random duration. This has both performance and security implications. Hence, you will rarely see shared media networks with hubs or coaxial cable any more. Enter network switching. Network switches are the modern method to connect wired networks together and provide the layer 2 network connectivity between devices whilst addressing the above problems. A switch listens for ethernet frames from any devices plugged into its ports, and forwards the frame only to the port that it has seen the destination address on. Initially (e.g., upon switch power up, or if a connected device has just powered up), a network switch has no knowledge of which mac addresses exist on each of its ports. If a switch does not “know” where to forward an ethernet frame, it broadcasts it to all of its ports, and once the device replies, it will “learn” where the MAC address is located. As the switch only forwards frames to the “correct” port, the other ports are available to transmit/receive traffic at the same time without collisions. This increases throughput. Strictly speaking, a switch has no concept of IP addresses or routing. Though some modern switches combine some of the functionality of a router and are thus combination switching/routing devices. These switches that can also route are often called a “layer 3 switch”. A layer 3 switch has some limitations compared to a full router (typically they can only route between ethernet ports and not ethernet to ADSL for example), but they can perform ethernet only routing much faster than a router. Section 2  Wireless Access Points Wireless access points provide the same function as network switches, without wires. Section 3  Routers Routers provide the ability connect different IP networks together. Thus, by definition, a router will be connected to two or more networks. A router will receive IP packets from one network that is destined for some other network, examine the packets, re-encapsulate them and send them onto the next hop. In order to make routing decisions, a router needs a “routing table”. In order to build a routing table, network addresses need to be classified into different destinations. These destinations are called “subnets”. Section 4  Combo-devices Some devices, especially home/small office devices are combination devices. The typical combo-device is a typical home wireless router. These devices are actually 3 devices in one. A router, a network switch and a wireless access point. Chapter 4  Ethernet Chapter 5  IP Addressing Chapter 6  Routing Chapter 7  Firewalls Chapter 8  NAT