Networking Notes
LAN, WAN, Intranet, and Internet Structure

Characteristics of Effective Data Communications
- Delivery – Information must be delivered to the correct destination; only the intended user should receive the data.
- Accuracy – Data must be delivered without errors.
- Timeliness – Data must be delivered on time (must not be late).
- Jitter – Variation in packet arrival time should be minimized.
Main Components of Data Communication
- Message – Information to be conveyed.
- Sender – Device that sends the message.
- Receiver – Intended recipient of the message.
- Medium – The physical path by which the message travels.
- Protocol – A set of rules dictating how data is communicated between devices.
Networks
A network is two or more computers connected together for communication.
A stand-alone refers to an isolated computer.
Advantages
- File sharing
- Hardware sharing (e.g., printers)
- Communication between devices
- Roaming access – access files on any device
- Centralized maintenance and updates
- Centralized security (antivirus, firewalls)
- User monitoring
- Access level differentiation (different rights for users)
Disadvantages
- Cost (equipment/resources required)
- Malware spread (if poorly secured)
- Hacking (unauthorized access to files)
Types of Networks
- Local Area Network (LAN) – Geographically constrained to one site/building.
- Wide Area Network (WAN) – Covers more than one site.
- internet
*/Internetwork – When two or more networks are connected. - Internet – Global system of connected networks that use TCP/IP protocols; includes private, public, academic, business, and government networks.
- Intranet – Private network limited to an organization for internal communications and collaboration (restricted to organization members).
*- small letter i
OSI Reference Model
Host Layers
Each layer provides services to the layer above it and does not know where data from the previous layers came from.
- Application / Presentation / Session → Data
Connect directly with applications. - Transport → Segment (TCP) / Datagram (UDP)
Translates formats between systems; handles compression and encoding. - Network → Packet
Routing of packets across networks. - Data Link → Frame
Ensures data transfer across physical links, framing, error detection, and MAC addressing. - Physical → Bits
Transmission and reception of bitstream over the medium.
Physical Layer
-
Represented in 1s and 0s.
-
Decides rate and duration of transmission.
-
Synchronizes bit-rate to prevent loss.
-
Concerned with device connections and modes of transmission:
- Simplex – One-way communication.
- Half-duplex – Two-way communication, but one device transmits at a time.
- Full-duplex – Both devices communicate simultaneously.
Transmission Media
-
Wired
- Twisted Pair Cable – Ethernet LANs (Cat5, Cat6).
- Coaxial Cable – Used in cable TV and older networks.
- Fiber Optic Cable – High-speed, long-distance, minimal interference.
-
Wireless
- Radio Waves – Wi-Fi, mobile networks.
- Microwaves – Satellite and long-distance comms.
- Infrared – Short-range comms (e.g., TV remotes).
Physical Connections
-
Multipoint / Multidrop
- Time-shared: Devices take turns.
- Spatially shared: Devices use link simultaneously.
Topologies
-
Multipoint/Multi drop - all devices connected to one link, devices take turns and use the link simultaneously
-

-
Bus – Multi point, Single cable shared by all devices.

-
Mesh – Every device has a dedicated connection with all others.

-
Point to point - Every device has two dedicated connections to the devices around it
- sorry i dont have the images but i guess you can imagine it
-
Star – Central controller; all traffic passes through it.

-
Ring – Each connected to two neighbors; signals passed until reaching destination.

Data Link Layer
- Represented in frames.
- Responsible for direct connection between two devices on the same local network.
- Functions:
- Oversees packet delivery.
- Packages data into frames (Header – Source/Destination MAC, Payload, Trailer – error info).
- Error/Duplicate detection (checksums, parity bits, CRC).
- devices can ask for re-transmissions
- Flow control (preventing overflow).
- Access control (who can transmit).
Access Control
Manage which device have control over the link when two or more devices are connected to the same link.
- MAC protocol (Ethernet) – Listens before transmitting, detects collisions.
- CSMA/CA (Wireless) – Avoids collisions by waiting for a “go” signal.
Components
- LLC (Logical Link Control) – Interface with network layer; error/flow control.
- MAC (Media Access Control) – Physical addressing, channel access.

Frame Structure

- Preamble – Synchronization.
- SFD – Start of frame delimiter.
- Destination – Destination MAC.
- Source – Source MAC.
- Type – Type of packet.
- Data – Payload.
- FCS – Error check.
MAC Addresses
- 48-bit hardware address (6 groups of 2 hex digits).
- Formats:
00:1A:2B:3C:4D:5E,00-1A-2B-3C-4D-5E, or001A2B3C4D5E. - First 3 bytes = manufacturer; last 3 bytes = device ID.
- Unique and fixed to the NIC.
- Used for local addressing.
Network Layer
-
Responsible for source-to-destination packet delivery across multiple networks.
-
Data link same network only.
-
treats all packages independently
-
Logical addressing – Packets crossing boundaries are made to carry source/destination addresses(logical addressing).
-
Routing – Routers switching packets to the correct destination.(Internetworks and large networks)
Important to note!:
- if the two hosts are connected to the same network, network layer is still needed to accomplish source to destination,
- no routing needed
Transport Layer
-
Responsible for process-to-process delivery (application to application).
-
Ensures the whole message arrives intact and in order.
-
Provides both error control and flow control from source to destination.
- Service Point Addressing(ports)
- Ensures data is delivered to the correct process.
- Works at two levels:
- One device to another.
- One program (process) to another.
- Uses a service point address (port number) to direct the packet to the correct process
- Service Point Addressing(ports)
-
Segmentation and Reassembly
- Messages are divided into smaller units called segments.
- Each segment contains a sequence number
- At the destination, segments are reassembled according to sequence numbers.
- If a packet is lost, a request is made for re-transmission of the missing data.
-
connection control
- segments are treated as independent packets
- connection oriented transport layer establishes a connection with the destination transport layer before delivering said packets, before the connection terminates upon completion(tcp requires a connection, udp doesnt need a prior connection to work)
- flow control
- flow control of end to end rather than a single link
- error control
- process to process errors
- makes sure message arrives at receiving end without loss / error
- else the data is re transmitted(correction)
-
Flow Control
- Provides end-to-end flow control (not just on a single link like the data link layer).
- Prevents the sender from overwhelming the receiver.
-
Error Control
- Provides process-to-process error control.
- Ensures that the entire message arrives at the receiving end without loss or error.
- If errors are detected, the affected data is re transmitted (correction).
Session Layer
- Manages concurrent sessions.
- Session initiation/tear-down – Starts and terminates sessions.
- Token management – Controls which device can transmit (important for simplex/half/full duplex).
Presentation Layer
- Ensures proper format for application data.
- Handles compression, encryption, translation.
Application Layer
- Provides end-user services.
- Identifies available services.
- Manages QoS parameters, security mechanisms, and synchronization of communication apps.
OSI Model Summary

Each layer adds/removes its own header and trailer.
- Transport adds sequence numbers and acknowledgements (TCP).
Routers

- Routers are network devices.
- They partially unpack packets up to the network layer.
- Read routing info, select best path, repackage, and forward.
- Repeat until reaching the destination.
- At the transport layer, segments are reassembled based on sequence numbers.
(from here its networking 2 stuff)
Networks 2
TCP/IP(transmission control protocol / internet protocol)
A protocol suite - set of protocols organised in different layers
- same concept as the OSI layers, but as a predecessor to it

Layering - the layer recieves same object sent by corresponding layer at source
Benefits of layering:
- Molecularity: grouping of specific functions into layers makes it easier to design, understand and troubleshoot.
- Interoperability: standardize layers and functions
- cross compatibily for software as long as they follow the same protocols for each layer
- Flexibility and abstraction: Changes made to one layer shouldn’t affect functionality of other layers
- Simplified troubleshooting - network issues can be diagnosed by layers
- standardization - common language and framework for implementing network protocols.

protocols of each layer in the TCPIP

encapsulation process in TCPIP
Kety characterists of the TCPIP suite:
- It is designed to work over any underlying network infrastructure
- runs over any sort of hardware
- flexible
Physical
- supports all standard and proprietary protocols
- communication between two nodes(computer or router)
- communicates in bits
Data link
- supports all standard and proprietary protocols
- communication between two nodes
- communicates in frames - packet that encapsulates data recieved from above and optional trailer
Network layer
- selects the best path for data to travel
- mainly uses Internet Protocol
- includes various supporting protocols for IP

Transport
- responsible for source to destination and end to end conversations
- Transmission Control protocol(TCP)
- connection based
- User data-gram Protocol(UDP)
- connection less communication
Application layer:
- in charge of exchange information between transport and application layers
- source to destination
- contains many “high level” protocols that cover wide uses
- HTTP, FTP, SMTP, Post office protocol, Telnet Domain name service
Modes of data transfer:
Circuit switching:
- connection established before the start of data transfer(between network layers)
- Data moves through the same path defined by the connection
- eg: early telephone systems
Packet switching:
- connectionless
- data fragmented into manageable packets
- individually addressed and sent to recipient
- takes the best route
- Network layer in charge
- Network layer waits for all packets to arrive before reassembly and delivery
- routing - selection of best path to destination for a packet
- IP is responsible for packet sending
- Host A:
- Packet is encapsulated with IP header, with addresses of hosts A and B
- consults routing table:
- if B is on the same network, it is directly sent to B
- else: it sends to a default gateway(no need to worry about this its just another device that’s set as the default IP to send to)
- packets will be fragmented if it exceeds the Maximum transmission unit(MTU)
- Router:
- router receives and validates the packet(check for corruptions and destination issues)
- Checks the destination IP
- consults the routing table for the next hop to send the packet towards B(same process as host A)
- fragments packets into smaller units and passes it to data link
- repeat until destination
- B:
- validates packet for errors, extract data and caches it
- reassembles and sent to transport when all info is received
- cached info has a reassembly timer
- if expiry, destroys caches and sends an error for re-transmission.
Main differences:
circuit switching is a connection based data transfer method that relies on a pre established connection
- all data will take same path
circuit switching is a connectionless based data transfer method that breaks data upp into smaller packets that travel independently
Advantages and disadvantages of circuit switching
- garenteed data rate
- reliable
- quality of service
- securityease management
- compatibility
However it is:
- limited in scalibility
- resource intensive
- prone to failure
- there somewhat is latency
Switching uses MAC addresses and MAC address tables
Protocols
Features of a Protocol
-
Ensures compatibility and interoperability between systems, software, and devices.
-
Defines how data is formatted and organized in transmission.
-
Defines how devices initiate, maintain, and terminate connections.
-
Defines how errors are handled.
Network Protocols
-
IPv4 – Packetizing, forwarding, and delivery.
-
ICMPv4 (Internet Control Message Protocol v4) – Handles errors that may occur during delivery.
-
IGMP (Internet Group Management Protocol) – Supports multicasting.
-
ARP (Address Resolution Protocol) – Connects the network and data link layers by mapping IP addresses to MAC addresses.
Internet Protocol (IP)
-
Unreliable
-
Best-effort delivery.
-
Packets can be corrupted, lost, out of order, delayed, or cause network congestion.
-
-
Connectionless – No prior connection is established.
-
Independent packet handling – Each packet can follow a different route to the destination.
-
Responsible for source-to-destination delivery.
IP Host-to-Source Delivery
-
An IP header is added with source and destination IP addresses before passing down the stack.
-
If destination is on the same network:
- (Same subnet mask) → Sent directly to destination.
-
If destination is on a different network:
- Sent to the default gateway or router (indirect delivery).
-
Packet may be fragmented according to the MTU (Maximum Transmission Unit).
-
Before passing to the data link layer, the MAC address of the next hop (host or router) is required.
-
The MAC is resolved from the destination IP using ARP.
Address Resolution Protocol (ARP)
Maps IP addresses to MAC (hardware) addresses.
-
Resolves IP → hardware address.
-
Process:
-
Looks in the ARP cache.
-
If found → entry is used (stored for 2–10 mins).
-
If not found → request broadcast is sent.
-
-
All nodes in the local network receive the ARP request.
-
The node with the matching IP responds with its hardware (MAC) address.
-
Internet Control Message Protocol (ICMP)
-
Used for:
-
Sending error messages.
-
Performing diagnostics.
-
Controlling data flow.
-
-
ICMP source-quench – Router tells a source host to slow down due to overload.
-
PING – Sends ICMP echo request packets to test connectivity.
Internet Group Management Protocol (IGMP)
-
Allows one host to send one stream of data to many hosts simultaneously.
-
Supports multicast communication – delivers streams to multiple hosts concurrently.
IP Addresses (Networking)
Every host in TCP/IP networks needs a unique address for host-to-host delivery.
- Packets carry addressing information in their headers for routing.
IPv4 (Logical Address)
-
32-bit address uniquely identifies each host.
-
Characteristics:
-
Software-assigned (not permanent).
-
Prefix (
nbits) = network. -
Suffix (
32-nbits) = host.
-
-
Example:
192.168.2.100 -
Written in dotted decimal notation.
IPv6
-
128-bit address, allowing up to
2^128unique addresses. -
Written in hexadecimal form (32 hex digits).
- Example:
