Cisco Switch Configuration, PC IP Address Configuration, Packet Tracer Lab, Basic Network Configuration, Cisco IOS Commands
Learning how to configure network switches and end devices is an essential step in understanding computer networking. Cisco Packet Tracer provides a practical environment where beginners can build network topologies, configure IP addresses, and test connectivity between devices.
In this tutorial, you will learn how to configure two Cisco switches and two PCs, assign IP addresses, and verify network connectivity using basic Cisco IOS commands.
1. Network Topology
This lab consists of four devices:
- S1: The first network switch.
- S2: The second network switch.
- PC-A: The first end device.
- PC-B: The second end device.
The switches are connected to each other, and each PC connects to one switch.
Image 1: Network topology showing S1, S2, PC-A, PC-B, and all connected ports.
Network Connections
| Device | Interface | Connected Device | Interface |
|---|---|---|---|
| S1 | Fa0/1 | S2 | Fa0/1 |
| S1 | Fa0/5 | PC-A | NIC |
| S2 | Fa0/1 | S1 | Fa0/1 |
| S2 | Fa0/10 | PC-B | NIC |
2. IP Addressing Table
Each device uses an IP address within the same IPv4 network.
| Device | Interface | IP Address | Subnet Mask |
|---|---|---|---|
| S1 | VLAN 1 | 192.168.1.1 | 255.255.255.0 |
| S2 | VLAN 1 | 192.168.1.2 | 255.255.255.0 |
| PC-A | NIC | 192.168.1.10 | 255.255.255.0 |
| PC-B | NIC | 192.168.1.11 | 255.255.255.0 |
The network address is 192.168.1.0/24. Since all devices belong to the same IP subnet, a router is not required for communication within this lab.
3. Configure Switch S1
The first step is to configure the hostname, management IP address, and connected interfaces on S1.
Step 1: Enter Global Configuration Mode
Open the CLI tab on S1 and enter:
enable
configure terminal
hostname S1Step 2: Configure the Management IP Address
interface vlan 1
ip address 192.168.1.1 255.255.255.0
no shutdown
exitStep 3: Configure the Switch-to-Switch Port
interface fastethernet 0/1
switchport mode access
no shutdown
exitStep 4: Configure the PC-A Port
interface fastethernet 0/5
switchport mode access
no shutdown
exitStep 5: Save the Configuration
end
copy running-config startup-config4. Configure Switch S2
Next, configure S2 with its own hostname and management IP address.
Step 1: Enter Configuration Mode
enable
configure terminal
hostname S2Step 2: Configure the Management IP Address
interface vlan 1
ip address 192.168.1.2 255.255.255.0
no shutdown
exitStep 3: Configure the Switch-to-Switch Port
interface fastethernet 0/1
switchport mode access
no shutdown
exitStep 4: Configure the PC-B Port
interface fastethernet 0/10
switchport mode access
no shutdown
exitStep 5: Save the Configuration
end
copy running-config startup-configImage 2: Cisco switch CLI configuration showing the commands for S1 and S2, including VLAN 1 management IP addresses and connected interfaces.
5. Configure End Devices PC-A and PC-B
After configuring the switches, assign static IPv4 addresses to both PCs.
Configure PC-A
- Click PC-A in Cisco Packet Tracer.
- Open the Desktop tab.
- Select IP Configuration.
- Choose Static.
- Enter the following values:
| Setting | Value |
|---|---|
| IP Address | 192.168.1.10 |
| Subnet Mask | 255.255.255.0 |
| Default Gateway | Leave blank |
| DNS Server | Leave blank |
Configure PC-B
Repeat the same steps on PC-B and enter:
| Setting | Value |
|---|---|
| IP Address | 192.168.1.11 |
| Subnet Mask | 255.255.255.0 |
| Default Gateway | Leave blank |
| DNS Server | Leave blank |
Important: Each device must have a unique IP address. Do not assign the same IP address to more than one device.
6. Verify the Switch Configuration
After completing the configuration, verify that the interfaces and management IP addresses are correct.
Check Interface IP Addresses
show ip interface briefCheck Port Status
show interfaces statusCheck VLAN Membership
show vlan briefConfirm that the ports used in this lab belong to VLAN 1 and that the relevant interfaces are operational.
7. Test Network Connectivity
The final step is to verify communication between the devices.
Test PC-A to PC-B
On PC-A, open Desktop → Command Prompt and run:
ping 192.168.1.11Test Connectivity to the Switches
From PC-A, run:
ping 192.168.1.1
ping 192.168.1.2If the pings fail, check the cable connections, IP addresses, subnet masks, switch port status, and VLAN membership. The first ping may occasionally time out while devices learn their Layer 2 addresses; repeat the test before troubleshooting further.
8. Common Problems and Troubleshooting
Problem 1: PC-A Cannot Reach PC-B
Possible causes:
- Incorrect IP address or subnet mask.
- Incorrect cable connections.
- A switch interface is down.
- The PCs are connected to ports assigned to different VLANs.
Solution: Verify the IP configuration on both PCs and use show interfaces status and show vlan brief on the switches.
Problem 2: Cannot Ping the Switch Management IP
Possible causes:
- VLAN 1 is down.
- The management IP address is incorrect.
- No active port belongs to VLAN 1.
Solution: Run show ip interface brief and confirm that VLAN 1 is operational.
Problem 3: The Configuration Is Lost After Restarting
Cause: The running configuration was not saved to startup configuration.
Solution: Run:
copy running-config startup-configConclusion
This Cisco Packet Tracer lab demonstrates the basic steps required to configure two switches and two end devices. You learned how to set switch hostnames, configure management IP addresses, enable interfaces, assign static IP addresses to PCs, and test connectivity using the ping command.
These skills provide a foundation for more advanced networking topics, including VLAN configuration, trunk links, inter-VLAN routing, network troubleshooting, and network security.



0 تعليقات