CSDN Topic Challenge Phase 2 https://marketing.csdn.net/p/7b6697fd9dd3795a268d1a6f2fe75012
Participation Topic: Study Notes https://activity.csdn.net/creatActivity?id=10213
Table of contents
Three, global mode (global config mode)
(1) Interface mode (interface mode)
(3) Routing mode (router mode)
7. Example of Router working mode conversion
3. Configure the console password
Nine, the switching of the overall configuration command
10. Configure login prompt information
11. Solve the domain name lookup after the command is entered incorrectly
Thirteen, save, delete, view configuration files
1. Save the configuration file
2. Delete the configuration file
3. View the configuration file
*The abbreviated command is only available under the premise that the command is unique
1. User mode
(user mode) ">"
可以做一些简单的查询
2. Privileged mode
privilgede mode) "#"
进入方法:在用户模式下,输入enable(en)即可进入,disable(dis)即可退出
Three, global mode (global config mode)
"router(config)#"
在特权模式下输入:config t即可进入
Four, sub-mode (sub-mode)
(1) Interface mode (interface mode)
router(config-if)#
(2) Line mode (line mode)
router(config-line)#
(3) Routing mode (router mode)
router(config-router)#
5. Setup mode*
An interactive dialog is provided in the console to help new users create basic configurations for the first time.
6. ROMMON mode*
Can be used to recover passwords and upgrade IOS
7. Example of Router working mode conversion
8. Configuration commands
1. Name the router
Router(config)#hostname 名字
2. Set enable password
先用conf t进入全局模式,配置完成之后exit退出,可用show running查看配置文件
R1(config)#enable password cisco
R1#Show run
enable password cisco(明文,未加密)
R1#(config)#enable secret cisco
R1#Show run
enable secret 5 $1$emBK$WxqLahy7YO(密码被加密)
3. Configure the console password
R1(config)#line console 0
R1(config-line)#password cisco
R1(config-line)#login
4. Configure VTY password
R1(config)#line vty 0 4 (0 4:允许5个终端同时远程登录)
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#privilege level 15(配置登录权限,默认1,15表示直接进图特权模式)
R1(config -line)#transport input ssh telnet(配置远程登录方式为ssh何telnet,ssh更安全)
5. Enable SSH
配置enable密码
SSH-S(config)#enable password 1234567
(1)更改路由器名字配置IP域名
Router(config)#hostname SSH-S
SSH-S(config)#ip domain-name Test.com
(2)生成单向密钥
SSH-S(config)#crypto key generate rsa general-keys modulus 2048
(3)检验或创建本地数据库条目
SSH-S(config)#username ABC secret qq1234we!
(4)启用VTY入站SSH会话
SSH-S(config)#line vty 0 4
SSH-S(config-line)#login local
SSH-S(config-line)#transport input ssh
SSH-S(config-line)#exit
SSH-S(config)#inter g0/0
SSH-S(config-if)#ip address 192.168.11.1 255.255.255.0
SSH-S(config-if)#no shutdown
6. Configure the serial port
R1 # config t
R1(config)# interface s0/0/0 (enter serial port mode)
R1(config-if)# clock rate 64000 (configuration clock at DCE side)
R1(config-if)# ip address 192.168.100.1 255.255.255.0 (configure interface IP address and netmask)
R1(config-if)# no shut (open interface)
R1(config-if)# description connect to R2 (configuration interface description)
7. Configure Ethernet port
R1# config t
R1(config)# interface g0/0 (进入以太口模式)
R1(config-if)# ip address 10.1.1.1 255.255.255.0(配置接口IP地址和网络掩码)
R1(config-if)# no shut (开启接口)
R1(config-if)# description LAN Engineering, Bldg.2(配置接口描述)
Nine, the switching of the overall configuration command
Practice: telnet service configuration
1. Complete (1) interface IP address configuration on the router
(2) enable password configuration plaintext 123456
(3) Configure Telnet service
(4) Configure the router hostname to pinyin for your own name
2. Configure the IP address on the PC (1)
(2) Use Telnet to test the routed Telnet service
First configure the IP address and subnet mask of the router
enable
conf t #Enter global mode
interface g0/0 #Enter serial interface mode
ip address 172.16.111.1 255.255.0.0 #Configure router IP address and subnet mask
no shutdown #Activate the interface, the router interface is closed by default
Then configure the router telnet service
Enter in the config-if mode where interface g0/0 is located:
line vty 0 4 #Enter vty mode
password 1111 #Configure vty password
no login #configure login check
enable password 123456 #Configure router privilege password
Finally, check whether the IP addresses of both parties are correct, then enter the terminal on the PC side and enter
telnet 172.16.111.1 (router's IP address)
If try 172.16.111.1...open appears, and the configuration is successful, you can operate the router configuration command in the PC terminal.
10. Configure login prompt information
Router(config)#banner motd #Prompt Information#
11. Solve the domain name lookup after the command is entered incorrectly
Shortcut key: ctrl+shift+6
Command: Enter in ip domain-lookup in global mode
Yes, the router does not use the DNS server to resolve the IP address of the host
12. show command
Thirteen, save, delete, view configuration files
1. Save the configuration file
copy running-config startup-config
Write
2. Delete the configuration file
erase nvram
erase startup-config
3. View the configuration file
show startup-config
show running-config