路由器基本配置命令-如何用命令配置路由器
1.1:配置console永不超時命令。
1.2:配置console的日志同步,關閉域名解析。
1.3:配置設備時間。
1.4:配置console密碼,特權模式密碼,VTY線路密碼。
1.5:配置標識符(banner)和接口描述信息。
拓撲圖
Router>enable //特權模式
Router#configure terminal //全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1 //配置設備名字為R1
R1(config)#line console 0 //進入console 0接口
R1(config-line)#exec-timeout 0 0 //配置console永不超時。
R1(config-line)#logging synchronous // 配置console日志同步,輸入命令時不會被信息打斷。
R1(config)#no ip domain lookup //關閉域名解析
R1#clock set 20:24:29 4 oct 2020 //修改設備時間為20:24:29 4 oct 2020
R1(config)#clock timezone GMT +8 //修改時區
R1#show clock //查看設備時間
04:25:52.732 GMT Mon Oct 5 2020
R1(config)#line console 0 //進入console 0接口
R1(config-line)#password cisco //配置console密碼cisco
R1(config-line)#login //配置使上述密碼生效,且登入時需要密碼。
R1(config)#enable password cisco //配置特權enable明文密碼cisco
R1(config)#enable secret cisco //配置特權enable密文密碼cisco
The enable secret you have chosen is the same as your enable password.
This is not recommended. Re-enter the enable secret. //密文密碼生效。
R1(config)#line vty 0 4 //進入vty虛擬線路
R1(config-line)#password cisco //配置VTY密碼cisco
R1(config-line)#login //配置使上述密碼生效,且登入時需要密碼。
R1(config)#service password-encryption //配置使明文密碼顯示加密,保證安全。
R1(config)#banner motd # //配置標識符,登入設備時顯示信息以#開始。
Enter TEXT message. End with the character '#'. //表示以#結尾
hello word //標識的內容
# //和開始的符號一致,表示以#結尾。
R1(config)#interface ethernet 0/0 //進入接口E0/0
R1(config-if)#ip address 12.1.1.1 255.255.255.0 //配置IP地址為12.1.1.1
R1(config-if)#description R1toR2 //配置接口描述信息R1toR2