Configuring routers and switches is the cornerstone of network management. Understanding the fundamental configuration commands is crucial for network administrators to ensure the security and efficiency of their networks. In this guide, we'll delve into each step of a router and switch basic configuration, providing detailed explanations and practical examples to help you master the process.
Go to your Switch or Router terminal and you will find the
switch>
Then type enable like
switch>enable
switch#
For routers do the same as a switch
router>
router>enable
router#
Entering Global Configuration Mode:
- Command: R1# configure terminal
- Description: Entering global configuration mode allows you to make changes to the router or switch's global settings.
Setting Hostname:
- Command: R1(config)# hostname NAME
- Description: Setting the hostname identifies the router or switch within the network.
Setting Password Security:
- Command: R1(config)# security passwords min-length 5 R1(config)# service password-encryption R1(config)# enable secret PASSWORD
- Description: These commands enhance password security by setting a minimum password length, encrypting passwords, and configuring an encrypted privilege-level password.
Login Security:
- Command: R1(config)# login block-for 60 attempts 3 within 30 R1(config)# no ip domain-lookup
- Description: These commands improve login security by implementing login blocking for failed login attempts and suppressing DNS lookup for mistyped commands.
Configuring Message of the Day (MOTD):
- Command: R1(config)# banner motd MESSAGE
- Description: The MOTD banner displays a message to users when they login to the device, providing important information or warnings.
Configuring Console and Virtual Terminal (VTY) Lines:
- Command: R1(config)# line console 0 R1(config-line)# password PASSWORD R1(config-line)# login R1(config-line)# logging synchronous R1(config-line)# exec-timeout 0 0 R1(config)# line vty 0 4 S1(config)# line vty 0 15
- Description: These commands configure settings for console and VTY connections, including password authentication, synchronous logging, and session timeout parameters.
Saving Configuration:
- Command: R1# copy running-config startup-config R1# wr
- Description: These commands save the current configuration to non-volatile memory, ensuring that changes persist across reboots.
Remark Command:
- Command: R1(config)# ! (remark – makes no configuration changes)
- Description: The remark command allows you to add comments or remarks to the configuration for documentation purposes.