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 //命令格式,也称之为关键字
操作:
×××的光纤:单模、多模?
利用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
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
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)远程管理时,显示日志
原文地址:http://blog.51cto.com/enderjoe/2104162