1、楼主,你好

2、在模拟器上添加思科交换机

3、进行CLI输入

4、用户模式hostname# ;

5、特权模式hostname(config)# ;

6、全局配置模式hostname(config-if)# ;

7、交换机口令设置:

8、switch>enable ;进入特权模式

9、switch#config terminal ;进入全局配置模式

10、switch(config)#hostname csico ;设置交换机的主机名

11、switch(config)#enable secret csico1 ;设置特权加密口令

12、switch(config)#enable password csico8 ;设置特权非密口令

13、switch(config)#line console 0 ;进入控制台口

14、switch(config-line)#line vty 0 4 ;进入虚拟终端

15、switch(config-line)#login ;虚拟终端允许登录

16、switch(config-line)#password csico6 ;设置虚拟终端登录口令csico6

17、switch#exit ;返回命令

18、交换机VLAN创建,删除,端口属性的设置,配置trunk端口,将某端口加入vlan中,配置VTP:

19、switch#vlan database ;进入VLAN设置

20、switch(vlan)#vlan 2 ;建VLAN 2

21、switch(vlan)#vlan 3 name vlan3 ;建VLAN 3并命名为vlan3

22、switch(vlan)#no vlan 2 ;删vlan 2

23、switch(config)#int f0/1 ;进入端口1

24、switch(config)#speed ? 查看speed命令的子命令

25、switch(config)#speed 100 设置该端口速率为100mb/s (10/auto)

26、switch(config)#duplex ? 查看duplex的子命令

27、switch(config)#duplex full 设置该端口为全双工(auto/half)

28、switch(config)#description TO_PC1 这是该端口描述为TO_PC1

29、switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2

30、switch(config-if)#switchport mode trunk ;设置为trunk模式(access模式)

31、switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan

32、switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继

33、switch(config)#vtp domain vtpserver ;设置vtp域名相同

34、switch(config)#vtp password ;设置发vtp密码

35、switch(config)#vtp server ;设置vtp服务器模式

36、switch(config)#vtp client ;设置vtp客户机模式

37、交换机设置IP地址,默认网关,域名,域名服务器,配置和查看MAC地址表:

38、switch(config)#interface vlan 1 ;进入vlan 1

39、switch(config-if)#ip address 192.168.1.1 255.255.255.0 ;设置IP地址

40、switch(config)#ip default-gateway 192.168.1.6 ;设置默认网关

41、switch(config)#ip domain-name cisco.com 设置域名

42、switch(config)#ip name-server 192.168.1.18 设置域名服务器

43、switch(config)#mac-address-table? 查看mac-address-table的子命令

44、switch(config)#mac-address-table aging-time 100 设置超时时间为100ms

45、switch(config)#mac-address-table permanent 0000.0c01.bbcc f0/3 加入永久地址在f0/3端口

46、switch(config)#mac-address-table restricted static 0000.0c02.bbcc f0/6 f0/7 加入静态地址目标端口f0/6源端口f0/7

47、switch(config)#end

48、switch#show mac-address-table 查看整个MAC地址表

49、switch#clear mac-address-table restricted static 清除限制性静态地址

50、交换机显示命令:

51、switch#write ;保存配置信息

52、switch#show vtp ;查看vtp配置信息

53、switch#show run ;查看当前配置信息

54、switch#show vlan ;查看vlan配置信息

55、switch#show interface ;查看端口信息

56、switch#show int f0/0 ;查看指定端口信息

57、switch#show int f0/0 status;查看指定端口状态

58、switch#dir flash: ;查看闪存

推荐阅读

联系我们

联系我们

邮件:admin@mrbest.cn

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信
关注微信
分享本页
返回顶部