CCNA-2操作IOS和快捷键以及远程连接的改善

1.通过操作交换机搭建一个基本的小型局域网
2.改善IOS操作方式的快捷键
3.初步认识IP这个鬼东西

TCP/IP协议栈
封装和解封装(穿衣服和脱衣服)
了解、理解、掌握、精通、研究
应用工程师
1.通过操作交换机搭建一个基本的小型局域网,类似网管
傻瓜交换机(VLAN1)!--->中型局域网
SW1#show vlan brief //验证VLAN的简要信息

SW1(config-vlan)#name QYT //vlan1作为默认VLAN,不可以修改
%Default VLAN 1 may not have its name changed.
设备是空配,为什么存在VLAN10、20之类?
思科设备上,VLAN信息可能保存在不同的位置
真机把vlan信息保存在flash卡的vlan.dat这个文件中
学会使用帮助命令,你就半只脚入门了。大家学会打问号
完全帮助和部分帮助
SW1#clock set 20:19?
hh:mm:ss //命令格式,也称之为关键字

SW1#clock set 20:19 ?
% Unrecognized command,为什么不识别呢?
SW1#clock set 20:22:30 April 16
% Incomplete command.
SW1#clock set 20:22:30 April 16 2018 ?
<cr> //代表回车~执行
SW1(config)#clock timezone BJ +8 //设置时区为BK +8
保存:
Branch#copy running-config startup-config //等于wr,把正在运行的文件保存到非易失性寄存器(nvram)去
Destination filename [startup-config]?
Building configuration...
[OK]
思科路由器设备上配置保存在nvram;中低端的交换机配置保存在flash(dir)--->在不破坏原有配置的情况下,破解交换机的密码
Branch#reload //重启命令

快捷键--->手速
tab //补全命令
ctrl+a //光标到行首
ctrl+e //光标到行末
ctrl+U //擦除一行
ctrl+shift+6 //中断测试,比如ping
ctrl+c //不执行命令,退出到特权模式
ctrl+z //执行完毕命令,退出到特权模式
Branch#terminal length 0 //显示所有配置
管道符|,比较精准的定位配置和显示
sh run | section
securecrt中的log功能,文件->日志文件

操作:
×××的光纤:单模、多模?
利用vlan1实现终端的通信
PC1:
PC1(config)#int e0/1
PC1(config-if)#ip add
PC1(config-if)#ip address 10.1.10.1 ?
A.B.C.D IP subnet mask

PC1(config-if)#ip address 10.1.10.1 255.255.255.248
PC1(config-if)#no shu
PC2:
PC2(config)#int e0/1
PC2(config-if)#no shu
PC2(config-if)#ip address 10.1.10.6 255.255.255.248
PC2#show ip route //验证路由表
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

  10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C 10.1.10.0/29 is directly connected, Ethernet0/1
L 10.1.10.6/32 is directly connected, Ethernet0/1
PC1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route

    • replicated route, % - next hop override

Gateway of last resort is not set

  10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C 10.1.10.0/29 is directly connected, Ethernet0/1
L 10.1.10.1/32 is directly connected, Ethernet0/1
PC1#ping 10.1.10.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.10.6, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
PC1#
如果没有恢复sw1和sw2的配置,PC1和PC2不能通信

PC2(config)#line vty 0 4
PC2(config-line)#password qyt
PC2(config-line)#transport input telnet

PC2(config)#enable secret ?
0 Specifies an UNENCRYPTED password will follow
5 Specifies a MD5 HASHED secret will follow
8 Specifies a PBKDF2 HASHED secret will follow
9 Specifies a SCRYPT HASHED secret will follow
LINE The UNENCRYPTED (cleartext) 'enable' secret
level Set exec level password

PC2(config)#enable secret qytang123 //secret级别高于password,secret密码生效
PC2(config)#enable password qytang

PC2#terminal monitor //在远程管理的终端上显示日志
PC2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
PC2(config)#hostname PC-TEST
PC-TEST(config)#
PC-TEST#
*Apr 15 10:15:11.661: %SYS-5-CONFIG_I: Configured from console by vty0 (10.1.10.1) //通过日志更多的来了解配置的变化,以及配置是否生效
作业:
1)通过2个交换机的VLAN1实现PC1和PC2通信(用我配置的地址)
2)PC2上配置secret密码
3)远程管理时,显示日志

猜你喜欢

转载自blog.51cto.com/enderjoe/2104162
今日推荐