Networking
What is Networking?
Definition
- Practice of connecting computers and other devices together to:
- share resources,
- exchange data, and
- communicate with each other.
- Foundation of modern communication and data exchange.
Key Concepts
- Node - Any device connected to a network.
- Links - Physical or logical connections between notes (wired or wireless).
- Data Transfer - Sending and receiving data between nodes over a network.
Importance
- Resource sharing
- Communication
- Data exchange
- Scalability
- Efficiency
Types of Networks
Local Area Networks (LAN)
- Networks that cover a small geographic area.
- Eg: Single building, campus, etc.
- Typically used for connecting PCs and workstations to share resources like printers and file servers
Wide Area Networks (WAN)
- Networks that cover a large geographic area.
- Eg: City, country, globally, etc.
- Internet is largest example of a WAN
Metropolitan Area Network (MAN)
- Network somewhere between LAN and WAN.
- Eg: City-wide or large campus.
Personal Area Network (PAN)
- Small networks used for connecting device around individual person.
- Eg: ranging few meters, single room, etc.
- Bluetooth connections and old-school infrared.
Network Topologies
Star Topology
- All nodes connected to a central hub or switch.
- Easy to manage, but vulnerable if central hub fails.
Mesh Topology
- Every node connected to every other node.
- Provides high redundancy and reliability but is complex and expensive to implement.
Bus Topology
- All nodes connected to a single central cable or bus.
- Simple and cost-effective but inefficient and prone to collisions.
Ring Topology
- Nodes connected in a circular fashion, with each node having exactly two neighbours.
- Data travels in one direction.
- Efficient but suffers if single connection fails.
IP Address
Subnetting
Definition
- Network inside a network.
- Subnets make networks more efficient since network traffic can travel a shorter distance without passing through unnecessary routers to reach its destination.
Classless Inter-Domain Routing (CIDR)
Definition
- Method of allocating IP addresses and IP routing that improves efficiency of IP address distribution.
Key Concepts and Features
- Variable-Length Subnet Masking (VLSM): Allows for subnet masks of various length, meaning IP addresses can be assigned according needs of networks.
- CIDR Notation:
A.B.C.D/E-->A.B.C.Dis IP Address andEis number of bits in network prefix. - Aggregation: Multiple IP addresses can be combined into a single routing entry. Reduces size of routing tables in routers.
Example
- Start with network block:
192.168.1.0/24. - Lets say we need 4 subnets.
- New Subnet Mask = Original Subnet Mask +
(Number of Subnets) - New Subnet Mask = 24 +
(4) - New Subnet Mask = 26
- New Subnet Mask = 24 +
- Dividing network block:
- For a
26subnet mask, first26bits are for network, remaining are for host addresses. - In IPv4 recollect that there are IPv4 per network address, that means for a
/26subnet there are= 64 IP addresses per subnet. - Each subnet with have 64 addresses of which 1 is for network and other is for broadcast (meaning 62 usable addresses).
- For a
- Subnets:
- Subnet 1:
192.168.1.0/26- Network address:
192.168.1.0 - Usable IP range:
192.168.1.1to192.168.1.62 - Broadcast address:
192.168.1.63
- Network address:
- Subnet 2:
192.168.1.64/26- Network address:
192.168.1.64 - Usable IP range:
192.168.1.65to192.168.1.126 - Broadcast address:
192.168.1.127
- Network address:
- Subnet 3:
192.168.1.128/26- Network address:
192.168.1.128 - Usable IP range:
192.168.1.129to192.168.1.190 - Broadcast address:
192.168.1.191
- Network address:
- Subnet 4:
192.168.1.192/26- Network address:
192.168.1.192 - Usable IP range:
192.168.1.193to192.168.1.254 - Broadcast address:
192.168.1.255
- Network address:
- Subnet 1:
Protocol Layers and OSI Model
Definition
The Open Systems Interconnection (OSI) model is a conceptual framework that divides network communication functions into seven layers.
Every tech in specific layer must provide certain capabilities and perform specific functions to be useful in networking.
Tech in higher layers benefit from abstraction, as they can use lower-level tech without having to worry about underlying implementation details.
Importance
Layers of OSI model encapsulate every type of network communication across both software and hardware components.
Model was designed to allow standalone systems to communicate via standardised interfaces or protocols based on current layer of operation.
Benefits
- Shared understanding of complex systems - Can decompose system into smaller, manageable parts via abstraction, making it easier to conceptualise as a whole.
- Faster research and development - Easier to develop when the targetted layer is known, can take advantage of repeatable processes and protocols.
- Flexible standardisation
Seven Layers of OSI Model
Physical Layer (L1)
Refers to the physical communication medium and the technologies to transmit data across that medium.
Data communication (transfer of digital and electronic signals through various physical channels) occurs through fibre-optic cables, copper cabling, air, etc.
Physical layer includes standards for technologies and metrics related with channels like:
- Bluetooth,
- NFC,
- Data transmission speeds, etc.
Data Link Layer (L2)
Refers to technologies used to connect two machines across a network where physical layer already exists.
Manages data frames.
Digital signals encapsulated into data packets.
Flow control and error control of data are often key focuses of data link layer.
Ethernet is an example of a standard at this level.
Data link layer is often split into two sub-layers.
Media Access Control (MAC) layer
Controls how devices access the network and communicate over shared medium. Lower sublayer closest to L2.
MAC address (hardware/physical addresses) identify devices in a network uniquely. Each Network Interface Card (NIC) has a globally unique MAC address assigned by manufacturer.
Controls when and how devices can transmit data. In shared medium networks (like Ethernet), the MAC layer uses techniques like Carrier Sense Multiple Access with Collision Detection (CSMA/CD), or Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) to manage access and avoid or handle collisions.
Organizes data into frames with headers and trailers for error detection.
Identifies corrupted data using techniques like Cyclic Redundancy Check (CRC).
Regulates data flow to prevent sender from overwhelming receiver.
Logical Link Control (LLC) layer
Upper sublayer whose primary role is to provide interface between L3 and MAC Layer. It manages communication between devices and helps in error handing and flow control.
Allows multiple network protocols (like IPv4, IPv6, etc.) to use same network interface by distinguishing between them with Service Access Points (SAPs).
Provides mechanisms for error detection and sometimes recovery.
Network Layer (L3)
This layer is concerned with concepts such as routing, forwarding, and addressing across dispersed network or multiple connected networks of nodes or machines.
Across the internet, the Internet Protocol v4 (IPv4) and v6 (IPv6) are used as the main network layer protocols.
Transport Layer (L4)
Ensures that data packets arrive in the right order, without losses or errors, or can be seamlessly recovered if required.
Commonly used protocols in this layer include:
Session Layer (L5)
Manages and controls the dialog or session between two communicating devices. It establishes, maintains, and terminates communication sessions.
Its functions include:
- Session establishment - Set up, manage, and terminate connections.
- Synchronisation - Add checkpoints during data transfer to recover the session if interrupted.
- Dialogue control - Manage which device is allowed to send or recieve data at any given moment.
Presentation Layer (L6)
Responsible for ensuring that data sent by application layer of one system is readable by application layer of another.
Its functions include:
- Data translation - Convert data between different formats (example from ACII -> UTF-8 encoding).
- Encryption/Decryption - For security purposes like with SSL and TLS.
- Compression/Decompression - Manipulate data size for ease of transmission.
Application Layer (L7)
Provides interfaces and services for applications to access network resources and communicate with other devices over the network.
Its primary function is to ensure that applications have a way to send and recieve data. Common protocols in this layer include:
- HTTP - Hyper-Text Transfer Protocol.
- FTP - File Transfer Protocol.
- SMTP - Simple Mail Transfer Protocol.
- DNS - Domain Name System.
Network Devices
Router
Switch
Modems
Access Points
Definition
Device in a wireless local area network (WLAN) that allows wireless devices to connect to a wired network. It creates a wireless connection point between wired and wireless networks.
Types of Access Points
- Standalone AP - Separate devices that connect to wired router or switch to extend Wi-Fi coverage.
- Mesh AP - Multiple AP work together to provide seamless wireless coverage to large areas by creating unified network.
- Router w/ Built-in AP
Functions
- Extend network coverage.
- Wireless connectivity.
- Bridge wired and wireless networks.