10 Cisco IOS Service Subcommands and Their Usage
This article lists and explains ten Cisco IOS service subcommands—including service dhcp, service linenumber, service password-encryption, service nagle, and others—detailing their functions, typical usage scenarios, and security considerations for configuring routers and switches.
service dhcp enables or disables the Cisco IOS DHCP server and relay. The command is enabled by default; use no service dhcp to turn it off.
service linenumber displays the line number of the console or VTY session, helping you identify which line you are logged into. Example output: CE-Switch-001 con0 is now available Press RETURN to get started. CE-Switch-001 line 0 CE-Switch-001>
service password-encryption encrypts passwords stored in the router's NVRAM configuration file, preventing them from being read in plain text via TFTP or other means. It is disabled by default but recommended for security.
service nagle enables the Nagle algorithm, which reduces network congestion caused by small packets, saving bandwidth for Telnet‑like command sessions. The algorithm is disabled by default.
service prompt config controls whether the configuration prompt is displayed. Disabling it with no service prompt config hides the prompt in global configuration mode, though commands can still be entered. Example: TechRepublic-Router(config)# no service prompt config ^Z TechRepublic-Router# TechRepublic-Router# conf t Enter configuration commands, one per line. End with CNTL/Z. service prompt config TechRepublic-Router(config)#
service sequence-numbers adds sequence numbers to log messages, useful when logs are generated rapidly. Example log entry: 000377: *Mar 17 23:06:33.609: %SYS-5-CONFIG_I: Configured from console by console
service tcp-keepalives-in and service tcp-keepalives-out monitor inbound and outbound TCP connections; if no response is received, the router automatically closes the connection.
service tcp-small-servers enables small TCP services (Echo, Discard, Chargen, Daytime). These are disabled by default for security reasons and should generally remain off unless explicitly required.
service timestamps adds timestamps to log messages. The command can be configured for both log and debugging messages, for example: service timestamps log datetime localtime msec show-timezone year service timestamps debugging datetime localtime msec show-timezone year
service password-recovery enables password recovery, allowing you to recover the enable password if the config‑register is changed. Disabling it with no service password-recovery makes password recovery impossible, which can be dangerous if the enable password is lost.
Practical DevOps Architecture
Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.