ECM1413 - Computers and the Internet - Network Access Layer
Network Access Layer
Objectives
- Media Access Control Techniques
- Frame and L2 Addressing
- Address Resolution Protocol
- L1 and L2 Network Devices (Hub & Switch)
Segmentation & Encapsulation
- Network Access layer is responsible for segmentation and encapsulation of data.
- Data flow:
- Application layer creates data.
- Transport layer segments the data into segments.
- Internet layer encapsulates the segments into packets.
- Network Access layer encapsulates the packets into frames.
Layers
- OSI (Reference Model)
- L1: Physical
- L2: Data Link
- Media Access Control (MAC) Method
- Encapsulate a packet into a frame
- Encoding
- Signalling
- Physical components
- L3: Network
- L4: Transport
- L5: Session
- L6: Presentation
- L7: Application
- TCP/IP (Protocol Model)
- Network Access
- Internet
- Transport
- Application
- MAC for Shared Media
- Controlled Access
- Contention-Based Access
- “scheduled access or deterministic”
- Only one device transmits at a time.
- Devices must wait their turn.
- No collisions occur.
- Token Ring is an example.
MAC for Shared Media: Contention-based
- “non-deterministic”
- Devices can transmit at any time.
- Collisions can occur, and mechanisms are needed for resolving contention.
- CSMA/CD is used for Ethernet networks.
- CSMA/CA is used for 802.11 wireless networks.
Different Frames: LAN Protocols
- Ethernet (IEEE 802.2 & 802.3)
- Wireless LAN (IEEE 802.11)
- Token Ring (IEEE 802.5)
Different Frames: WAN Protocols
- PPP (Point-to-Point Protocol)
- MPLS (Multiprotocol Label Switching)
- HDLC (High-Level Data Link Control)
Creating a Frame
- A frame consists of a header, packet (data), and trailer.
- Header: Contains Start, Addressing, Type, Quality Data
- Trailer: Error Detection, Frame Stop
- Start and Stop: Specific bit patterns denote the start and end of the frame.
LAN and WAN Frames
- Ethernet Frame: Contains 48-bit MAC address.
- Wireless (802.11) Frame: Contains 48-bit MAC address.
- PPP Frame: PPP Broadcast Address
Ethernet MAC address
- 48 bits - hexadecimal format
- Examples:
- Cisco MAC Address: 00-60-2F-3A-07-BC, 00:60:2F:3A:07:BC, 0060.2F3A.07BC
- Intel MAC Address: 00-20-E0-6B-17-62, 00:20:E0:6B:17:62, 0020.E06B.1762
- Unicast, Multicast & Broadcast (FF-FF-FF-FF-FF-FF)
- Use
ipconfig /all to view MAC address.
L2 Address: Destination on Same Network
- How can PC1 know the MAC address of PC2?
L2 Address: Destination on Remote Network
- How a device determines the destination MAC address?
- ARP (for IPv4) or ICMPv6 Neighbor Discovery (for IPv6)
ARP - Step 1
- A host (H1) needs to find the MAC address of another host (H4) with IP address 192.168.1.7.
- H1 sends out an ARP request to learn the MAC address.
ARP - Step 2
- The ARP request is broadcast to all hosts on the network.
- Hosts that do not have the IP address 192.168.1.7 ignore the request.
- Host H4, with IP address 192.168.1.7, responds with its MAC address.
ARP - Step 3
- H1 receives the MAC address of H4 and can now forward its information.
Refresh Your Mind
- What destination MAC address would be included in a frame sent from a source device to a destination device on the same local network?
- b) The MAC address of the destination device.
- What destination MAC address would be included in a frame sent from a source device to a destination device on a remote local network?
- c) The MAC address of the local router interface.
- What two protocols are used to determine the MAC address of a known destination device IP address (IPv4 and IPv6)?
- The destination MAC address of an Ethernet broadcast in hexadecimal is:
Hubs - L1 Device
- Hubs operate at Layer 1 (Physical Layer).
- They simply forward any received signal to all connected devices.
- This can lead to collisions and reduced network efficiency.
Switch - L2 Device
- Switches operate at Layer 2 (Data Link Layer).
- They maintain a MAC address table to forward traffic only to the intended destination.
- This reduces collisions and improves network efficiency.
- The switch learns MAC addresses by examining the source MAC address of incoming frames.