三层交换机配置命令以及中文解释_第1页
三层交换机配置命令以及中文解释_第2页
三层交换机配置命令以及中文解释_第3页
三层交换机配置命令以及中文解释_第4页
三层交换机配置命令以及中文解释_第5页
已阅读5页,还剩8页未读 继续免费阅读

下载本文档

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

文档简介

1、三层交换机配置命令以及中文解释基本配置S enable进入特权模式S# configure terminal进入全局配置模式S(config)# hostname name 改变交换机名称S(config)# enable password level level_# password 设置用户口令(level_#=1)或特权口令(level_#=15)S(config)# line console 0 进入控制台接口S(config-line)# password console_password 接上一条命令,设置控制台口令S(config)# line vty 0 15 进入虚拟终端S(

2、config-line)# password telnet_password 接上一条命令,设置 Telnet 口令S(config-line)# login 允许 Telnet 登录S(config)# enable password|secret privilege_password 配置特权口令(加密或不加密)S(config)# interface ethernet|fastethernet|gigabitethernet slot_#/port_# 进入接口子配置模式S(config-if)# no shutdown关闭或启用该接口(默认启用)S(config)# ip addres

3、s IP_address sunbet_mask 指定 IP 地址S(config)# ip default-gateway routers_IP_address 指定哪台路由器地址为默认网关S# show running-config查看当前的配置S# copy running-config startup-config 将 RAM 中的当前配置保存到 NVRAM 中S show interface type slot_#/port_#查看所有或指定接口的信息S show ip显示交换机的IP配置(只在1900系列上可用)S show version查看设备信息S# show ip inte

4、rface brief 验证 IP 配置S(config-if)# speed 10|100|auto 设置接口速率S(config-if)# duplex auto|full|half 设置接口双工模式S show mac-address-table 查看 CAM 表S# clear mac-address-table清除CAM表中的动态条目1900(config)# mac-address-table permanent MAC_address type slot_#/port_# 在 CAM 表 中创建静态条目2950(config)# mac-address-table static

5、MAC_address vlan VLAN_# interface type slot_#/ port_#在CAM表中创建静态条目1900(config)# mac-address-table restricted static MAC_address source_portlist_of_allowed_interface设置静态端口安全措施1900(config-if)# port secure 启用粘性学习1900(config-if)# port secure max-mac-count value设置粘性学习特性能够学到的地址数量(默 认132,取值范围是1-132)1900(con

6、fig)# address-violation suspend|ignore|disable 改变安全选项1900 show mac-address-table security 验证端口安全措施2950(config)# switchport mode access定义接口为主机端口而不是中继端口2950(config)# switchport port-security 启用端口安全措施2950(config)# switchport port-security maximum value 指定可与此接口相关的设备的最大数 量2950(config)# switchport port-se

7、curity violation protect|restrict|shutdown 指定出现安全违规时应该发生的事2950(config)# switchport port-security mac-address MAC_address 指定允许与此接口相关的确 切的MAC地址2950(config)# switchport port-security mac-address sticky 启用粘性学习特性2950(config)# show port interface type slot_#/ port_# 验证接口配置2950(config-if) description name

8、设置接口描述信息2950# show buffers查看系统缓存的大小1900# copy nvram tftp:/ IP_address_of_TFTP_server/ file_name 将配置文件备份到 TFTP 服务 器上1900# copy tftp:/ IP_address_of_TFTP_server/ file_name nvram 从 TFTP 服务器上恢复配置到 NVRAM1900# delete nvram 删除配置文件2950# erase startup-config 删除配置文件3550# show tcam qos TCAM_ID statistics 查看 TC

9、AM 剩余容量4000 enable进入特权模式4000(enable) set enablepass 设置授权密码4000(enable) set interface sc0 IP_address mask 配置 IP 地址4000(enable) set port enable|disable slot_#/port_# 启用/禁用接口4000(enable) show port slot_#/port_#显示接口信息4000(enable) set port name slot_#/port_# name 设置交换机接口描述信息4000(enable) set port speed sl

10、ot_#/port_# 4|10|16|100|auto 设置交换机接口速率4000(enable) set port duplex slot_#/port_# full|half 设置交换机接口双工模式4000(enable) clear config all 删除 NVRAM 中的配置信息4000(enable) erase all 删除 FLASH 中的内容4000(enable) show flash 显示 FLASH 中的内容4000(enable) show cam count dynamic|static|permanent|system vlan_# 显示 CAM 表VLAN

11、1900(config)# vtp domain VTP_domain_name 定义交换机域名1900(config)# vtp server|client|transparent 定义交换机 VTP 模式(默认服务器)1900(config)# vtp password VTP_password 配置 VTP 口令1900(config)# vtp pruning enable|disable 启用/禁用修剪(默认启用)1900(config)# vtp trap enable 启用 SNMP 陷阱(默认启用)1900# show vtp 验证 VTP 配置2950# vtp databa

12、se访问VLAN和VTP配置(以下均是在IOS12.1前用,12.1后全是在全局 配置模式下)2950(vlan)# vtp domain VTP_domain_name 定义交换机域名2950(vlan)# vtp server|client|transparent 定义交换机 VTP 模式(默认服务器)2950(vlan)# vtp password VTP_password 配置 VTP 口令2950(vlan)# vtp pruning启用/禁用修剪(默认启用)2950(config)# snmp-server enable traps vtp 启用 SNMP 陷阱(默认启用)2950

13、# show vtp status 检查 VTP 配置2950# show vtp counters显示与VTP消息发送与接收相关的VTP统计信息1900(config-if)# trunk on|off|desirable|auto 指定中继类型1900# show trunk A|B 验证接口中继(A 是 fa0/26,B 是 fa0/27)2950(config-if)# switchport mode trunk|dynamic desirable|dynamic auto|nonegotiate 指定中继类 型(默认自动协商)2950(config-if)# switchport t

14、runk nativelallowedlpruning vlan VLAN_# 配置中继2950(config-if)# switchport trunk pruning vlan remove VLAN_# 清除不希望消减的 VLAN2950# show interfaces type 0/port_# switchport|trunk 验证接口中继1900(config)# vlan VLAN_# name VLAN_name创建 VLAN1900(config-if)# vlan-membership static VLAN_# 将该接 口静态地分配给一个 VLAN1900# show

15、vlan 验证 VLAN1900# show vlan-membership 查看 VLAN 成员关系1900# show spantree VLAN_#查看 VLAN 的 STP 信息2950# vlan database 进入 VLAN 数据库(ISO12.1 前用)2950(vlan)# vlan VLAN_# name VLAN_name创建 VLAN2950(config)# vlan VLAN_# 进入 VLAN数据库(ISO12.1 后用)2950(config-vlan)# name VLAN_name 创建 VLAN2950(config-if)# switchport mo

16、de access 指定连接是接入链路连接2950(config-if)# switchport access vlan VLAN_# 指定 VLAN 是接入链路连接4000(enable) set vlan VLAN_# name VLAN_name 配置 VLAN4000(enable) set vlan VLAN_# slot_#/port_#-port_# 为 VLAN 分配端口4000(enable) set trunk slot_#/port_# on|off|desirable|auto|nonegotiate VLAN_#isl|dot1q|dot10|lane|negotia

17、te配置中继4000(enable) clear trunk slot_#/port_# VLAN_# 删除 VLAN4000(enable) show trunk slot_#/port_# 验证中继端口4000(enable) set vtp v2 enable 配置 VTPv24000(enable) set vtp domain name mode client|server|transparent passwd password pruningenable|disable v2 enable|disable设置 VTP4000(enable) show vtp domain 验证 V

18、TP 域的信息4000(enable) show vtp statistics显示发出或收到的VTP通告信息的摘要内容4000(enable) set vtp pruneeligible VLAN_# 设置 VTP 消减4000(enable) clear vtp pruneeligible VLAN_# 清除不希望消减的 VLANSTP 4000(enable) set spantree enableldisable VLAN_# 启用/禁用 STP (默认启用)2950(config)# no spanning-tree vlan VLAN_# 启用/禁用 STP (默认启用)4000(e

19、nable) show spantree VLAN_#验证 STP 状态2950# show spanning-tree 验证 STP 状态4000(enable) set spantree root secondary VLAN_# dia network_diameter hello hello_time设置主根节点桥、备份节点桥、最大桥数量(2-7)、持续时间(1-10,默认2)4000(enable) set spantree portcost slot_#/port_# cost_# 设置端口开销2950(config-if)# spanning-tree cost cost_# 设

20、置端口开销4000(enable) set spantree portpri slot_#/port_# priority_# 设置端口优先级4000(enable) set spantree portvlanpri slot_#/port_# priority_# VLAN_#改变 VLAN 的优先级 设置2950(config-if)# spanning-tree vlan VLAN_# port-priority priority_# 设置端口优先级4000(enable) set spantree fwddelay delay_# VLAN_#设置从侦听状态到学习状态再到转发状态的时间

21、间隔(默认15秒,取值范围是4-30秒)4000(enable) set spantree hello interval_time VLAN_#设置根节点交换机发送 BPDU 的时间间隔(默认2秒,取值范围是1-10秒)4000(enable) set spantree maxage agingtime VLAN_#设置交换机持有 BPDU的时间(默认20秒,取值范围是6-40秒)2950(config)# spanning-tree vlan VLAN_# forward-time forward_time 设置从侦听状态到学习状态再到转发状态的时间间隔(默认15秒,取值范围是4-30秒)2

22、950(config)# spanning-tree vlan VLAN_# hello-time hello_time 设置根节点交换机发送BPDU的时间间隔(默认2秒,取值范围是1-10秒)2950(config)# spanning-tree vlan VLAN_# max-age maxage 设置交换机持有 BPDU 的时间(默认20秒,取值范围是6-40秒)4000(enable) set port channel slot_#/port_# on 建立以太通道集合4000(enable) show port capabilities slot_#/port_# 查看端口 的配置4

23、000(enable) show port channel验证以太通道集合的配置2950(config-if)# channel-group group_number mode auto|desirable|on 建立以太通道集合2950# show etherchannel group_number|brief|detail|load-balance|port|port-channel|summary 验 证以太通道集合的配置4000(enable) set spantree portfast slot_#/port_# enable 酉己置 PortFast2950(config-if)#

24、 spanning-tree portfast 酉己置 PortFast4000(enable) set spantree uplinkfast enable|disable rate station_update_rate all-protocolsoff|on启用/禁用 UplinkFast4000(enable) show spantree uplinkfast 验证 UplinkFast 配置2950(config)# spanning-tree uplinkfast max_update_rate 启用/禁用 UplinkFast2950# show spanning-tree up

25、linkfast 验证 UplinkFast 配己置4000(enable) set spantree backbonefast enable|disable 启用/禁用 BackboneFast4000(enable) show spantree backbonefast 验证 BackboneFast 配置2950(config)# spanning-tree backbonefast 启用 BackboneFast虚拟网间路由2600(config)# interface type slot_#/port_#.subint_number 配置子接口2600(config-subif)#

26、encapsulation dot1q|isl|sde|tr-isl VLAN_# 配置封装类型4000(enable) show module查看交换机的硬件配置4000(enable) session module_# 访问 L3SML3SM(config-if)# mac-address mac_address 分配 MAC 地址MLS 2600(config)# mls rp ip 启动 MLS2600(config-if)# mls rp vtp-domain domain_name 分配路由器接口到 VTP 域中2600(config-if)# mls rp vlan-id VLA

27、N_# 向接 口分配 VLAN2600(config-if)# mls rp management-interface 指定该接口为管理接口2600# show mls rp提供全局MLS信息2600# show mls rp interface type slot_#/port_# 提供指定接口的 MLS 信息2600# show mls rp vtp-domain domain_name 提供 VTP 域的 MLS 信息6500(enable) set mls enable 在 MLS-SE 上启动 MLS6500(enable) set mls include rp_ip_address

28、 告诉交换机哪一个 IP 地址是正确的6500(enable) show mls include显示外部路由处理器的IP地址列表6500(enable) set mls flow destination|destination-source|full告诉 MLS 交换机要缓存候选数据包的哪些信息6500(enable) set mls agingtime aging_time改变缓存的衰老时间(默认256秒,取值范围是 8-2032秒中的8的倍数值)6500(enable) set mls agingtime fast fast_aging_time pkt_threshold 改变快速衰老周

29、期和数据包门限值6500(enable) show mls ip 验证 MLS-SE 的配置6500(enable) clear mls entry destination IP_address source IP_address flow protocolsource_port destination_port all删除所有或指定 MLS 缓存记录3550(config)# ip routing 启动 IP 路由3550(config)# ip cef 启动 CEF3550(config-if)# no switchport将第二层接口转换为第三层接口3550(config-if)# ip

30、 route-cache cef 在接口上启动 CEF3550# show ip cef 验证 CEF组播3640(config)# ip multicast-routing启动路由器上的组播服务3640(config-if)# ip pim dense-mode 将接口 设置为 PIM 密集模式3640(config-if)# ip pim sparse-mode 将接口 设置为 PIM 稀疏模式3640(config-if)# ip pim sparsed-dense-mode 将接口 设置为 PIM 稀疏-密集模式3640(config)# ip pim rp-address IP_ad

31、dress group_ACL_# override手工配置 RP3640(config)# ip pim send-rp-announce type slot_#/port_# scope ttl_value group-list ACL_# 通 告RP组的分配3640(config)# ip pim send-rp-discovery scope ttl_value 配置 RP 映射代理3640(config-if)# ip multicast ttl-threshold ttl_value 设置 TTL 门限值3640(config-if)# ip igmp join-group gro

32、up_address 加入组播组3640# show ip mroute查看组播信息3640# ping验证RP之间或其他组播路由器之间的连接3640# mtrace source_IP_address destination_IP_address group 组播 traceroute3640(config-if)# ip cgmp 配置 CGMP 路由器4000(enable) set cgmp enable 启动 CGMP4000(enable) show cgmp statistics 查看 CGMP 统计信息4000(enable) set cgmp leave enable检查由客

33、户端产生的IGMPv2的离开信息4000(enable) set igmp enable 启动 IGMP4000(enable) ip igmp snooping 启动 IGMP 探听4000(enable) set igmp fastleave enable 启动快速离开过程4000(enable) show igmp statistics显示交换机上IGMP探听的状态信息QoS 2950(config)# wrr-queue cos-map queue_ID cos_value 建立队列2950(config)# wrr-queue bandwidth bandwidth_value 设置队列门限2950(config)# class-maps name定义对信息传输分类时的匹配标准2950(

温馨提示

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

评论

0/150

提交评论