交换机命令行基本配

交换机命令行基本配置

3.1 问题

修改及查看交换机配置

1)修改交换机主机名

2)查看交换机配置信息

3)查看IOS名称以及版本信息

3.2 方案

在Packet Tracer程序主窗口中,添加一台Cisco 2960交换机,进入交换机,输入相关命令进行配置和查看交换机

3.3 步骤

步骤一:修改交换机主机名

进入全局配置模式后,使用hostname指令可以为交换机设置主机名。例如,以下操作可以将主机名设置为s1:

  1. Switch(config)# hostname s1                     //配置主机名
  2. s1(config)#    

步骤二:查看交换机配置信息

查看交换机当前的运行配置:

 
   
  1. 查看交换机当前的运行配置(或write terminal):
  2. s1# show running-config                 //查看当前的运行配置
  3. Building configuration...
  4. Current configuration : 1052 bytes
  5. !
  6. version 12.2
  7. no service timestamps log datetime msec
  8. no service timestamps debug datetime msec
  9. no service password-encryption
  10. !
  11. hostname sw1                         //已配置主机名
  12. !
  13. !
  14. !
  15. !
  16. spanning-tree mode pvst
  17. !
  18. interface FastEthernet0/1
  19. !
  20. interface FastEthernet0/2
  21. !
  22. interface FastEthernet0/3
  23. !
  24. interface FastEthernet0/4
  25. !
  26. interface FastEthernet0/5
  27. !
  28. interface FastEthernet0/6
  29. !
  30. interface FastEthernet0/7
  31. !
  32. interface FastEthernet0/8
  33. !
  34. interface FastEthernet0/9
  35. !
  36. interface FastEthernet0/10
  37. !
  38. interface FastEthernet0/11
  39. !
  40. interface FastEthernet0/12
  41. !
  42. interface FastEthernet0/13
  43. !
  44. interface FastEthernet0/14
  45. !
  46. interface FastEthernet0/15
  47. !
  48. interface FastEthernet0/16
  49. !
  50. interface FastEthernet0/17
  51. !
  52. interface FastEthernet0/18
  53. !
  54. interface FastEthernet0/19
  55. !
  56. interface FastEthernet0/20
  57. !
  58. interface FastEthernet0/21
  59. !
  60. interface FastEthernet0/22
  61. !
  62. interface FastEthernet0/23
  63. !
  64. interface FastEthernet0/24
  65. !
  66. interface GigabitEthernet1/1
  67. !
  68. interface GigabitEthernet1/2
  69. !
  70. interface Vlan1
  71. no ip address
  72. shutdown
  73. !
  74. !
  75. line con 0
  76. !
  77. line vty 0 4
  78. login
  79. line vty 5 15
  80. login
  81. !
  82. !
  83. end
  84. sw1#

步骤三:查看IOS名称以及版本信息

查看ios名称及版本信息

 
  
  1. s1#show version
  2. Cisco Internetwork Operating System Software
  3. IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4, RELEASE SOFTWARE(fc1)
  4. Copyright (c) 1986-2005 by cisco Systems, Inc.
  5. Compiled Wed 18-May-05 22:31 by jharirba
  6. Image text-base: 0x80010000, data-base: 0x80562000
  7. ROM: Bootstrap program is is C2950 boot loader
  8. Switch uptime is 1 minutes, 39 seconds
  9. System returned to ROM by power-on
  10. Cisco WS-C2950-24 (RC32300) processor (revision C0) with 21039K bytes of memory.
  11. Processor board ID FHK0610Z0WC
  12. Last reset from system-reset
  13. Running Standard Image
  14. 24 FastEthernet/IEEE 802.3 interface(s)
  15. 63488K bytes of flash-simulated non-volatile configuration memory.
  16. Base ethernet MAC Address: 00E0.B026.B88C
  17. Motherboard assembly number: 73-5781-09
  18. Power supply part number: 34-0965-01
  19. Motherboard serial number: FOC061004SZ
  20. Power supply serial number: DAB0609127D
  21. Model revision number: C0
  22. Motherboard revision number: A0
  23. Model number: WS-C2950-24
  24. System serial number: FHK0610Z0WC
  25. Configuration register is 0xF
  • 2
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值