> 文章列表 > 【Cisco Packet Tracer| 一.交换机配置模式与基本参数配置】

【Cisco Packet Tracer| 一.交换机配置模式与基本参数配置】

【Cisco Packet Tracer| 一.交换机配置模式与基本参数配置】

文章目录

    • 一.交换机的多种模式以及切换
      • 1.如何进入到交换机配置的命令行用户界面(Command Line Interface)
      • 2.普通模式模式
      • 3.特权用户模式
      • 4.全局配置模式
      • 5.模式切换图
    • 二.交换机名称,口令等设置
      • 1.全局模式下-交换机改名
      • 2.接口模式下-配置端口速度和工作模式
        • 2.1配置端口速度
        • 2.2配置工作模式
      • 3.特权模式下-查看交换机历史命令
      • 4.命令的撤销

思科模拟软件:Cisco Packet Tracer Student

一.交换机的多种模式以及切换

1.如何进入到交换机配置的命令行用户界面(Command Line Interface)

【Cisco Packet Tracer| 一.交换机配置模式与基本参数配置】

enter进入到普通用户模式

2.普通模式模式

普通用户模式下的
命令提示符:>
Switch>?
Exec commands:connect     Open a terminal connectiondisable     Turn off privileged commandsdisconnect  Disconnect an existing network connectionenable      Turn on privileged commandsexit        Exit from the EXEClogout      Exit from the EXECping        Send echo messagesresume      Resume an active network connectionshow        Show running system informationtelnet      Open a telnet connectionterminal    Set terminal line parameterstraceroute  Trace route to destination

命令行下的复制粘贴:

shift+insert:复制命令行上的内容

shift+delete:粘贴最近一次剪切板中的内容到命令行上

普通用户模式转为特权用户模式:

Switch>enable
Switch#

3.特权用户模式

特权用户模式下的命令提示符:#
Switch#?
Exec commands:clear       Reset functionsclock       Manage the system clockconfigure   Enter configuration modeconnect     Open a terminal connectioncopy        Copy from one file to anotherdebug       Debugging functions (see also 'undebug')delete      Delete a filedir         List files on a filesystemdisable     Turn off privileged commandsdisconnect  Disconnect an existing network connectionenable      Turn on privileged commandserase       Erase a filesystemexit        Exit from the EXEClogout      Exit from the EXECmore        Display the contents of a fileno          Disable debugging informationsping        Send echo messagesreload      Halt and perform a cold restartresume      Resume an active network connectionsetup       Run the SETUP command facilityshow        Show running system informationssh         Open a secure shell client connection--More--

more表示由于屏幕大小原因,还有部分内容没有显示出来:

  1. 回车键:一次向下显示一行
  2. 空格键:一次向下显示一屏

特权用户模式转为全局配置模式:

Switch#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#

ps:

configure terminal意为配置终端,单词较长,可采用以下解决办法:

  1. tab键自动补全
  2. 简写成conf t

4.全局配置模式

特权用户模式下的命令提示符:(configure)+#
Switch(config)#?
Configure commands:access-list        Add an access list entrybanner             Define a login bannerboot               Boot Commandscdp                Global CDP configuration subcommandsclock              Configure time-of-day clockcrypto             Encryption moduledo                 To run exec commands in config modeenable             Modify enable password parametersend                Exit from configure modeexit               Exit from configure modehostname           Set system's network nameinterface          Select an interface to configureip                 Global IP configuration subcommandsline               Configure a terminal linelogging            Modify message logging facilitiesmac                MAC configurationmac-address-table  Configure the MAC address tableno                 Negate a command or set its defaultsport-channel       EtherChannel configurationprivilege          Command privilege parametersservice            Modify use of network based servicessnmp-server        Modify SNMP engine parameters--More-- 

查看配置模式中的24个端口:

【Cisco Packet Tracer| 一.交换机配置模式与基本参数配置】

ps: FastEthernet0/1单词意为快速以太网0/1

全局配置模式转为接口配置模式:

Switch(config-if)#interface f0/1
Switch(config-if)#

全局配置模式转为vlan配置模式:

Switch(config)#vlan 4
Switch(config-vlan)#

5.模式切换图

【Cisco Packet Tracer| 一.交换机配置模式与基本参数配置】

二.交换机名称,口令等设置

1.全局模式下-交换机改名

全局模式下:

Switch(config)#hostname song
song(config)#

2.接口模式下-配置端口速度和工作模式

2.1配置端口速度

【Cisco Packet Tracer| 一.交换机配置模式与基本参数配置】

song(config-if)#speed ?10    Force 10 Mbps operation100   Force 100 Mbps operationauto  Enable AUTO speed configuration

ps:默认会自动地匹配式10Mbps,还是100Mbps

【Cisco Packet Tracer| 一.交换机配置模式与基本参数配置】

song(config-if)#speed 10
song(config-if)#speed 100
song(config-if)#speed auto
song(config-if)#

2.2配置工作模式

【Cisco Packet Tracer| 一.交换机配置模式与基本参数配置】

song(config-if)#duplex ?auto  Enable AUTO duplex configurationfull  Force full duplex operationhalf  Force half-duplex operation

【Cisco Packet Tracer| 一.交换机配置模式与基本参数配置】

3.特权模式下-查看交换机历史命令

原则上可以一个一个通过上键来上翻找到所有的历史命令,但是不方便

song#show running-conf
Building configuration...Current configuration : 975 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname song
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4--More-- 

4.命令的撤销

有些命令可以通过覆盖来达到撤销后再次写入的目的,但是有些命令只能通过撤销后再次写入来完成

song(config-if)#speed 100
song(config-if)#no speed 100
song(config-if)#

免费商用字体