交换机的基本原理(二)

一、交换机配置前的准备

1、计算机与交换机的物理连接

交换机/路由器的console口
console线(一般用com1、com2口)/USB转console线(一般用com3、com4口)

2、计算机与交换机的软件

SecureCRT软件(选择串口、端口、波特率,数据位,停止位)

2、实验环境与练习

可以购买二手设备
可以网上购买云实验室VIP
使用思科出品的专用模拟软件Cisco Packet Tracer

Cisco Packet Tracer相关使用方法:

https://jingyan.baidu.com/article/b87fe19e472ca4521835680c.html
https://jingyan.baidu.com/article/ea24bc39f24684da62b33137.html
https://jingyan.baidu.com/article/0320e2c13db6321b87507bdd.html
https://jingyan.baidu.com/article/e75aca85077a44142edac6c3.html

二、Cisco交换机的命令行介绍

1、用户模式
  switch>
2、特权模式
  switch>enable
  switch#
3、全局配置模式
  switch#config terminal
  switch(config)#
4、接口模式
  switch(config)#interface fastetherent 0/1
  switch(config-if)#
命令的含义:
interface 关键字
fastetherent 接口类型:E表示10M接口、F表示100M接口、Gi表示1000M接口、Te表示10000M接口
  示例进入千兆接口Switch(config)#interface gigabitEthernet 0/1
0/1:其中0表示模块 1表示端口号
备注:高级设备会有0/0/1:其中第一个0表示槽位号
5、模式间的转换
5.1、进入不同模式的命令可以简写
  Switch>en 
  Switch#conf t 
  Enter configuration commands, one per line.  End with CNTL/Z.
  Switch(config)#int f0/1
5.2、exit命令:退出当前模式,返回上一模式
  Switch(config-if)#exit
  Switch(config)#exit
  Switch#
  %SYS-5-CONFIG_I: Configured from console by console

  Switch#exit

  Switch con0 is now available
  Press RETURN to get started.
  Switch>
5.3、end命令:无论在任何模式下,直接返回特权模式
  Switch>
  Switch>en 
  Switch#conf t
  Enter configuration commands, one per line.  End with CNTL/Z.
  Switch(config)#int 0/1
               ^
  % Invalid input detected at '^' marker.

  Switch(config)#end
  Switch#
  %SYS-5-CONFIG_I: Configured from console by console

  Switch#
5.4、Ctrl+z快捷键:直接返回到特权模式

三、命令行的层次关系

image

四、帮助命令行?的作用

1、显示命令
在当前模式下直接输入?即可显示当前模式下的所有命令
 Switch#?
 Exec commands:
      clear       Reset functions
      clock       Manage the system clock
      configure   Enter configuration mode
      connect     Open a terminal connection
      copy        Copy from one file to another
      debug       Debugging functions (see also 'undebug')
      delete      Delete a file
      dir         List files on a filesystem
      disable     Turn off privileged commands
      disconnect  Disconnect an existing network connection
      enable      Turn on privileged commands
      erase       Erase a filesystem
      exit        Exit from the EXEC
      logout      Exit from the EXEC
      more        Display the contents of a file
      no          Disable debugging informations
      ping        Send echo messages
      reload      Halt and perform a cold restart
      resume      Resume an active network connection
      setup       Run the SETUP command facility
      show        Show running system information
      ssh         Open a secure shell client connection
      telnet      Open a telnet connection
      terminal    Set terminal line parameters
      traceroute  Trace route to destination
      undebug     Disable debugging functions (see also 'debug')
      vlan        Configure VLAN parameters
      write       Write running configuration to memory, network, or                 terminal
  Switch#
2、显示参数
在命令后输入?可以显示该命令的所有参数
  Switch(config)#int ?
    Ethernet         IEEE 802.3
    FastEthernet     FastEthernet IEEE 802.3
    GigabitEthernet  GigabitEthernet IEEE 802.3z
    Port-channel     Ethernet Channel of interfaces
    Vlan             Catalyst Vlans
    range            interface range command
3、命令列表
忘记某个命令的拼写,输入前几个字母?即可显示以此开头的所有可用命令
  Switch(config)#i?
  interface  ip 

五、Tab键:用于补全命令

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值