4006交换机简明配置手册中文(编辑修改稿)内容摘要:

ort 命令生成的端口 所有的三层都需要 IP 地址以实现路由交换 配置步骤如下: 命令 目的 Step 1 configure terminal 进入配置状态 Step 2 interface {{fastether | gigabitether} interfaceid} | {vlan vlanid} | {portchannel portchannelnumber} 进入端口配置状态 Step 3 no switchport 把物理端口变成三层口 Step 4 ip address ip_address sub_mask 配置 IP地址和掩码 Step 5 no shutdown 激活端口 Step 6 end 退出 Step 7 show interfaces [interfaceid] show ip interface [interfaceid] show runningconfig interface [interfaceid] 验证配置 Step 8 copy runningconfig startupconfig 保存配置 配置举例如下: 4006 configure terminal Enter configuration mands, one per line. End with CNTL/Z. 4006(config) interface gigabitether3/2 4006(configif) no switchport 4006(configif) ip address 4006(configif) no shutdown 4006(configif) end show ip interface 命令 : 4006 show ip interface gigabitether3/2 GigabitEther3/2 is up, line protocol is up Inter address is Broadcast address is Address determined by setup mand MTU is 1500 bytes Helper address is not set Directed broadcast forwarding is disabled output truncated 监控及维护端口 监控端口和控制器的状态 主要命令见下表: Show Commands for Interfaces Command 目的 show interfaces [type slot/interface] 显示所有端口或某一端口的状态和配置 . show interfaces interfaceid status [errdisabled] 显示一系列端口的状态或错误-关闭的状态 show interfaces [interfaceid] switchport 显示二层端口的状态,可以用来决定此口是否为二层或三层口。 show interfaces [interfaceid] description 显示端口描述 show protocols [type slot/interface] 显示在任何已配置协议下全局和接口的状态 show runningconfig interface [interfaceid] 显示当前配置中的端口配置情况 show version 显示软硬件等情况 举例如下 : Switchshow interfaces status Port Name Status Vlan Duplex Speed Type Gi1/1 notconnect 1 auto auto No Gbic Gi1/2 notconnect 1 auto auto No Gbic Gi5/1 notconnect 1 auto auto 10/100/1000TX Gi5/2 notconnect 1 auto auto 10/100/1000TX Gi5/3 notconnect 1 auto auto 10/100/1000TX Gi5/4 notconnect 1 auto auto 10/100/1000TX Fa6/1 connected 1 afull a100 10/100BaseTX Fa6/2 connected 2 afull a100 10/100BaseTX Fa6/3 notconnect 1 auto auto 10/100BaseTX Fa6/4 notconnect 1 auto auto 10/100BaseTX Switch This example shows how to display the status of interfaces in errordisabled state: Switch show interfaces status errdisabled Port Name Status Reason Fa9/4 errdisabled linkflap informational error message when the timer expires on a cause 5d04h:%PMSP4ERR_RECOVER:Attempting to recover from linkflap errdisable state on Fa9/4 Switch Switch show protocols fastether 5/5 FastEther5/5 is up, line protocol is up Switch 刷新、重置端口及计数器 Clear 命令 目的 clear counters {type slot/interface} 清除端口计数器 . clear interface {type slot/interface} 重置某一端口的硬件逻辑 clear line [number | console 0 | vty number] 重置异步串口的硬件逻辑 Note clear counters 命令只清除用 show interface 所显示的计数,不影响用 snmp 得到的计数 举例如下: Switch clear counters fastether 5/5 Clear show interface counters on this interface [confirm] y Switch *Sep 30 08:42:55: %CLEAR5COUNTERS: Clear counter on interface FastEther5/5 by vty1 () Switch 可使用 clear interface 或 clear line 命令来清除或重置某一端口或串口,在大部分情况下并不需要这样做 : Switch clear interface fastether0/5 关闭和打开端口 命令 目的 Step 1 configure terminal 进入配置状态 Step 2 interface {vlan vlanid} | {{fastether | gigabitether} slot/port} | {portchannel portchannelnumber} 选择要关闭的端口 Step 3 shutdown 关闭 Step 4 end 退出 Step 5 show runningconfig 验证 使用 no shutdown 命令重新打开端口 . 举例如下 : Switch configure terminal Switch(config) interface fastether2/5 Switch(configif) shutdown Switch(configif) *Sep 30 08:33:47: %LINK5CHANGED: Interface FastEther2/5, changed state to a administratively down Switch configure terminal Switch(config) interface fastether2/5 Switch(configif) no shutdown Switch(configif) *Sep 30 08:36:00: %LINK3UPDOWN: Interface FastEther2/5, changed state to up 配置 VLAN 理解 VLAN 一个 VLAN 就是一个交换网,其逻辑上按功能、项目、应用来分而不必考虑用户的物理位置。 任何交换口都可以属于某一 VLAN, IP 包、广播包及组播包均可以发送或广播给在此VLAN 内的最终用户。 每一个 VLAN 均可看成是一个逻辑网络,发往另一 VLAN 的数据包必须由路由器或网桥转发(如下图)。 由于 VLAN 被看成是一个逻辑网络,其具有自己的网桥管理信息庫 (MIB) 并可支持自己的生成树 VLAN 作为逻辑定义的网络示意图 VLAN 常常与 IP 子网相联系,同一 IP 子网属于同一 VLAN。 在 3550 上 VLAN 之间的数据包可以由 VLAN 端口进行转发。 可支持的 VLAN Catalyst 4006交换机将来的版本可支持 4096个 VLAN,可以分别是 VTP client, server, 及 transparent modes. VLAN 号可以从 1到 4094. VLAN 号 1002 到 1005保留给令牌环及 FDDI VLAN. VTP 只能学习到普通范围的 VLAN, 即从 VLAN 到 1到 1005。 VLAN 号大于 1005 属于扩展 VLAN,不存在 VLAN 数据庫中。 交换机必须配置成 VTP 透明模式当需要生成 VLAN 号从 1006 到 4094. 本交换机支持基于每一 VLAN 的生成树 (PVST),最多支持 128 个生成树。 本交换机支持 ISL 及 IEEE trunk 二种封装。 配置正常范围的 VLAN VLAN 号 1, 1002 到 1005 是自动生成的不能被去掉。 生成、修改以太网 VLAN 命令 目的 Step 1 configure terminal 进入配置状态 Step 2 vlan vlanid 输入一个 VLAN 号 , 然后进入 vlan 配置状态,可以输入一个新的 VLAN 号或旧的来进行修改。 Step 3 name vlanname (可选 )输入一个 VLAN 名,如果没有配置 VLAN 名,缺省的名字是 VLAN 号前面用 0填满的 4位数,如 VLAN0004是 VLAN4的缺省名字 Step 4 mtu mtusize (可选 ) 改变 MTU 大小 Step 5 end 退出 Step 6 show vlan {name vlanname | id vlanid} 验证 Step 7 copy runningconfig startup config (可选 ) 保存配置 用 no vlan name 或 no vlan mtu 退回到缺省的 vlan 配置状态 举例如下 : Switch configure terminal Switch(config) vlan 20 Switch(configvlan) name test20 Switch(configvlan) end 也可以在 enable 状态下,进行 VLAN 配置 : 命令 目的 Step 1 vlan database 进入 VLAN 配置状态 Step 2 vlan vlanid name vlanname 加入 VLAN 号及 VLAN名 Step 3 vlan vlanid mtu mtusize (可选 ) 修改 MTU大小 Step 4 exit 更新 VLAN数据庫并退出 Step 5 show vlan {name vlanname | id vlanid} 验证配置 Step 6 copy runningconfig startup config 保存配置(可选) 举例如下: Switch vlan database Switch(vlan) vlan 20 name test20 Switch(vlan) exit APPLY pleted.。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。