Scenario

SW1 is an access switch in an open office. Fa0/1 serves a desk with a PC and a small desktop switch, so it may learn two addresses. When an unknown device shows up there, the switch should just drop its frames and log it. Fa0/2 is a reception PC: exactly one device, and anything else must take the port down. Ports start in their default state.

Topology

SW1Uplink

Requirements

  1. 1Fa0/1 is a static access port
  2. 2Port security is on at Fa0/1 with a maximum of 2 addresses
  3. 3Fa0/1 learns addresses as sticky
  4. 4A violation on Fa0/1 only drops and logs: restrict
  5. 5Fa0/2 is a static access port with port security on and a maximum of 1
  6. 6A violation on Fa0/2 shuts the port down (the default mode)

SW1 is a new switch with default settings. Type ? for the commands you can use. Start with: enable

SW1> show running-config

CCNA lab · about 10 min

Port security on access ports

Limit which devices can use two access ports: allow up to two sticky-learned addresses on one port with a quiet violation action, and lock the other to a single device that shuts the port down.

This lab is included in the CCNA plans and in the free trial.

Start the free trial Try the free VLAN lab Today's free lab

All labs

About this lab

SW1 is an access switch in an open office. Fa0/1 serves a desk with a PC and a small desktop switch, so it may learn two addresses. When an unknown device shows up there, the switch should just drop its frames and log it. Fa0/2 is a reception PC: exactly one device, and anything else must take the port down. Ports start in their default state.

About 10 minutes. Included in the CCNA plans and the free trial.

Questions about this lab

Is this a real Cisco switch?

No. It is a small simulator written by CertAce. It understands a handful of commands and keeps the state of one switch, so you can practise the ideas without lab gear. Real devices print more, and the exam may ask for things this lab does not cover. CertAce is not affiliated with Cisco.

What are the three violation modes?

Protect drops traffic from unknown addresses silently. Restrict drops it, logs it and counts the violations. Shutdown, the default, puts the port in the err-disabled state. Only shutdown takes the port down.

How do I recover an err-disabled port?

Fix the cause, then shut the interface down and bring it back with no shutdown. You can also configure errdisable recovery so the switch does it after a timer.

Why use sticky?

It saves you typing each MAC by hand. The port learns the first allowed number of addresses, writes them into the configuration as secure entries and refuses anything else.

CertAce is not affiliated with or endorsed by Cisco Systems. CCNA and Cisco are trademarks of Cisco Systems, Inc. The simulator and every command output here were written by CertAce.