cisco2950 交换机 简单配置 2950 是只支持二层的交换机 支持 VLAN 第 1 步.doc_第1页
cisco2950 交换机 简单配置 2950 是只支持二层的交换机 支持 VLAN 第 1 步.doc_第2页
cisco2950 交换机 简单配置 2950 是只支持二层的交换机 支持 VLAN 第 1 步.doc_第3页
cisco2950 交换机 简单配置 2950 是只支持二层的交换机 支持 VLAN 第 1 步.doc_第4页
cisco2950 交换机 简单配置 2950 是只支持二层的交换机 支持 VLAN 第 1 步.doc_第5页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

cisco2950 交换机 简单配置 2950 是只支持二层的交换机 支持 VLAN 第 1 步:单击“开始”按钮,在“程序”菜单的“附件”选项中单击“超级终端” 第 2 步:在“名称”文本框中键入“Cisco” 第 3 步:在“连接时使用”下拉列表框中选择与交换机相连的计算机的串口。台式机为“com 1”,笔记本为 “com 3 或者 com 5”。 第 4 步:在“波特率”下拉列表框中选择“9600”-确定. 如果通信正常的话就会出现类似于如下所示的主配置界面,并会在这个窗口中就会显示交换机的初始配 置情况。 enter enter enter no! 1)配置交换机姓名 switchena switch#configure enter switch#configure terminal (进入配置状态) Switch(config)#hostname 配置的交换机姓名 如:30FLoor-2960-1 30FLoor-2960-1(config)#end 30FLoor-2960-1# 2)配置交换机的 ip 30FLoor-2960-1#configure terminal (进入配置状态) 30FLoor-2960-1(config)#interface vlan 1 30FLoor-2960-1(config)#ip address ip 地址 子网掩码 例如:30FLoor-2960-1(config)#ip address 0 30FLoor-2960-1(config)#no shutdown 30FLoor-2960-1(config)#end 30FLoor-2960-1# 30FLoor-2960-1# 3)配置交换机的 默认网关 30FLoor-2960-1(config)#ip default-gateway 网关 ip 例如:30FLoor-2960-1(config)#ip default-gateway 54 4)设置路由 30FLoor-2960-1(config)#ip route X.X.X.X 5)设置 console 口密码 30FLoor-2960-1(config)#line console 0 30FLoor-2960-1(config-line)#password 输入密码 30FLoor-2960-1(config-line)#login 30FLoor-2960-1(config-line)#end 6)设置 telnet 的密码 30FLoor-2960-1(config)#line vty 0 10 30FLoor-2960-1(config-line)#password 输入密码(yuxuan) 30FLoor-2960-1(config-line)#login 30FLoor-2960-1(config-line)#end7)设置交换机的 enable 密码 30FLoor-2960-1(config)#enable password 输入密码(xuan) 30FLoor-2960-1(config)#enable secret 输入密码(yuxuan) 30FLoor-2960-1(config)#end 8)将当前配置信息保存到闪存中 30FLoor-2960-1(config)#write 9)查看交换机信息 30FLoor-2960-1# show version 查看交换机版本信息 show ip interfaces 查看交换机的 ip 地址 show interface vlan 1 验证管理 ip 地址已经配置并开启 show ip redirect 查看交换机的网关 show running-configure 查看交换机当前的配置信息 show configure 查看交换机保存的配置信息 switch#write ; 保存配置信息 switch#show vtp ; 查看 vtp 配置信息 switch#show run ; 查看当前配置信息 switch#show vlan ; 查看 vlan 配置信息 switch#show interface ; 查看端口信息 switch#show int f0/0 ; 查看指定端口信息 10)交换机基本配置步骤 1.登陆到交换机 2.进入特权模式 命令:enable 3.进入全局配置模式 命令:configure terminal 4.进入相应的配置子模式 如:接口子模式 命令:interface vlan 1 交换机基本状态: 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 ;设置登录口令 xx switch#exit ;返回命令交换机 VLAN 设置: switch#vlan database ;进入 VLAN 设置 switch(vlan)#vlan 2 ;建 VLAN 2 switch(vlan)#no vlan 2 ;删 vlan 2 switch(config)#int f0/1 ;进入端口 1 switch(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 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 ;查看指定端口信息 思科 2950 交换机 VLAN 划分 cisco 首先配置一下交换机 SC-2950 SC-2950en SC-2950#conf t Enter configuration commands, one per line. End with CNTL/Z. SC-2950(config)#config-register 0x2102 SC-2950(config)#end 添加三个 VLAN SC-2950#vlan data SC-2950(vlan)#vlan 10 name v1 VLAN 10 added: Name: v1 SC-2950(vlan)#vlan 20 name v2 VLAN 20 added: Name: v2 SC-2950(vlan)#vlan 30 name v3 VLAN 30 added: Name: v3 SC-2950(vlan)#exitAPPLY completed. Exiting. SC-2950# 划分接口到各个 VLAN SC-2950#conf t Enter configuration commands, one per line. End with CNTL/Z. SC-2950(config)#int fa0/1 /留给管理员 SC-2950(config-if)#switchport mode access SC-2950(config-if)#sw acc vlan 10 SC-2950(config-if)#no shutdown SC-2950(config-if)#exit SC-2950(config)#int range f0/2 - 15 SC-2950(config-if-range)#sw mode acc SC-2950(config-if-range)#sw acc vlan 20 SC-2950(config-if-range)#no sh SC-2950(config-if-range)#exit SC-2950(config)#int range f0/16 - 24 SC-2950(config-if-range)#sw mode acc SC-2950(config-if-range)#sw acc vlan 30 SC-2950(config-if-range)#no sh SC-2950(config-if-range)#exit 激活 VLAN,并且给 VLAN 10 加个 IP 以便管理 SC-2950(config)#int vlan 10 SC-2950(config-if)#ip add SC-2950(config-if)#no sh SC-2950(config-if)#exit SC-2950(config)#int vlan 20 SC-2950(config-if)#no sh SC-2950(config-if)#exit SC-2950(config)#int vlan 30 SC-2950(config-if)#no sh SC-2950(config-if)#exit 将交换机指向网关 SC-2950(config)#ip default-gateway 54 SC-2950(config)#end SC-2950# 检测配置 SC-2950#sh vlan brief VLAN Name Status Ports - - - -1 default active 10 v1 active Fa0/1 20 v2 active Fa0/2, Fa0/3, Fa0/4,Fa0/5 Fa0/6, Fa0/7, Fa0/8,Fa0/9 Fa0/10, Fa0/11, Fa0/12,Fa0/13 Fa0/14, Fa0/1530v3activeFa0/16, Fa0/17, Fa0/18, Fa0/19 Fa0/20, Fa0/21, Fa0/22, Fa0/23 Fa0/24 Prot down down down up up downSC-2950#sh ip int b Interface IP-Address ocol FastEthernet0/23 unassigned FastEthernet0/24 unassigned Vlan1 unassigned Vlan10 Vlan20 unassigned Vlan30 unassigned SC-2950#sh run Building configuration. Current configuration : 1482 bytes . ! interface FastEthernet0/24 switchport access vlan 30 ! interface Vlan1 no ip address ! interface Vlan10 ip address ! interface Vlan20 no ip address ! interface Vlan30 no ip address ! ip default-gateway 54 ip http server ! . 保存配置 SC-2950#write Building configuration. OK cisco 2960 交换机 安装配置基础 新设备配置内容: 1. interface vlan 1 的 ip,gateway conf t int vlan 1 ip address xx.xx.xx.xx OK? Method Status YES unset up YES unset up YES unset up YES manual up YES unset up YES unset upip default-gateway ip-address no shutdown exit 2.en 的密码 3.line vty 0-4 telnet 的密码 4.wr 存盘 show interface vlan 1 show run 将 F0/1-10 端口加入到 VLAN20 中,对应以下命令 interface range f0/1 -10 switchport mode acccess switchport access vlan 20 注意,f0/1 后面有个空格,然后才是-10 cisco 2950 常用配置命令 产品相关命令 1、配置 IP 地址 交换机要能够被网管,必须给它标识一个管理 IP 地址,默认情况下 CISCO 交换机的 VLAN 1 为管理 VLAN,为该 VLAN 配上 IP 地址,交换机就可以被网管了。命令如下: a、进入全局模式: Switch#configure terminal b、进入 VLAN 1 接口模式:Switch(config)#interface vlan 1 c、配置管理 IP 地址:Switch(config-if) # ip address A.B.C.D mask 如果当前 VLAN 不是管理 VLAN ,只需要将上面第 b 处命令的 vlan 的号码换成管理 VLAN 的号码 即可。 2、打开 SNMP 协议 a、进入全局模式: Switch#configure terminal b、配置只读的 Community,产品默认的只读 Community 名为 public Switch(config)#snmp-server community public ro c、配置可写的 Community,产品默认的可写 Community 名为 private Switch(config)#snmp-server community private rw 3、更改 SNMP 的 Community 密码 a、将设备分组,并使能支持的各种 SNMP 版本 Switch(config)#snmp-server group qycx123 v1 Switch(config)#snmp-server group qycx 123 v2c Switch(config)#snmp-server group qycx123 v3 noauth b、分别配置只读和可写 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 terminal Switch(config)#line vty 0 4 Switch(config-line)#password qycx123 Switch(config-line)#loginSwitch(config-line)#exit b、更改进入全局配置模式时的密码 Switch#configure terminal Switch(config)#enable secret qycx123 2、创建并划分 VLAN a、创建 VLAN Switch#vlan database Switch(vlan)#vlan 99 name office (创建 vlan 99 并命名为 office) b、将端口划分至 vlan Switch(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 run b、显示所有接口状态:Switch#show ip int brief c、显示所有 VLAN 的信息:Switch#show vlan brief Cisco 之 line vty 线路使用 2007-12-08 13:11 Cisco 的设备管理有很多种方式,如 Console、HTTP、TTY、VTY 或其它网管软件,但我们远程管理较为 常用的一种方式肯定是 VTY 方式。 VTY 在 Cisco 的不同系列产品中,都有一定数量的 VTY 线路可用,但具体数目则不尽相同。有些路 由器交换机产品只有五条线路可用(line vty 0 4) ,有些交换机路由器设备则提供了十多条,甚至达一千 多条,但默认情况下不一定全部启用。如果您想看一下自己的设备具体支持多少条线路,只需在全局模 式下使用命令 show line ; show line vty 0 ?即可查看该设备支持多少条线路。 VTY 线路的启用/关闭: VTY 线路的启用只能按顺序进行,你不可能启用 line vty 10,而不启用 line vty 9。如果想启用 line vty 9,那么你可以在全局模式(或 line 模式)下输入命令 line vty 9 ,如: (config)#line vty 9 这样系统会自动启用前面的 0-8 线路。当然也可以直接输入 line vty 0 9 直接启用 10 条线路。 如果不想开启这么多条线路供用户使用,那么只须在全局模式下使用 no line vty m n命令就可以关闭第 m 后的线路,此时 n 这个数值可有可无,因为系统只允许开启连续的线路号,取消第 m 号线路会自动取 消其后的所有线路。 VTY 线路的协议选用: VTY 线路支持多种协议: acercon Remote console for ACE-based blade lat DEC LAT protocol mop DEC MOP Remote Console Protocol nasi NASI protocol pad X.3 PAD rlogin Unix rlogin protocol ssh TCP/IP SSH protocol telnet TCP/IP Telnet protocol udptn UDPTN async via UDP protocol 在某一个接口上使用什么协议可以使用命令:transport input|ouput来进行定义:(config)#line vty 0 (config-line)#transport ? /查看支持哪种方式的协议定义 input Define which protocols to use when connecting to the terminal server output Define which protocols to use for outgoing connections preferred Specify the preferred protocol to use (config-line)#transport input ? /查看在输入方向上支持的协议 acercon Remote console for ACE-based blade all All protocols lat DEC LAT protocol mop DEC MOP Remote Console Protocol nasi NASI protocol non

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论