一、模式
• 用户模式(>):
• 特权模式(#):
• 全局配置模式(config#):
• 接口配置模式(config-if#):
• 线路模式(#config-line):
二、基本IOS命令结构
•每个IOS 命令都具有特定的格式或语法,并在相应的提示符下执行。
•常规命令语法为命令后接相应的关键字和参数。
•某些命令包含一个关键字和参数子集,此子集可提供额外功能。

三、相关配置
1、 进入用户模式,命令提示符是>号(正常登陆设备CLI(command-line interface,命令行界面)后的第一个配置模式,主要用于查看统计信息,可用的命令比较少,查看部分简单配置,不可修改,配置)
Switch>
Switch>?
Exec commands:
connect Open a terminal connection
disable Turn off privileged commands
disconnect Disconnect an existing network connection
enable Turn on privileged commands
exit Exit from the EXEC
logout Exit from the EXEC
ping Send echo messages
resume Resume an active network connection
show Show running system information
telnet Open a telnet connection
terminal Set terminal line parameters
traceroute Trace route to destination

2、 输入enable进入特权模式,命令提示符是#号(从用户模式进入,可用命令比较多,查看所有配置,部分修改(保存,恢复出厂等))
Switch>enable
Switch#
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
--More--

3、 输入disable从特权模式退到用户模式
Switch#disable
Switch>

4、 输入configure terminal进入全局配置模式(需要从特权模式进入,在全局模式下执行命令将影响整个设备,大配置操作都在这个模式下或从这个模式进入其他模式)
Switch#configure terminal
Switch(config)#

5、输入exit从全局配置模式退到特权模式
Switch(config)#exit
Switch#

6、在全局配置模式下可以设置特权密码(进入特权模式的密码,用于限制人员访问特权执行模式),输入enable password
Switch(config)#enable password 1234 #密码为1234

Switch>enable
Password: #再从用户模式进入特权模式提示输入密码

7、进入某个接口配置模式
Switch(config)#interface vlan 100
Switch(config-if)#

Switch(config)#interface gigabitEthernet 0/1
Switch(config-if)#

8、现在开始配置vlan 100 的管理ip 和子网掩码
Switch(config-if)#ip address 192.168.100.100 255.255.255.0

9、配置一条线路(实际线路或虚拟线路,每个连接这个设备的用户都要占用一个线路例Console、AUX 或VTY等连接方式,这里VTY(Virtual Type Terminal) 是虚拟终端的意思)

Switch(config)#line vty 0 4
line vty 0 4表示设置0到4号5个线路为远程登录,设置为0 3,0 2,0 1完全是可以的,0 4表示最多可以同时5个线路连接,默认0线路被Console占用)
Switch(config-line)#

10、在全局配置模式下可以设置Console密码(用于限制人员通过控制台(Console)连接访问设备)
Switch(config)#line console 0 #配置console线路
Switch(config-line)#password 1234 #密码为1234
Switch(config-line)#login #登录启用密码检查

11、在全局配置模式下可以设置VTY线路登录密码(用于限制人员通过VTY接访问设备)

Switch(config)#line vty 0 10 #通过VTY线路同时连接的最大用户是10
Switch(config-line)#password 12345 #VTY线路登录密码12345
Switch(config-line)#login #登录启用密码检查

Cisco交换机IOS配置介绍的更多相关文章

  1. Cisco交换机常见配置

    -------查看当前系统基础信息-------- sh version //查看当前IOS版本. sh running-config //查看当前系统中运行的配置信息 -------清除当前系统配置 ...

  2. CISCO交换机-SNMP配置

    1.1     SNMP基础配置 router> enable 进入路由器是用户模式 router# conf terminal 进入路由器的全局配置模式 #snmp-server commun ...

  3. Huawei交换机VRP配置介绍

    一.命令视图• 用户视图<Huawei>• 系统视图 [Huawei]• 接口视图 [Huawei-GigabitEthernet0/0/1]• 协议视图 [Huawei-rip-1]• ...

  4. 通过python的paramiko模块获取cisco交换机的配置

    import paramiko import time import os import threading,Queue class MyExpection(Exception): pass clas ...

  5. cisco 交换机 IOS命令

    1 显示交换机的MAC地址表 user mode : show mac-address-table

  6. Cisco交换机管理员配置

    conf tservice timestamps debug datetime msec localtime yearservice timestamps log datetime msec loca ...

  7. [CISCO] 思科交换机基本配置

    思科交换机基本配置 交换机是局域网中最重要的设备,交换机是基于 MAC 来进行工作的.和路由器类似,交换 机也有 IOS,IOS 的基本使用方法是一样的.本章将简单介绍交换机的一些基本配置,以及交换 ...

  8. CiSCO 交换机配置 SSH 登陆

    CiSCO 交换机配置 SSH 登陆 题目:在三层交换机上仅运行 SSH 服务,且用户名和密码的方式登录交换机. (一)了解主机名与域名 ​ 1."主机名" 为该设备的名称 ​ 2 ...

  9. Cisco 交换机配置的基本命令

    1.不同的vlan 不同vlan需要路由 在路由的端口设置多个IP段 交换机模拟器实验六 2.查看端口名字 SWA#sh vlan    default  Active  F0/1, F0/2, F0 ...

随机推荐

  1. hadoop-01-ssh无密登录配置

    1,分配master机器2台,slave机器5台: 2,在全部机器上面配置/etc/hosts设置 3,全部机器上面进行ntp设置:TODO 4,在master机器上面: 不要用root登录 1) s ...

  2. 多线程02---pThread简单介绍

    1.简单介绍 pthread 是属于 POSIX 多线程开发框架. 它是c语言提供的一个跨平台的多线程解决方式.因为其在iOS编程中,操作比較麻烦.一般不用,这里介绍只作为了解. 2.pthread的 ...

  3. Ext4.1 chart的使用

    var reportsPanel = Ext.create('Ext.panel.Panel', { id:'reportsPanel',    layout: 'fit',    tbar: [{ ...

  4. 最快的方式清除Chrome浏览器DNS缓存

    最快的方式就是直接数据url,然后清除不须要的dns缓存. chrome://net-internals/#dns 一般步骤.要经过下列几项. Chrome - > 扳手 - > 选项 - ...

  5. 使用React Hook后的一些体会

    一.前言 距离React Hook发布已经有一段时间了,笔者在之前也一直在等待机会来尝试一下Hook,这个尝试不是像文档中介绍的可以先在已有项目中的小组件和新组件上尝试,而是尝试用Hook的方式构建整 ...

  6. 木马——本质就是cs socket远程控制,反弹木马是作为c端向外发起网络请求

    摘自:http://kczxsp.hnu.edu.cn/upload/20150504165623705.pdf 里面对于木马的实验过程写得非常清楚,值得一看.   木马是隐藏在正常程序中的具有特殊功 ...

  7. [CQOI2009] 叶子的颜色 解题报告(树形DP)

    题目链接:https://www.lydsy.com/JudgeOnline/problem.php?id=1304 Description 给一棵m个结点的无根树,你可以选择一个度数大于1的结点作为 ...

  8. [-] Failed to load plugin from /usr/share/metasploit-framework/plugins/db_autopwn: No classes were loaded from /usr/share/metasploit-framework/plugins/db_autopwn in the Msf::Plugin namespace.

    问题详情 然后,执行,出现如下问题,则说明大家的这个文件,下载不是完整的或者你上传不完整. msf > load db_autopwn [-] Failed to load plugin fro ...

  9. Windows 绝赞应用(该网站收集了日常好用的工具和软件)

    在我们的电脑使用过程中,或多或少的被流氓软件恶心过.流氓软件之所以这么流氓全是靠他那恐怖的用户数量,基本上形成垄断后,各种流氓行为就一点点体现出来了. 我们也可以选择不用,但对流氓软件来说多你一个不多 ...

  10. 那些不兼容 IE11的网站(持续更新)

    此博文用于收集不兼容 IE11 的网站,持续更新,请网站开发者自己认领: 兼容性引起的功能缺陷: v.qq.com (提示未安装 Flash 播放器,这问题我反馈几百年了,还没修复) tv.sohu. ...