Port security

Practise this lab in the free NanoTech-kw Network Lab - a Cisco-style simulator that runs in your browser, with hints, an event log and automatic checking.

▶ Open the free Network Lab

Devices: SW1, HUB1, PC1, LAP1, PC2

Your task

SW1 Fa0/1 goes to a hub where PC1 sits. Lock that port to one device:
 int fa0/1 → switchport mode access → switchport port-security → switchport port-security mac-address sticky
Then connect the rogue laptop LAP1 to the hub - the port goes err-disabled! (show port-security, show interfaces status). Recover with shutdown / no shutdown after removing it.

Step by step

  1. On SW1 int fa0/1: switchport port-security + mac-address sticky
  2. Cable the rogue laptop LAP1 to HUB1.
  3. See the violation: show port-security / show interfaces status (err-disabled).
  4. Remove LAP1's cable, then shutdown + no shutdown on fa0/1. PC1 works again.

▶ Start this lab in the browser📖 Command guide🧭 Watch how Ethernet switching works

More labs

Two PCs on a switchRouter between two networksVLANs on a switchStatic routingInter-VLAN routing (router-on-a-stick)Layer-3 switch with SVIsDHCP server on a routerDHCP server + relay + DNSOSPF between three routersRIP v2NAT/PAT to the InternetACL: protect a serverWireless access pointIPv6 static routingEIGRP between three routersProject: build a small office networkHuawei switch VLANs + Cisco routerOSPF between Huawei and Cisco routersSpanning Tree: who blocks?EtherChannel (LACP)HSRP: a gateway that never diesSecure remote access (SSH)To the Internet: NAT + DNS + webIPv6 SLAAC + OSPFv3🔧 Fix 1: PC can't leave its network🔧 Fix 2: same VLAN, no ping🔧 Fix 3: one-way routing🔧 Fix 4: inter-VLAN broken🔧 Fix 5: odd subnet problem