zoukankan      html  css  js  c++  java
  • Cisco 交换机基本命令

    交换机登录后进入的模式叫用户模式,如下显示为名称+大于号,权限比较低

    Switch> 

    switch>enable  (进入特权模式,进入特权模式后大于号变为井号,如下)

    switch#

    特权模式下的配置:

    1. 修改设备名称:

        switch(config)#hostname ccna

             ccna(config)#

             2. console口配置:

        Switch(config)#line console 0

        Switch(config-line)#logging synchronous   (日志同步功能,你输入命令的时候,不会被系统的提示打断)

        Switch(config-line)#exec-timeout 0 0  (设置超时时间,第一个0为分钟,第二个0为秒,现在的设置就是关闭超时功能)

        Switch(config-line)#password ccna    (设置console口登录密码)

        Switch(config-line)#login                     (登录的时候需要密码验证)

             3. 配置远程登录:

        Switch(config)#line vty 0 4 (设置总共5个口可以同时登录,也可以根据环境自己设置)

        Switch(config-line)#password ccna

        Switch(config-line)#logging synchronous

             4. 配置接口:

                 Switch(config)#interface fa0/1

        Switch(config-if)#?  (罗列出了接口相关的配置命令,这是基于fa0/1的接口配置)

        cdp            Global CDP configuration subcommands

        channel-group          Etherchannel/port bundling configuration

        channel-protocol   Select the channel protocol (LACP, PAgP)

        description     Interface specific description

        duplex     Configure duplex operation.

        exit     Exit from interface configuration mode

        ip     Interface Internet Protocol config commands

        lldp     LLDP interface subcommands

        mdix     Set Media Dependent Interface with Crossover

        mls   mls interface commands

        no   Negate a command or set its defaults

        shutdown   Shutdown the selected interface

        spanning-tree   Spanning Tree Subsystem

        speed   Configure speed operation.

        storm-control   storm configuration

        switchport   Set switching mode characteristics

        tx-ring-limit   Configure PA level transmit ring limit

            管理端口配置:     Switch(config)#interface vlan 1

                      Switch(config-if)#ip add 10.1.1.5 255.255.255.0

     

        5. 保存配置:  (下面两种方法都可以)

          Switch#copy running-config startup-config  

          Switch#write memory

                  6. 重启设备   Switch#reload

        7. 擦除当前配置:  switch#erase startup-config

     

     

  • 相关阅读:
    echarts labelLayout
    可视化学习及实战记录
    VS2008提示无法打开包括文件:“afxcontrolbars.h”解决办法
    原码、补码和反码
    第一篇
    vc2008编译就提示找不到msvcr90d.dll
    Vue H5 与 APP 交互 (IOS为例)
    VS Code中小程序与Vue常用插件合集(前端合集)
    如何在Element 使用正则表达式校验
    分享CSS公共类库(能在项目快捷使用CSS类)
  • 原文地址:https://www.cnblogs.com/20e8/p/13094692.html
Copyright © 2011-2022 走看看