Introduction to Switch and Basic Switching Commands
Introduction to Switch and Basic Switching Commands
Table of Contents
1. Introduction to Switches
○ What is a Switch?
○ Types of Switches
○ Port Configuration
○ Saving Configuration
○ Verifying Connectivity
○ Saving Configuration
1. Introduction to Switches
What is a Switch?
A switch is a networking device that operates at Layer 2 (Data Link Layer) of the OSI
model. It connects multiple devices within a Local Area Network (LAN) and uses MAC
● Learning: The switch builds a MAC address table by recording the source MAC
● Forwarding: It forwards frames only to the port where the destination MAC is
located (unicast).
● Flooding: If the destination MAC is unknown, the switch floods the frame to all
● Filtering: Does not forward frames if the source and destination are on the same
port.
Types of Switches
1. Open Cisco Packet Tracer and drag a switch (e.g., 2960) into the workspace.
(#).
bash
Copy
Download
Switch> enable
Switch#
Setting Hostname
bash
Copy
Download
SW1(config)#
bash
Copy
Download
SW1(config-line)# login
SW1(config-line)# exit
SW1(config-line)# login
SW1(config-line)# exit
Encrypting Passwords
bash
Copy
Download
bash
Copy
Download
SW1(config-if)# no shutdown
SW1(config-if)# exit
Copy
Download
SW1(config-if)# no shutdown
SW1(config-if)# exit
bash
Copy
Download
SW1(config)# vlan 10
SW1(config-vlan)# exit
SW1(config)# vlan 20
SW1(config-vlan)# name HR
SW1(config-vlan)# exit
Saving Configuration
bash
Copy
Download
bash
Copy
Download
Switch> enable
SW1(config-line)# login
SW1(config-line)# exit
bash
Copy
Download
SW1(config-if)# no shutdown
SW1(config-if)# exit
SW1(config-if)# no shutdown
SW1(config-if)# exit
○ PC1: 192.168.1.10/24
○ PC2: 192.168.1.20/24
bash
Copy
Download
Tracer. 🚀