一、模式
• 用户模式(>):
• 特权模式(#):
• 全局配置模式(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. 【转】 C# DEBUG 调试信息打印及输出详解

    [转] C# DEBUG 调试信息打印及输出详解 1.debug只在[debug模式下才执行](运行按钮后面的下拉框可选) 2.debug提供了许多调试指令,如断言          System.D ...

  2. 常用Java开源库(新手必看)

    Jakarta common: Commons LoggingJakarta Commons Logging (JCL)提供的是一个日志(Log)接口(interface),同时兼顾轻量级和不依赖于具 ...

  3. 在oracle中采用connect by prior来实现递归查询

    注明:该文章为引用别人的文章,链接为:http://blog.csdn.net/apicescn/article/details/1510922 , 记录下来只是为了方便查看 原文: connect ...

  4. 洛谷 P2040 打开所有的灯

    P2040 打开所有的灯 题目背景 pmshz在玩一个益(ruo)智(zhi)的小游戏,目的是打开九盏灯所有的灯,这样的游戏难倒了pmshz... 题目描述 这个灯很奇(fan)怪(ren),点一下就 ...

  5. Android实战简易教程-第二十八枪(Uri转String型实例)

    接上一篇文章.我们能够轻易的获取所选图片的uri,那么我们考虑怎样将获取的uri转换成String型的地址呢? 接下来我们通过实例来研究.布局文件和上篇(二十七枪)一致,我们就不再列出,直接看Main ...

  6. angularjs作用域和函数调用

    <!DOCTYPE HTML> <html ng-app> <head> <meta http-equiv="Content-Type" ...

  7. Find or Query Data with the mongo Shell

    https://docs.mongodb.com/getting-started/shell/query/ Overview You can use the find() method to issu ...

  8. ORM中基于对象查询与基于queryset查询

    感谢老男孩~  一步一步走下去 前面是视图函数 后面是表结构models.py from django.shortcuts import render, HttpResponse from djang ...

  9. Oozie框架基础

    * Oozie框架基础 官方文档地址:http://oozie.apache.org/docs/4.0.0/DG_QuickStart.html 除Oozie之外,类似的框架还有: ** Zeus:h ...

  10. display的几种常用取值

    display的取值有很多种,下面列出比较常用的几种取值,还有其它的少用的值没有列出来: 1.none 此元素不会被显示,并且不占据页面空间,这也是与visibility:hidden不同的地方,设置 ...