Author: Insist--
Personal homepage: insist--personal homepage
The author will continue to update network knowledge and python basic knowledge , looking forward to your attention
Table of contents
1. The command line mode of the Cisco switch:
3. Introduction to Common Commands of Switches
2. Display system IOS name and version
Fourth, the basic configuration of the switch
Five, the basic configuration of the router
1. Modify the session timeout time
3. Router configuration IP address (IP+subnet)
4. Configure the IP address of the switch
6. ARP command of Cisco equipment
7. Static and default routing configuration commands
foreword
This article will explain some basic commands of Cisco switches and routers.
1. The command line mode of the Cisco switch:
1. User mode
Check the statistical information . After the switch is started, the default mode is the user mode. In this mode, the user can only apply very few commands and can only view some statistical information. The command line prompt is as follows:
2. Privileged mode
View the configuration of the device and modify it easily . Enter the en (full name: enable) command in the user mode to enter the privileged mode. In this mode, the user can view and modify the configuration of the Cisco device . The command line prompt is as follows: ...
3. Global configuration mode
To modify parameters for the entire switch , enter the conf t (full name: config terminal) command in the privileged mode to enter the global configuration mode, and the user can modify the global configuration of the switch in this mode . For example, static configuration and host name modification are in this mode. The command line prompt is as follows: .
4. Interface mode
This mode is to modify the configuration parameters for the interface of the device. Enter the int f0/1 (full name: interface fastEthernet 0/1) command in the global mode to enter the interface mode. In this mode, the configuration of the interface can be modified. 0 in f0/1 indicates the module, and 1 indicates the port number.
5. Return command
exit: return to the previous step
end: Return directly to privileged mode
2. Help Mechanism
1. Command line help
Enter "?" in the global mode to enter the help, the command is as follows:
2. Complete command
After entering the command, press the Tab key on the keyboard to complete the command
3. Introduction to Common Commands of Switches
1. Configure the host name
Enter the global configuration mode, enter hostname sw1 (the black mark is the set name)
2. Display system IOS name and version
Enter the privileged mode, enter sh ver (full name: show version),
Fourth, the basic configuration of the switch
1. View the Mac address table
In privileged mode, enter show mac-address-table
2. Test IP address
①ipconfig: View the configuration information of the computer's IP address.
②ping: Test whether the network is connected.
③ping 127.0.0.1 : Verify that the local computer is correctly configured with TCP/IP.
④Ping the IP address of the local computer: verify whether it is correctly added to the network.
⑤Ping the IP address of the default gateway: Verify that the default gateway is working properly and can communicate with hosts on the local network.
⑥Ping the IP address of the remote host: verify whether it can communicate through the router.
Five, the basic configuration of the router
1. Modify the session timeout time
Enter line con 0 in global mode and then enter exec-timeout 0 0 again, as shown in the figure below:
2. Disable DNS lookups
Enter no ip domain-lookup in global mode, as shown below
3. Router configuration IP address (IP+subnet)
Configure the router interface ip as 192.168.1.1, execute it in interface mode , the command is as follows:
4. Configure the IP address of the switch
Configure the ip for the switch to 10.0.0.1, enter vlan configuration , the command is as follows
6. ARP command of Cisco equipment
1. View the ARP cache table
Enter show arp in privileged mode, the command is as follows:
2. Clear the ARP cache table
Enter clear arp-cache in privileged mode
3. ARP binding
For example, the ip address to be bound is 192.168.1.1/24, just enter the arp ip address mac address arpa in the global mode
Router(config)# arp ip-address mac-address arpa
7. Static and default routing configuration commands
1. Static routing
192.168.1.1 is the network segment, 10.0.0.0 is the next hop, the command is as follows:
2. Default route
0.0.0.0 0.0.0.0 is all network segments, 10.0.0.1 is the next hop, the command is as follows: