Cisco2960交换机的基础安装配置教程.doc
思科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口的配置。
Cisco2960交换机的基础安装配置教程.doc

Cisco2960交换机的基础安装配置教程.docCisco2960交换机的基础安装配置教程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 ro Switch(config)#snmp-server community qycx123 rw 4、保存交换机配置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/8Switch(config-if)#switchport mode accessSwitch(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 ;设置登录口令xxswitch#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 2 switch(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 1 switch(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个字节。
Cisco2960交换机的基本配置

CISCO2960交换机的基本配置1、2960交换机所需要进行的配置项目交换机的主机名、进入enable模式的密码、远程登陆的用户名和密码及设置、管理vlan 的IP地址、交换机的默认网关、交换机的端口、SNMP服务、交换机时间设置等。
这些和之前的2950交换机都是一样的,2960交换机和2950相比增加了限速等功能,由于今后客户新上架除了签署了流量合同的其他都要在交换机的端口上做限速。
2、2960交换机配置时的注意事项首先也是十分重要的一点就是,在交换机的配置没有完成前,特别是VTP模式的配置(一般情况下VTP的初始模式因配置为transparent模式)没有完成前禁止将交换机接入网络,以免使网络中的VLAN信息发生改变,因当使用console线对其进行配置。
在刚开始配置2950的时候由于还没有设置密码,处于安全方面的考虑不要将其接入网络,因使用console口对其进行配置。
交换机刚加电启动时所有的端口会进行自检,开始时每个端口上的指示灯会呈琥珀色经过一段时间后熄灭。
系统的指示等默认情况下会亮在SYST和 STAT两个灯上。
3、2960交换机的配置流程交换机启动后使用console线对其进行设置。
Console线使用的是串行接口,串行口与电脑的串行口相连(如电脑没有串行口可以使用转接器连接),RJ-45的接头和交换机的console口相连。
线连好后在windows上点击开始→程序→附件→通讯→超级终端,在跳出新建连接对话框后在名称一栏中填入想要新建的连接名称,然后确定。
接着所连接的COM 口,在COM1属性里波特率选择“9600”,数据位选择“8”,奇偶效验选择“无”,停止位选择“1”,流量控制选择“无”;或直接点击“还原默认值”,确定进入2950配置界面。
2950如第一次启动会出现对话配置模式选项,选择yes进入对话配置模式,选择no进入CLI命令行界面。
以下配置都在CLI模式下进行。
在CLI模式下交换机显示:switch>在此输入命令switch> 用户模式switch>enable 进入特权模式switch# configure terminal 进入配置模式switch(config)# 配置模式设置主机名switch(config)#hostname 主机名一般情况下主机名的设置规则是switch后面跟交换机编号,如switch20、switch21等设置enable密码switch(config)#enable secret 密码设置密码时使用secret命令,因为它比password命令有更好的安全性,密码用Password Agent软件随机生成12位包含数字和大小写字母的密码设置远程登陆的switch(config)# username 用户名privilege 权限secret 密码用户名、权限和密码在设置权限参数时一般填0,用户名统一为netmaster,密码用Password Agent软件随机生成12位包含数字和大小写字母的密码对所设置的密码switch(config)# service password-encryption进行加密设置管理vlan和switch(config)# interface vlan1 进入管理vlan的配置默认网关switch(config-if)# ip address IP地址子网掩码设置管理vlan的IP,远程登陆使用此IPswitch(config-if)#no shutdown 启用管理vlanswitch(config-if)#exit 退出管理vlan的配置switch(config)# ip default-gateway IP地址设置默认网关设置交换机端口switch(config)# interface FastEthernet 0/1 进入交换机的1号端口switch(config-if)# description uplink port 对端口进行描述,默认时交换机1号口为上连口switch(config-if)# switchport mode trunk 将上连口设为trunk模式switch(config-if)# speed 100 设置端口速率switch(config-if)# duplex full 端口设为全双工模式switch(config-if) interface range fastEthernet 0/2 -24进入端口2至端口24的配置switch(config-if-range)#shutdown 关闭这些端口,到使用时再打开设置SNMP服务switch(config)#snmp-server community 字符串RO命令允许读访问到任何提交community string为字符串的软件,字符串设置要符合长度8位以上、需包含大小写字母和数字关闭http服务switch(config)#no ip http server 由于开启http服务在全全上存在隐患,因关闭设置vty switch(config)#line vty 0 4 设置telnet为0至4共5条线路switch24(config-line)# login local 使系统在远程登录时使用本地设置的用户名和密码进行验证设置timestamps switch(config)# service timestamps debug datetimeswitch(config)# service timestamps log datetime 默认时debug/log为uptime,改为datetime debug和log 显示时间设置VTP模式switch#vlan database 进入VTP的设置switch (vlan)#vtp transparent 将VTP模式设置为transparent模式设置交换机时间switch#clock set hh:mm:ss保存交换机的设置switch#copy running-config startup-config查看交换机设置switch#show running-config 查看交换机的配置端口流量的限制交换机端口流量的限制是用policy-map来实现的。
cisco2960配置

Vlan
1,創建Vlan
(config)#vlan 180 //創建Vlan ID號為180
(config-vlan)#name askey //Vlan 名稱為askey
2,刪除Vlan
(config)#no vlan 180
#show vlan brief //查看交換機當前Vlan 號及Vlan 下有哪些端口
(config-line)#exec-timeout 5 0 //telnet 5分鐘超時
Show
1,開啟明文密碼加密服務
1,show run //查看交換機配置
2,show ip int brief //查看所有端口狀況
3, show int des //查看所有端口的描述
2,設置時間與時區
(config)# Clock timezone TAIWAN 8 //設置時區
(config)# Clock set 12:16:50 nov 27 2008 //設置時間(月﹐日﹐年)
#Show clock //查看交換機當前的時間
3﹐設置ntp server 實現時間同步
(config-if)# storm-control broadcast level 0.80 //控制广播包的突发百分比
(config-if)# storm-control action shutdown //暴风控制的违例时端口进入errdisable
(config-if)# storm-control action trap //产生snmp trap(抑制)消息来通告发生过量流量的情况
(config-if)#switchport access vlan 33 // 划分VLAN
2960交换机简要配置手册(中文)21页word

2960交换机简明配置维护手册目录说明 (3)产品特性 (3)配置端口 (3)配置一组端口 (3)配置二层端口 (5)配置端口速率及双工模式 (5)端口描述 (6)监控及维护端口 (7)监控端口和控制器的状态 (7)刷新、重置端口及计数器 (9)关闭和打开端口 (10)配置VLAN (10)理解VLAN (11)可支持的VLAN (11)配置正常范围的VLAN (11)生成、修改以太网VLAN (11)删除VLAN (13)将端口分配给一个VLAN (14)配置VLAN Trunks (15)使用STP实现负载均衡 (18)配置Cluster (23)说明本手册只包括日常使用的有关命令及特性,其它未涉及的命令及特性请参考英文的详细配置手册。
产品特性2960是只支持二层的交换机支持VLAN∙到250 个VLAN∙支持VLAN ID从1到4094(IEEE 802.1Q 标准)∙支持ISL及IEEE 802.1Q封装安全∙支持IOS标准的密码保护∙支持标准及扩展的访问列表来定义安全策略∙支持基于VLAN的访问列表监视∙交换机LED指示端口状态∙SPAN及远端SPAN (RSPAN) 可以监视任何端口或VLAN的流量∙内置支持四组的RMON监控功能(历史、统计、告警及事件)配置端口配置一组端口命令目的Step 1configure terminal进入配置状态Step 2interface range {port-range} 进入组配置状态Step 3可以使用平时的端口配置命令进行配置Step 4end退回Step 5show interfaces[interface-id] 验证配置保存Step 6copy running-configstartup-config当使用interface range命令时有如下的规则:∙有效的组范围:o vlan从1 到4094o fastethernet槽位/{first port} - {last port}, 槽位为0o gigabitethernet槽位/{first port} - {last port},槽位为0o port-channel port-channel-number - port-channel-number, port-channel号从1到64∙端口号之间需要加入空格,如:interface range fastethernet 0/1 – 5是有效的,而interface range fastethernet 0/1-5是无效的.∙interface range命令只能配置已经存在的interface vlan∙所有在同一组的端口必须是相同类别的。
思科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。
思科交换机2960配置

cisco 交换机2960配置配置密码:2960>en ;第一次密码为空2960h#conf t ;进入全局配置模式2960(config)#hostname swa ;设置交换机名2960(config)#enable secret aaa ;设置特权加密口令为aaa2960(config)#enable password aax ;设置特权非密口令为aax2960(config)#line console 0 ;进入控制台口(Rs232)2960(config-line)#password aa ;设置登录口令aa2960(config-line)#login ;登录要求口令验证2960(config-line)#line vty 0 4 ;进入虚拟终端virtual tty2960(config-line)#password a ;设置登录口令a2960(config-line)#login ;登录要求口令验证2960(config-line)#exit ;返回上一层2960(config)#exit ;返回上一层2960#sh run ;看配置信息2960#exit ;返回命令配置Vlan新建一个Vlan的命令Switch>enable 进入特权模式Switch#configure terminal 进入全局配置模式Switch (config)# vlan vlan-id 创建一个Vlan或者进入Vlan配置模式Switch (config-vlan)# name vlan-name 给Vlan命名(取消设置:no name) Switch (config-vlan)# mtu mtu-size 设置最大通讯量(取消设置:no mtu) Switch (config-vlan)#remote-span 开启远程流量监控(关闭:no remote-span)Switch (config-vlan)# end 回到特权模式Switch#show vlan {name vlan-name | id vlan-id} 查看当前配置Switch#copy running-config startup config 保存配置删除Vlan的命令Switch>enable 进入特权模式Switch#configure terminal 进入全局配置模式Switch (config)# no vlan vlan-id 删除VlanSwitch (config)# end 回到特权模式Switch#show vlan brief 查看删除情况Switch#copy running-config startup config 保存配置端口加入特定Vlan的命令Switch>enable 进入特权模式Switch#configure terminal 进入全局配置模式Switch (config)# interface interface-id 进入端口配置Switch (config-if)# switchport mode access 将接口的模式设为访问模式Switch (config-if)# switchport access vlan vlan-id 将端口加入指定的Vlan(恢复端口默认配置:default interface interface-id)Switch (config-if)# end 回到特权模式Switch#show running-config interface interface-id 查看端口模式Switch#show interfaces interface-id switchport 查看端口详细配置Switch#copy running-config startup-config 保存配置批量端口加入特定Vlan的命令int range fa0/1 - 10switchport access VLan V2将特定端口设为trunk2960-01(config)#default interface fastEthernet 0/1 端口恢复默认值2960-01(config)#interface fastethernet0/1 进入端口模式2960-01(config-if)#switchport mode trunk 设置端口为trunk模式2960-01(config-if)#switchport nonegotiate 将接口设置为不协商模式2960-01(config-if)end2960-01#wr启用snmpSwitch>enable 进入特权模式Switch#configure terminal 进入全局配置模式Switch (config)# snmp-server community string [view view-name] [ro | rw] [access-list-number](关闭snmp: no snmp-server)(删除团体字符: no snmp-server community string) 配置snmp团体字符并开启snmp代理服务String: 团体口令字符(所有SNMP命令中只有设置团体口令的snmp-server community是必须的,其它的都是可选的.)View: view 可以用于限定哪些MIB分支不能用本community-string存取预先用snmp-server view定义ro | rw: ro获得MIB对象信息;rw获得并可以修改MIB对象信息access-list-number:访问列表号Switch (config)#access-list access-list-number {deny |permit} source [source-wildcard] 配置拒绝或者允许访问snmp代理服务的IP地址,访问列表号为上一步指定的列表号Switch (config)#end 回到特权模式Switch#show running-config 查看配置Switch#copy running-config startup-config 保存配置cisco2960口令恢复交换机口令恢复的步骤⒈串口线连接到到交换机的console口。
Catalyst2960交换机基本配置教学提纲

Copyright Hoare Lecture. All rights reserved.
查看并保存配置
switch#show startup-config switch#show running-config switch#erase startup-config Erasing the nvram filesystem will remove all configuration files! Continue? [co][ok]Erase of nvram :complete switch#show startup-config %% non-volatile configuration memory is not present switch#copy running-config startup-config Destination filename [startup-config]?Building pressed configuration from 6015 bytes to 2238 bytes[OK] switch#copy nvram tftp://192.168.1.101/wgswd.cfg %% Configuration upload is successfully completed switch#copy tftp://192.168.1.101/wgswd.cfg nvram %% TFTP successfully downloaded configuration file
[interface-id]
copy running-config startup-config
目的 进入配置状态 进入组配置状态
可以使用平时的端口配置 命令进行配置 退回 验证配置
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Cisco2960交换机的基础安装配置教程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 ro Switch(config)#snmp-server community qycx123 rw 4、保存交换机配置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/8Switch(config-if)#switchport mode accessSwitch(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 ;设置登录口令xxswitch#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 2 switch(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 1 switch(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个字节。