CISCO交换机问题解答
“毓红悦”通过精心收集,向本站投稿了8篇CISCO交换机问题解答,这里小编给大家分享一些CISCO交换机问题解答,方便大家学习。
篇1:CISCO交换机问题解答
各位大虾:
在下在调试网络的时候遇到了一个问题,请各位大虾解答下,
网络拓扑是这样的 在一楼有个总监控室 安装一台CISCO 2918 的48口
交换机,在2楼有两台CISCO的2918系列的24口交换机,分别有大概15个左右的监控摄像头,两台交换机分别和一楼的48口交换机连接,
5楼一台CISCO的2918系列的24口交换机有20个监控摄像头,和一楼交换机直接连接。 10楼一台2918的 48口交换机 连接有35个摄像头和5楼的交换机连接。 10楼到5楼用的是100兆的端口,5楼到一楼用的是1000兆的端口。2楼到一楼用的都是100兆的端口。连接上去后在获取图象的时候5楼和10楼有十多个图片获取不到,而且这几个图象也不固定 轮流变换的 。 CISCO交换机连接摄像头的端口灯变暗后成橙黄色的灯,轮流换。
篇2:cisco交换机命令
cisco交换机命令
1.在基于IOS的交换机上设置主机名/系统名:
switch(config)# hostname hostname
在基于CLI的交换机上设置主机名/系统名:
switch(enable) set system name name-string
2.在基于IOS的交换机上设置登录口令:
switch(config)# enable password level 1 password
在基于CLI的交换机上设置登录口令:
switch(enable) set password
switch(enable) set enalbepass
3.在基于IOS的交换机上设置远程访问:
switch(config)# interface vlan 1
switch(config-if)# ip address ip-address netmask
switch(config-if)# ip default-gateway ip-address
在基于CLI的交换机上设置远程访问:
switch(enable) set interface sc0 ip-address netmask
broadcast-address
switch(enable) set interface sc0 vlan
switch(enable) set ip route default gateway
4.在基于IOS的交换机上启用和浏览CDP信息:
switch(config-if)# cdp enable
switch(config-if)# no cdp enable
为了查看Cisco邻接设备的CDP通告信息:
switch# show cdp interface [type modle/port]
switch# show cdp neighbors [type module/port] [detail]
在基于CLI的交换机上启用和浏览CDP信息:
switch(enable) set cdp {enable|disable} module/port
为了查看Cisco邻接设备的CDP通告信息:
switch(enable) show cdp neighbors[module/port]
[vlan|duplex|capabilities|detail]
5.基于IOS的交换机的端口描述:
switch(config-if)# description description-string
基于CLI的交换机的端口描述:
switch(enable)set port name module/number
description-string
6.在基于IOS的交换机上设置端口速度:
switch(config-if)# speed{10|100|auto}
在基于CLI的交换机上设置端口速度:
switch(enable) set port speed moudle/number
{10|100|auto}
switch(enable) set port speed moudle/number {4|16|auto}
7.在基于IOS的交换机上设置以太网的链路模式:
switch(config-if)# duplex {auto|full|half}
在基于CLI的交换机上设置以太网的链路模式:
switch(enable) set port duplex module/number {full|half}
8.在基于IOS的交换机上配置静态VLAN:
switch# vlan database
switch(vlan)# vlan vlan-num name vla
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(config-if)# end
在基于CLI的交换机上配置静态VLAN:
switch(enable) set vlan vlan-num [name name]
switch(enable) set vlan vlan-num mod-num/port-list
9. 在基于IOS的交换机上配置VLAN中继线:
switch(config)# interface interface mod/port
switch(config-if)# switchport mode trunk
switch(config-if)# switchport trunk encapsulation
{isl|dotlq}
switch(config-if)# switchport trunk allowed vlan remove
vlan-list
switch(config-if)# switchport trunk allowed vlan add
vlan-list
在基于CLI的交换机上配置VLAN中继线:
switch(enable) set trunk module/port
[on|off|desirable|auto|nonegotiate]
Vlan-range [isl|dotlq|dotl0|lane|negotiate]
10.在基于IOS的交换机上配置VTP管理域:
switch# vlan database
switch(vlan)# vtp domain domain-name
在基于CLI的交换机上配置VTP管理域:
switch(enable) set vtp [domain domain-name]
11.在基于IOS的交换机上配置VTP 模式:
switch# vlan database
switch(vlan)# vtp domain domain-name
switch(vlan)# vtp {sever|cilent|transparent}
switch(vlan)# vtp password password
在基于CLI的交换机上配置VTP 模式:
switch(enable) set vtp [domain domain-name] [mode{
sever|cilent|transparent }][password password]
12. 在基于IOS的交换机上配置VTP版本:
switch# vlan database
switch(vlan)# vtp v2-mode
在基于CLI的交换机上配置VTP版本:
switch(enable) set vtp v2 enable
13. 在基于IOS的交换机上启动VTP剪裁:
switch# vlan database
switch(vlan)# vtp pruning
在基于CL I 的交换机上启动VTP剪裁:
switch(enable) set vtp pruning enable
14.在基于IOS的交换机上配置以太信道:
switch(config-if)# port group group-number [distribution
{source|destination}]
在基于CLI的交换机上配置以太信道:
switch(enable) set port channel moudle/port-range
mode{on|off|desirable|auto}
15.在基于IOS的交换机上调整根路径成本:
switch(config-if)# spanning-tree [vlan vlan-list] cost
cost
在基于CLI的交换机上调整根路径成本:
switch(enable) set spantree portcost moudle/port cost
switch(enable) set spantree portvlancost moudle/port
[cost cost][vlan-list]
16.在基于IOS的交换机上调整端口ID:
switch(config-if)# spanning-tree[vlan
vlan-list]port-priority port-priority
在基于CLI的交换机上调整端口ID:
switch(enable) set spantree portpri
{mldule/port}priority
switch(enable) set spantree portvlanpri
{module/port}priority [vlans]
17. 在基于IOS的交换机上修改STP时钟:
switch(config)# spanning-tree [vlan vlan-list]
hello-time seconds
switch(config)# spanning-tree [vlan vlan-list]
forward-time seconds
` switch(config)# spanning-tree [vlan vlan-list] max-age
seconds
在基于CLI的交换机上修改STP时钟:
switch(enable) set spantree hello interval[vlan]
switch(enable) set spantree fwddelay delay [vlan]
switch(enable) set spantree maxage agingtiame[vlan]
18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:
switch(config-if)#spanning-tree portfast
在基于CLI的交换机端口上启用或禁用Port Fast 特征:
switch(enable) set spantree portfast
{module/port}{enable|disable}
19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:
switch(config)# spanning-tree uplinkfast
[max-update-rate pkts-per-second]
在基于CLI的交换机端口上启用或禁用UplinkFast 特征:
switch(enable) set spantree uplinkfast
{enable|disable}[rate update-rate] [all-protocols
off|on]
20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,
然后使用下列命令:
switch(config)# cluster enable cluster-name
21. 为了从一条中继链路上删除VLAN,可使用下列命令:
switch(enable) clear trunk module/port vlan-range
22. 用show vtp domain 显示管理域的VTP参数.
23. 用show vtp statistics显示管理域的VTP参数.
篇3:cisco交换机常用协议
交换机有3种交换方式:存储转发,快速转发和分段转发,
1.CSMA/CD(带冲突检测的载波监听多路访问)
工作原理:发送前先监听信道是否空闲,若空闲则立即发送,在发送时边发边监听,若监听到冲突,则立即停止发送,等待一段随机时间,在重新发送。
2.CDP:当cisco设备启动是,CDP会自动启动,是的网络管理员能获得有关直连设备的摘要信息,CDP运行于数据链路层。
3.中继链路:trunk虚拟链路,全球设备通用802.1q(虚拟桥接局域网标准),
4.DTP(动态中继协议):cisco专有协议,它只能用于交换机和路由器指尖的中继链路,同时支持ISL和802.1q两种中继协议自动协商。
5.BPDU(桥接协议数据单元),被生成树算法用来决定网络拓扑结构的信息,用来交换网桥ID,根路径成本。
6.VTP协议:一种消息协议,使用第2层帧,在全网的基础上管理vlan的添加,删除和重命名,以实现vlan配置的一致性。
7.STP(spanning tree protocol,生成树协议),在逻辑上断开网络的环路,防止广播风暴的产生,而一旦正在使用的线路出现故障,被逻辑上断开的线路又被连通,继续传输数据。
8.PVST:为每个虚拟局域网运行单独的生成树协议实例,有负载均衡的作用。
篇4:cisco交换机常用命令
交换机命令
switch>用户模式
1:进入特权模式 enable
switch>enable
switch#
2:进入全局配置模式 configure terminal
switch>enable
switch#configure terminal
switch(conf)#
3:交换机命名 hostname aptech2950 以aptech2950为例
switch>enable
switch#configure terminal
switch(conf)#hostname aptch-2950
aptech2950(conf)#
4:配置使能口令 enable password cisco 以cisco为例
switch>enable
switch#configure terminal
switch(conf)#hostname aptch2950
aptech2950(conf)# enable password cisco
5:配置使能密码 enable secret ciscolab 以cicsolab为例
switch>enable
switch#configure terminal
switch(conf)#hostname aptch2950
aptech2950(conf)# enable secret ciscolab
8:查看命令 show
switch>enable
switch# 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>enable
switch# erase startup-configure
switch# reload
10:双工模式设置
switch>enable
switch#configure terminal
switch2950(conf)#hostname aptch-2950
aptech2950(conf)# interface fastehernet 0/17 以17端口为例
aptech2950(conf-if)#duplex full/half/auto 有full , half, auto 三个可选项
11:cdp相关命令
switch>enable
switch# show cdp 查看设备的cdp全局配置信息
show cdp interface fastethernet 0/17 查看17端口的cdp配置信息
show cdp traffic 查看有关cdp包的统计信息
show cdp nerghbors 列出与设备相连的cisco设备
12:csico2950的密码恢复
拔下交换机电源线,
cisco交换机常用命令
,
用手按着交换机的MODE键,插上电源线
在switch:后执行flash_ini命令:switch: flash_ini
查看flash中的文件: switch: dir flash:
把“config.text”文件改名为“config.old”: switch: rename flash: config.text flash: config.old
执行boot: switch: boot
交换机进入是否进入配置的对话,执行no :
进入特权模式察看flash里的文件: show flash :
把“config.old”文件改名为 “config.text”: switch: rename flash: config.old flash: config.text
把“config.text”拷入系统的“running-configure”: copy flash: config.text system : running-configure
把配置模式重新设置密码存盘,密码恢复成功。
本文出自 “网络珍藏笔记”
篇5:cisco交换机Telnet配置
cisco交换机Telnet配置
switch>en ;第一次密码为空
switch#conf t ;进入全局配置模式
switch(config)#hostname swa ;设置交换机名
swa(config)#enable secret 456 ;设置特权加密口令为(即:从普通模式进入特权(en)模式的口令为:456)
swa(config)#enable password 789 ;设置特权非密口令为:789
swa(config)#line console 0 ;进入控制台口(Rs232)
swa(config-line)#password 999 ;设置登录口令为:999(即:登录到交换机的配置状态,就是普通用户模式啦)举个例子加入你现在在特权(en)模式想返回到普通模式下,呵呵是要输入这个密码的,
swa(config-line)#login ;登录要求口令验证
swa(config-line)#line vty 0 4 ;进入虚拟终端virtual tty
swa(config-line)#password 123 ;设置登录口令(即:从远程pc机Telnet到交换机时代登录口令为:123)
swa(config-line)#login ;登录要求口令验证
swa(config-line)#exit ;返回上一层
swa(config)#exit ;返回上一层
swa#sh run ;看配置信息
swa#exit ;返回命令 (注:1.蓝色字体的配置可以省略 2.另外:一般都是配enable secret 因为安全度高,如果你同时配了enable secret和enable password的时候,后者就失效了,登陆的时候,只需输入enable secret的密码即可,
)
在配置之前要还要给交换机配置管理IP.配置如下 RA#
RA#conf t
RA(config)#interface vlan 1
RA(config-if)#ip address 192.168.2.100 255.255.255.0
RA(config-if)#no shutdown %LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
RA(config-if)#exit
RA(config)#exit
RA#
篇6:cisco交换机snmp设置命令
,
具体配置命令如下:
Switch(config)#snmp-server community public ro #设置只读字符串,public为团体名称,ro为只读
Switch(config)#snmp-server enable traps #启用snmp陷井,允许路由器将所有类型SNMP Trap发送出去
Switch(config)#snmp-server enable traps snmp authentication #snmp trap 验证
Switch(config)#snmp-server host *.*.*.* version 2c public # SNMP采用版本2,public作为团体名称
Switch(config)#snmp-server host *.*.*.* traps public# 指定SNMP Trap的接收者为192.68.98.166,发送Trap时采用public作为团体名称
Switch(config)#snmp-server trap-source vlan 1 #设置vlan1虚接口IP地址做为为snmp trap信息的发布地址
Switch(config)#end
篇7:cisco交换机DHCP服务器配置浅谈
cisco交换机DHCP服务器配置是我们接下来主要讲解的内容, 那么通过这篇文章,我们就能对此有一个比较前面的了解了。所谓的DHCP就是Dynamic Host Configuration Protocol的缩写,即动态主机配置协议,它是TCP/IP协议簇中的一种,主要作用给网络中其他电脑动态分配IP地址之用。
纯粹地谈DHCP协议也许大家会觉得很陌生,但是说到“自动获取IP地址”,各位有装机经验的朋友可能就比较熟悉了。在windows 下,我们打开“本地连接 属性”对话框之后,双击“internet 协议 (TCP/IP)”,打开“internet 协议 (TCP/IP) 属性”对话框中,就有一项“自动获得 IP 地址”(当然我们也可以直接指定固定IP给电脑)。然而为什么我们可以使电脑来自动获取IP呢?试想一下,如果每台电脑可以自动获取任意IP的话,那岂不是IP地址严重冲突,网络世界大乱。然而现实生活中使用自动获取IP的网络并没有象我们想象中的一片混乱,为什么呢?原因就是在我们的网络中存在这一个 DHCP服务器,这个DHCP服务器管理着网络中的IP地址资源,使得各IP地址合理地分配给网络中的每一台有需要的主机。
为什么我们有时候需要DHCP服务器来使IP自动分配呢?举个例子来说明一下:假如在某单位中有400台电脑,但是在任何一个时刻,要上网的电脑不会超过255台。如果使用固定IP的话,那么我们就需要为这个单位申请400个IP才够用;但是如果我们使用动态IP分配的话,我们只要申请255个 IP就已经足够了,节省了145个IP资源的费用。DHCP服务就是特别试用于这种IP资源使用密度不高的情况。
然而,常规的方法来讲,需要专门配置一台服务器来做DHCP服务器,这样无疑又增加了网络耗费,
据笔者的经验,有时在一些网络低层设备中(如路由器、交换机等)里面整合了DHCP服务,一般的小型网络里,我们完全可以利用网络中的这些网络设备是上的DHCP服务来配置我们自己的DHCP服务器,而不需要另外专门配置一台服务器来做DHCP服务。下面我就以cisco交换机(其他款交换机没试过)为例子,说说具体做法:
假设在某网络中有400台主机,其中申请了255个以供分配的IP,其范围从202.38.X.0~202.38.X.254,其中 202.38.X.1是用来分配给网关的,该网络里有三台服务器A、B、C,其需要固定的IP,分别为202.38.X.2、202.38.X.3、202.38.X.4,其他的所有IP均供动态分配之用。cisco交换机DHCP服务器配置网络拓扑结构如下:
telnet登陆上交换机,进入交换机命令行;
启动DHCP服务:service DHCP
对于要固定分配的IP,我们需要先将其约定出来:ip dhcp exclude-address 202.38.X.2 202.38.X.3 202.38.X.4
在分配地址前,先将测试一下该地址,如果该地址有人在用,则分配其他地址,避免IP地址的冲突:
ip dhcp ping packets 3
设置DHCP地址池全局变量:ip dhcp pool 1
设置动态分配的IP地址范围、子网掩码:
network 202.38.X.0 255.255.255.0 //动态分配IP范围,这里给定的是202.38.X.0到255.255.255.0,也就是该段所有IP
设置网关:default-router 202.38.X.1
设置DNS服务器地址: dns-server 202.38.193.33 202.112.17.33
就这么简单,一个cisco交换机DHCP服务器配置完成了。请注意,并不是所有的交换机上都带有了DHCP服务,笔者使用的是cisco交换机,所以请大家购买的时候根据用途多加注意了。
篇8:cisco交换机端口隔离的实现
现在网络安全要求也越来越多样化了,一个局域网有时候也希望用户不能互相访问(如小区用户),只能和网关进进行通讯,H3C交换机可以用端口隔离来实现,下面给大家介绍一下在cisco的交换机上面如何来实现这样的(端口隔离)需求。
在cisco 低端交换机中的实现方法:
1.通过端口保护(Switchitchport protected)来实现的。
2.通过PVLAN(private vlan 私有vlan)来实现.
主要操作如下:
相对来说cisco 3550或者2950交换机配置相对简单,进入网络接口配置模式:
Switch(config)#int range f0/1 - 24 #同时操作f0/1到f0/24口可根据自己的需求来选择端口
Switch(config-if-range)#Switchitchport protected #开启端口保护
ok...到此为止,在交换机的每个接口启用端口保护,目的达到.
由于4500系列交换机不支持端口保护,可以通过PVLAN方式实现。
主要操作如下:
交换机首先得设置成transparents模式,才能完成pvlan的设置。
首先建立second Vlan 2个
Switch(config)#vlan 101
Switch(config-vlan)#private-vlan community
###建立vlan101 并指定此vlan为公共vlan
Switch(config)vlan 102
Switch(config-vlan)private-vlan isolated
###建立vlan102 并指定此vlan为隔离vlan
Switch(config)vlan 200
Switch(config-vlan)private-vlan primary
Switch(config-vlan)private-vlan association 101
Switch(config-vlan)private-vlan association add 102
###建立vlan200 并指定此vlan为主vlan,同时制定vlan101以及102为vlan200的second vlan
Switch(config)#int vlan 200
Switch(config-if)#private-vlan mapping 101,102
###进入vlan200 配置ip地址后,使second vlan101与102之间路由,使其可以通信
Switch(config)#int f3/1
Switch(config-if)#Switchitchport private-vlan host-association 200 102
Switch(config-if)#Switchitchport private-vlan mapping 200 102
Switch(config-if)#Switchitchport mode private-vlan host
###进入接口模式,配置接口为PVLAN的host模式,配置Pvlan的主vlan以及second vlan,一定用102,102是隔离vlan
至此,配置结束,经过实验检测,各个端口之间不能通信,但都可以与自己的网关通信,
注:如果有多个vlan要进行PVLAN配置,second vlan必须要相应的增加,一个vlan只能在private vlan下作为 second vlan。
来自中国IT实验室
【CISCO交换机问题解答】相关文章:
5.面试问题解答思路
6.留美热点问题解答






文档为doc格式