Cisco IOS has 2 main command line modes: User mode and privileged mode
1. User mode, when using ">" to express user mode
2. Privileged mode (EXEC mode) when "#" is used to indicate that it is in privileged mode
3. Commands for switching in different modes
Switching between user mode and privileged mode (note the change of the prompt)
Router>Enable (default is User mode in command line mode, switch to privileged mode with enable) router# (note the change of prompt) router#disable (exiting from privileged mode to user mode) Router > (Note the change of the prompt) Router#logout (exit Router command line)
4. To configure the router, you need to use more modes, if you want to make additional configuration of the device, you need to go to
In the corresponding configuration mode, the main mode is specified as shown in
- Global Configure: The entire device is in effect, and the following mode inherits his settings
- Interface mode: Configure a interface for the device
- Sub-interface mode: Configures a logical SUBINTERFAC of the device
- Control mode: Mainly used to configure T1 or E1 lines
- Threading Mode: Parameters that are primarily used to configure access control, such as Telnet access
- Routing mode, mainly used to configure routing protocols such as RIP,EIGRP
- IPX Routing pattern: a route parameter primarily used to configure the IPX protocol
The switching methods for various modes are as follows:
Go to Global mode:
Router#config terminal (go to global mode) Router (config) # (note the change of the prompt) in the global configuration mode can be switched to a variety of modes: into the interface mode: Router (config) # Interface 0/0 (enter into interface mode) Router (config-if) # (note the change of the prompt) interface is the command-line argument, The fastethernet is the type of interface to enter (front is the Fast Ethernet port),0/0 is the number of the interface, the previous 0 is the slot number, and the subsequent 0 is the specific interface in the slot.
You can use the shortcut key CTRL + Z when exiting from global mode to privileged mode
5. Easy way to use iOS
- When the command is not remembered, enter it at the command line.
- Imcomplete Command error prompt: Incomplete commands
- Ambiguous command Router error tip: The commands entered are not unique and the commands are ambiguous.
6. Get basic information about your device
Show version: Displays the basic configuration and software version of the system hardware.
Basic common configuration of 7.Router and switch
- Hostnames (host name setting): To facilitate local labeling of the device, does not affect router's work on the Internet
Router (config) #hostname Inforen (Note that command usage mode is global Configuration) Inforen (config) #hostname Itclub (note that the host name cannot contain spaces) ITCl UB (config) #
- Descriptions (Interface description information): Used to add functional descriptions to the interface locally for maintenance and inspection.
Itclub (config) #interface0/0 itclub (config-if) #description Sales LAN itclub (config-if) #^z
Interface 0/0 ... Description:sales LAN
8. Set the password
The Enable password and enable password are both set to the same local password, and if two passwords are used together,
Enable password will not work unless the password for enable secret is valid. The Setup method is as follows:
Configure the console password and some auxiliary commands:
Router#config ter (enter global mode) Router (config)#lineConsole 0 (Enter the configuration control port mode, at which time the command is only valid for console 0)Router (config-Line ) #login (log in thread) Router (config-line) #password123(Set password) Router (config-line) #exec-timeout? (Ask the exec-parameters that can be taken after the timeout command)<0-35791>timeoutinchminutsrouter (config-line) #exec-timeout0?<0-2147483>timeoutinchsecondsrouter (config-line) #exec-timeout0Minutes0(in seconds) (this means never Time out) Router (config-line) #logging Synchronous (enable cursor follow)
9. Configure the IP address of the interface coniguring an IP addresses on an Interface
Configuring an IP address for an interface, using commands in interface mode
IP [address] [mask] Command
Router (config) #interface fa0router (config-if172.16. 10.2255.255. 255.0 remember to turn on the interface: Router (config-if) #no shutdownrouter (config-if) #^z
Open an interface using no shutdown, close an interface using the shutdown command when you want to view an interface
You can use the SH interface command to view port status, interface IP address, MAC address, interface rate, and so on.
"Security Networking" Cisco IOS Device Foundation app