H3C交换机配置命令

上传人:M****1 文档编号:1119998 上传时间:2017-05-28 格式:DOC 页数:7 大小:196.50KB
返回 下载 相关 举报
H3C交换机配置命令_第1页
第1页 / 共7页
H3C交换机配置命令_第2页
第2页 / 共7页
H3C交换机配置命令_第3页
第3页 / 共7页
H3C交换机配置命令_第4页
第4页 / 共7页
H3C交换机配置命令_第5页
第5页 / 共7页
点击查看更多>>
资源描述

《H3C交换机配置命令》由会员分享,可在线阅读,更多相关《H3C交换机配置命令(7页珍藏版)》请在金锄头文库上搜索。

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 进入虚拟终端

2、S(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 add

3、ress 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# s

4、how ip interface 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-

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

6、值范围是 1-132)1900(config)# 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(conf

7、ig)# switchport port-security 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(conf

8、ig-if) description name 设置接口描述信息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

9、TCAM_ID statistics 查看 TCAM 剩余容量4000 enable 进入特权模式4000(enable) set password 设置用户模式密码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

10、slot_#/port_# name 设置交换机接口描述信息4000(enable) set port speed slot_#/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

11、 count dynamic|static|permanent|system vlan_# 显示 CAM 表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 启用

12、 SNMP 陷阱(默认启用)1900# show vtp 验证 VTP 配置2950# vtp database 访问 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 启用/禁用修剪(默认启用)2

13、950(config)# snmp-server enable traps vtp 启用 SNMP 陷阱(默认启用)VLAN2950# 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 desirabl

14、e|dynamic auto|nonegotiate 指定中继类型(默认自动协商)2950(config-if)# switchport trunk native|allowed|pruning 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(

15、config-if)# vlan-membership static VLAN_# 将该接口静态地分配给一个 VLAN1900# show 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 后

16、用)2950(config-vlan)# name VLAN_name 创建 VLAN2950(config-if)# switchport mode 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|negotiate配置中继4000(enable) clear trunk slot_#/port_# VLAN_# 删除 VLAN40

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号