2.2.操作和配置Cisco IOS设备-启动交换机
思科网络交换机配置命令详细总结归纳

使用`switchport access vlan`命令将接口 分配到指定VLAN,如`switchport access vlan 10`将接口分配到VLAN 10。
使用`switchport mode access`命令将接 口设置为访问模式。
使用`name`命令为VLAN设置名称,如 `name Sales`为VLAN 10设置名称为 Sales。
使用`interface`命令进入接口配置模式, 如`interface FastEthernet 0/1`进入 FastEthernet 0/1接口。
VLAN间路由配置
01 02 03 04
使用`interface`命令进入三层接口配置模式,如`interface vlan 10`进入 VLAN 10的三层接口。
配置Root Guard
在接入层交换机上启用Root Guard功能,防止非法设备成为网 络根节点。
STP故障排除技巧
查看STP状态
使用命令`show spanning-tree vlan vlan-id`查看指定 VLAN的STP状态,包括根交换机、根端口、指定端口等信 息。
抓包分析
使用网络抓包工具(如Wireshark)抓取并分析STP协议报 文,以深入了解STP交互过程和故障原因。
将ACL应用到三层接口或VLAN接口上,以实现对 VLAN间通信的控制。
使用`interface`命令进入接口配置模式,然后使用 `ip access-group`命令将ACL应用到接口上,如`ip access-group 101 in`将ACL 101应用到接口的入 方向。
VLAN安全性设置
01
表不稳定等问题。
链路备份
STP在消除环路的同时,保留了一条 或多条备份链路,以在网络故障时提
思科交换机配置命令

思科交换机配置命令思科交换机配置命令大全美国思科公司,凭借它的IOS,Cisco公司在多协议路由器市场上处于绝对领先的地位。
目前,在Internet中,有近80%的路由器来自Cisco。
下面给大家介绍思科交换机配置命令大全,一起来了解一下吧! 思科交换机配置命令大全一、基本配置命令switch> 用户模式1:进入特权模式 enableswitch> enableswitch#2:进入全局配置模式 configure terminalswitch> enableswitch#c onfigure terminalswitch(conf)#3:交换机命名 hostname aptech2950 以 aptech2950 为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch-2950aptech2950(conf)#4:配置使能口令 enable password cisco 以 cisco 为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable password cisco5:配置使能密码 enable secret ciscolab 以 cicsolab 为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable secret ciscolab6:设置虚拟局域网 vlan 1 interface vlan 1switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface vlan 1aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口 ip 和子网掩码aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exitaptech2950(conf)#ip default-gateway 192.168.254 设置网关地址7:进入交换机某一端口 interface fastehernet 0/17 以 17 端口为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface fastehernet 0/17aptech2950(conf-if)#8:查看命令 showswitch> enableswitch# show version 察看系统中的所有版本信息show interface vlan 1 查看交换机有关 ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interface fastethernet 0/1 察看交换机 1 接口具体配置和统计信息show mac-address-table 查看 mac 地址表show mac-address-table aging-time 查看 mac 地址表自动老化时间9:交换机恢复出厂默认恢复命令switch> enableswitch# erase startup-configureswitch# reload10:双工模式设置switch> enableswitch#c onfigure terminalswitch2950(conf)#hostname aptch-2950aptech2950(conf)# interface fastehernet 0/17 以 17 端口为例aptech2950(conf-if)#duplex full/half/auto 有 full , half, auto 三个可选项11:cdp 相关命令switch> enableswitch# show cdp 查看设备的 cdp 全局配置信息show cdp interface fastethernet 0/17 查看 17 端口的 cdp 配置信息show cdp traffic 查看有关 cdp 包的统计信息show cdp nerghbors 列出与设备相连的 cisco 设备12:csico2950 的密码恢复拔下交换机电源线。
思科交换机配置教程

思科交换机配置教程首先,我们需要登录到交换机的控制台界面。
可以通过串口连接,或者通过网络连接,例如通过SSH协议进行连接。
登录后,我们进入到交换机的命令行界面。
接下来,我们需要进行基本的配置。
思科交换机的配置是通过命令行界面进行的,配置的命令是不同的,但是有一些通用的配置信息,我们可以先进行配置。
首先,我们要为交换机设置一个主机名。
可以使用如下命令进行配置:```Switch(config)# hostname Switch1```这样就为交换机设置了一个名字为"Switch1"的主机名。
接下来,我们可以配置交换机的管理IP地址。
可以使用如下命令进行配置:```Switch(config)# interface vlan 1Switch(config-if)# ip address 192.168.1.1 255.255.255.0Switch(config-if)# no shutdown```这样就为交换机的VLAN1接口配置了一个IP地址为192.168.1.1,子网掩码为255.255.255.0,并且启用了这个接口。
除了基本配置信息,我们还需要进行一些其他的配置,例如VLAN的配置。
VLAN是虚拟局域网的意思,可以将交换机的端口划分到不同的VLAN中,实现不同VLAN之间的隔离。
可以使用如下命令进行VLAN的配置:```Switch(config)# vlan 10Switch(config-vlan)# name VLAN10Switch(config-vlan)# exitSwitch(config)# interface fastEthernet 0/1Switch(config-if)# switchport access vlan 10Switch(config-if)# exit```这样就创建了一个编号为10的VLAN,名称为"VLAN10"。
2.2 操作和配置Cisco IOS设备-启动路由器

福建金科集团网络工程师系列教程 福建金科集团网络工程师系列教程
配置脚本的确认和应用
The following configuration command script was created: hostname Routerinterface BRI0 enable secret 5 shutdown $1$/CCk$4r7zDwDNeqkxFO.kJxC3G0 enable passwordno ip address sanfran line vty 0 4 ! password sanjose interface Ethernet0 no snmp-server no shutdown ! ip address 10.1.1.31 255.255.255.0 no appletalk routing enabled no mop no decnet routing ! ip routing interface Serial0 no clns routingshutdown no ipx routing no ip address no vines routing <text omitted> no xns routing end no apollo routing isdn switch-type basic-5ess IOS command prompt without saving this config. [0] Go to the [1] Return back to the setup without saving this config. [2] Save this configuration to nvram and exit. Enter your selection [2]:
福建金科集团网络工程师系列教程 福建金科集团网络工程师系列教程
Cisco IOS 操作模式及切换方法-思科

4
主要命令模式
5
配置命令模式
全局配置模式 ▪ 要配置设备,必须使用 configure terminal 命令进入此模式 ▪ 示例:Switch(config)# ▪ 此模式下进行的 CLI 配置更改会影响设备的整体运行情况 ▪ 在此模式下,用户可以进入不同的子配置模式 两个常见的子配置模式包括: ▪ 线路配置模式 - 用于配置控制台、SSH、Telnet 或 AUX 访问。示例:
2
ቤተ መጻሕፍቲ ባይዱ
© 2013 思科和/或其附属公司。版权所有。
思科公开信息
3
Cisco IOS 操作模式
• 在对思科设备进行初始配置之前,必须建立控制台连接。 • 登录控制台后,网络技术人员必须导航 IOS CLI 的各种命令模式。 • Cisco IOS 模式采用分层结构,交换机和路由器的 Cisco IOS 模式非常
Switch(config-line)# ▪ 接口配置模式 - 用于配置交换机端口或路由器网络接口。示例:
Switch(config-if)#
6
在 IOS 模式之间导航
7
在 IOS 模式之间导航(续)
退出 End 或 Ctrl+Z
8
Cisco IOS 操作模式 及切换方法
前言
▪ 管理员和工程师如果要实现网络连通性,就必须对相关的思科网络产品进行 配置。配置命令有特定的结构,并且命令结构定义了很多命令行视图,每条 命令只能在特定的视图中执行。熟悉掌握配置命令是高效管理思科网络设备 的必备基础。
▪ 通过本课件,您可以了解Cisco IOS 操作模式;主要命令模式;配置命令模式; 在 IOS 模式之间导航。
CiscoIOS与交换机配置初步

(3)全局配置模式 在特权模式下执行configure terminal命令即可进入全局配
置模式。 对交换机或路由器的配置修改,都要进入配置模式。(4)
接口配置模式 在全局配置模式下,执行选择接口的命令,此时就会进入接
口配置模式,以实现对所选中的接口进行相关的配置修改。
(5)线路配置模式 在全局模式下,执行line vty或line console命令,即可进入
(2)特权EXEC模式 设置进入特权模式的密码,命令格式: enable secret|password 密码值 secret和password任选其一,使用secret时,密码加密存贮和 显示。 例如,若设置进入特权模式的密码为 letmein,则命令为: enable secret letmein 注:该命令只能在全局配置模式下执行。
端口模式:是全局模式的下一级模式,该模式下可对交换机 的端口进行参数配置,端口模式的提示符为switch(configif)#
VLAN模式 是全局模式的下一级模式,配置交换机的 VLAN参数,端口模式的提示符为Swicth (config-vlan)#
2.Cisco IOS命令模式与切换方法 (1)用户EXEC模式 交换机或路由器的最低运行模式,登录连接成功后, 所处的模式,就是用户EXEC模式,命令行提示符为> 例如:Switch> (2)特权EXEC模式 通 常 简 称 特 权 模 式 , 在 用 户 EXEC 模 式 下 , 执 行 enable命令进入该模式。
交换机基本配置
教学内容:交换机的基本配置 教学准备:教材、课件 目的与要求:了解交换机的基本配置过程 重点:交换机的命令行操作模式的掌握 教学方法:讲授、演示
本文档后面有精心整理的常用PPT编辑图标,以提高工作效率
2.2.3.3 Packet Tracer - Configuring Initial Switch Settings 配置初始交换机设置

Packet Tracer - 配置初始交换机设置目标第 1 部分:检验默认交换机配置第 2 部分:配置基本交换机配置第 3 部分:配置 MOTD 标语第 4 部分:将配置文件保存到 NVRAM第 5 部分:配置 S2背景在本练习中,您将执行基本的交换机配置。
您将使用加密密码和明文密码来保护对命令行界面 (CLI) 和控制台端口的访问。
您还将学习如何为登录到交换机的用户配置消息。
这些标语也用来警示未授权用户访问是被禁止的。
第 1 部分:检验默认交换机配置第 1 步:进入特权模式。
在特权模式下,您可以使用全部交换机命令。
不过,由于许多特权命令会配置操作参数,因此应使用口令对特权访问加以保护,防止未授权使用。
特权 EXEC 命令集包括用户 EXEC 模式中包含的命令和用于访问其余命令模式的configure 命令。
a.单击S1,然后单击“CLI”选项卡。
按下<Enter>。
b.输入enable 命令进入特权 EXEC 模式:Switch> enableSwitch#请注意特权执行模式下配置中提示符的变化。
第 2 步:检查当前交换机配置。
a.输入show running-config命令。
Switch# show running-configb.请回答以下问题:交换机有多少个FastEthernet接口?交换机有多少个千兆以太网接口?显示的vty线路值范围是什么?哪条命令将显示非易失性随机访问存储器 (NVRAM) 中的当前内容?为什么交换机响应startup-config is not present?第 2 部分:创建基本交换机配置第 1 步:为交换机指定名称。
要在交换机上配置参数,您可能需要在各种配置模式之间切换。
注意您导航交换机时提示符的变化。
Switch# configure terminalSwitch(config)# hostname S1S1(config)# exitS1#第 2 步:保护对控制台线路的访问。
思科交换机基本配置手册

17. 在基于IOS的交换机上修改STP时钟:
switch(config)# spanning-tree [vlan vlan-list] hello-time seconds
switch(vlan)# exit
switch# configure teriminal
switch(config)# interface interface module/number
switch(config-if)# switchport mode access
switch(config-if)# switchport access vlan vlan-num
switch(vlan)# vtp domain domain-name
在基于CLI的交换机上配置VTP管理域:
switch(enable) set vtp [domain domain-name]
11.在基于IOS的交换机上配置VTP 模式:
switch# vlan database
22. 用show vtp domain 显示管理域的VTP参数.
23. 用show vtp statistics显示管理域的VTP参数.
24. 在Catalyst交换机上定义TrBRF的命令如下:
switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]
4.在基于IOS的交换机上启用和浏览CDP信息:
CISCO交换机基本配置和使用概述

CISCO交换机基本配置和使用概述CISCO交换机是一种常用的网络设备,用于构建局域网(Local Area Network,LAN)。
它可以通过物理线路的连接,将多台计算机或其他网络设备连接到同一个网络中,实现数据的传输和共享。
CISCO交换机的基本配置包括IP地址的配置、VLAN的配置、端口配置、安全性配置等。
接下来,我们将对这些配置进行详细说明。
首先,IP地址的配置是CISCO交换机的基本操作之一。
通过配置IP地址,我们可以对交换机进行管理和监控。
具体的配置步骤如下:1. 进入交换机的配置模式。
在命令行界面输入"enable"命令,进入特权模式。
2. 进入全局配置模式。
在特权模式下输入"configure terminal"命令,进入全局配置模式。
3. 配置交换机的IP地址。
在全局配置模式下输入"interfacevlan 1"命令,进入虚拟局域网1的接口配置模式。
然后输入"ip address 192.168.1.1 255.255.255.0"命令,配置交换机的IP地址和子网掩码。
4. 保存配置并退出。
在接口配置模式下输入"exit"命令,返回到全局配置模式。
然后输入"exit"命令,返回到特权模式。
最后输入"copy running-config startup-config"命令,保存配置到闪存中。
其次,VLAN的配置是CISCO交换机的关键配置之一。
通过配置VLAN,我们可以将交换机的端口划分为不同的虚拟局域网,实现数据的隔离和安全。
1. 进入交换机的配置模式。
同样,在特权模式下输入"configure terminal"命令,进入全局配置模式。
2. 创建VLAN。
在全局配置模式下输入"vlan 10"命令,创建一个编号为10的VLAN。
Cisco_Packet_Tracer思科模拟交换机配置解析

术的变化。
用户配置交换机就是通过IOS中提供的专门接口,发出
命令来配置和管理交换机的过程。
运行在常用操作系统上的专用程序有两种: (1)Windows系统下的“超级终端”程序 (2) Linux或Windows下的Telnet程序
3
1、访问交换机的方法
可用 5种方式来访问交换机
要对网络互联设备进行具体的配置首先就要有效 地访问它们,常用的有5种方式来访问交换机:
8、配置使能口令enable password cisco
switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco
9、配置使能密码enable secret ciscolab
switch> enable
switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab
10、设置交换机的控制台口令:
控制台口令是用超级终端登录交换机时使用的口令。 S1(config)#line console 0 S1(config-line)#login S1(config-line)#password ciscocon
(1)Console口接终端或运行终端仿真软件的微机; (2)AUX口接MODEM,通过电话线与远方的终端或 运行终端仿真软件的微机相连;
(3)通过Ethernet上的TFTP服务器;
(4)通过Ethernet上的TELNET程序;
思科交换机命令大全+CiscoIOS基本命令

思科交换机命令大全+CiscoIOS基本命令思科交换机命令大全(一)序号/类别基于ios的交换机命令基于CLI的交换机命令1.设置主机名/系统名switch(config)# hostname "hostname" switch(enable) setsystem name name-string2.设置登录口令switch(config)# enable password level 1 password switch(enable) set passwordswitch(enable) set enalbepass3.设置远程访问switch(config)# inte***ce vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address switch(enable) set inte***ce sc0 ip-address netmask broadcast-addressswitch(enable) set inte***ce sc0 vlanswitch(enable) set ip route default gateway4.启用和浏览CDP信息switch(config-if)# cdp enableswitch(config-if)# no cdp enable switch(enable) set cdp {enable|disable}module/port5.查看Cisco邻接设备的CDP通告switch# show cdp inte***ce [type modle/port] switch# show cdp neighbors [type module/port] [detail] switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 6.端口描述switch(config-if)#description escription-string switch(enable)set port name module/number description-string 7.设置端口速度switch(config-if)# speed{10|100|auto} switch(enable) set portspeed moudle/number {10|100|auto}switch(enable) set port speed moudle/number {4|16|auto} 8.设置以太网的链路模式switch(config-if)# duplex {auto|full|half} switch(enable) set port duplex module/number {full|half9.配置静态VLAN switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)#inte***ce inte***ce module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# end switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list10.配置VLAN中继线switch(config)# inte***ce inte***ce mod/portswitch(config-if)# switchport mode trunkswitch(config-if)#switchport trunk encapsulation {isl|dotlq} switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list switch(enable)settrunk module/port [on|off|desirable|auto|nonegotiate]Vlan-range [isl|dotlq|dotl0|lane|negotiate]11.配置VTP管理域switch# vlan databaseswitch(vlan)# vtp domain domain-name switch(enable) set vtp [domain domain-name]12.配置VTP 模式switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password password switch(enable) set vtp [domaindomain-name] [mode{ sever|cilent|transparent }][password password]13.配置VTP版本switch# vlan databaseswitch(vlan)# vtp v2-mode switch(enable) set vtp v2 enable 14.启动VTP剪裁switch# vlan databaseswitch(vlan)# vtp pruning switch(enable) set vtp pruning enable15.配置以太信道switch(config-if)# port group group-number [distribution {source|destination}] switch(enable) set port channel moudle/port-rangemode{on|off|desirable|auto}16.调整根路径成本switch(config-if)#spanning-tree [vlan vlan-list] cost cost switch(enable)set spantree portcost moudle/port costswitch(enable)set spantree portvlancost moudle/port [cost cost][vlan-list] 17.调整端口ID switch(config-if)#spanning-tree[vlan vlan-list]port-priorityport-priority switch(enable)set spantree portpri {mldule/port}priorityswitch(enable)set spantree portvlanpri {module/port}priority [vlans]18.修改STP时钟switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)#spanning-tree [vlan vlan-list] forward-time secondsswitch(config)#spanning-tree [vlan vlan-list] max-age seconds switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]19.启用或禁用Port Fast 特征switch(config-if)#spanning-tree portfastswitch(enable)set spantree portfast {module/port}{enable|disable}20.启用或禁用UplinkFast 特征switch(config)#spanning-tree uplinkfast[max-update-rate pkts-per-second] switch(enable)set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令:switch(config)# cluster enable cluster-name21. 为了从一条中继链路上删除VLAN,可使用下列命令:switch(enable) clear trunk module/port vlan-range22. 用show vtp domain 显示管理域的VTP参数.23. 用show vtp statistics显示管理域的VTP参数.24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp{ieee|ibm}]25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf {ringhex-ring-num|decring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:switch(enable) set vlan vlan-num mod-num/port-num27. 命令show spantree显示一个交换机端口的STP状态.28. 配置一个ELAN的LES和BUS,可以使用下列命令: ATM (config)# inte***ce atm number.subint multiointATM(config-subif)# lane serber-bus ethernet elan-name29. 配置LECS: ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-addressles1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-addressles2-nsap-addressATM(lane-config-databade)# name ...30. 创建完数据库后,必须在主接口上启动LECS.命令如下: ATM(config)#inte***ce atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下: ATM(config)#inte***ce atm number.subint multipointATM(config)# lane client ethernet vlan-num elan-num32. 用show lane server 显示LES的状态.33. 用show lane bus显示bus的状态.34. 用show lane database显示LECS数据库可内容.35. 用show lane client显示LEC的状态.36. 用show module显示已安装的模块列表.--------------------------------------------------------------------------------37. 用物理接口建立与VLAN的连接: router# configure terminalrouter(config)# inte***ce media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接: router(config)# inte***cemodule/port.subinte***cerouter(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接: router(config)# inte***ce atm module/port router(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# inte***ce atm module/port.subinte***ce multipointrouter(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# inte***ce atm module/port.subinte***ce multipointrouter(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# ...40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行:router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number41. 配置默认路由: switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)# inte***ce inte***ce numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP: router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP 域中:router(config)# inte***ce inte***ce numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息: router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:router(config-if)#mls rp management-inte***ce47. 要检验MLS-RP的配置情况:router# show mls rp48. 检验特定接口上的MLS配置:router# show mls rp inte***ce inte***ce number49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination|destination-source|full]50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)# mls rp ip input-acl51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:switch(enable) set mls enable52. 若想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtimepkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录:switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的内容。
操作与配置CiscoIOS设备概述

操作与配置CiscoIOS设备概述配置Cisco IOS设备通常包括以下几个步骤:1. 连接到设备:通过串口、Telnet、SSH或者通过Console接口等方式连接到设备。
2. 进入特权模式:输入特权密码或验证凭证可以进入特权模式,有些情况下需要配置特权密码或者配置AAA 认证。
3. 进入全局模式:输入"configure terminal"命令可以进入全局配置模式,进行设备的全局配置。
4. 配置接口:通过"interface"命令进入接口配置模式,可以对接口进行配置,包括IP地址、子网掩码、MTU等。
5. 配置路由:通过路由协议或者静态路由对设备进行路由配置,以实现网络之间的通信。
6. 配置安全策略:通过ACL、防火墙等方式对设备进行安全配置,保护网络的安全。
7. 保存配置:在完成配置后,需要通过"write memory"或者"copy running-config startup-config"命令保存配置,以防止设备重启后丢失配置。
总之,配置Cisco IOS设备需要对网络知识有一定的了解,并且要谨慎操作,以避免造成设备故障或数据泄露等问题。
同时,根据实际需求和网络规模,配置也会有所不同,需要根据具体情况进行相应的配置。
配置和操作Cisco IOS设备是网络管理员日常工作的一部分,因此对于熟悉这个操作系统的人来说,这是一项重要的技能。
它是一个功能强大、灵活且稳定的操作系统,为管理和维护网络提供了大量的工具和选项。
在配置Cisco IOS设备时,管理员需要熟悉各种命令和配置选项。
作为网络设备的核心,路由器和交换机的配置是最常见的任务。
接下来,我们将详细了解如何配置常用的路由器和交换机功能。
路由器配置:1. 配置基本设置:管理员可以使用命令行界面(CLI)通过控制台或SSH连接到路由器。
通常会要求管理员输入特权密码以进入特权模式。
配置Cisco交换机启动及基本设置

•配置Cisco交换机启动及基本设置本实验是对Cisco Catalyst 1900系列交换机的启动和基本设置的操作。
本实验是对Cisco Catalyst 1900系列交换机的启动和基本设置的操作。
1.实验目的通过本实验,读者可以掌握以下技能熟悉交换机的开机界面;对交换机进行基本的设置;理解交换机的端口及其编号。
2.设备需求本实验需要以下设备:Cisco Catalyst 1900系列交换机1台,型号不限,企业版软件,本实验中使用了1912交换机;PC机1台,操作系统为Windows系列。
装有超级终端程序;Console电缆1条及相应的接口转换器。
3.线缆连接及配置说明如图3.1所示,PC机通过串口与交换机的Console端口相连。
和路由器一样,Cisco交换机的Console端口的缺省设置如下端口速率:9600bit/s数据位:8奇偶校验:无停止位:1流控:无把PC机超级终端程序中串行端口的属性设置成与上述参数一致后,便可以开始实验。
4.实验配置及监测结果在PC机启动正常,PC机与交换机使用Console电缆连接起来,并且已经进入超级终端程序的情况下。
接通交换机电源。
由于交换机没有电源开关,接通电源即直接插上电源插头。
监测清单3.1记录了Catalyst 1912交换机启动的全过程。
监测清单3-1 Catalyst 1912交换机启动及基本配置第1段:交换机的启动Catalyst 1900 Management ConsoleCopyright (c) Cisco Systems, Inc. 1993-1999All rights reserved.Emter[rose Edotopm SoftwareEthernet Address: 00-04-DD-4E-9C-80PCA Number: 73-3122-04PCA Serial Number: FAB0503D0B4Model Number: WS-C1912-ENSystem Serial Number: FAB0503W0FAPower Supply S/N PHI044207FRPCB Serial Number: FAB0503D0B4,73-3122-041 user(s)now active on Management Console.User Interface Menu[M] Menus[K] Command Line[1] IP Configuration[P] Console PasswordEnter Selection:第2段:进行交换机基本配置Enter Selection: KCLI session with the switch is open.To end the CLI session, enter [Exit].>?Exec commands:enable Turn on privileged commandsexit Exit from the EXEChelp Description of the interactive help systemping Send echo messagessession Tunnel to moduleshow Show running system informationterminal Set terminal line parameters>enable##conftEnter configuration commands, one per line. End with CNTL/Z (config)#?Configure commands:address-violation Set address violation actionback-pressure Enable back pressurebanner Define a login bannerbridge-group Configure port grouping using bridge groupscdp Global CDP configuration subcommandscgroup Enable CGMPcluster Cluster configuration commandsecc Enable enhanced congestion controlenable Modift enable password parametersend Exit from configure modeexit Exit from configure modehelp Description of the interactive help systemhostname Set the system's network nameinterface Select an interface to configureip Global IP configureation subcommandsline Configure a terminal linelogin Configure options for logging inmac-address-table Configure the mac address tablemonitor-port Set port monitoring--More--mlilticast-store-and-forward Enables multicast store and forward network-port Set the network portno Negate a cominand or set its defaultsport-channel Configure Fast EtherChannelrip Routing information protocol configurationservice Configuration Commandsump-server Modify SNMP parametersspantree Spanning subsystemspantree-template Set bridge template parameterstorm-control Configure broadcast storm contfolpirameters switching-mode Set the switching modetacacs-server Modify TACACS query parameterstftp Configure TFTPuplink-fast Enable Uplink fastvlan VLAN configurationvlan-membership VLAN membership server configurationvtp Global VTP configuration commands(config)#SiostBiame SW1912SW1912(config)#enabSe password ?level Set exec level passwordSW1912(config)#enable password level 1 pass1SW1912(config)#enabSe password level 15 passl5SW1912(config)#enable secret CiscoSW1912#disableSW1912>SW1912>enEnter password: ***** ( 键入cisco )SW1912#conf tEnter configuration commands, one per line. End with CNTL/Z SW1912(config)#ip address 192.168.1.1255.255.255.0SW1912(config)#ip default-gateway 192.168.1.254SW1912(config)#ip domain-name ?WORD Domain nameSW1912(config)#ip domain-name SW1912(config)#ip name-server 200.1.1.1SW1912(config)#endSW1912#sh versionCisco Catalyst 1900/2820 Enterprise Edition Software Version V9.00,05 written from 192.168.000.005Copyright (c) Cisco Systems, Inc. 1993-1999SW1912 uptime is 0day(s)00hour(s)12minute(s)44secibd(s)cisco Catalyst 1900(486sxl)processor with 2048K/1024K bytes of memory Hardware board revision is 5Upgrade Status: No upgrade currently in progress.Config File Status: No configuration upload/download is in progress 15 Fixed Ethernet/IEEE802.3interface(s)Base Ethernet Address: 00-04-DD-4E-9C-80SW1912#show ipIP Address:192.168.1.1Subnet Mask:255.255.255.0Default Gateway:192.168.1.254Management VLANl: 1Domain name:Name server1:200.1.1.1HTTP server:EnabledHTTP port: 80RIP:EnabledSW1912#show running-configBuilding configuration...Current configuration:!tftp accepttftp server "192.168.0.5"tftp filename "catl900EN.9.00.05.bin"!hostname "SW1912"!ip address 192.168.1.1255.255.255.0ip default-gateway 192.168.1.254ip domain-name ""ip name-server 200.1.1.1!enable secret 5 $l$FMFQ$mlNHW7EzaJpG9uhKPWBvf/enable password level 1 "PASS 1"enable password level 15 "PASS 15"!interface Ethernet 0/1!interface Ethernet 0/2!interface Ethernet 0/3!interface Ethernet 0/4!interface Ethernet 0/5!interface Ethernet 0/6!interface Ethernet 0/7!interface Ethernet 0/8!interface Ethernet 0/9interface Ethernet 0/10!interface Ethernet 0/11!interface Ethernet 0/12!interface Ethernet 0/25!interface FastEthernet 0/26!interface FastEthernet 0/27!line consoleendSW1912#show int e0/lEthernet 0/1 is Suspended-no-linkbeat802.1 dSTP State: Forwarding Forward Transitions:1Port monitoring: DisabledUnknown unicast flooding: EnabledUnregistered multicast flooding: EnabledDescription:Duplex setting: Half duplexBack pressure: DisabledReceive Statistics Transmit StatisticsTotal good frames 0 Total frames 0Total octets 0 Total octets 0Broadcast/multicast frames 0 Broadcast/multicast frames 0Broadcast/multicast octets 0 Broadcast/multicast octets 0Good frames forwarded 0 Deferrals 0Frames filtered 0 Single collisions 0Runt frames 0 Multiple collisions 0No buffer discards 0 Excessive collisions 0Queue full discards 0Errors: Errors:第3段:重新启动交换机查看配置保持情况SW1912#reloadThis command resets the switch. All configured system parameters and static addresses will be retained. All dynamic addresses well be removed. Reset system, [Y]es or [N]o? YesCatalyst 1900 Management ConsoleCopyright (c) Cisco Systems, Inc. 1993-1999All rights reserved.Enterprise Edition SoftwareEthernet Address: 00-04-DD-4E-9C-80PCA Number: 73-3122-04PCA Serial Number: FAB0503D0B4Model Number: WS-C 1912-ASystem Serial Number: FAB0503W0FAPower Supply S/N: PH1044207FRPCB Serial Number: FAB0503DOB4,73-3122-04----------------------1 user(s) now active on Management Console.User Interface Menu[M]Menus[K]Command LineEnter Selection: KEnter password: *****CLI session with the switch is open.To end the CLI session, enter [Exit].SW1912>enableEnter password: ***** (键入cisco )SW1912#show running-config…(与第2段中配置清单相同,此处省略)(1)第1段是1912交换机加电后出现的显示内容,依次列出了版权信息、软件版本信息(企业版)、以太网地址(00.04,DD-4E-9C.80)以及各种序列号。
思科交换机基本配置实例讲解

思科交换机基本配置实例讲解你还在为不知道思科交换机基本配置实例讲解而烦恼么?接下来是小编为大家收集的思科交换机基本配置实例讲解教程,希望能帮到大家。
思科交换机基本配置实例讲解的方法目录1、基本概念介绍 (2)2、密码、登陆等基本配置 (2)3、cisco设备端口配置详解 (8)4、vlan的规划及配置 (13)4.1 核心交换机的相关配置 (13)4.2 接入交换机的相关配置 (25)5、配置交换机的路由功能 (30)6、配置交换机的DHCP功能 (31)7、常用排错命令 (32)友情链接:杭州大金空调售后/ 杭州大金空调售后电话杭州西门子洗衣机售后维修电话/ 杭州西门子洗衣机售后服务电话上海夜总会招聘/ 上海***上海夜总会/ 上海夜场上海***/ 上海招聘杭州ktv招聘/ ktv招聘1、基本概念介绍IOS:互联网操作系统,也就是交换机和路由器中用的操作系统VLAN:虚拟lanVTP:VLAN TRUNK PROTOCOLDHCP:动态主机配置协议ACL:访问控制列表三层交换机:具有三层路由转发能力的交换机本教程中“#”后的蓝色文字为注释内容。
2、密码、登陆等基本配置本节介绍的内容为cisco路由器或者交换机的基本配置,在目前版本的cisco交换机或路由器上的这些命令是通用的。
本教程用的是cisco的模拟器做的介绍,一些具体的端口显示或许与你们实际的设备不符,但这并不影响基本配置命令的执行。
Cisco 3640 (R4700) processor (revision 0xFF) with 124928K/6144K bytes of memory.Processor board ID 00000000R4700 CPU at 100MHz, Implementation 33, Rev 1.22 Ethernet interfaces8 Serial interfacesDRAM configuration is 64 bits wide with parity enabled.125K bytes of NVRAM.8192K bytes of processor board System flash (Read/Write) --- System Configuration Dialog ---Would you like to enter the initial configuration dialog? [yes/no]: n# 此处我们选择no,不进入他的初始化配置向导Press RETURN to get started!# 选择no以后,提示你按回车键开始,此处我们需要按回车键*Mar1 00:43:56.591: %IP-5-WEBINST_KILL: Terminating DNS process*Mar1 00:43:58.379: %SYS-5-RESTART: System restarted --Cisco IOS Software, 3600 Software (C3640-JK9O3S-M), Version 12.3(14)T7, RELEASE SOFTWARE (fc2)Technical Support: /techsupportCopyright (c) 1986-2006 by Cisco Systems, Inc.Compiled Wed 22-Mar-06 21:46 by pwade*Mar1 00:43:58.411: %SNMP-5-COLDSTART: SNMP agent on host Router is undergoing a cold startRouter># 等显示稳定后,出现最初的提示符,注意提示符是“>”,目前所处的状态称为用户模式。
CISCO交换机的常用操作项-思科常用命令手册速查手册

交换机的常用操作项1、更改主机名switch(config)#hostname sw12、设置进入特权模式的密码switch(config)#enable password 1234switch(config)#enable secret cisco3、设置console口密码switch(config)#line console 0switch(config-line)#password 123switch(config-line)#login4、查看mac地址列表switch#show mac-address-table5、查看mac地址列表刷新时间switch#show mac-address-table aging-time6、更改mac地址列表刷新时间switch(config)#mac-address-table aging-time 200 7、查看当前配置(RAM)switch#show running-config8、查看交换机的配置(NVRAM)switch#show startup-config9、保存配置switch#copy running-config startup-configswitch#write10、恢复出厂默认设置switch#erase startup-configswitch#reload11、查看cdp的全局信息switch#show cdp12、查看接口的cdp配置信息switch#show cdp interface f0/213、查看有关cdp包的统计信息switch#show cdp traffic14、查看邻居信息switch#show cdp neighbors15、查看所有入口项的详细信息switch#show cdp neighbors detailswitch#show cdp entry *16、添加接口的描述信息switch(config-if)# description connection to routerA 17、设置交换机的网关switch(config)#ip default-gateway 192.168.1.118、关掉DNS解析switch(config)# no ip domain-lookup19、实现交换机的远程管理switch(config)#enable secret ciscoswitch(config)#interface vlan 1switch(config-if)#ip address 192.168.1.100 255.255.255.0switch(config-if)#no shutdownswitch(config)#line vty 0 4switch(config-line)#password 123switch(config-line)#loginc:\>telnet 192.168.1.10020、交换机的密码恢复1、将交换机的电源拔下2、按mode键将电源插上,当出现switch:时将手松开3、switch:flash_init //加载到flash中4、switch:dir flash: //查看flash中的文件5、rename flash:config.text flash:config.old //更改文件名6、boot //重新启动交换机7、rename flash:config.old flash:config.text //将文件名改回8、copy flash:config.text running-config9、enable password cisco //重新设置密码10、write //保存21、创建vlan方法一switch#vlan databaseswitch(vlan)#vlan 10 name scswitch(vlan)#exit22、创建vlan方法二switch(config)#vlan 10switch(config-vlan)#name sc23、删除vlan方法一switch(vlan)#no vlan 10switch(vlan)#exit24、删除vlan方法二switch(config)#no vlan 1025、删除vlan方法三switch#delete vlan.dat26、将端口加入到vlan中switch(config-if)#switchport access vlan 1027、将一组连续的端口加入到vlan中switch(config)# interface range f0/1 – 5 (端口范围管理switch(config-if-range)#switchport access vlan 10 端口范围管理模式28、将端口从vlan中删除switch(config-if)#no switchport access vlan 10switch(config-if)#switchport access vlan 1switch(config-if-range)#no switchport access vlan 10 switch(config-if-range)#switchport access vlan 1 29、查看所有vlan的摘要信息switch#show vlan brief30、查看指定vlan的信息switch#show vlan id 1031、指定端口成为trunkswitch(config-if)#switchport mode trunk 两个端口全要设成trunk32、Trunk的自动协商switch(config-if)#switchport mode dynamic desirable switch(config-if)#switchport mode dynamic auto注意:如果中继链路两端都设置成auto将不能成为trunk 33、查看端口状态switch#show interface f0/24 switchport34、在trunk上移出vlanswitch(config-if)#switchport trunk allowed vlan remove 235、在trunk上添加vlanswitch(config-if)#switchport trunk allowed vlan add236、Cisco 2600路由器的基本操作从用户模式进入特权模式router>enablerouter#从特权模式进入全局配置模式router#config terminalrouter(config)#为路由器配置主机名router(config)#hostname teacherteacher(config)#进入路由器的以太口配置模式teacher(config)#interface fastethernet 0/0teacher(config_if)#37、查看Cisco 2600路由器的串口状态router#show interface serial 0/0serial 0/0 is up ,line protocol is up可操作状态………serial 0/0 is up ,line protocol is up连接问题…………serial 0/0 is up ,line protocol is down接口问题…………serial 0/0 is down ,line protocol isdown禁用状态…………serial 0/0 is administratively down ,line protocol is down38、 静态路由的实现router(config)#hostname AA(config)#interface f0/0 A(config-if)#ip address 192.168.1.1 255.255.255.0 A(config-if)#no shutdownA(config)#interface f0/1A(config-if)#ip address 192.168.2.1 255.255.255.0 A(config-if)#no shutdownA(config)#iproute 192.168.3.0 255.255.255.0 192.168.2.2B(config)#iproute 192.168.1.0 255.255.255.0 192.168.2.139、 配置默认路由route(config)#ip route 0.0.0.0 0.0.0.0 下一跳地址40、 查看路由表router#show ip route其中C 代表直连的网络,S 代表静态的路由,S*代表默认的路由 192.168.1.1 192.168.2.2 192.168.2.1 192.168.3.1 192.168.1.10 192.168.3.1041、为Cisco 2600路由器配置密码配置控制台密码router (config)#line console 0router (config-line)# password ciscorouter (config-line)# login42、配置特权模式密码router (config)#enable password cisco43、配置安全的加密密码router (config)#enable secret 123444、配置路由器标识router(config)#banner motd $This is Aptech company’s Router! Please don’t change the configuration whithout permissions$45、对所有密码进行加密router (config)#service password-encryption46、配置超时router(config)#line console 0router(config-line)#exec-timeout 0 0 //第一个0代表分钟,第二个0代表秒47、显示同步router(config)#line console 0router(config-line)#logging synchronous48、配置禁用DNSrouter(config)#no ip domain-lookup49、利用三台路由器实现静态路由和默认路由50、路由器密码恢复重启路由器按Ctrl+Break键进入ROM Monitor 模式rommon 1>confreg 0x2142rommon 2>reset重启后选择norouter>enablerouter#copy startup-config running-configrouter#config terminalrouter(config)#enable password ciscorouter(config)#config-register 0x2102router#copy running-config startup-configrouter#reload51、单臂路由——实现不同vlan之间的通信V L A N11、划分vlanswitch#vlan databaseswitch(vlan)#vlan 2写NAME,不行,switch(vlan)#vlan 3switch(vlan)#exit2、将端口加入vlanswitch(config)#interface range f0/6 -8switch(config-if-range)#switchport access vlan 2 switch(config-if-range)# interface range f0/9 -11 switch(config-if-range)#switchport access vlan 3 3、配置trunkswitch(config)#interface f0/12switch(config-if)#switchport mode trunk4、配置路由器的子接口封装dot1q,并设置IP地址router(config)#interface f0/0.1router(config-subif)#encapsulation dot1q 1router(config-subif)#ip address 192.168.0.1 255.255.255.0router(config-subif)#no shutrouter(config)#interface f0/0.2router(config-subif)#encapsulation dot1q 2router(config-subif)#ip address 192.168.1.1 255.255.255.0router(config-subif)#no shutrouter(config)#interface f0/0.3router(config-subif)#encapsulation dot1q 3router(config-subif)#ip address 192.168.2.1 255.255.255.0router(config-subif)#no shutrouter(config)#interface f0/0router(config-if)#no shut5、设置pc的IP地址和默认网关52、RIP版本V1和V2 的区别RIP v1发送路由更新时不携带子网掩码,属于有类路由协议发送路由更新时,目标地址为广播地址:255.255.255.255RIP v2发送路由更新时携带子网掩码,属于无类路由协议发送路由更新时,目标地址为组播地址:224.0.0.953、 RIP V1的配置配置步骤:1、配置路由器接口IP 地址routerA(config)#interface f0/0routerA(config-if)#ipaddress 192.168.1.1 255.255.255.0routerA(config-if)#no shutdownrouterA(config-if)#interface f0/1routerA(config-if)# ip address 10.0.0.2 255.0.0.0routerA(config-if)#no shutdownrouterB(config)#interface f0/0routerB(config-if)#ip address 10.0.0.1 255.0.0.0 192.168.2.0/24192.168.1.0/24routerB(config-if)#no shutdownrouterB(config)#interface f0/1routerB(config-if)#ip address 20.0.0.2 255.0.0.0 routerB(config-if)#no shutdownrouterC(config)#interface f0/0routerC(config-if)#ip address 20.0.0.1 255.0.0.0 routerC(config-if)#no shutdownrouterC(config)#interface f0/1routerC(config-if)#ip address 192.168.2.2 255.255.255.0routerC(config-if)#no shutdown2、在路由器上启动RIP进程,并宣告网络号:routerA(config)#router riprouterA(config-router)#network 10.0.0.0routerA(config-router)#network 192.168.1.0routerB(config)#router riprouterB(config-router)#network 10.0.0.0routerB(config-router)#network 20.0.0.0routerC(config)#router riprouterC(config-router)#network 20.0.0.0routerC(config-router)#network 192.168.2.03、验证配置是否正确1)查看路由表router#show ip route2)查看路由协议配置router#show ip protocols3)打开RIP协议调试命令router#debug ip rip4)退出router# no debug ip rip4、在PC上设置IP地址、子网掩码、默认网关,用ping命令测试连通性54、RIP V2的配置10.1.1.0/24 192.168.1.0/241、配置各路由器接口IP地址routerA(config)#interface f0/0routerA(config-if)#ip address 10.1.1.1 255.255.255.0routerA(config-if)#no shutdownrouterA(config-if)#interface f0/1routerA(config-if)# ip address 192.168.1.1 255.255.255.0routerA(config-if)#no shutdownrouterB(config)#interface f0/0routerB(config-if)#ip address 10.1.2.1 255.255.255.0routerB(config-if)#no shutdownrouterB(config)#interface f0/1routerB(config-if)#ip address 192.168.1.2 255.255.255.0routerB(config-if)#no shutdownrouterC(config)#interface f0/0routerC(config-if)#ip address 192.168.1.3 255.255.255.0routerC(config-if)#no shutdownrouterC(config)#interface f0/1routerC(config-if)#ip address 192.168.2.1 255.255.255.0routerC(config-if)#no shutdown2、在路由器上配置RIP V2 路由协议routerA(config)#router riprouterA(config-router)#version 2routerA(config-router)#no auto-summary不合并同段网络routerA(config-router)#network 10.0.0.0 routerA(config-router)#network 192.168.1.0 routerB(config)#router riprouterB(config-router)#version 2routerB(config-router)# no auto-summary routerB(config-router)#network 10.0.0.0 routerB(config-router)#network 192.168.1.0 routerC(config)#router riprouterC(config-router)# version 2routerC(config-router)# no auto-summary routerC(config-router)#network192.168.1.0 routerC(config-router)#network 192.168.2.0 3、验证配置是否正确1)查看路由表router#show ip route2)查看路由协议配置router#show ip protocols3)打开RIP协议调试命令router#debug ip rip4、在PC上设置IP地址、子网掩码、默认网关,用ping命令测试连通性55、上传路由器上的IOSrouter#show flash //查看IOS文件名router#copy flash tftpSource filename []? c2600-ik8o3s-mz.122-11.T.binAddress or name of remote host []? 192.168.1.11Destination filename [c2600-ik8o3s-mz.122-11.T.bin]?下载IOS到路由器router#copy tftp flash上传路由器上配置文件router#copy nvram:startup-config tftp:Address or name of remote host []? 192.168.1.11Destination filename [router-config]? startup-config下载配置文件到路由器router#copy tftp:startup-config nvramC2600路由器IOS被删除的恢复方法:1、ctrl+breakrommon 1>IP_ADDRESS=192.168.0.100 //路由器接口地址rommon 2>IP_SUBNET_MASK=255.255.255.0rommon 3>DEFAULT_GATEWAY=192.168.0.100rommon 4>TFTP_SERVER=192.168.0.254rommon 5>TFTP_FILE=c2600-ik8o3s-mz.122-11.T.binrommon 6>tftpdnld希望各位学员努力学习,将交换机和路由器的操作命令练会、练熟学如逆水行舟,不进则退。
cisco设备详细配置(全)

实验一口令和主机名设置1. 口令和设备名设置添加一个交换机或一个路由器,先对交换机进行操作,双击SwitchAswitch>enpassword: ;第一次密码为空,直接回车switch#conf t ;进入全局配置模式switch(config)#hostname swa ;设置交换机名swa(config)#enable secret aaa ;设置特权加密口令为aaaswa(config)#enable password aax ;设置特权非密口令为aaxswa(config)#line console 0 ;进入控制台口(Rs232)状态swa(config-line)#login ;允许登录swa(config-line)#password aa ;设置登录口令aaswa(config-line)#line vty 0 4 ;进入虚拟终端virtual ttyswa(config-line)#login ;允许登录swa(config-line)#password a ;设置登录口令aswa(config-line)#exit ;返回上一层swa(config)#exit ;返回上一层swa#sh run ;看配置信息swa#exit ;返回命令swa>enpassword: ;哪一个口令可以通过双击ROA对路由器进行与交换机类似的设置。
2. 清除口令清除交换机口令,实际中是在开机时按住交换机上的mode钮,本模拟机按Ctrl+Break。
口令请除,可以重新配置口令了。
清除路由器口令,实际中是在开机时上电时,按Ctrl+Break,本模拟机按Ctrl+Break。
参考操作如下:双击RouterA 。
先配置路由的特权口令:router>enpassword: ;第一次密码为空,直接回车router#conf t ;进入全局配置模式router(config)#enable secret aaa ;设置特权加密口令为aaarouter(config)#exit ;返回router#exitrouter>enpassword:aaarouter#清除路由器的口令是在假设口令丢失情况下使用的方法,具体的操作是开机进入rommon状态,打开寄存器配置开关:router#reload ;重新启动,按Ctrl+Break rommon>rommon>confreg 0x2142 ;跳过配置,26xx 36xx 45xxrommon>reset;重新引导,等效于重开机router>enpassword:router#conf trouter(config)#enable secret bbb ;设置特权加密口令为aaarouter(config)#config-register 0x2102 ;正常使用配置文件router(config)#exitrouter#exitrouter>enpassword:bbbrouter#在实际工作中一般要备份路由器的配置文件,当系统有问题时将配置文件复原。
Cisco交换机IOS命令及交换机的基本配置

Cisco交换机IOS命令及交换机的基本配置实验3 Cisco交换机IOS命令及交换机的基本配置第一部分Cisco交换机IOS命令1、几种配置命令模式switch>这种提示符表示是在用户命令模式。
switch#这种提示符表示是在特权命令模式,只能使用一些查看命令。
switch(config)# 这种提示符表示是全局配置模式switch(config-if)# 端口配置命令模式2、检查、查看命令这些命令是查看当前配置状况,通常是以show(sh)为开始的命令。
show version查看IOS的版本、show flash查看flash内存使用状况、show mac-address-table查看MAC地址列表Show ? 帮助命令显示当前所有的查看命令3、密码设置命令Cisco交换机、路由器中有很多密码,设置好这些密码可以有效地提高设备的安全性。
switch(config)#enable password设置进入特权模式的密码switch(config-line)#可以设置通过console端口连接设备及telnet远程登录时所需要的密码默认情况下,这些密码都是以明文的形式存储,所以很容易查看到(采用show running-config命令)。
为了避免这种情况,我们可以以密文的形式存储各种密码:switch(config)#service password-encryption密码以明文形式存储密码以密文形式存储第二部分交换机的基本配置实验目的掌握交换机基本配置的步骤和方法;掌握查看和测试交换机基本配置的步骤和方法。
背景描述假设某学校的网络管理员第一次在设备机房对交换机进行了初次配置后,他希望以后在办公室或出差时也可以对设备进行远程管理,现要在交换机上做适当配置,使他可以实现这一愿望。
本实验以Cisco二层交换机为例,交换机命名为Switch。
一台PC 机通过串口连接到交换机的控制(Console)端口,通过网卡(NIC)连接到交换机的F0/1端口。
cisco思科交换机配置篇

cisco思科交换机配置篇cisco思科交换机配置篇要进行思科交换机的配置,首先就得进入交换机的全局配置模式,在成功连接交换机并且登陆成功进入特权模式下,下面跟yjbys店铺一起来学习一下思科交换机的配置命令吧!1、输入进入全局配置模式:switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.switch(config)#switch(config)#switch(config)#这么简单的一条命令,俺们就进入到全局配置模式了,还记得上一篇中查看端口所查询到的信息中name字段下的值吗?这字段其实代表的是交换机端口的描述信息2、修改端口描述switch#switch#switch#conf terEnter configuration commands, one per line. End with CNTL/Z.switch(config)#switch(config)#int fa0/3switch(config-if)#switch(config-if)#descswitch(config-if)#description updateDescswitch(config-if)#switch(config-if)#exitswitch(config)#exitswitch#switch#show interswitch#show interfaces statuswitch#show interfaces statusPort Name Status Vlan Duplex Speed TypeFa0/1 connected 1 a-full a-100 10/100BaseTXFa0/2 h3c2.250 connected trunk a-full a-100 10/100BaseTX Fa0/3 updateDesc notconnect 1 auto auto 10/100BaseTXFa0/4 connected 1 a-full a-100 10/100BaseTXFa0/5 h3c-2.200 connected 1 a-full a-100 10/100BaseTXFa0/6 notconnect 1 auto auto 10/100BaseTX修改描述的关键命令在于,在配置模式下,进入到要修改的端口下,然后使用description + “内容”!效果应该很直观了吧,接下来就是修改端口的所在Vlan了3、修改端口Vlanswitch#switch#switch#conf tEnter configuration commands, one per line. End with CNTL/Z.switch(config)#switch(config)#int fa0/3switch(config-if)#switch(config-if)#sw acc vl 2switch(config-if)#switch(config-if)#exitswitch(config)#switch(config)#exitswitch#switch#show inter statuPort Name Status Vlan Duplex Speed TypeFa0/1 connected 1 a-full a-100 10/100BaseTXFa0/2 h3c2.250 connected trunk a-full a-100 10/100BaseTX Fa0/3 updateDesc notconnect 2 auto auto 10/100BaseTXFa0/4 connected 1 a-full a-100 10/100BaseTXFa0/5 h3c-2.200 connected 1 a-full a-100 10/100BaseTXFa0/6 notconnect 1 auto auto 10/100BaseTX逻辑和修改端口描述是一样的,对于配置来说,肯定是到了能有配置权限的地方和要配置的对象,这里修改端口Vlan的关键命令为:sw acc vl + vlantag,命令很明显被简写了,但是不影响执行,命令的全写为:switchport access vlan + vlantag还有一些对端口的简单操作,譬如修改端口的模式,4、修改端口模式switch(config-if)#switchport trunk encap dot1q ----------------设置vlan 中继的'封装协议注:dot1q就是 IEEE 802.1Q协议,是vlan的一种封装方式,是公有协议。
思科交换机重刷IOS版本以及败处理方法

1.电脑连接交换机console口。
2.准备ptf传输ios文件到交换机。
(1)网线连接电脑和交换机任意端口,这里连接交换机f0/3端口。
(2)在电脑【本地链接】配置IP地址为10.1.1.1,255.255.255.0。
这里可以随意配置,只要保证和交换机端口的IP地址在同一网段即可。
(3)配置交换机端口f0/3IP地址为10.1.1.2,255.255.255.0。
●Switch# configure terminal 进入全局配置模式●Switch(config)#do show ip interface brief 查看端口状态。
我们所用的f0/3端口在Vlan1(因为原来设置过IP地址,所有显示IP地址为10.1.1.2,如未设置,可能是其他的IP地址)●Switch(config)#interface vlan 1●Switch(config-if)ip address 10.1.1.2 255.255.255.0 设置IP(4)在交换机上ping 电脑配置的IP地址,在电脑上PING交换机上的IP地址,如果能够PING通,则可以传输数据。
(5)Show flash 查看现在交换机上的文件。
(6)Copy flash tftp,然后根据命令提示,备份原来机器上的IOS到FTP服务器上(7)通过show flash发现flash中剩余空间足够安装新的IOS文件,则不需要删除文件。
但是这演示怎么删除文件switch#delete flash:c3560-ipbasek9-mz.122-55.SE9.bin将原来的IOS文件删除,因为前面已经备份过,所以可以放心删除,实在不行还可以恢复。
删除之后show flash 发现,原来的IOS文件已经不在了(8)传输IOS文件到交换机copytftp flash,根据命令提示,将文件传到flash3.全局模式下Boot system flash + filename 可以设置下次启动时的启动配置4.退出全局模式,show boot 可以看到目前的启动项为上一步设置的启动项5.Reload 重启交换机。
Cisco Ios交换机安装配置指导书

系统安全服务解决方案2.0版Cisco IOS交换机安装配置指导书华为技术华为技术有限公司综合业务服务产品部二〇一三年四月修订记录目录1CISCO IOS交换机简介 (4)1.1C ISCO 2950系列交换机 (4)1.2C ISCO 3550系列交换机 (5)1.3C ISCO 4000系列交换机 (7)2CISCO IOS的交换机的配置 (8)2.1访问交换机 (8)2.1.1通过console访问交换机 (8)2.1.2通过Telnet访问交换机 (10)2.2基本管理配置 (12)2.2.1设置交换机名字 (12)2.2.2设置交换机管理IP地址 (12)2.2.3设置交换机时间信息 (12)2.2.4设置交换机的密码 (12)2.2.5设置交换机的日志信息 (13)2.3以太网端口的配置 (14)2.3.1打开/关闭以太网端口 (14)2.3.2以太网端口的描述 (14)2.3.3设置以太网端口的双工状态 (15)2.3.4设置以太网端口的速率 (15)2.3.5设置以太网端口的工作模式 (15)2.4链路聚合(E THER C HANNEL) (15)2.5VLA N配置 (16)2.6T RUNK配置 (17)2.7VTP配置 (19)2.8STP协议 (20)3配置实例 (22)3.1C ATALYST 2924XL配置实例 (22)3.2C ATALYST 4006配置实例 (25)1Cisco IOS交换机简介在Cisco交换机簇中,有以下交换机的配置命令是采用IOS命令行进行配置的:Catalyst 2924、 Catalyst 2950、Catalyst 3500、Catalyst 3550、Catalyst 2948G-L3、采用新交换引擎的4000系列交换机、以及采用IOS软件的Catalyst 6000系列的交换机。
其中Catalyst 2950是Catalyst 2924的替代品,Catalyst 3550是Catalyst 3500的替代品。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
© 2002, Cisco Systems, Inc. All rights reserved.
ICND v2.0—1-15
Showing Switch Initial Startup Status
wg_sw_a#show version • Displays the configuration of the system hardware, software version, names and sources of configuration files, and boot images
© 2002, Cisco Systems, Inc. All rights reserved.
ICND v2.0—1-17
Switch show running-configuration Command
Catalyst 1924 Switch
wg_sw_a#show running-configuration wg_sw_a#show running-configuration Building configuration... Building configuration... Current configuration: Current configuration: ! ! hostname "wg_sw_c" hostname "wg_sw_c" ! ! ip address 10.1.1.33 255.255.255.0 ip address 10.1.1.33 255.255.255.0 ip default-gateway 10.3.3.3 ip default-gateway 10.3.3.3 ! ! interface Ethernet 0/1 interface Ethernet 0/1 <text omitted> <text omitted> interface Ethernet 0/24 interface Ethernet 0/12 ! ! Interface Ethernet 0/25 Interface Ethernet 0/25 ! ! interface FastEthernet 0/26 interface FastEthernet 0/26 ! ! interface FastEthernet 0/27 interface FastEthernet 0/27
Configuring the Switch IP Address
wg_sw_a(config)#ip address {ip address} {mask}
Example:
wg_sw_a(config)#ip address 10.5.5.11 255.255.255.0
© 2002, Cisco Systems, Inc. All rights reserved.
ICND v2.0—1-10
Switch Command-Line Help Facilities
Context-Sensitive Help
Provides a list of commands and the arguments associated with a specific command
© 2002, Cisco Systems, Inc. All rights reserved.
ICND v2.0—1-3
Initial Startup of the Catalyst Switch
• System startup routines initiate switch software. • Initial startup uses default configuration parameters.
Catalyst 2950 Switch LED Indicators
© 2002, Cisco Systems, Inc. All rights reserved.
ICND v2.0—1-6
Port LEDs During Switch POST
1. At the start, all port LEDs are green. 2. Each LED turns off after its test completes. 3. If a test fails, its LED turns amber. 4. System LED turns amber if any test fails. 5. If no test fails, POST completes. 6. On POST completion, LEDs blink, then turn off.
© 2002, Cisco Systems, Inc. All rights reserved.
ICND v2.0—1-7
Initial Bootup Output from the Catalyst 1900 Switch
© 2002, Cisco Systems, Inc. All rights reserved.
wg_sw_a#show ip • Displays the IP address, subnet mask, and default gateway
© 2002, Cisco Systems, Inc. All rights reserved. ICND v2.0—1-16
Switch show version Command
ICND v2.0—1-2
2
Objectives
Upon completing this lesson, you will be able to:
• Start an access layer switch and recognize the normal boot sequence • Use the command-line interface to interact with the Cisco IOS software, given an operational access layer switch • Use the online help facilities associated with the command-line interfaces, given an operational access layer switch
wg_sw_a#show running-configuration
• Displays the switch’s current active configuration file
wg_sw_a#show interfaces • Displays statistics for all interfaces configured on the switch
© 2002, Cisco Systems, Inc. All rights reserved.
ICND v2.0—1-4
Catalyst 1900 Switch LED Indicators
© 2002, Cisco Systems, Inc. All rights reserved.
ICND v2.0—1-5
wg_sw_a#show version Cisco Catalyst 1900/2820 Enterprise Edition Software Version V8.01.01 written from 171.068.229.225 Copyright (c) Cisco Systems, Inc. 1993-2001 wg_sw_c uptime is 15day(s) 21hour(s) 53minute(s) 11second(s) cisco Catalyst 1900 (486sxl) processor with 2048K/1024K bytes of memory Hardware board revision is 5 Upgrade Status: No upgrade currently in progress. Config File Status: No configuration upload/download is in progress 27 Fixed Ethernet/IEEE 802.3 interface(s) Base Ethernet Address: 00-50-BD-73-E2-C0
Console Error Messages
Identifies problems with any switch commands that are incorrectly entered so that you can alter or correct them
Command History Buffer Allows recall of long or complex commands or entries for reentry, review, or correction
© 2002, Cisco Systems, Inc. All rights reserved.
Starting a Switch
©© 2002, 2002, Cisco Cisco Systems, Systems, Inc. Inc. All All rights rights reserved. reserved.
© 2002, Cisco Systems, Inc. All rights reserved.
ICND v2.0—1-9
Logging In to the Switch and Entering the Enable Password
© 2002, Cisco Systems, Inc. All rights reserved.
ICND v2.0—1-12
Configuring Switch Identification