H3C交换机配置代码

合集下载

H3C交换机常用配置命令大全

H3C交换机常用配置命令大全

H3C交换机常用配置命令大全.用户配置: system-view [H3C]super password H3C 设置用户分级密码 [H3C] undo super password 删除用户分级密码[H3C]localuser bigheap 123456 1 缺省 admin,adminWeb 网管用户设置,1 (缺省)为管理级用户[H3C] undo localuser bigheap 删除Web 网管用户 [H3C]user- in terface aux 0 只支持0[H3C-Aux]idle-timeout 2 50 设置超时为 2分50秒,若为0则表示不超时,默认为 5分钟[H3C-Aux]undo idle-timeout 恢复默认值 [H3C]user-i nterface vty 0 只支持0和[H3C-vty]idle-timeout 2 50 5分钟设置超时为2分50秒,若为0则表示不超时,默认为[H3C-vty]undo idle-timeout恢复默认值[H3C-vty]set authe ntication password 123456 设置telnet 密码,必须设置 [H3C-vt y]undo set authe nticati on password 取消密码[H3C]display users显示用户[H3C]display user- in terface 显示用户界面状态二.系统IP 配置: [H3C]vla n 20[H3C]ma nageme nt-vlan 20 [H3C]i nterface vlan-in terface 20 创建并进入管理 VLAN[H3C]u ndo i nterface vla n-in terface 20 删除管理VLAN 接口[H3C-Vla n-in terface20]ip address 192.168.1.2 255.255.255.0 N 接口静态IP 地址(缺省为192.168.0.234)配置管理VLA[H3C-Vla n-in terface20]u ndo ip address 删除IP 地址[H3C-Vla n-in terface20]ip gateway 192.168.1.1指定缺省网关(默认无网关地[H3C-Vla n-in terface20]u ndo ip gateway [H3C-Vla n-in terface20]shutdow n 关闭接口[H3C-Vla n-in terface20]u ndo shutdow n 显示管理VLAN 接口 IP 的相关信息开启[H3C]display ip[H3C]display in terface vla n-in terface 20 开启IP 调试功能查看管理VLAN 的接口信息debugg ing ip undo debuggi ng ip:[H3C-Vla n-in terface20]ip address dhcp-alloc 取IP 地址[H3C-Vla n-in terface20]u ndo ip address dhcp-alloc [H3C]display dhcp debugg ing dhcp-alloc 显示DHCP 客户信息开启DHCF 调试功能undo debuggi ng dhcp-alloc 四. 端口配置:5,10,20,100,缺省为100,同时组播和未知单播也受此影响(trunk 线路两端的PVID 必须一致)[H3C-Ethernet0/3]port access vlan 20 将当前 access 端口加入指定的 VLAN[H3C-Ethernet0/3]port trunk permit vlan all 允许所有的 VLAN 通过当前的 trunk 端口,可多次使用该命令 [H3C-Ethernet0/3]mdi auto 设置以太端口为自动监测,normal (缺省)为直通线,across 为交叉线[H3C]link-aggregation Ethernet 0/1 to Ethernet 0/4将 1-4 口加入汇聚组,1为主端口,两端需要同时配置,设置了端口镜像以及端口隔离的端口无法汇聚管理VLAN 接口通过DHC 方式获取消[H3C]i nterface EthernetO/3 [H3C-EthernetO/3]shutdow n [H3C-EthernetO/3]speed 100 [H3C-EthernetO/3]duplex full 聚后速率,可为10,100,1000 和auto (缺省)双工,可为half,full 和auto (缺省)光口和汇[H3C-Ethernet0/3]flow-co ntrol开启流控,默认为关闭[H3C-Ethernet0/3]broadcast-suppression 20设置抑制广播百分比为20%,可取[H3C-Ethernet0/3]loopback in ternal [H3C-Ethernet0/3]loopback external 者自协商模式[H3C-Ethernet0/3]port lin k-type trunk (缺省),trunk[H3C-Ethernet0/3]port trunk pvid vlan 20认为1内环测试外环测试,需插接自环头,必须为全双工或设置链路的类型为 trunk,可为access设置20为该trunk 的缺省VLAN,默[H3C]u ndo lin k-aggregation Ethernet0/1 [H3C]li nk-aggregati on mode egress 行负荷分担,可选为gress,egress 禾口both,缺省为both删除该汇聚组配置端口汇聚模式为根据目的MAC地址进in[H3C]monitor-port Ethernet 0/2 将该端口设置为镜像端口,必须先设置镜像端口,删除时必须先删除被镜像端口,而且它们不能同在一个端口,该端口不能在汇聚组中,设置新镜像端口时,新取代旧,被镜像不变[H3C]mirroring-port Ethernet 0/3 to Ethernet 0/4 both 将端口3 和4 设置为被镜像端口,both为同时监控接收和发送的报文,inbound表示仅监控接收的报文,outbound 表示仅监控发送的报文[H3C]display mirror[H3C]display in terface Ethernet 0/3reset cou nters 清除所有端口的统计信息[H3C]display lin k-aggregatio n Ethernet 0/3 显示端口汇聚信息[H3C-Ethernet0/3]virtual-cable-test 诊断该端口的电路状况五.VLAN配置:[H3C]vla n 2[H3C]undo vlan all 删除除缺省VLAN外的所有VLAN缺省VLAN 不能被删除[H3C-vlan2]port Ethernet 0/4 to Ethernet 0/7 将4 到7 号端口加入到VLAN2 中,此命令只能用来加access端口,不能用来增加trunk或者hybrid端口[H3C-vlan2]port-isolate enable 打开VLAN内端口隔离特性,不能二层转发,默认不启用该功能[H3C-Ethernet0/4]port-isolate uplink-port vlan 2 设置4 为VLAN2的隔离上行端口,用于转发二层数据,只能配置一个上行端口,若为trunk,则建议允许所有VLAN通过, 隔离不能与汇聚同时配置[H3C]display vlan all 显示所有VLAN的详细信息S1550E支持基于端口的VLAN,通过创建不同的user-group 来实现,一个端口可以属于多个user-group, 不属于同一个user-group 的端口不能互相通信,最多支持50个user-group [H3C]user-group 20 创建user-group 20, 默认只存在user-group 1[H3C-UserGroup20]port Ethernet 0/4 to Ethernet 0/7 将4 到7 号端口加入到VLAN20中,初始时都属于user-group 1 中[H3C]display user-group 20 显示user-group 20 的相关信息六.集群配置:S2100只能作为成员交换机加入集群中,加入后系统名改为”集群名_成员编号?原系统名"的格式?即插即用功能通过两个功能实现:集群管理协议MAC组播地址协商和管理VLAN协商[H3C]cluster enable 启用群集功能,缺省为启用[H3C]cluster 进入群集视图[H3C-cluster]administrator-address H-H-H name switch H-H-H 为命令交换机的MAC加入switch集群[switch_1.H3C-cluster] undo admi nistrator-address 退出集群[H3C]display cluster 显示集群信息[H3C]management-vlan 2 集群报文只能在管理VLAN中转发,同一集群需在同一个管理VLAN中,需在建立集群之前指定管理VLANdebugg ing cluster七.QoS配置:QoS配置步骤:设置端口的优先级,设置交换机信任报文的优先级方式,队列调度,端口限速[H3C-EthernetO/3]priority 7 设置端口优先级为7,默认为0[H3C]priority-trust cos 设置交换机信任报文的优先级方式为cos (802.1p优先级,缺省值),还可以设为dscp方式(dscp优先级方式)[H3C]queue-scheduler hq-wrr 2 4 6 8 设置队列调度算法为HQ-WRR默认为WR R),权重为2,4,6,8[H3C-Ethernet0/3]li ne-rate in bou nd 29 将端口进口速率限制为2Mbps,取1-28 时,速率为rate*8*1024/125, 即64,128,192...1.792M;29-127 时,速率为(rate-27)*1024, 即2M,3M,4M...100M,千兆时可继续往下取,128-240 时,速率为(rate-115)*8*1024, 即104M,112M,120M...1000M[H3C]display queue-scheduler 显示队列调度模式及参数[H3C]display priority-trust 显示优先级信任模式八.系统管理:[H3C]mac-address blackhole H-H-H vlan 1 在VLAN1 中添加黑洞MAC[H3C]mac-address static H-H-H in terface Ethernet 0/1 vla n 1 在VLAN1 中添加端口一的一个mac[H3C]mac-address timer aging 500 设置MAC地址表的老化时间为500s[H3C]display mac-address[H3C]display arp[H3C]mac-address port-bi ndi ng H-H-H in terface Ethernet 0/1 vla n 1 配置端口邦定[H3C]display mac-address port-b inding[H3C]display saved-c on figurati on[H3C]display curre nt-con figurati onsave[H3C]restore default 恢复交换机出厂默认配置,恢复后需重启才能生效[H3C]display versionreboot[H3C]display device[H3C]sys name bigheap[H3C]i nfo-ce nter e nable启用系统日志功能,缺省情况下启用。

h3c交换机配置命令

h3c交换机配置命令

H3C交换机配置命令1. 简介本文档将介绍H3C交换机常用的配置命令,包括基本配置、端口配置、VLAN 配置、静态路由配置等内容。

2. 基本配置命令2.1. 登录交换机在浏览器中输入交换机的管理界面IP地址,打开Web界面,输入用户名和密码进行登录。

2.2. 设置主机名[h3c]sysname Switch2.3. 配置管理员密码[Switch]super password level 3 simple 1234563. 端口配置命令3.1. 配置端口速率和双工模式[Switch]interface GigabitEthernet 1/0/1[Switch-GigabitEthernet1/0/1]speed-duplex 1000-full3.2. 配置端口描述[Switch]interface GigabitEthernet 1/0/1[Switch-GigabitEthernet1/0/1]description This is a test port.3.3. 配置端口VLAN成员关系[Switch]vlan 10[Switch-vlan10]port GigabitEthernet 1/0/1 untagged4. VLAN配置命令4.1. 创建VLAN[Switch]vlan 10[Switch-vlan10]name Sales4.2. 配置端口VLAN成员关系[Switch]interface GigabitEthernet 1/0/1[Switch-GigabitEthernet 1/0/1]port link-type access[Switch-GigabitEthernet 1/0/1]port default vlan 104.3. 配置端口TRUNK属性[Switch]interface GigabitEthernet 1/0/1[Switch-GigabitEthernet 1/0/1]port link-type trunk[Switch-GigabitEthernet 1/0/1]port trunk allow-pass vlan 10 to 205. 静态路由配置命令5.1. 配置静态路由[Switch]ip route-static 0.0.0.0 0.0.0.0 192.168.1.15.2. 配置静态路由的下一跳接口[Switch]interface GigabitEthernet 1/0/1[Switch-GigabitEthernet 1/0/1]ip address 192.168.1.2 255.255.255.06. 总结以上是H3C交换机常用的配置命令的简要介绍,包括基本配置、端口配置、VLAN配置和静态路由配置等内容。

H3C交换机配置代码

H3C交换机配置代码

H3C交换机配置代码*中文切换language-mode Chinese|English1.进入特权用户<Quidway>system //2.命名交换机sysname [名称]3.查看配置情况undo shutdown //打开端口display currect-config //查看所有配置dis vlan //查看vlanQuit //返回上一级Save //保存4.划分vlanvlan [号] //vlan 105.在划分vlan后分配端口port ethernet0/2 //port ethernet0/3 to ethernet0/5 //从3端口到5端口6.进入端口分配vlanint e0/3 //进入3号端口port access vlan 2 //划分进vlan27.进入vlan划分IP[S3026]interface vlan 1[S3026-Vlan-interface1]ip address 192.168.0.1 255.255.255.0 8.静态路由ip route-static 0.0.0.0 0.0.0.0 10.65.1.29.设置默认网管ip default-gateway 10.65.1.2H3C交换机################################################1、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、port link-type Access|Trunk|Hybrid 设置端口访问模式7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器########################################################### ###########################1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router########################################################### ###############################1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置:<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。

H3C交换机配置代码

H3C交换机配置代码

H3C交换机配置代码*中文切换language-mode Chinese|English1.进入特权用户<Quidway>system //2.命名交换机sysname [名称]3.查看配置情况undo shutdown //打开端口display currect-config //查看所有配置dis vlan //查看vlanQuit //返回上一级Save //保存4.划分vlanvlan [号] //vlan 105.在划分vlan后分配端口port ethernet0/2 //port ethernet0/3 to ethernet0/5 //从3端口到5端口6.进入端口分配vlanint e0/3 //进入3号端口port access vlan 2 //划分进vlan27.进入vlan划分IP[S3026]interface vlan 1[S3026-Vlan-interface1]ip address 192.168.0.1 255.255.255.08.静态路由ip route-static 0.0.0.0 0.0.0.0 10.65.1.29.设置默认网管ip default-gateway 10.65.1.2H3C交换机################################################1、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、 language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、 port link-type Access|Trunk|Hybrid 设置端口访问模式7、 undo shutdown 打开以太网端口8、 shutdown 关闭以太网端口9、 quit 退出当前视图模式10、 vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、 port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器########################################################### ###########################1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、 language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、 ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码7、 undo shutdown 打开以太网端口8、 shutdown 关闭以太网端口9、 quit 退出当前视图模式10、 ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、 ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router########################################################### ###############################1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、 language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置 :<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。

H3C华为交换机配置命令

H3C华为交换机配置命令

华为交换机基础命令1.在基于IOS的交换机上设置主机名/系统名:switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名:switch(enable) set system name name-string2.在基于IOS的交换机上设置登录口令:switch(config)# enable password level 1 password在基于CLI的交换机上设置登录口令:switch(enable) set passwordswitch(enable) set enalbepass3.在基于IOS的交换机上设置远程访问:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address在基于CLI的交换机上设置远程访问:switch(enable) set interface sc0 ip-address netmask broadcast-addressswitch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.在基于IOS的交换机上启用和浏览CDP信息:switch(config-if)# cdp enableswitch(config-if)# no cdp enable为了查看Cisco邻接设备的CDP通告信息:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]在基于CLI的交换机上启用和浏览CDP信息:switch(enable) set cdp {enable|disable} module/port为了查看Cisco邻接设备的CDP通告信息:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]5.基于IOS的交换机的端口描述:switch(config-if)# description description-string基于CLI的交换机的端口描述:switch(enable)set port name module/number description-string6.在基于IOS的交换机上设置端口速度:switch(config-if)# speed{10|100|auto}在基于CLI的交换机上设置端口速度:switch(enable) set port speed moudle/number {10|100|auto}switch(enable) set port speed moudle/number {4|16|auto}7.在基于IOS的交换机上设置以太网的链路模式:switch(config-if)# duplex {auto|full|half}在基于CLI的交换机上设置以太网的链路模式:switch(enable) set port duplex module/number {full|half}switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)# interface interface module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list9. 在基于IOS的交换机上配置VLAN中继线:switch(config)# interface interface mod/portswitch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation {isl|dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list在基于CLI的交换机上配置VLAN中继线:switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]Vlan-range [isl|dotlq|dotl0|lane|negotiate]10.在基于IOS的交换机上配置VTP管理域:switch# vlan databaseswitch(vlan)# vtp domain domain-name在基于CLI的交换机上配置VTP管理域:switch(enable) set vtp [domain domain-name]11.在基于IOS的交换机上配置VTP 模式:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password password在基于CLI的交换机上配置VTP 模式:switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]12. 在基于IOS的交换机上配置VTP版本:switch# vlan databaseswitch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本:switch(enable) set vtp v2 enable13. 在基于IOS的交换机上启动VTP剪裁:switch# vlan databaseswitch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁:switch(enable) set vtp pruning enableswitch(config-if)# port group group-number [distribution {source|destination}]在基于CLI的交换机上配置以太信道:switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto}15.在基于IOS的交换机上调整根路径成本:switch(config-if)# spanning-tree [vlan vlan-list] cost cost在基于CLI的交换机上调整根路径成本:switch(enable) set spantree portcost moudle/port costswitch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list]16.在基于IOS的交换机上调整端口ID:switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority在基于CLI的交换机上调整端口ID:switch(enable) set spantree portpri {mldule/port}priorityswitch(enable) set spantree portvlanpri {module/port}priority [vlans]17. 在基于IOS的交换机上修改STP时钟:switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)# spanning-tree [vlan vlan-list] forward-time seconds` switch(config)# spanning-tree [vlan vlan-list] max-age seconds在基于CLI的交换机上修改STP时钟:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:switch(config-if)#spanning-tree portfast在基于CLI的交换机端口上启用或禁用Port Fast 特征:switch(enable) set spantree portfast {module/port}{enable|disable}19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]在基于CLI的交换机端口上启用或禁用UplinkFast 特征:switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]端口镜像配置『配置环境参数』1.PC1和PC2的IP地址分别为10.10.1.1/24、10.10.1.2/24『组网需求』2数据配置步骤『S2000EI、S2000C系列交换机端口镜像配置流程』mirroring-port用来定义镜像端口,monitor-port用来定义监控端口。

最新H3C交换机配置代码

最新H3C交换机配置代码

H3C交换机配置代码*中文切换language-mode Chinese|English1.进入特权用户<Quidway>system //2.命名交换机sysname [名称]3.查看配置情况undo shutdown //打开端口display currect-config //查看所有配置dis vlan //查看vlanQuit //返回上一级Save //保存4.划分vlanvlan [号] //vlan 105.在划分vlan后分配端口port ethernet0/2 //port ethernet0/3 to ethernet0/5 //从3端口到5端口6.进入端口分配vlanint e0/3 //进入3号端口port access vlan 2 //划分进vlan27.进入vlan划分IP[S3026]interface vlan 1[S3026-Vlan-interface1]ip address 192.168.0.1 255.255.255.0 8.静态路由ip route-static 0.0.0.0 0.0.0.0 10.65.1.29.设置默认网管ip default-gateway 10.65.1.2H3C交换机################################################1、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、port link-type Access|Trunk|Hybrid 设置端口访问模式7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器########################################################### ###########################1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router########################################################### ###############################1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置:<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。

H3C交换机配置命令大全

H3C交换机配置命令大全

H3C交换机配置命令大全H3C交换机################################################Dis cur 查看当前配置[h3c]telnet server enable 开启远程登录[h3c]local-user h3c 创建用户名h3c[h3c-luser-h3c]password cipher h3c 为h3c创建密文显示的密码[h3c-luser-h3c]service-type telnet 定义该用户的服务类型为telnet[h3c-luser-h3c]authorization-attribute level 3 定义该用户的特权级别[h3c-luser-h3c]quit 退出用户配置模式[h3c]user-interface vty 0 4 设置虚拟用户端口[h3c-ui-vty0-4]authentication-mode scheme 设定远程登录用户的登录方式使用用户名和密码[h3c-ui-vty0-4]user privilege level 3 设置远程登录用户登录后的最高级别注意两条设置级别命令的区别。

第一个是设置当前用户的级别。

第二个是设置所有远程登录用户的最高级别H3C路由telnet配置第一步:开启服务1.[H3C]telnetserver enable#开启服务H3C路由telnet配置第二步:创建和配置用户1.[H3C]local-user new2.#创建一个用户,命名为new3.4.[H3C-luser-new]password simple 12345.#设置用户密码为明文显示12346.7.[H3C-luser-new]service-typetelnet8.#设置用户类型为telnet9.10.[H3C-luser-new]authorization-attribute level 311.#设置用户级别为最高级312.13.[H3C-luser-new]quit14.15.[H3C]user-interface vty 0 416.#设置虚拟用户端口0-417.18.[H3C-ui-vty0-4]authentication-mode scheme19.#设置用户远程登录方式为使用用户名和密码20.21.[H3C-ui-vty0-4]user privilege level 322.#设置远程用户登录后的最高级别为323.24.[H3C]local-user aaa25.[H3C-luser-aaa]pa26.[H3C-luser-aaa]password si27.[H3C-luser-aaa]password simple aaa28.[H3C-luser-aaa]ser29.[H3C-luser-aaa]service-type tl [1D [1Del30.[H3C-luser-aaa]service-typetelnetle31.[H3C-luser-aaa]service-typetelnetlevel 332.^33.% Too many parameters found at '^' position.34.[H3C-luser-aaa] er35.[H3C-luser-aaa]er [1D [1D [1D [1Dser36.[H3C-luser-aaa]service-type tel37.[H3C-luser-aaa]service-typetelnet38.[H3C-luser-aaa]l39.[H3C-luser-aaa]logfile40.[H3C-luser-aaa]logfile41.[H3C-luser-aaa]logfile [1D [1D [1D [1D [1D [1D [1D [1D [1D [1D [1D [1D [1D [1Devel 3通过上述命令我们就完成了H3C路由telnet配置的工作了。

h3c交换机配置命令大全

h3c交换机配置命令大全

h3c交换机配置命令大全其实不同厂家型号的交换机设置都是差不多的,只是不同厂家的交换机设置的命令是不同的!今天店铺就来给你介绍一下h3c交换机配置命令大全,希望你能够使用上!h3c交换机配置命令大全一.用户配置:system-view[H3C]super password H3C 设置用户分级密码[H3C]undo super password 删除用户分级密码[H3C]localuser bigheap 123456 1 Web网管用户设置,1(缺省)为管理级用户,缺省admin,admin[H3C]undo localuser bigheap 删除Web网管用户[H3C]user-interface aux 0 只支持0[H3C-Aux]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟[H3C-Aux]undo idle-timeout 恢复默认值[H3C]user-interface vty 0 只支持0和1[H3C-vty]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟[H3C-vty]undo idle-timeout 恢复默认值[H3C-vty]set authentication password 123456 设置telnet密码,必须设置[H3C-vty]undo set authentication password 取消密码[H3C]display users 显示用户[H3C]display user-interface 显示用户界面状态二.系统IP配置:[H3C]vlan 20[H3C]management-vlan 20[H3C]interface vlan-interface 20 创建并进入管理VLAN[H3C]undo interface vlan-interface 20 删除管理VLAN接口[H3C-Vlan-interface20]ip address 192.168.1.2 255.255.255.0 配置管理VLAN接口静态IP地址(缺省为192.168.0.234) [H3C-Vlan-interface20]undo ip address 删除IP地址[H3C-Vlan-interface20]ip gateway 192.168.1.1 指定缺省网关(默认无网关地址)[H3C-Vlan-interface20]undo ip gateway[H3C-Vlan-interface20]shutdown 关闭接口[H3C-Vlan-interface20]undo shutdown 开启[H3C]display ip 显示管理VLAN接口IP的相关信息[H3C]display interface vlan-interface 20 查看管理VLAN的接口信息debugging ip 开启IP调试功能undo debugging ip三.DHCP客户端配置:[H3C-Vlan-interface20]ip address dhcp-alloc 管理VLAN接口通过DHCP方式获取IP地址[H3C-Vlan-interface20]undo ip address dhcp-alloc 取消[H3C]display dhcp 显示DHCP客户信息debugging dhcp-alloc 开启DHCP调试功能undo debugging dhcp-alloc。

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

H3C交换机配置代码*中文切换language-mode Chinese|English1.进入特权用户<Quidway>system //2.命名交换机sysname [名称]3.查看配置情况undo shutdown //打开端口display currect-config //查看所有配置dis vlan //查看vlanQuit //返回上一级Save //保存4.划分vlanvlan [号] //vlan 105.在划分vlan后分配端口port ethernet0/2 //port ethernet0/3 to ethernet0/5 //从3端口到5端口6.进入端口分配vlanint e0/3 //进入3号端口port access vlan 2 //划分进vlan27.进入vlan划分IP[S3026]interface vlan 1[S3026-Vlan-interface1]ip address 192.168.0.1 255.255.255.08.静态路由ip route-static 0.0.0.0 0.0.0.0 10.65.1.29.设置默认网管ip default-gateway 10.65.1.2H3C交换机################################################1、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、 language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、 port link-type Access|Trunk|Hybrid 设置端口访问模式7、 undo shutdown 打开以太网端口8、 shutdown 关闭以太网端口9、 quit 退出当前视图模式10、 vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、 port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器########################################################### ###########################1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、 language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、 ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码7、 undo shutdown 打开以太网端口8、 shutdown 关闭以太网端口9、 quit 退出当前视图模式10、 ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、 ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router########################################################### ###############################1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、 language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置 :<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。

7、192.168.1.1/24 等同 192.168.1.1 255.255.255.0;在配置交换机和路由器时, 192.168.1.1 255.255.255.0 可以写成:192.168.1.1 248、设备命名规则:地名-设备名-系列号例:PingGu-R-S3600########################################################### ######################################################H3C华为交换机端口绑定基本配置2008-01-22 13:401,端口 MACa)AM命令使用特殊的AM User-bind命令,来完成MAC地址及端口之间的绑定。

例如:[SwitchA]am user-bind mac-address 00e0-fc22-f8d3 interface Ethernet 0/1配置说明:由于使用了端口参数,则会以端口为参照物,即此时端口E0/1只允许PC1上网,而使用其他未绑定的MAC地址的PC机则无法上网。

但是PC1使用该MAC地址可以在其他端口上网。

b)mac-address命令使用mac-address static命令,来完成MAC地址及端口之间的绑定。

例如:[SwitchA]mac-address static 00e0-fc22-f8d3 interface Ethernet 0/1 vlan 1[SwitchA]mac-address max-mac-count 0配置说明:由于使用了端口学习功能,故静态绑定mac后,需再设置该端口mac学习数为0,使其他PC接入此端口后其mac地址无法被学习。

2,IP MACa)AM命令使用特殊的AM User-bind命令,来完成IP地址及MAC地址之间的绑定。

例如:[SwitchA]am user-bind ip-address 10.1.1.2 mac-address00e0-fc22-f8d3配置说明:以上配置完成对PC机的IP地址和MAC地址的全局绑定,即及绑定的IP地址或者MAC地址不同的PC机,在任何端口都无法上网。

支持型号:S3026E/EF/C/G/T、S3026C-PWR、E026/E026T、S3050C、E050、S3526E/C/EF、S5012T/G、S5024Gb)arp命令使用特殊的arp static命令,来完成IP地址及MAC地址之间的绑定。

例如:[SwitchA]arp static 10.1.1.2 00e0-fc22-f8d3配置说明:以上配置完成对PC机的IP地址和MAC地址的全局绑定。

3,端口 IP MAC使用特殊的AM User-bind命令,来完成IP、MAC地址及端口之间的绑定。

例如:[SwitchA]am user-bind ip-address 10.1.1.2 mac-address00e0-fc22-f8d3 interface Ethernet 0/1配置说明:可以完成将PC1的IP地址、MAC地址及端口E0/1之间的绑定功能。

由于使用了端口参数,则会以端口为参照物,即此时端口E0/1只允许 PC1上网,而使用其他未绑定的IP地址、MAC地址的PC机则无法上网。

但是PC1使用该IP地址和MAC地址可以在其他端口上网。

########################################################### ####################################[S2016-E1-Ethernet0/1]mac-address max-mac-count 0;进入到端口,用命令mac max-mac-count 0(端口mac学习数设为0)[S2016-E1]mac static 0000-9999-8888 int e0/1 vlan 10;将0000-9999-8888绑定到e0/1端口上,此时只有绑定mac的pc可以通过此口上网,同时E0/1属于vlan 10就这样,ok了,不过上面两个命令顺序不能弄反,除非端口下没有接pc########################################################### #############################dis vlan 显示vlanname text 指定当前vlan的名称undo name 取消[h3c] vlan 2[h3c-vlan2]name test vlandis users 显示用户dis startup 显示启动配置文件的信息dis user-interface 显示用户界面的相关信息dis web users 显示web用户的相关信息。

header login 配置登陆验证是显示信息header shellundo headerlock 锁住当前用户界面acl 访问控制列表 acl number inbound/outbound [h3c]user-interface vty 0 4[h3c-vty0-4] acl 2000 inboundshutdown:关闭vlan接口undo shutdown 打开vlan接口关闭vlan1 接口[h3c] interface vlan-interface 1[h3c-vlan-interface] shutdownvlan vlan-id 定义vlanundo valn vlan-iddisplay ip routing-tabledisplay ip routing-table protocol staticdisplay ip routing-table statisticsdisplay ip routing-table verbose 查看路由表的全部详细信息interface vlan-interface vlan-id 进入valnmanagement-vlan vlan-id 定义管理vlan号reset ip routing-table statistics protocol all 清除所有路由协议的路由信息.display garp statistics interface GigabitEthernet 1/0/1 显示以太网端口上的garp统计信息display voice vlan status 查看语音vlan状态[h3c-GigabitEthernet1/0/1] broadcast-suppression 20 允许接受的最大广播流量为该端口传输能力的20%.超出部分丢弃.[h3c-GigabitEthernet1/0/1] broadcast-suppression pps 1000 每秒允许接受的最大广播数据包为1000传输能力的20%.超出部分丢弃.display interface GigabitEthernet1/0/1 查看端口信息display brief interface GigabitEthernet1/0/1 查看端口简要配置信息display loopback-detection 用来测试环路测试是否开启display transceiver-information interfaceGigabitEthernet1/0/50 显示光口相关信息duplex auto/full/half[h3c]interface GigabitEthernet1/0/1[h3c-GigabitEthernet1/0/1]duplux auto 设置端口双工属性为自协商port link-type access/hybrid/trunk 默认为accessport trunk permit vlan all 将trunk扣加入所有vlan中reset counters interface GigabitEthernet1/0/1 清楚端口的统计信息speed auto 10/100/1000display port-security 查看端口安全配置信息am user-bind mac-addr 00e0-fc00-5101 ip-addr 10.153.1.2 interface GigabitEthernet1/0/1 端口ip绑定display arp 显示arpdisplay am user-bind 显示端口绑定的配置信息display mac-address 显示交换机学习到的mac地址display stp 显示生成树状态及统计信息[h3c-GigabitEthernet1/0/1]stp instance 0 cost 200 设置生成树实例0上路径开销为200stp cost 设置当前端口在指定生成树实例上路径开销。

相关文档
最新文档