Lab · Computer Networking (CCNA level)
Lab: set up a small office switch
The brief
In Cisco Packet Tracer, set up the switch for a two-desk travel agency office: give it a name and passwords, save the configuration, connect two PCs, and watch the switch learn their MAC addresses and the PCs learn each other through ARP. Then write a small Python helper that finds which port a MAC address is on.
Why it matters
Naming, securing and saving a switch is the first job on any new network device. Reading the MAC address table and the ARP cache is how support engineers find which desk socket a device is plugged into, and why "it pings but the name is wrong" happens. Scripts that read show command output are how network teams check hundreds of switches at once.
Skills you practise
- Cisco IOS modes
- hostname, enable secret, console password
- copy running-config startup-config
- show mac address-table
- ARP and arp -a
- parsing show output in Python
You need
- Cisco Packet Tracer (free with a Cisco Networking Academy account)
- One 2960 switch and two PCs, joined with copper straight-through cables
What you will have at the end
A saved Packet Tracer file (switch-lab.pkt) with SW-Office and two PCs, the four command outputs, and mac_lookup.py that finds a device's port from any MAC format.
How it is marked (rubric, 100 points)
| Switch configured and savedHostname, enable secret and console login are in the startup-config and survive a reload. | 35 |
|---|---|
| Connectivity provedThe ping works, and the MAC table and ARP cache show both PCs. | 25 |
| Python helperport_of() handles all three MAC formats and returns None when the MAC is not there. | 25 |
| Can explainYou can say how the switch learnt each MAC and why PC0 needed ARP before the first ping. | 15 |
0/5 steps done
Step 1 of 5
Name, protect and save the switch
The saved configuration has the hostname SW-Office, an enable secret and a console password with login.
Click the switch, open the CLI tab and press Enter. In global configuration mode set hostname SW-Office, then enable secret (a hashed password for privileged mode), then a password and login under line console 0. Everything goes into the running-config in RAM at once; copy it to the startup-config in NVRAM, or a reboot loses it.
show startup-config proves it was saved. Paste the whole output: the check looks for the hostname, the enable secret and the console lines.
$ show startup-configAlso check yourself
Your notes: mac_lookup.py
Write down each command you ran. It goes into your project summary.