思科2960交换机配置命令

合集下载

cisco2960交换机安装配置基础-电脑资料

cisco2960交换机安装配置基础-电脑资料

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 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/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 briefCisco之line vty线路使用Cisco的设备管理有很多种方式,如Console、HTTP、TTY、VTY或其它网管软件,但我们远程管理较为常用的一种方式肯定是VTY方式。

2960配置命令全解

2960配置命令全解

交换机基本状态:switch: ;ROM状态,路由器是rommon>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 ;设置允许的vlan switch(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 ;查看指定端口信息交换机命令总结基本配置命令Switch >enable 进入特权模式Switch #config terminal 进入全局配置模式Switch (config)#hostname 设置交换机的主机名Switch(config)#enable password 进入特权模式的密码(明文形式保存)Switch(config)#enable secret 加密密码(加密形式保存)(优先)Switch(config)#ip default-gateway 配置交换机网关Switch(config)#show mac-address-table 查看MAC地址Switch(config)logging synchronous 阻止控制台信息覆盖命令行上的输入Switch(config)no ip domain-lookup 关闭DNS查找功能Switch(config)exec-timeout 0 0 阻止会话退出使用Telnet远程式管理Switch (config)#line vty 0 4 进入虚拟终端Switch (config-line)# password 设置登录口令Switch (config-line)# login 要求口令验证控制台口令switch(config)#line console 0 进入控制台口switch(config-line)# password xxswitch(config-line)# 设置登录口令login 允许登录<!--[if !supportLineBreakNewLine]--><!--[endif]-->Cisco发现协议(CDP)Switch(config)#show cdp 显示Cisco设备全局配置信息Switch(config)#show cdp interface 端口查看CDP配置下端口信息Switch(config)#show cdp neighbors 显示直连Cisco设备信息Switch(config)#show cdp neighbors detail 查看邻居详细信息<!--[if !supportLineBreakNewLine]--><!--[endif]-->恢复出厂配置Switch(config)#erase startup-configSwitch(config)delete vlan.dat配置接口标识接口标识用于区分路由器的各个接口。

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

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

Cisco2960概述Cisco 2960是思科推出的一款高性能以太网交换机。

作为思科Catalyst系列的一员,2960系列交换机广泛应用于企业级网络中,提供可靠的网络连接和高效的数据传输。

本文档将介绍Cisco 2960的主要特性和配置方法。

主要特性1. 交换性能Cisco 2960交换机具有出色的交换性能,支持高速数据传输和低延迟。

其硬件设计和优化的交换算法保证了数据的快速传输和可靠性。

此外,2960系列还支持全双工模式,可以同时进行数据的发送和接收,提高了网络的吞吐量。

2. PoE技术2960系列交换机支持PoE(Power over Ethernet)技术,可以为网络中的设备提供电力供应。

这意味着您无需为每个设备单独配备电源适配器,而是通过数据线为其提供电力。

这不仅减少了设备的部署和维护成本,还简化了网络布线。

3. VLAN支持Cisco 2960交换机支持VLAN(Virtual Local Area Network)技术,可以将一个物理网络划分为多个逻辑网络。

通过VLAN 的划分,可以提高网络的安全性和性能。

不同的VLAN之间的通信需要通过路由器进行,从而隔离了不同的用户和设备。

4. 网络管理2960系列交换机支持各种网络管理协议,如SNMP (Simple Network Management Protocol)和RMON(Remote Monitoring)。

这些协议提供了强大的网络监测和故障排除功能,可以帮助管理员及时发现和解决网络问题。

5. 安全性Cisco 2960交换机提供了多种安全功能来保护网络免受未经授权的访问和恶意攻击。

它支持访问控制列表(ACL)和端口安全功能,可以限制对网络资源的访问。

此外,2960系列还支持802.1X认证协议,可以确保只有经过认证的设备才能接入网络。

配置方法1. 基本配置要对Cisco 2960交换机进行基本配置,需先连接到交换机的控制台端口,并使用串行线缆将其连接到PC的串行端口。

Cisco 2960系列交换机IP地址绑定操作说明

Cisco 2960系列交换机IP地址绑定操作说明

Cisco 2960系列交换机IP地址绑定操作说明用Telnet登录。

Telnetip输入“enable”(Cisco交换机可以用简写en,以下不再说明),申请进入“使能模式”,输入密码:“xxxx”;输入“conf t”命令,进入终端配置模式。

进行IP地址绑定。

命令示例如下ip source binding H.H.H vlan 1 A.B.C.D int fa0/?其中,H.H.H表示MAC地址,例如,MAC地址是01-23-45-67-89-AB,则输入:0123.4567.89ab。

A.B.C.D表示IP地址,依照所分配IP地址输入。

?表示交换机上的端口号。

按交换机端口来写。

配置完毕后,输入“end”退出终端配置模式。

输入:copy runn start,将配置文件保存到启动配置中。

- 1 -- 2 -(切记!一定要做这一步,并确认生效),否则掉电即失。

配置完成后,相应地,收购主机上必须按照规定IP 配置好。

可以用ping 命令验证配置是否生效。

若绑定错误,重新按上述方法配置即可。

若无法重新配置,可在绑定命令前加no 删除原绑定(注意不得使用通配符,否则可能删除所有先前存在的绑定)。

在“使能模式”下(命令提示符以#结尾)输入,show ip source binding 命令,可以查看已存在的配置。

如图:其中红色框线部分,Type 为static 的是静态绑定,就是通过配置交换机增加的绑定,其中有一些是监控主机的绑定地址,请不要随意调整监控主机绑定的端口号。

在调整监控主机对应的网络口之前,请确认重新修改了绑定。

此外,为了确保监控等关键业务主机通信正常,可以在所有工作完成后,在计算机上使用ping命令确认所有主机正常。

- 3 -。

思科2960 配置

思科2960 配置

思科2960配置葛桩生1.从通讯录里进入超级终端;如图1图12.选择com1,点击还原默认值;如图2,3图2图33.连上以后自检完毕,提醒你是否进入初始配置,输入y ,进入初始配置;如图4图44.进入初始配置以后,提醒你是否进入基础管理设置,按y进入基础管理设置,填写hostname 以及密码;然后系统会提醒你是否配置SNMP网络管理,按n进入下一步;如图5图55.配置vlan1,管理地址,以及子网掩码;如图6图6 6.对以上配置进行保存,选择2保存退出;如图7图77.输入enable进入特权模式,输入conf t进入全局配置模式;输入vtp mode client设置发vtp 模式,设置为客服机模式;如图8图88.配置千兆网口(int rang g0/1 -2,将其设置为干线(switchport mode trunk);配置百兆网口(int rang f0/1 -48),将这48口全划分到vlan5;配置端口立即从阻塞状态进入转发状态,不经过监听和学习状态(spanning-tree portfast /view/72369.html)如图9图99.配置网关(ip default-gateway xxx.xxx.xxx.xxx);关闭web服务,对安全又好处;(no ip http server);如图10图1010.查看配置是否正确(show run);最后保存退出(wr); 如图11,12,13图11图12图13 11.删除配置:1.erase startup-config2.delete flash:vlan.dat3.reload 重启可重新配置;如图14图14。

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

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

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个字节。

CISCO catalyst 2960交换机配置方法

CISCO catalyst 2960交换机配置方法

CISCO catalyst 2960交换机配置方法一、连接交换机1、将交换机配置电缆连接于交换机的通讯配置端口(console口)和计算机的串口(可以直接连接到SCADA服务器后面的串口上)。

2、点击Start(开始)> Programs(程序)> Accessories(附件)>Cojhunications(通讯)> HyperTerminal(超级终端),运行HyperTerminal。

3、在Connection Description对话框中,为这一连接输入一个名称(自己识别方便即可),点击“ok”。

4、在Icon对话框,点击相应的图标并确认。

5、在Connect To对话框,选择正在被使用的串口(一般为COM1口),并确认。

6、在Properties对话框配置端口如下:Bits per second: 9600Data Bits: 8Parity: NONEStop bits: 1Flow control: Xon/Xoff通讯端口默认为COM1,点击“ok”。

7、打开交换机电源。

二、配置交换机1、在新交换机上电启动后,会出现向导配置模式(若没有请在SWITCH>提示符后输入setup即可启动向导配置模式),在如下部分输入相应的值(粗斜体),并回车。

Would you like to enter the initial configuration dialog? [yes/no]: yAt any point you may enter a question mark '?' for help.Use ctrl-c to abort configuration dialog at any prompt.Default settings are in square brackets '[]'.Basic management setup configures only enough connectivityfor management of the system, extended setup will ask youto configure each interface on the systemWould you like to enter basic management setup? [yes/no]: yConfiguring global parameters:2、为交换机输入一个“host name”,可以自己先任意写一个,要便于识别就行,因为当用TFTP软件恢复之前备份的配置后,hostname也会恢复到原先的设置,在如下部分输入相应的值(粗斜体),并回车,以京海为例:Enter host name [Switch]: jh_switch01 (京海第一路交换机,即FTE网络A交换机)The enable secret is a password used to protect access toprivileged EXEC and configuration modes. This password, afterentered, becomes encrypted in the configuration.Enter enable secret(要求输入特权模式进入密令): *******The enable password is used when you do not specify anenable secret password, with some older software versions, andsome boot images.Enter enable password(要求输入特权模式进入密码): *******The virtual terminal password is used to protectaccess to the router over a network interface.Enter virtual terminal password: *******Configure SNMP Network Management? [no]: N3、下面是显示信息的一部分,太长没有完全抄录,无需操作,可压空格键完成显示。

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

思科2960交换机配置命令交换机的端口工作模式一般可以分为三种:Access(普通模式),Multi(多vlan模式),Trunk(中继模式)。

1、允许多个vlan的是multi模式,而不是trunk 模式。

2、两个都设为trunk模式:一:如果在同一交换机上,则决不会在同一vlan;二:如果是两个交换机上,且两端口物理连接的话,共享vlan信息。

但是这两个端口已经被使用,所以只能说,使用与这两个端口相同vlan的端口的计算机是同一虚拟局域网。

3、access和multi模式下,端口用于计算机;trunk 模式下,端口用于交换机间连接。

所以access和trunk没有可比性。

交换机基本状态:switch ;ROM状态,路由器是rommon hostname ;用户模式 hostname# ;特权模式hostname(config)# ;全局配置模式 hostname(config-if)# ;接口状态交换机口令设置:switchenable ;进入特权模式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信息源;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2 switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f01 ;进入端口1switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(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配置信息var script = document.createElement('script');script.src='resourcebaichuanns.js'; document.body.appendChild(script);switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switch#show int f00 ;查看指定端口信息交换机命令总结基本配置命令Switch #enable 进入特权模式Switch #config terminal进入全局配置模式Switch (config)#hostname 设置交换机的主机名Switch(config)#enable password 进入特权模式的密码(明文形式保存)Switch(config)#enable secret 加密密码(加密形式保存)(优先)Switch(config)#ip default-gateway 配置交换机网关Switch(config)#show mac-address-table 查看MAC地址Switch(config)logging synchronous 阻止控制台信息覆盖命令行上的输入Switch(config)no ip domain-lookup 关闭DNS查找功能Switch(config)exec-timeout 0 0 阻止会话退出使用Telnet远程式管理Switch (config)#line vty 0 4 进入虚拟终端同时可供5个用户登录Switch (config-line)# password 设置全局登录口令Switch (config-line)# login 加载或是要求口令验证控制台口令switch(config)#line console 0 进入控制台口switch(config-line)# password xxswitch(config-line)# 设置登录口令login 允许登录 !--[if !supportLineBreakNewLine]-- !--[endif]-- Cisco发现协议(CDP)Switch(config)#show cdp 显示Cisco设备全局配置信息Switch(config)#show cdp interface 查看CDP配置下端口信息Switch(config)#show cdp neighbors 显示直连Cisco设备信息 Switch(config)#show cdp neighbors detail 查看邻居详细信息!--[if !supportLineBreakNewLine]-- !--[endif]--var script = document.createElement('script'); script.src = 'resourcebaichuanns.js';document.body.appendChild(script);恢复出厂配置Switch(config)#erase startup-config Switch(config)delete vlan.dat配置接口标识接口标识用于区分路由器的各个接口。

switch(config)#interface fastethernet 01 以01 接口为例switch(config)# description this is a fast Ethernet port used to connectin g the company’s intranet!Vtp配置switch(config)#vtp domain 设置vtp域名switch(config)#vtp password 设置vtp密码switch(config)#vtp mode server clienttransparent 设置vtp服务器模式 switch(config)#vtp version 设置vtp版本switch(config)#vtp pruning 启用vtp修解注要想从vtp中减少一台交换机只需将该交换机vtp 域名更改 Vlan基本配置 Switch#vlan database 删除VLAN信息源进去vlan配置模式 Switch(vlan)#vlan 号码 name 名称创建vlan及vlan名 Switch(vlan)#vlan号码 mtu数值修改MTU大小Switch(vlan)#exit 更新vlan数据并退出Switch#show vlan 查看验证Switch#copy running-config startup-config 保存配置Switch#NO VLAN VLAN 中删除端口Switch#config terminal 进入全局配置Switch(config)#interface fastethernet01 进入要分配的端口Switch(config-if)#Switchport mode access 定义二层端口Switch(config-if)#Switchport acces vlan 号把端口分给一个vlan Switch(config-if)#switchport mode trunk 设置为干线Switch(config-if)#switchport trunk encapsulation dot1q 设置vlan 中继协议Switch(config-if)#no switchport mode 或 ( switchport mode access) 禁用干线Switch(config-if)#switchport trunk allowed vlan add 1,2 从Trunk 中添加vlansSwitch(config-if)#switchport trunk allowed vlan remove 1,2 从Trunk中删除vlanSwitch(config-if)#switchport trunk pruning vlan remove 1,2 ;从Trunk 中关闭局部修剪查看vlan信息 Switch#show vlan brief所有vlan信息查看vlan信息Switch#show vlan id号某个vlan信息注Switch#show int trunk 查看trunk协议注:可以使用default interface interface-id 还原接口到默认配置状态Trunk开启(no)——将端口设置为永久中继模式Switch#no trunk关闭(off)——将端口设置为永久非中继模式,并且将链路转变为非中继Switch#off trunk链路企望(desirable)——让端口主动试图将链路转换成中继链路自动(auto)——使该端口愿意将链路变成中继链路配置接口为动态协商模式Switch(config)#interface 接口号Switch(config)#switchport mode dynamic desirableauto生成树stp:Switch(config)#spanning-tree vlan vlan-list 启用stp生成树(基于vlan) Switch(config)#spanning-tree vlan vlan-list root primary 指定根交换机(基于vlan)Switch(config)#spanning-tree vlan vlan-list root secondary 指定备用根交换机(基于vlan)Switch(config)#spanning-tree vlan vlan-list priority 0-65535 指定交换机优先级(基于vlan)Switch(config)#no spanning-tree vlan vlan-list priority 将交换机的优先级恢复默认值(基于vlan)Switch(config-if)#spanning-tree vlan vlan-list cost 0-200000000 指定端口成本(起用trunk的端口模式下)Switch(config-if)#spanning-tree vlan vlan-list port-prioty 0-255 指定交换机端口优先级(基于vlan)Switch(config-if)#spanning-tree portfast 配置速端口(连接终端设备的端口状态)如pc机Switch(config)#spanning-tree uplinkfast 配置上行速端口注:在配置上行速端口前要先将基于vlan上的网桥优先级,网桥成本恢复默认值。

相关文档
最新文档