Cisco2960交换机的基础安装配置教程

合集下载

思科2960初始化配置 CONSOLE口

思科2960初始化配置 CONSOLE口

思科2960初始化配置CONSOLE口VTY(virtual type terminal)虚拟终端连接line vty 0 4 // VTY是路由器的远程登陆的虚拟端口,0 4表示可以同时打开5个会话1. 建立PC到路由器的物理连接,用RS232 CONSOLE线(随交换机带)连接路由器CONSOLE 接口和PC的COM口。

2. 在计算机上使用超级终端:打开“开始-程序-附件-通讯-超级终端—新建超级终端”,首先为新建连接设置名称。

然后,设置连接用端口,一般选择COM1,再设置连接参数,设置参数如下:每秒位数为9600,数据位为8,奇偶校验为无,停止位为1,数据流控制为Xon/Xoff。

不可搞错了!3. 等待30秒,回车,出现人机对话界面Would you like to enter the initial configuration dialog? [yes/no]: 是否按提示步骤操作% Please answer yes or no.Would you like to enter the initial configuration dialog? [yes/no]: n 输入n(自己手工设置)Press RETURN to get started!Switch> 首先看到的是用户模式Switch>en 输入en(即enable)进入特权模式Switch#conf t 进入配置模式Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname sw2960 给交换机命名sw2960(config)#enable secret Cisco 设置特权加密口令sw2960(config)#enable password Cisco 给交换机配置特权管理口令(明码的)sw2960(config)#line consle 0 进入控制台口(RS232)sw2960(config-line)#password Cisco 设置登录口令sw2960(config-line)#login 登录要求口令验证sw2960(config-line)#exit 退出到上级目录sw2960(config)#line vty 0 4 给交换机开启远程管理sw2960(config-line)#pass Cisco! 设置远程管理口令sw2960(config-line)#login 允许远程登陆sw2960(config-line)#exit 退出到上级目录sw2960(config)#int vlan 1 进入vlan1 接口sw2960(config-if)#no shut 开启此接口1y13w: %LINK-3-UPDOWN: Interface Vlan1, changed state to up1y13w: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to upsw2960(config-if)#ip add 192.168.1.2 255.255.255.0 设置此接口地址sw2960(config-if)#exit 退出到上一层sw2960(config-if-range)#exit 退出到上一级目录sw2960(config)#show run 查看配置信息sw2960(config)#end 退到根目录sw2960#write 保存配置切记!必须保存,否则重新启动后设置丢失!4d00h: %SYS-5-CONFIG_I: Configured from console by consoleBuilding configuration...[OK] (保存好了,已经生效)重新启动交换机之后就可以通过浏览器输入IP地址进行访问或设置了,也可通过思科专业软件思科网络助理4.0中文版设置。

Cisco 2960X系列交换机配置指南说明书

Cisco 2960X系列交换机配置指南说明书

Configuring the Cisco 2960X Series of Switches for Livewire®October 2016IntroductionPlease note that this document applies o nly t o the Cisco 2960X series of switches. While some of these settings will work with other switches, using these commands to program switches not in this series could yield unintended results.This document is not intended to be an all-inclusive or even a step-by-step manual on how to configure this switch but is provided as a guide and makes some basic assumptions regarding the skill level of person doing the programming. If you are not comfortable hooking up serial cables, assigning IP addresses, typing in a command line interfaces, etc, you should contact your IT department for assistance.If this is the first time the switch has been configured, you will have to connect to the switch via a console cable and serial connection to enter into setup. After initial configuration of the switch, you can connect to the switch either via a Telnet session, or through a serial port.During the initial setup, you will assign the switch an IP address, which will then allow you to connect to the switch via a Telnet session at a later time.You can connect to this switch using a usb cable and a serial port driver from Cisco. As of the date of this writing the usb driver can be obtained from the C isco website. Make sure you install the driver before connecting the switch to your USB ports. This will install a new COM port on your computer. PuTTy is a free terminal program that can be used for configuration and can be downloaded h ere.ConfigurationThis switch has been tested and the configuration is based on the following;Cisco model: WS-C2960X-24TS-LVersion ID: V02Software: 15.0(2)EX5ProgrammingOnce connected with the serial cable (default settings are 9600 baud), you should be able to see messages on the screen as the switch boots. This will confirm that your serial cable is working correctly. If you are prompted to enter any setup wizards, please answer ‘No’.A couple of other notes that might be helpful:1)Many commands can be abbreviated and just need to be disambiguous. For example, the‘e nable’command is often abbreviated as ‘e n’ a nd‘configure terminal’ i soften abbreviated as‘config t’. All commands can be abbreviated.2)The TAB key completes a work and checks it for correctness. For example, if you type ‘e n’ andthen press TAB it will spell out the word ‘e nable’.3)The # (pound or hash sign) indicates you are in privileged mode. For example, if your promptsays S witch>and you try to type c onfig t, you will receive and error because you arenot in privileged mode. Typing the e nable command will give you the S witch#promptindicating privileged mode.SET THE PASSWORDSWe suggest using a password of ‘Livewire’ or some other password that is easy to remember. Switch>enableSwitch#configure terminalSwitch(config)#username AAAA password LivewireSwitch(config)#enable password AxiaSET THE HOSTNAMEWe suggest setting the hostname of each switch to something descriptive. Suggestions might be AXIA CORE01, or AXIAEDGE01, etc. In this example we will use AXIA01.To change the hostname from the default of ‘Switch’, type the following from the prompt;Switch(config)#hostname AXIA01AXIA01(config)#SET THE IP ADDRESS ON VLAN 1By default Livewire uses Vlan 1. It may be possible to use other Vlans however, support for that is outside of the scope of this document. Please contact your Cisco dealer or Cisco for support on using other Vlans.A Word About IP AddressingBy default the IGMP Querier will be the lowest IP address switch in the subnet. For this reason, it is important to set your core switch lower than any other switch. Note, that this includes any Power Station, QOR, or xSwtich as well.To set the IP address, type the following from the prompt (replace the IP address shown with one that is appropriate to your configuration):AXIA01(config)#interface vlan1AXIA01(config-if)#ip address 192.168.2.2 255.255.255.0AXIA01(config-if)#endLet’s save our configuration:AXIA01#wrBuilding configuration...[OK]AXIA01#CONFIGURE IGMPTo configure IGMP, type the following from the prompt:AXIA01#config terminalAXIA01(config)#ip igmp snooping querierAXIA01(config)#ip igmp snooping vlan 1 immediate-leaveAXIA01(config)#ip igmp snooping querier max-response-time 25AXIA01(config)#ip igmp snooping querier timer expiry 205CONFIGURING GLOBAL QoSAXIA01(config)#m ls qos srr-queue output cos-map queue 1 threshold 1 6 7AXIA01(config)#m ls qos srr-queue output cos-map queue 2 threshold 1 5AXIA01(config)#m ls qos srr-queue output cos-map queue 3 threshold 1 0 1AXIA01(config)#m ls qos srr-queue output dscp-map queue 1 threshold 1 48AXIA01(config)#m ls qos srr-queue output dscp-map queue 2 threshold 1 46AXIA01(config)#m ls qos srr-queue output dscp-map queue 3 threshold 1 0AXIA01(config)#m ls qos map cos-dscp 0 8 16 24 32 46 48 56AXIA01(config)#m ls qos queue-set output 1 buffers 20 70 5 5AXIA01(config)#m ls qosAXIA01(config)#e ndAXIA01#wrBuilding configuration...[OK]AXIA01#CONFIGURING ACCESS PORTSAccess ports are used for connecting “end point” devices like Axia nodes, engines, computers, as well as any other devices that are not considered “switches” (see note in trunk port configuration section). T o configure multiple access ports at once, type the following from the prompt:*Note - Replace G igabitEthernet1/0/1 - 22 w ith the ports that are appropriate to your configuration. In this example we are configuring ports 1 thru 24 as access ports.AXIA01#config terminalAXIA01(config)#interface range GigabitEthernet1/0/1 - 22AXIA01(config-if-range)#switchport mode accessAXIA01(config-if-range)#switchport nonegotiateAXIA01(config-if-range)#switchport voice vlan dot1pAXIA01(config-if-range)#priority-queue outAXIA01(config-if-range)#spanning-tree portfastAXIA01(config-if-range)#mls qos trust dscp *SEE NOTE BELOW*AXIA01(config-if-range)#no ip igmp snooping tcn floodAXIA01(config-if-range)#end*NOTE* - for Engine, iPort, VX, or Omnia 8x versions o lder than 2011-06-15 use “mls qos trust cos” Alternately, to configure a single access port, type the following from the prompt:*Note - Replace G igabitEthernet1/0/1 w ith the port that is appropriate to your configuration. In this example we are configuring port 1 as an Access port.AXIA01#config terminalAXIA01(config)#interface GigabitEthernet1/0/1AXIA01(config-if)#switchport mode accessAXIA01(config-if)#switchport nonegotiateAXIA01(config-if)#switchport voice vlan dot1pAXIA01(config-if)#priority-queue outAXIA01(config-if)#spanning-tree portfastAXIA01(config-if)#mls qos trust dscp *SEE NOTE BELOW*AXIA01(config-if)#no ip igmp snooping tcn floodAXIA01(config-if)#end*NOTE* - for Engine, iPort, VX, or Omnia 8x versions o lder than 2011-06-15 use “mls qos trust cos”CONFIGURING TRUNK PORTSTrunk ports are used for connecting other switches or Axia devices with switches built in (like a PowerStation Main or QOR or xSwitch). Please note that when connecting to a PowerStation Main, only the GIG ports can be used and they must be properly configured for Trunk operation in the Ethernet Switch configuration of the Element Control Center. QOR based devices and xSwitch should only be connected to the GIG Ports.T o configure multiple trunk ports at once, type the following from the prompt:*Note - Replace G igabitEthernet1/0/23 - 24 w ith the ports that are appropriate to yourconfiguration. In this example we are configuring ports 23 and 24 for Trunk.AXIA01#config tAXIA01(config)#interface range GigabitEthernet1/0/23 - 24AXIA01(config-if-range)#switchport mode trunkAXIA01(config-if-range)#priority-queue outAXIA01(config-if-range)#mls qos trust dscpAXIA01(config-if-range)#endAXIA01#Alternately, to configure a single trunk port, type the following from the prompt:*Note - Replace G igabitEthernet1/0/23 w ith the port that is appropriate to your configuration. In this example we are configuring port 23 for Trunk.AXIA01#config tAXIA01(config)#interface GigabitEthernet1/0/23 - 24AXIA01(config-if)#switchport mode trunkAXIA01(config-if)#priority-queue outAXIA01(config-if)#mls qos trust dscpAXIA01(config-if)#endAXIA01#wrBuilding configuration...[OK]AXIA01#CONFIGURING TELNET ACCESSTo configure telnet access, type the following from the prompt:AXIA01#configure terminalAXIA01(config)#line vty 0 15AXIA01(config-line)#password LivewireAXIA01(config-line)#loginAXIA01(config-line)#endAXIA01#wrBuilding configuration...[OK]AXIA01#CHECK YOUR CONFIGURATIONTo check your switch configuration, type the following from the prompt:AXIA01#show run。

思科Catalyst2960 初始化配置

思科Catalyst2960 初始化配置

思科 Catalyst 2950/2960 初始化配置新购的思科交换机往往都没有说明书,要进行初始化配置,一般都需要专业的网络工程师,通过用CISCO随机带CONSOLE线,一端连在CISCO交换机的CONSOLE 口,一端连在计算机的COM口进行设置,这个我们下次再谈,先谈谈菜鸟级的配置。

实际上思科 Catalyst 2950/2960 已经具备了WEB的初始化设置功能,只是没有说明书或者是全英文的说明书,很多人不太了解,我们现在就讲讲这个,以方便非网络专业人员学习和设置。

第一步:交换机通电,各LED灯会依次不停的闪烁,等待3分钟。

第二步:等各LED灯无变化后,按下MODE按钮3-4秒不松,待MODE按钮上面的LED灯全亮后松开MODE按钮这个时候,交换机已经进入了设置状态第三步:将你的计算机网卡设置为自动获取IP地址,并打开DHCP第四步:将网络线(直通线)一头接到计算机的网卡,另一头接到交换机的1X 口,(注意:一定要1X口,其他口不行)这个时候你可以在计算机输入命令,CMD / ipconfig 你可以发现,你计算机取到的ip地址是 10.0.0.2如果不是,请重新从第一步开始。

第五步:打开计算机的浏览器,输入10.0.0.1 即可出现交换机的配置窗口,我的2960配置窗口居然还是全中文的,好爽。

第六步:依次按说明输入交换机的ip地址、子网掩码、网关、交换机名称、密码,以及远程telnet管理密码,点提交即可。

第七步:交换机将重新启动,按新的ip连接交换机即可。

整个初始化配置完成,是不是很简单,接下来你有三种方式进入交换机。

1. 还是通过计算机的COM口连接到交换机的CONSOLE口,这个我们下次再谈2. 通过计算机上的浏览器输入交换机的ip地址,输入交换机密码进入3. 通过计算机超级终端TCP/IP方式进入,输入交换机密码进入远程管理密码进入今天就到这里,下次我们谈谈通过CONSOLE口的配置。

CISCO Catalyst 2960G

CISCO Catalyst 2960G

图1-4
六、配置交换机 使用TELNET命令后,进入交换机按图1-5步骤(a-g)进行配制
图1-5
七、注意事项
1、使用思科的交换机,我们所有CI板卡的组播地址都不能使用224.0.0.X网段。请注意, 公司出库的所有CI板卡,默认使用224.0.1.X网段。 2、配置时请务必确认输入的命令无误(因为输入的命令是否正确,执行后是没有提示的), 防止命令输入错误可采用交换机命令行的“联想”功能,即输入命令的首字母后,按 “Tab”键,可联想出以该字母开头的命令,如图1-6
图1-6
2007-5-16 MADE BY 1232
பைடு நூலகம்
重启时间较长,请耐心等待, SYST和STAT两个LED灯常亮 两个LED灯常亮, 重启时间较长,请耐心等待,待SYST和STAT两个LED灯常亮,表 明交换机已经启动)。
二、进入快速设置模式 交换机启动后,按住模式按钮3秒钟左右,模式按钮上方 的所有LED灯都变为绿色时,松开模式按钮,此时交换机处于快 速设置模式(必须确认交换机处于此状态,否则无法继续进行操 作)。 三、连接 将主机的IP地址设置为自动获取,使用一根直通的网线将 其连接在交换机的任意一个端口上,并确认两个网口上的LED灯 都是绿色的(确保能正常通信)。
CISCO Catalyst 2960G Series 交换机配置组播的 步骤
一、重置交换机 如果是新打开包装的交换机可跳过此步骤,此步骤适用于忘 记配置或无法进入快速设置模式的交换机。 在交换机前面板的左侧,找到模式选择面板(如图1-1), 一直按住模式按钮,大约3秒中后交换机的LED开始闪烁,继续按 住模式按钮,大约再过7秒后LED停止闪烁,松手后交换机重新启 此操作会删除交换机配置,并使交换机重启, 动(注:此操作会删除交换机配置,并使交换机重启,交换机

2960开局配置

2960开局配置

2960开局配置.txt心态决定状态,心胸决定格局,眼界决定境界。

当你的眼泪忍不住要流出来的时候,睁大眼睛,千万别眨眼,你会看到世界由清晰到模糊的全过程。

Would you like to enter the initial configuration dialog? [yes/no]: 是否按提示步骤操作% Please answer 'yes' or 'no'.Would you like to enter the initial configuration dialog? [yes/no]: n 输入n(自己手工一点点的设置)Press RETURN to get started!Switch> 首先看到的是用户模式Switch>en 输入en(即enable)进入特权模式1y13w: %LINK-5-CHANGED: Interface Vlan1, changed state to administratively down 1y13w: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down Switch#conf t 进入配置模式Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname xy_c2950t24_e0201 给交换机命名xy_c2950t24_e0201(config)#enable password Cisco 给交换机配置管理口令(明码的)xy_c2950t24_e0201(config)#line vty 0 4 给交换机开启远程管理xy_c2950t24_e020(config-line)#pass Cisco! 设置远程管理口令xy_c2950t24_e020(config-line)#login 允许远程登陆xy_c2950t24_e020(config-line)#exit 退出到上级目录xy_c2950t24_e0201(config)#int vlan 1 进入vlan1 接口xy_c2950t24_e0201(config-if)#no shut 开启此接口1y13w: %LINK-3-UPDOWN: Interface Vlan1, changed state to up1y13w: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up xy_c2950t24_e0201(config-if)#ip add 172.25.161.22 255.255.255.0 设置此接口地址xy_c2950t24_e0201(config-if)#exit 退出到上一层xy_c2950t24_e0201(config)#ip default-gateway 172.25.161.16 将交换机的网关指向上联交换机xy_c2950t24_e0201(config)#int ran gi 0/1 - 2 配置上连下连端口xy_c2950t24_(config-if-range)#sw mo tr 将此端口设置成trunkxy_c2950t24_(config-if-range)#no shut 开启此端口xy_c2950t24_(config-if-range)#exit 退出到上一级目录xy_c2950t24_e0201(config)#int ran fa 0/1 - 24 进入一段接口range一段范围,接电脑用户xy_c2950t24_(config-if-range)#no shut 开启此段端口xy_c2950t24_(config-if-range)#sw mo acc 将此段端口设置成问接入access模式xy_c2950t24_(config-if-range)#exit 退出到上一级目录(公司内部没有设置VLAN,所以没有用到将此段端口划分到某个vlan里的命令:sw acc vlan 2 )xy_c2950t24_e0201(config)#vtp mo cl 设置vtp(vlan transport portocol)模式为client(一般来讲,汇聚和接入交换机都配置成client)Setting device to VTP CLIENT mode.xy_c2950t24_e0201(config)#vtp domain xyass 设置vtp域名(只有域名相同的情况下,vlan信息才能透传过来)Domain name already set to xyass.xy_c2950t24_e0201(config)#end 退到根目录xy_c2950t24_e0201#wr 保存配置4d00h: %SYS-5-CONFIG_I: Configured from console by consoleBuilding configuration...[OK] (保存好了,已经生效)以上就是全部设置过程。

Catalyst 3560-C 和 2960-C 交换机 说明书

Catalyst 3560-C 和 2960-C 交换机 说明书
PC 和交换机之间的连接会失败,因为已配置的交换机 IP 地址属于不同于 PC 所处的 子网。 第 9 步 将交换机与 PC 断开,然后在您的网络中安装交换机。请参阅第 12 页的 “安装交换机” 一节。
OL-24368-02
Catalyst 3560-C 和 2960-C 交换机入门指南
7
Catalyst 3560-C 和 2960-C 交换机 入门指南
将电缆的另一端连接至 PC 上的以太网端口。
请等待至交换机和您的 PC 或笔记本电脑上 的端口 LED 均为绿色或呈绿色闪烁,再继 续下一步。绿色端口指示灯表示连接成功。
M ODE
SYST
STAT
DPLX
SPD
PoE
CONSOLE
PD
1 2 3 4 5 6 7 8
PO W ER O VER ETH ERN ET
208779
OL-24368-02
பைடு நூலகம்
Catalyst 3560-C 和 2960-C 交换机入门指南
3
Catalyst 3560-C 和 2960-C 交换机 入门指南
运行 Express Setup
应使用 Express Setup 输入初始 IP 信息。日后配置时也可通过此 IP 地址访问 交换机。
设备管理器
管理交换机的最简单方法就是使用交换机存储器中的设备管理器。该网络界 面提供快速配置和监控。您可以在您网络中的任何位置通过网络浏览器访问 设备管理器。 1. 在您的 PC 或工作台上启动网络浏览器。 2. 在网络浏览器中输入交换机 IP 地址,然后按下 Enter。屏幕上将出现设
或更高版本) • 直通或交叉的 5 类或 6 类电缆
注意 运行 Express Setup 之前,应禁用浏览器中的所有弹出窗口阻止程序或代理 设置,以及 PC 上运行的所有无线客户端。

catalyst2960交换机说明书

catalyst2960交换机说明书

catalyst2960交换机说明书
第1步请确保交换机上未连接任何设备。

第2步在“快速安装”过程中,交换机将充当一台DHCP服务器。

如果您的PC拥有静态IP地址,那么请临时更改您的PC设置使用DHCP,然后继续下一步。

第3步将交流电源线连接至交换机电源和接地交流插座,给交换机通电。

第4步按住Mode按钮直至其上方的所有LED均变成绿色。

您可
能需要按住按钮3秒以上。

Mode按钮上方的所有LED均变成绿色后,松开Mode按钮。

第5步在网络浏览器中输入IP地址10.0.0.1,然后按下Enter。

出现提示时,输入默认密码:cisco。

第6步在“快速安装”窗口中输入必填的设置。

注意所有条目均须为英文字母和数字。

第7步将交换机与PC断开,然后在您的网络中安装交换机。

思科2960配置方法

思科2960配置方法

(一)使能口令(enable password),口令以明文显示使能密码(enbale secret),口令以密文显示Switch.> /*用户直行模式提示符Switch.>enable /*进入特权模式Switch.# /*特权模式(进入前要输入密文)Switch.#config terminal /*进入全局配置模式Switch.(config)# /*配置模式提示符Switch.(config)# hostname Pconline /*设置主机名PconlinePconline(config)# enable password cisco3560 /*设置使能口令为pconlinePconline(config)# enable secret cisco3560 /*设置使能密码为networkPconline(config)# line vty 0 15 /*设置虚拟终端线Pconline(config-line)# login /*设置登陆验证Pconline(config-line)# password cisco3560 /*设置虚拟终端登陆密码二、交换机VLAN设置Switch.> /*用户直行模式提示符Switch.>enable /*进入特权模式switch#vlan database ;进入VLAN设置switch(vlan)# vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入网络端口1switch(config)#int giga0/1 ; 进入汇聚千兆口1switch(config-if)# duplex {auto | full | half} 设置端口为---自动/全双工/半双工switch(config-if)#switchport mode trunk ;当前端口设置为汇聚口switch(config-if)#switchport mode access ;当前端口设置为接入模式switch(config-if)#switchport trunk allowed vlan 1,2 ;设置1,2号口允许的vlan组switch(config-if)#switchport trunk vlan 2 ;设置1号口允许的vlanswitch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继cisco网络中,交换机在局域网中最终稳定状态的接口类型主要有四种:access/ trunk/ multi/ dot1q-tunnel。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Cisco2960交换机的基础安装配置教程你还在为Cisco 2960交换机的基础安装配置教程而烦恼么?不用担心,接下来是店铺为大家收集的Cisco 2960交换机的基础安装配置教程,欢迎大家阅读:Cisco 2960交换机的基础安装配置教程的方法分类:新设备配置内容:1. interface vlan 1 的ip,gatewayconf tint vlan 1ip address xx.xx.xx.xx 255.255.255.0ip default-gateway ip-addressno shutdownexit2.en的密码3.line vty 0-4 telnet的密码4.wr存盘show interface vlan 1show run将F0/1-10端口加入到VLAN20中,对应以下命令interface range f0/1 -10switchport mode acccessswitchport access vlan 20注意,f0/1后面有个空格,然后才是-10cisco 2950 常用配置命令产品相关命令1、配置IP地址交换机要能够被网管,必须给它标识一个管理IP地址,默认情况下CISCO交换机的VLAN 1为管理VLAN,为该VLAN配上IP 地址,交换机就可以被网管了。

命令如下:a、进入全局模式: Switch#configure terminalb、进入VLAN 1接口模式:Switch(config)#interface vlan 1c、配置管理IP地址:Switch(config-if) # ip address [A.B.C.D] [mask]如果当前VLAN 不是管理VLAN ,只需要将上面第b处命令的vlan的号码换成管理VLAN的号码即可。

2、打开SNMP协议a、进入全局模式: Switch#configure terminalb、配置只读的Community,产品默认的只读Community名为publicSwitch(config)#snmp-server community public roc、配置可写的Community,产品默认的可写Community名为privateSwitch(config)#snmp-server community private rw3、更改SNMP的Community密码a、将设备分组,并使能支持的各种SNMP版本Switch(config)#snmp-server group qycx123 v1Switch(config)#snmp-server group qycx 123 v2cSwitch(config)#snmp-server group qycx123 v3 noauthb、分别配置只读和可写community 如:Switch(config)#snmp-server community qycx123 roSwitch(config)#snmp-server community qycx123 rw4、保存交换机配置Switch#copy run start常用命令1、设置交换机密码a、更改远程TELNNET密码Switch#configure terminalSwitch(config)#line vty 0 4Switch(config-line)#password qycx123Switch(config-line)#loginSwitch(config-line)#exitb、更改进入全局配置模式时的密码Switch#configure terminalSwitch(config)#enable secret qycx1232、创建并划分VLANa、创建VLANSwitch#vlan databaseSwitch(vlan)#vlan 99 name office(创建vlan 99 并命名为office)b、将端口划分至vlanSwitch(config)#interface fastEthernet 0/8 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 99(将8号快速以太口划分至vlan 99)3、常用调试命令a、显示所有配置命令:Switch#show runb、显示所有接口状态:Switch#show ip int briefc、显示所有VLAN的信息:Switch#show vlan brief 交换机支持的命令1. linux 命令:PCA login: root ;使用root用户password: linux ;口令是linux# shutdown -h now ;同init 0 关机# logout# login# ifconfig ;显示IP地址# ifconfig eth0 netmask ;设置IP地址# ifconfig eht0 netmask down ; 删除IP地址# route add 0.0.0.0 gw# route del 0.0.0.0 gw# route add default gw ;设置网关# route del default gw ;删除网关# route ;显示网关# ping# telnet2. 交换机支持的命令:交换机基本状态:switch: ;交换机的ROM状态rommon> ;路由器的ROM状态hostname> ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname ;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令switch(config)#enable password xxa ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xx switch#exit ;返回命令交换机VLAN设置:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlanswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain ;设置发vtp域名switch(config)#vtp password ;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode client ;设置发vtp模式交换机设置IP地址:switch(config)#interface vlan 1 ;进入vlan 1switch(config-if)#ip address ;设置IP地址switch(config)#ip default-gateway ;设置默认网关switch#dir flash: ;查看闪存交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息3. 路由器支持的命令:路由器显示命令:router#show run ;显示配置信息router#show interface ;显示接口信息router#show ip route ;显示路由信息router#show cdp nei ;显示邻居信息router#reload ;重新起动路由器口令设置:router>enable ;进入特权模式router#config terminal ;进入全局配置模式router(config)#hostname ;设置交换机的主机名router(config)#enable secret xxx ;设置特权加密口令router(config)#enable password xxb ;设置特权非密口令router(config)#line console 0 ;进入控制台口router(config-line)#line vty 0 4 ;进入虚拟终端router(config-line)#login ;要求口令验证router(config-line)#password xx ;设置登录口令xxrouter(config)#(Ctrl+z) ; 返回特权模式router#exit ;返回命令路由器配置:router(config)#int s0/0 ;进入Serail接口router(config-if)#no shutdown ;激活当前接口router(config-if)#clock rate 64000 ;设置同步时钟router(config-if)#ip address ;设置IP地址router(config-if)#ip address second ;设置第二个IProuter(config-if)#int f0/0.1 ;进入子接口router(config-***if.1)#ip address ;设置子接口IProuter(config-***if.1)#encapsulation dot1q ;绑定vlan中继协议router(config)#config-register 0x2142 ;跳过配置文件router(config)#config-register 0x2102 ;正常使用配置文件router#reload ;重新引导路由器文件操作:router#copy running-config startup-config ;保存配置router#copy running-config tftp ;保存配置到tftprouter#copy startup-config tftp ;开机配置存到tftprouter#copy tftp flash: ;下传文件到flashrouter#copy tftp startup-config ;下载配置文件ROM状态:Ctrl+Break ;进入ROM监控状态rommon>confreg 0x2142 ;跳过配置文件rommon>confreg 0x2102 ;恢复配置文件rommon>reset ;重新引导rommon>copy xmodem: flash: ;从console传输文件Cisco 2960设置管理地址问题我这里有个2960,准备配置管理地址,配置应该没有问题,可是就是无法连通,在此台2960上也无法Ping通网关,相关配置如下interface GigabitEthernet0/2switchport mode trunkspanning-tree link-type point-to-pointinterface Vlan241ip address 192.168.241.53 255.255.255.0no ip redirectsno ip unreachablesno ip proxy-arpno ip route-cache!ip default-gateway 192.168.241.1交换机工作正常,但是使用Show inter vlan241,发现接口处于Down状态,使用No shutdown 命令也没有用,不知道怎么回事情?是不是和VTP有关?谢谢!网友1;方法两个:1、把你见vlan号给删除,给vlan1配置ip地址2、修改你配置vlan的native vlan网友2:cisco的vlan1默认为管理vlan,只要给它配各地址就行了网友3:1.show vlan看本交换机有没有VLAN241如果没有可以手工添加上去或者启用VTP学习2.show int g0/2 trunk信息网友4:1、show vlan brief 看一下有没有这个vlan2、如果数据vlan和管理vlan分开,看看上联的trunk起来没有网友5:29交换机管理VLAN默认就是VLAN1,你的问题有两种方法:1、取消VLAN241的IP地址interface vlan 1ip add 192.168.241.53 255.255.255.02、是将VLAN241设置成管理VLANinterface vlan 241ip add 192.168.241.53 255.255.255.0management-----------是将该VLAN设置成管理VLAN你任选一种就可以的Cisco 2960交换机中如何绑定IP与MAC地址请问:在2960交换机中如何进行端口MAC地址绑定,并同时绑定IP与MAC地址?网友1:conf tarp 192.168.1.1 0000.1001.2200 arpa fa0/1网友2:IP地址与MAC地址的关系: IP地址是根据现在的IPv4标准指定的,不受硬件限制长度4个字节。

相关文档
最新文档