Use it when hardening a device by turning off services it does not need.
Disable Unused Device Services
service inventory → disable unused → verify ports
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show control-plane host open-portsVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Finding enabled services Verify boundary
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- SSHv2 protects the session; VTY policy still controls who may connect and how users authenticate
- Use a dedicated management VRF/interface where supported and restrict sources with ACL/firewall policy
- Disable Telnet and unused HTTP services
- Prefer named administrators, AAA, least privilege, timeouts and audit logging
- Preserve an out-of-band recovery path before changing remote access.
show running-config | include service|ip http|cdp— services enabledshow control-plane host open-ports— listening ports
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Disabling unused services
Every running service is part of a device's attack surface. Cisco's IOS hardening guide lists services to disable when they aren't needed, including small servers, finger, the BOOTP server, PAD, configuration auto-loading, the HTTP and HTTPS servers, and CDP or LLDP on untrusted interfaces.
Services from the hardening guide
| Command | Disables |
|---|---|
no service tcp-small-servers / no service udp-small-servers | Echo, discard, chargen (default on only before 12.0) |
no ip finger | Finger service |
no ip bootp server | BOOTP server (ip dhcp bootp ignore keeps DHCP) |
no service dhcp | DHCP server and relay, if not needed |
no mop enabled | MOP on interfaces |
no ip domain-lookup | Name lookups for mistyped commands |
no service pad | X.25 PAD |
no ip http server / no ip http secure-server | Web servers, if the GUI isn't used |
no service config | Loading configuration from the network at boot |
no cdp enable / no lldp transmit / no lldp receive | Discovery protocols on untrusted interfaces |
R1(config)# no ip http server
R1(config)# no service pad
R1(config)# no ip bootp server
R1(config)# no ip finger
R1(config)# interface GigabitEthernet0/0/0
R1(config-if)# description ISP-A
R1(config-if)# no cdp enable
R1(config-if)# no lldp transmit
R1(config-if)# no lldp receive
R1# show control-plane host open-ports
R1# show cdp interface GigabitEthernet0/0/0
Other services worth reviewing
| Service | Consideration |
|---|---|
Smart Install (vstack) on older switches | Disable unless used (no vstack) |
| Telnet | Disable on VTY lines |
| SNMP v1/v2c | Replace with SNMPv3 |
| IP source routing, directed broadcasts, proxy ARP | Usually disable on edge interfaces |
Doing it safely
Check what depends on a service before removing it (CDP for IP phones, HTTP for a controller GUI or web authentication, DHCP relay for clients). Put the result in a configuration template and audit devices against it.
Documented example, not captured output.
Quick reference
Every service running on a device is something that must be patched, monitored and defended. Services that nobody uses add risk without adding value, so the hardening rule is simple: if it is not needed, turn it off. Some defaults that are harmless inside a trusted network should also be disabled on interfaces facing untrusted networks.
Disable unused services to shrink the attack surface:
no ip http server
no ip http secure-server ! if web UI is unused
no service pad
no ip bootp server
no service tcp-small-servers
no service udp-small-servers
no ip source-route
no cdp run ! or per interface: no cdp enable (edge ports)
no lldp run
no ip domain lookup ! avoid DNS lookups on typos
service password-encryption ! cosmetic only, still use secrets
Per interface on untrusted edges: no ip redirects, no ip unreachables, no ip proxy-arp. Check what is listening with show control-plane host open-ports.
ReferenceConfiguration & state1 section · depth on demand
Configuration example
no ip http server
no ip http secure-server ! unless HTTPS management is required
no service pad
no ip source-route
no ip bootp server
no service tcp-small-servers
no service udp-small-servers
interface GigabitEthernet0/0
no cdp enable ! on untrusted or internet-facing ports
no lldp transmit
no lldp receive
Documented example, not captured output. Check what is listening with show control-plane host open-ports.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Security → Device Hardening → Disable unused services. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%