Notes Week 5 - Lecture 7 (NET1002)
Notes Week 5 - Lecture 7 (NET1002)
Introduction
This document provides an in-depth guide on key networking topics covered in Lecture 7,
including networking layers, devices like switches, hubs, and routers, and communication
protocols such as Ethernet and Wi-Fi. It is intended to serve as a comprehensive study
resource for students preparing for exams and practical assessments.
Layer 1 (Physical Layer): • Defines the physical connection between devices, including
the hardware elements such as cables, switches, and ports. • Examples include copper
cables (Ethernet cables), fiber optics (used for long-distance, high-speed connections),
and wireless media (like Wi-Fi). • Responsible for data encoding, signaling, and the actual
transmission of raw bits over a physical medium.
Layer 2 (Data Link Layer): • Manages error detection, framing, and addressing to ensure
reliable data transfer between connected devices. • The Data Link Layer ensures that
data is correctly formatted into frames, manages data flow control, and uses MAC
addresses to identify devices on a local network. • Devices that operate at this layer
include switches (which use MAC addresses to direct frames) and bridges (used to
segment networks to reduce traffic).
• Hub (Layer 1 Device): - A basic device that simply repeats incoming signals across all
connected ports, without any form of filtering. - Hubs operate at the physical layer,
meaning they cannot differentiate between different devices connected to them and
broadcast incoming traffic to all ports, causing potential network inefficiencies.
• Switch (Layer 2 Device): - A more advanced device that can filter traffic based on
MAC addresses, thereby sending data only to the intended recipient device and reducing
unnecessary network congestion. - Switches maintain a MAC address table to determine
which device is connected to each port, allowing them to make intelligent forwarding
decisions. - Switches also support full-duplex communication, enabling simultaneous
sending and receiving of data.
• Frames: - Frames are the data units used at Layer 2 for communication within a local
network. - Each router or media transition along the data path generates a new frame to
encapsulate the packet, ensuring it is appropriately formatted for the physical medium. -
Frames contain the source and destination MAC addresses, allowing switches to forward
them to the correct device on a local network.
• Packets: - Packets are the data units used at Layer 3 and contain data encapsulated
for routing across networks. - Packets include both the source and destination IP
addresses, allowing routers to determine the path to the target network.
• Physical Topology: - Illustrates the actual physical connection of devices, such as the
physical layout of cables, ports, and devices in a network. - Examples include star
topology (devices connected to a central hub) and bus topology (single backbone cable
connecting all devices).
• Logical Topology: - Represents how data flows within the network, irrespective of the
physical layout. - For instance, even if devices are physically connected in a star
configuration, they may logically operate as if they are all part of the same shared
network path, similar to a bus topology.
• Example: - A hub may physically connect multiple devices in a star pattern, but
logically, they share the same network path, similar to a bus topology. Switches, on the
other hand, provide each device with a distinct data path, reducing collisions and
improving efficiency.
• Function of MAC: - Media Access Control (MAC) is crucial for managing how data is
transmitted over the network. - It determines when a device can safely transmit data to
avoid collisions, especially in shared network environments.
• Full Duplex vs Half Duplex: - Full Duplex: Allows devices to send and receive data
simultaneously, effectively doubling the communication speed. - Half Duplex: Only one
operation (send or receive) is allowed at any given time, which can lead to collisions if
two devices try to communicate simultaneously.
• MAC Addressing: - MAC addresses are unique identifiers assigned to each network
interface card (NIC). - Used primarily for local communication, they identify specific
devices on a network, enabling Layer 2 devices like switches to forward frames correctly.
Practical Examples and Use Cases
• Frame Generation: - When data moves between devices, a new frame is created at
each router or media transition (e.g., transitioning from Wi-Fi to Ethernet). - This ensures
that each frame is formatted correctly for the medium it will traverse, allowing reliable
data delivery.
Summary