1. Nodes
In a computer network, a node refers to any device that can send, receive, or forward information over a communication channel. Nodes are crucial components of a network, as they enable communication between different devices. Each node has a unique address (such as an IP address) that identifies it within the network.
1.1 Types of Nodes
Nodes can be classified based on their role in the network:
- End Devices (Host Nodes): These are the devices at the edge of the network that send and receive data. Examples include computers, smartphones, and printers.
- Intermediary Devices: These nodes facilitate communication between end devices. They manage data flow and routing within the network. Examples include routers, switches, and gateways.
1.1.1 End Devices (Host Nodes)
End devices serve as the source and destination of network communication. They generate and consume data. Each end device has a unique identifier, such as an IP address, and is capable of directly interacting with the user.
1.1.2 Intermediary Devices
Intermediary devices are responsible for ensuring data is efficiently transferred between nodes. They route, switch, and process data to maintain smooth communication within the network. These devices do not originate or consume data but play a key role in forwarding it.
1.2 Node Addressing
Every node in a network is identified by a unique address, such as an IP address in the case of an Internet Protocol (IP) network. Addressing enables the correct delivery of data from one node to another.
In IPv4, an address is represented as a 32-bit number, typically written as four octets separated by dots (e.g., 192.168.1.1). In IPv6, the address is a 128-bit number represented in hexadecimal, separated by colons (e.g., 2001:0db8:85a3::8a2e:0370:7334).
2. Links
A link in a computer network is a communication pathway that connects two or more nodes. It is the medium through which data is transmitted between devices. Links can be either physical or logical, and they determine how data travels from one point to another in a network.
2.1 Types of Links
Links are broadly classified into two types based on the medium used:
- Wired Links: These use physical cables like copper wires (Ethernet cables) or optical fibers to transmit data.
- Wireless Links: These use electromagnetic waves, such as radio waves or infrared signals, to communicate data between nodes without physical connections.
2.1.1 Wired Links
Wired links are tangible communication paths that physically connect devices. They offer reliable data transmission with minimal interference. Common wired links include:
- Twisted Pair Cables (Ethernet): Used in LANs, they consist of copper wires twisted to reduce interference. Example: Cat5, Cat6 cables.
- Coaxial Cables: Used in older networks and cable TV systems, these provide better shielding against interference than twisted pair cables.
- Optical Fiber Cables: Use light to transmit data, providing higher bandwidth and longer distances compared to copper cables.
2.1.2 Wireless Links
Wireless links use radio frequencies, microwaves, or infrared signals to transmit data without the need for physical cables. These links allow for mobility and flexibility but are subject to interference from environmental factors. Common wireless links include:
- Wi-Fi: Uses radio waves to enable devices to connect to a local network or the internet.
- Bluetooth: Short-range wireless communication used for connecting personal devices.
- Satellite Links: Use microwaves to provide long-distance communication, especially in remote areas.
- Infrared: Used for very short-range communication (e.g., TV remotes), but limited by line-of-sight constraints.
2.2 Link Characteristics
The performance of a link depends on several key characteristics:
- Bandwidth: The amount of data that can be transmitted over a link in a given amount of time. Measured in bits per second (bps).
- Latency: The time taken for data to travel from the source to the destination. Lower latency means faster transmission.
- Reliability: The ability of the link to consistently transmit data without errors or packet loss.
- Noise: Unwanted interference that can disrupt data transmission, more common in wireless links.
- Duplex: The communication direction of a link, which can be:
- Simplex: Data flows in one direction only.
- Half-Duplex: Data flows in both directions but not simultaneously.
- Full-Duplex: Data flows in both directions simultaneously.
3. Network Interface Card (NIC)
The Network Interface Card (NIC) is a hardware component that allows a computer or other device to connect to a network. It serves as the physical interface between the computer and the network, enabling communication by sending and receiving data over the network link.
Each NIC has a unique Media Access Control (MAC) address, which is a hardware address used for network communication at the data link layer.
3.1 Types of Network Interface Cards
NICs can be classified based on the type of network they support and how they are integrated into the device:
- Wired NIC: These are used for connecting to wired networks through Ethernet cables. Wired NICs are generally more stable and provide higher speeds.
- Wireless NIC: These enable devices to connect to wireless networks (Wi-Fi). They come with a built-in antenna for transmitting and receiving data over radio waves.
- Virtual NIC: In virtualized environments, virtual NICs allow virtual machines (VMs) to connect to the network.
- Internal vs. External NIC: Internal NICs are embedded into the device's motherboard, while external NICs are connected via USB or other external ports.
3.1.1 Wired NIC
A wired NIC connects devices to a network using Ethernet cables. It is typically installed in desktops and servers to provide stable, high-speed network access. Most modern motherboards come with built-in wired NICs, supporting various Ethernet standards like Fast Ethernet (100 Mbps) and Gigabit Ethernet (1 Gbps).
Example: Intel Ethernet I219-V NIC (supports Gigabit Ethernet)
3.1.2 Wireless NIC
A wireless NIC enables devices to connect to wireless networks (Wi-Fi). It includes an antenna for transmitting and receiving wireless signals. Wireless NICs support different Wi-Fi standards, such as 802.11a/b/g/n/ac, which determine the speed and frequency bands used.
Example: TP-Link TL-WN881ND (supports 802.11n Wi-Fi)
3.2 Functions of NIC
The NIC performs several important functions to enable seamless communication between the device and the network:
- Data Transmission and Reception: NIC converts the data from the device into electrical or radio signals for transmission over the network, and vice versa for reception.
- Data Link Layer Processing: NIC operates at the data link layer, managing MAC addresses and handling error detection using methods like cyclic redundancy check (CRC).
- Packet Queueing: NIC buffers incoming and outgoing data packets to ensure smooth data flow between the device and the network.
- Network Addressing: NIC uses the MAC address for identifying devices at the data link layer and facilitating local network communication.
3.3 NIC and MAC Address
Each NIC has a unique MAC address, which is a 48-bit identifier used to distinguish devices on a local network. The MAC address is typically represented in hexadecimal format (e.g., 00:1A:2B:3C:4D:5E). It plays a crucial role in delivering frames to the correct device on the network.
4. Routers
A router is a network device that forwards data packets between different networks. It plays a critical role in directing traffic on the internet by determining the best path for data to travel from the source to the destination. Routers operate at the network layer (Layer 3) of the OSI model, making decisions based on IP addresses.
4.1 Functions of a Router
The main functions of a router include:
- Routing: Routers determine the optimal path for data packets to travel from one network to another by using routing tables and algorithms like OSPF (Open Shortest Path First) and BGP (Border Gateway Protocol).
- Packet Forwarding: Once a route is determined, the router forwards packets to their destination network.
- Network Segmentation: Routers segment large networks into smaller subnets, reducing congestion and improving performance by isolating traffic.
- NAT (Network Address Translation): Routers can perform NAT, which allows multiple devices on a local network to share a single public IP address for accessing external networks like the internet.
- Firewall Capabilities: Many modern routers have built-in firewall features, providing basic security by filtering incoming and outgoing traffic based on rules.
4.2 Types of Routers
Routers can be classified into different types based on their application:
- Wired Routers: Connect to a network using Ethernet cables and are typically used in homes and businesses.
- Wireless Routers: Provide wireless connectivity using Wi-Fi technology, allowing multiple devices to connect to the network without physical cables.
- Core Routers: Used by internet service providers (ISPs) and large enterprises to route data within large, complex networks.
- Edge Routers: Positioned at the boundary of a network to connect it to external networks, such as the internet.
4.2.1 Wired Routers
Wired routers are used in local area networks (LANs) to direct traffic between wired devices. They connect to modems or other network devices via Ethernet cables and provide stable, high-speed connections. They are preferred in environments where reliability and performance are key, such as offices or data centers.
Example: Cisco RV340 (supports wired connections with VPN capabilities)
4.2.2 Wireless Routers
Wireless routers provide Wi-Fi connectivity, enabling devices to connect to the network without the need for physical cables. They are commonly used in homes and small offices, allowing laptops, smartphones, and other wireless devices to connect to the internet.
Example: TP-Link Archer C7 (supports dual-band 802.11ac Wi-Fi)
4.3 Routing Algorithms
Routers use routing algorithms to determine the best path for forwarding data packets. These algorithms consider factors like distance, cost, and traffic congestion to make routing decisions. Common routing algorithms include:
- Distance Vector Routing: Routers share information about the distance to other networks. An example is the RIP (Routing Information Protocol).
- Link State Routing: Routers build a complete map of the network by sharing information about network topology. An example is OSPF.
- Path Vector Routing: Used in large-scale networks like the internet, this algorithm is implemented by BGP to find the most efficient paths between autonomous systems.
4.4 Routing Table
Routers use a routing table to store the information needed for packet forwarding. A routing table contains:
- Destination Network: The IP address range of the destination network.
- Next Hop: The next router or gateway to which the packet should be forwarded.
- Metric: A value representing the cost of using a particular route (e.g., distance or hop count).
- Interface: The network interface through which the packet should be sent.
By consulting the routing table, the router makes decisions on where to forward packets to reach their destination efficiently.
5. Switches
A switch is a network device that connects multiple devices within a local area network (LAN) and uses MAC addresses to forward data frames to the correct destination. Unlike a hub, which broadcasts data to all connected devices, a switch forwards data only to the specific device it is intended for. Switches operate at the data link layer (Layer 2) of the OSI model but can also function at the network layer (Layer 3) for routing purposes.
5.1 Functions of a Switch
The main functions of a switch include:
- Frame Forwarding: A switch inspects the destination MAC address of each incoming data frame and forwards it to the appropriate port where the destination device is connected.
- Learning MAC Addresses: Switches dynamically learn the MAC addresses of devices connected to their ports and store them in a MAC address table to facilitate efficient forwarding.
- Filtering Traffic: Switches filter network traffic, sending data only to the devices that need it, which reduces network congestion and improves performance.
- Full Duplex Communication: Modern switches support full duplex, allowing simultaneous sending and receiving of data on all ports.
5.2 Types of Switches
Switches can be categorized based on their functionality and usage:
- Unmanaged Switches: Basic switches that work out-of-the-box with no configuration options. They are commonly used in small networks like home or small office environments.
- Managed Switches: Advanced switches that offer more control over network traffic, allowing configuration, monitoring, and management. They are used in enterprise environments.
- Layer 2 Switches: Operate at the data link layer and use MAC addresses for forwarding frames between devices in the same network.
- Layer 3 Switches: These switches function both at the data link layer and the network layer, allowing them to perform routing functions based on IP addresses.
- PoE (Power over Ethernet) Switches: These switches provide power along with data to connected devices, such as IP cameras or wireless access points, via Ethernet cables.
5.2.1 Unmanaged Switches
Unmanaged switches are plug-and-play devices that require no configuration. They automatically manage data traffic and are ideal for home networks or small businesses where simplicity is key.
Example: TP-Link TL-SF1005D (5-port Fast Ethernet Unmanaged Switch)
5.2.2 Managed Switches
Managed switches provide the ability to control, configure, and monitor network traffic. They offer features like VLAN (Virtual LAN), Quality of Service (QoS), and advanced security settings, making them suitable for larger networks.
Example: Cisco Catalyst 2960X (24-port Managed Switch with Layer 2 and Layer 3 support)
5.3 MAC Address Table
A switch uses a MAC address table to map the MAC addresses of devices to the specific ports where those devices are connected. When a switch receives a frame, it checks the destination MAC address in the table to determine where to forward the frame. If the MAC address is not found, the switch broadcasts the frame to all ports.
The table is continuously updated as the switch learns new MAC addresses when devices communicate over the network.
5.4 VLAN (Virtual Local Area Network)
Managed switches support VLANs, which allow network administrators to logically segment a network into different broadcast domains. This improves security and performance by isolating traffic between different groups of devices. VLANs are configured using VLAN IDs, and devices within the same VLAN can communicate as if they were on the same physical network, even if they are connected to different switches.
5.5 PoE (Power over Ethernet) Switches
PoE switches can deliver both data and electrical power over Ethernet cables. This feature is commonly used to power devices like IP cameras, wireless access points, and VoIP phones, eliminating the need for separate power cables.
PoE switches comply with the IEEE standards like 802.3af and 802.3at, which define how much power can be delivered to devices.
Example: Ubiquiti UniFi Switch 8 (8-port Gigabit PoE switch supporting 802.3af)
6. Hubs
A hub is a basic networking device that connects multiple devices within a local area network (LAN). It operates at the physical layer (Layer 1) of the OSI model and acts as a simple data repeater, broadcasting incoming data to all connected devices. Unlike switches, hubs do not filter or direct data, leading to higher traffic and potential collisions on the network.
6.1 Functions of a Hub
Hubs perform basic functions in a network:
- Data Repeating: Hubs receive data from one port and broadcast it to all other connected devices, regardless of the intended recipient. This can lead to network inefficiencies.
- Signal Amplification: Hubs regenerate weak signals, allowing data to travel over longer distances without degradation.
- Collision Handling: Hubs do not have mechanisms to prevent data collisions, which occur when multiple devices send data simultaneously, resulting in data loss.
6.2 Types of Hubs
Hubs are generally classified based on their functionality:
- Passive Hub: A basic hub that only amplifies and broadcasts data. It does not have any built-in power source or signal regeneration capabilities.
- Active Hub: A hub that regenerates the signals it receives before broadcasting them. It requires a power source to boost weak signals.
- Intelligent Hub: A hub with basic management features like monitoring traffic and error detection. These hubs are not as advanced as switches but provide more functionality than passive and active hubs.
6.2.1 Passive Hub
A passive hub simply forwards the data it receives to all devices connected to it without any amplification or regeneration. It relies entirely on the strength of the incoming signals and does not require an external power source. Passive hubs are typically used in small networks with short cable lengths.
Example: A simple 4-port Ethernet hub
6.2.2 Active Hub
An active hub regenerates and amplifies the signals it receives before broadcasting them to other devices. This helps in reducing signal degradation over long distances. Active hubs require a power supply to function and are used in slightly larger networks where signal strength is a concern.
Example: TP-Link TL-SF1008D (8-port Fast Ethernet Active Hub)
6.3 Hub Limitations
Despite being a simple and cost-effective solution for small networks, hubs have several limitations:
- No Data Filtering: Hubs broadcast all incoming data to every connected device, leading to unnecessary network traffic and inefficiency.
- Collisions: Since hubs operate in half-duplex mode, where devices can either send or receive data at a given time, collisions are common, especially in larger networks.
- Limited Network Scalability: Hubs can only support a small number of devices efficiently. For larger networks, switches are preferred due to their traffic management capabilities.
- Security Issues: Since hubs broadcast data to all connected devices, sensitive information can be intercepted by any device on the network, making hubs less secure compared to switches.
6.4 Hub vs. Switch
While hubs and switches may appear similar, there are key differences in how they handle network traffic:
- Data Forwarding: Hubs broadcast data to all devices, while switches intelligently forward data to specific devices based on MAC addresses.
- Collision Domains: Hubs create a single collision domain for all devices, meaning all devices share the same bandwidth. Switches create a separate collision domain for each port, improving performance.
- Efficiency: Switches are more efficient as they reduce unnecessary traffic and collisions, making them ideal for larger and more complex networks.
- Cost: Hubs are cheaper but offer less functionality and are prone to performance issues in larger networks. Switches, though more expensive, provide better performance and security features.