华三交换机命令

合集下载

华三交换机命令详解

华三交换机命令详解

华三交换机命令详解华三交换机命令详解⽬录1 VLAN 配置命令1.1 VLAN 配置命令1.1.1 description1.1.2 display interface vlan-interface1.1.3 display vlan1.1.4 interface vlan-interface1.1.5 ip address1.1.6 name1.1.7 reset counters interface vlan-interface 1.1.8 shutdown1.1.9 vlan1.2 基于端⼝的 VLAN 配置命令1.2.1 display port1.2.2 port1.2.3 port access vlan1.2.4 port hybrid pvid1.2.5 port hybrid vlan1.2.6 port link-type1.2.7 port trunk permit vlan1.2.8 port trunk pvid1.3 基于 MAC 的 VLAN 配置命令1.3.1 display mac-vlan1.3.2 display mac-vlan interface1.3.3 mac-vlan enable1.3.4 mac-vlan mac-address1.3.5 mac-vlan trigger enable1.3.6 port pvid disable1.3.7 vlan precedence1.4 基于录录的 VLAN 配置命令1.4.1 display protocol-vlan interface 1.4.2 display protocol-vlan vlan 1.4.3 port hybrid protocol-vlan1.4.4 protocol-vlan1.5 基于 IP ⼦的⽹ VLAN 配置命令1.5.1 display ip-subnet-vlan interface 1.5.2 display ip-subnet-vlan vlan1.5.3 ip-subnet-vlan1.5.4 port hybrid ip-subnet-vlan2 Isolate-user-VLAN 配置命令2.1 Isolate-user-VLAN 配置命令2.1.1 display isolate-user-vlan2.1.2 isolate-user-vlan2.1.3 isolate-user-vlan enable2.1.4 isolated-vlan enable2.1.5 port isolate-user-vlan3 Voice VLAN 配置命令3.1 Voice VLAN 配置命令3.1.1 display voice vlan oui3.1.2 display voice vlan state3.1.3 voice vlan aging3.1.4 voice vlan enable3.1.5 voice vlan mac-address3.1.6 voice vlan mode auto3.1.7 voice vlan qos3.1.8 voice vlan qos trust3.1.9 voice vlan security enable1 VLAN配置命令1.1 VLAN配置命令1.1.1 description【命令】description textundo description【录录】VLAN录录/VLAN接⼝录录【缺省录录】2,系录录【】参数,描述VLAN或VLAN接⼝的描述字符串~可⽀持的描述字符包括英⽂可text 以包含录准字符;分⼤⼩的字母、字,、英⽂特殊字符、空格、以及符合区写数unicode录录录范的其他⽂字和符。

华三华为交换机路由器配置常用命令汇总

华三华为交换机路由器配置常用命令汇总

H3C交换机配置命令大全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路由器配置命令大全华为交换机常用配置实例H3C交换机路由器telnet和console口登录配置2009年11月09日星期一 10:00级别说明Level 名称命令0参观ping、tracert、telnet1监控display、debugging2配置所有配置命令管理级的命令除外3管理文件系统命令、FTP命令、TFTP命令、XMODEM命令telnet仅用密码登录,管理员权限Routeruser-interface vty 0 4Router-ui-vty0-4user privilege level3Router-ui-vty0-4set authentication password simple abctelnet仅用密码登录,非管理员权限Routersuper password level 3 simplesuperRouteruser-interface vty 0 4Router-ui-vty0-4user privilege level1Router-ui-vty0-4set authentication password simple abctelnet使用路由器上配置的用户名密码登录,管理员权限Routerlocal-user admin passwordsimple adminRouterlocal-user admin service-type telnetRouterlocal-useradmin level 3Routeruser-interface vty 04Router-ui-vty0-4authentication-mode localtelnet使用路由器上配置的用户名密码登录,非管理员权限Routersuper password level 3 simple superRouterlocal-user manage password simple manageRouterlocal-usermanage service-type telnetRouterlocal-user manage level2Routeruser-interface vty 0 4Router-ui-vty0-4authentication-mode local对console口设置密码,登录后使用管理员权限Routeruser-interface con0Router-ui-console0user privilege level 3Router-ui-console0set authentication password simple abc对console口设置密码,登录后使用非管理员权限Routersuper password level 3 simple superRouteruser-interfacecon 0Router-ui-console0user privilege level 1Router-ui-console0set authentication password simple abc对console口设置用户名和密码,登录后使用管理员权限Routerlocal-user admin password simpleadminRouterlocal-user admin service-type terminalRouterlocal-user adminlevel 3Routeruser-interface con 0Router-ui-console0authentication-modelocal对console口设置用户名和密码,登录后使用非管理员权限Routersuper password level 3 simple superRouterlocal-user manage password simple manageRouterlocal-user manage service-type terminalRouterlocal-usermanage level 2Routeruser-interface con0Router-ui-console0authentication-mode localsimple 是明文显示,cipher 是加密显示路由器不设置telnet登录配置时,用户无法通过telnet登录到路由器上Router-ui-vty0-4acl 2000 inbound可以通过acl的规则只允许符合条件的用户远程登录路由器华为路由器ospfnat。

华三交换机命令详解

华三交换机命令详解

目录1 VLAN配置命令1.1 VLAN配置命令1.1.1 description1.1.2 display interface vlan-interface1.1.3 display vlan1.1.4 interface vlan-interface1.1.5 ip address1.1.6 name1.1.7 reset counters interface vlan-interface 1.1.8 shutdown1.1.9 vlan1.2 基于端口的VLAN配置命令1.2.1 display port1.2.2 port1.2.3 port access vlan1.2.4 port hybrid pvid1.2.5 port hybrid vlan1.2.6 port link-type1.2.7 port trunk permit vlan1.2.8 port trunk pvid1.3 基于MAC的VLAN配置命令1.3.1 display mac-vlan1.3.2 display mac-vlan interface1.3.3 mac-vlan enable1.3.4 mac-vlan mac-address1.3.5 mac-vlan trigger enable1.3.6 port pvid disable1.3.7 vlan precedence1.4 基于协议的VLAN配置命令1.4.1 display protocol-vlan interface 1.4.2 display protocol-vlan vlan1.4.3 port hybrid protocol-vlan1.4.4 protocol-vlan1.5 基于IP子网的VLAN配置命令1.5.1 display ip-subnet-vlan interface 1.5.2 display ip-subnet-vlan vlan1.5.3 ip-subnet-vlan1.5.4 port hybrid ip-subnet-vlan2 Isolate-user-VLAN配置命令2.1 Isolate-user-VLAN配置命令2.1.1 display isolate-user-vlan2.1.2 isolate-user-vlan2.1.3 isolate-user-vlan enable2.1.4 isolated-vlan enable2.1.5 port isolate-user-vlan3 Voice VLAN配置命令3.1 Voice VLAN配置命令3.1.1 display voice vlan oui3.1.2 display voice vlan state 3.1.3 voice vlan aging3.1.4 voice vlan enable3.1.5 voice vlan mac-address3.1.6 voice vlan mode auto3.1.7 voice vlan qos3.1.8 voice vlan qos trust3.1.9 voice vlan security enable1 VLAN配置命令1.1 VLAN配置命令1.1.1 description【命令】description textundo description【视图】VLAN视图/VLAN接口视图【缺省级别】2:系统级【参数】text:描述VLAN或VLAN接口的描述字符串,可支持的描述字符包括英文可以包含标准字符(区分大小写的字母、数字)、英文特殊字符、空格、以及符合unicode 编码规范的其他文字和符号。

华三(H3C)交换机命令大全

华三(H3C)交换机命令大全

H3C【内部】交换机命令集用户视图<H3C>-------------------------------------------------------------------------------------------systen-view系统视图-------------------------------------------------------------------------------------------[H3C]?[H3C]super password 修改super密码[H3C]sysname 交换机命名[H3C]interface ethernet 0/1 进入接口视图[H3C]quit 退出系统视图[H3C]info-center console channel console 信息输出设置[H3C]monitor-port ethernet 0/1 配置端口镜像配置端口-------------------------------------------------------------------------------------------[H3C-Ethernet0/1]duplex {half|full|auto} 配置端口双工工作状态[H3C-Ethernet0/1]speed {10|100|auto} 配置端口工作速率[H3C-Ethernet0/1]flow-control 配置端口流控(防止拥塞丢包)[H3C-Ethernet0/1]mdi {across|auto|normal} 配置端口MDI/MDIX状态[H3C-Ethernet0/1]shutdown/undo shutdown 关闭/打开接口VLAN基本配置-------------------------------------------------------------------------------------------[H3C]vlan 3 创建/删除一个VLAN/进入VLAN配置视图[H3C]undo vlan 3[H3C-vlan3]port ethernet0/1 to ethernet0/4 给VLAN增加/删除以太网接口[H3C-Ethernet0/2]port access vlan 3 将端口加入到指定VLAN[H3C-Ethernet0/2]port link-type {trunk|access|hybrid} 设置端口工作模式[H3C-Ethernet0/2]port trunk permit vlan {ID|All} 设置trunk端口允许通过的VLAN[H3C-Ethernet0/2]port trunk pvid vlan 3 设置trunk端口的PVID-------------------------------------------------------------------------------------------交换机端口的3种工作模式:Access模式:不支持802.1q帧的传送Hybird模式:允许多个vlan的报文发送时不打标签Trunk 模式:只允许缺省vlan的报文发送时不打标签若trunk端口上收到了非802.1q帧时,交换机会给该帧加上802.1q的标志字段,该标志字段中的VLAN ID即该端口的PVID,使用port trunk pvid vlan vlan-id 配置端口的PVID配置端口聚合-------------------------------------------------------------------------------------------端口聚合,也称为端口汇聚或端口干路,是将多个端口聚合在一起,实现对出/入流量在各成员端口间进行分担的一种技术,解决上行链路的瓶颈问题,完成所有接入端口流量总和的传输。

华三交换机命令大全图文稿

华三交换机命令大全图文稿

华三交换机命令大全文件管理序列号:[K8UY-K9IO69-O6M243-OL889-F88688]一、<Quidway>system 进入使能模式password:~~~~~~~~~~[Quidway]super password 修改特权用户密码[Quidway]sysname 交换机命名[Quidway]interface ethernet 0/1 进入接口视图[Quidway]interface vlan x 进入接口视图=网关[Quidway]user-interface vty 0 4[S3026-ui-vty0-4]authentication-mode password[S3026-ui-vty0-4]set authentication-mode password simple 222 [S3026-ui-vty0-4]user privilege level 3[Quidway-Ethernet0/1]duplex {half|full|auto} 配置端口双工工作状态[Quidway-Ethernet0/1]speed {10|100|auto} 配置端口工作速率[Quidway-Ethernet0/1]flow-control 配置端口流控[Quidway-Ethernet0/1]mdi {across|auto|normal} 配置端口MDI/MDIX 状态平接或扭接[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} 接口工作模式[Quidway-Ethernet0/1]shutdown 关闭/重起接口[Quidway-Ethernet0/2]quit 退出视图[Quidway]vlan 3 创建/删除一个VLAN/进入VLAN模式[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 在当前VLAN增加/删除以太网接口[Quidway-Ethernet0/2]port access vlan 3 将当前接口加入到指定VLAN[Quidway-Ethernet0/2]port trunk permit vlan {ID|All} 设trunk允许的VLAN[Quidway-Ethernet0/2]port trunk pvid vlan 3 设置trunk端口的PVID[Quidway]monitor-port <interface_type interface_num> 指定和清除镜像端口[Quidway]port mirror <interface_type interface_num> 指定和清除被镜像端口[Quidway]port mirror int_list observing-port int_type int_num 指定镜像和被镜像[Quidway]description string 指定VLAN描述字符[Quidway]description 删除VLAN描述字符[Quidway] vlan [vlan_id]查看VLAN设置[Quidway] {enable|disable} 开启/关闭生成树,默认关闭[Quidway]stp priority 4096 设置交换机的优先级[Quidway]stp root{primary|secondary} 设置交换机为根或根的备份[Quidway-Ethernet0/1]stp cost 200 设置交换机端口的花费[SwitchA-vlanx]isolate-user-vlan enable 设置主vlan[SwitchA]Isolate-user-vlan <x> secondary <list> 设置主vlan包括的子vlan[Quidway-Ethernet0/2]port hybrid pvid vlan <id> 设置vlan的pvid[Quidway-Ethernet0/2]port hybrid pvid 删除vlan的pvid[Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged 设置无标识的vlan如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。

H3C(华三)交换机命令

H3C(华三)交换机命令
trusion-mode disableport-temporarily
[Sysname] port-security timer disableport 30
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] port-security intrusion-mode disableport-temporarily
[Quidway-ui-aux0] user privilege level 3
【CON口本地用户名和密码验证配置】
需要输入username和password才可以登陆交换机。
[Quidway]user-interface aux 0
配置本地或远端用户名和口令认证
[Quidway-ui-aux0] authentication-mode scheme
[Quidway-ui-aux0] authentication-mode password
设置登陆验证的password为明文密码”123+qwe”
[Quidway-ui-aux0] set authentication password simple chinasoft
配置登陆用户的级别为最高级别3(缺省为级别1)
[H3C-Ethernet1/0/2]quit
g8
另外一条为port-security port-mode
port-security max-mac-count 1
1,配置VLAN端口类型
<h3c>system-view
[h3c]interface Ethernet 1/0/2
[H3C-Ethernet1/0/2]port link-type Access|trunk|Hybrid

华三交换机-路由器配置命令

华三交换机-路由器配置命令

华三交换机-路由器配置命令华三交换机-路由器配置命令第一章:登录华三交换机-路由器1. 使用浏览器登录:a. 打开浏览器;b. 在地址栏中输入交换机-路由器的IP地址;c. 输入正确的用户名和密码;d. 单击登录按钮。

2. 使用命令行登录:a. 打开命令提示符或终端窗口;b. 输入telnet或ssh命令,后跟交换机-路由器的IP地址;c. 输入正确的用户名和密码;d. 按下回车键登录。

第二章:基本配置1. 设置主机名:hostname [主机名]2. 设置登录密码:enable password [密码]3. 配置管理接口:interface [接口]ip address [IP地址] [子网掩码] 4. 配置默认网关:ip default-gateway [默认网关]第三章:VLAN(虚拟局域网)配置1. 创建VLAN:vlan [VLAN号]name [VLAN名称]2. 配置端口―VLAN关联:interface [端口]switchport mode accessswitchport access vlan [VLAN号] 3. 配置交换机端口为Trunk口:interface [端口]switchport mode trunk第四章:路由配置1. 静态路由配置:ip route [目标网络] [目标子网掩码] [下一跳IP地址] 2. OSPF(开放最短路径优先)配置:router ospf [进程号]network [网络地址] [通配符] area [区域号]3. BGP(边界网关协议)配置:router bgp [自治系统号]neighbor [对等体IP地址] remote-as [对等体自治系统号]第五章:安全配置1. 配置SSH(安全外壳协议):crypto key generate rsaip ssh server enable2. 配置访问控制列表(ACL):ip access-list [ACL名称]permit/deny [源IP地址] [目标IP地址] [协议]第六章:性能优化配置1. 配置端口速率限制:interface [端口]bandwidth [带宽]2. 配置端口链路聚合(LACP):interface port-channel [聚合组号]channel-group [组号] mode active3. 配置端口流量控制:interface [端口]storm-control [选项]附件:本文档涉及的附件可在[link]。

华三路由器交换机配置命令

华三路由器交换机配置命令

路由器 :1、进入 SETUP模式 Router#setup2、时间设置 router#clock set hh:mm:ss date moth year3、 router>show historyRouter>terminal history size lines4、 router#show version5、 router#show running-config6、 router#show starup-config7、 router(config)#hostname name主机命名8、 router(config)#banner motd # message #开机时的固定显示信息9、 router(config)#enable password password特权模式明文密码10、 router(config)#no enable password11、 router(config)#enable secret password特权模式加密密码12、 router(config)#no enable secret13、 router(config)#service password-encryption特权模式把明文密码加密密码,但没enable secret 安全能够反解14、 router(config)#line console 控制台密码15、 router(config-line)#login16、 router(config-line)#password password17、 router(config-line)#exec-timeout mm ss严禁控制台会话自动退出18、 router(config-line)#logging synchronous重显被打乱的控制台输入router(config)#no ip domain-lookup严禁域名分析19、 router(config)#line vty 0 4 虚构终端密码20、 router(config-line)#login21、 router(config-line)#password password22、 router(config)#interface type number(slot/port)端口设置23、 router(config-if)#ip address ip summast24、 router(config-if)#clock rate 64000(时钟频次单位为bps,只在 DCE端设置)25、 router(config-if)#bandwith 64(带宽设置,单位为KB)26、 router(config-if)#no shutdown(shutdown)27、 router(config-if )#media-type type(10base)为以太网端口选择适合的介质种类28、 router(config-if )#ctrl+z 保留退出到特权模式29、 router#30、 router> 用户模式 enable 进入router# 特权模式 config terminal 进入router(config)# 全局配置模式31、Interface Router(config-if)# 端口设置Subinterface Router(config-subif)#子端口设置Controller Router(config-controller)#控制口设置Line Router(config-line)#虚构口设置Router Router(config-router)#路由设置IPX router Router(config-ipx-router)#IPX路由设置32、 router#show interface33、 router#show interface Ethernet 034、 router#show interface serial 035、 router#show running-config36、 router#show starup-config37、 router#show flash38、 router#show controller39、 router#show controller interface type40、 router#show running-configrouter#copy running-config starup-configrouter#copy running-config tftprouter#copy starup-config tftprouter#copy flash tftprouter#copy tftp star-configrouter#copy tftp flash--------------------------------------------------------------------------------端口状态Serial1 is up, line protocol is up 正常工作Serial1 is up, line protocol is down 连结问题Serial1 is down, line protocol is down端口问题Serial1 is administratively down, line protocol is down人为封闭配置存放器的值1、封闭路由器的电源从头启动按住ctrl+break键入进2、>3、> o/r 0 × 2142(跳过 nvarm 启动恢复密码 )4、>I5、当系统提示能否进入setup 模式时,按 N6、 router>7、 router>enable8、 router#9、进入改正后(包含密码、存放器的值:0×2100 为 rom monitor启动、 0× 2101 为 setup 模式启动、 0× 2102为10、 router#copy running-config starup-config11、 router#reload12、也能够在 router#setup 进入 setup 模式静态路由协议设置router(config)#ip route network submask(要抵达的网络号掩码)ip address( 下一跳或出口ip 地点 )rip 设置router(config)#router riprouter(config-router)#network network-numberrouter#show ip protocol查察 RIP 信息router#show ip route查察路由表router#debug ip rip查察 RIP更新信息router(config-router)#passive-interface e0(阻挡发出作息 )router(config-router)#ip rip receive version 1 2接收1、2RIP版本信息igrp 设置router(config)#router igrp as numberrouter(config-router)#network network numberrouter#show ip route查察路由表router#debug ip igrp events查察 IGRP 路由更新大体信息router#debug ip igrp transaction查察 IGRP路由更新详尽信息Router(config-router)#variance multiplier控制 IGRP load balancingRouter(config-router)#traffic-share {balanced | min}控制 load-balanced traffic的散布eigrp 设置router(config)#router eigrp as numberrouter(config-router)#network network numberrouter(config)#no auto-summry封闭自动汇总router(config)# auto-summry翻开自动汇总(默认是翻开的)router#show ip route eigrp显示目前的路由表里的EIGRP条目router#show ip protocol显示活动的路由协议进度的参数和目前的状态router#show ip eigrp neighbors显示被 EIGRP发现的街坊router#show ip eigrp traffic显示发出和收到的IP EIGRP 包的数目router#show ip eigrp topology显示 IP EIGRP的拓扑表Router#debug ip eigrpospf 设置1. Router(config)#router ospf process-idRouter(config-router)#network address( 能够是网络号也能够是Ip 地点 mask (通配掩码) area area-id Router(config-if)# ip ospf priority numbe配置 OSPF的优先级Router#show ip protocols考证 OSPF的配置Router#show ip route显示路由器学到的所有路由Router#show ip ospf interface type number显示 area-ID和毗邻信息Router#show ip ospf neighbor鉴于每接口显示OSPF街坊信息Router#debug ip ospf eventsRouter#debug ip ospf packet2. Router(config)# interface loopback number ( lookback 回路配置)Router(config-if)# ip address ip-address subnet-maskRouter(config-if)# ip ospf cost cost-numbe改正 OSPF 的 Cost 数值Router(config-if)# ip ospf authentication-key key配置明文口令Router(config-if)# ip ospf messge-digest-key keyid md5 key配置 MD5 口令(keyid 和 key 一定配对一致,两街坊才能够通讯)Router(config-route)# area area-id authentication [message-digest]message-digest 为可选项,使用后路由器只传递口令信息的纲要(或散列)配置 OSPF地区的考证:3. Router(config-if)# ip ospf hello-interval seconds配置 hello间隔:Router(config-if)# ip ospf dead-interval seconds配置 down 机判断间隔--------------------------------------------------------------------------------接见列表1.标准接见列表 (standard access lists): 只使用源 IP 地点来做过滤决定Router(config)#access-list 10 permit anyRouter(config)#int e1Router(config-if)#ip access-group 10 out使用 IP 标准 ACL 来控制VTY线路的接见 .Router(config)#line vty 0 4Router(config-line)#access-class 50 in删除 IP 标准 ACLRouter(config-line)#no ip access-class 50 inRouter(config)#no access-list 50,层 4 端口号来做过滤决定2.扩展接见列表 (extended access lists): 它比较源 IP 地点和目标 IP 地点 ,层 3 的协议字段Router(config)#access-list 110 permit ip any anyRouter(config)#int e1Router(config-if)#ip access-group 110 out3.虚构通道接见router(config)#line vty 0 4outer(config-line)#access-class 12 inip interface: 只显示IP 接见列表信息ip interface: 显示所有接口的信息和配置的ACL 信息ip interface [ 接口号 ]:显示详细某个接口的信息和配置的ACL信息running-config: 显示 DRAM 信息和ACL 信息 ,以及接口对ACL 的应用信息 .互换机配置互换机上设置登岸口令Switch(config)# enable password level level passwordSwitch(config)# no enable password level levelpassword hostname1900/2900(config)#hostname hostnameIP Address1900(config)#ip address {ip address} {mask}2950(config#interface vlan 12950(config-if)#ip address {ip_address} {mask}2950(config)#interface vlan 1default gateway1900/2950(config)#ip default-gateway {ip address}查察互换机的IP 地点1900#show ipManagement VLAN: 12950#show interface vlan 1Vlan1 is up, line protocol is up设置双工选项1900(config)#interface e0/11900(config-if)#duplex {auto | full |full-flow-control | half}2950(config)#interface fe0/12950(config-if)#duplex {auto | full | half}设置端口速度: switch(config-if)# speed {10|100|auto}查勘双工选项Switch#show interfaces fastethernet0/3查察 MAC 地点表1900/2950#show mac-address-table配置永远MAC 地点1900(config)#mac-address-table permanent {mac-address type module/port}1900#show mac-address-table2950(config)#mac-address-table static mac_addr {vlan vlan_id} [interface int1 [int2 ... int15]]--------------------------------------------------------------------------------配置受限静态MAC 地点1900(config)#mac-address-table restricted static {mac-address type module/port src-if-list} 1900#show mac-address-table2950(config)#mac-address-table secure mac-addr interface [vlan vlan-id]2950#show mac-address-table配置端口安全性1900(config-if)#port secure max-mac-count count1900(config)#interface e0/41900(config-if)#port secure1900(config-if)#port secure max-mac-count 11900(config)#address-violation {suspend | disable | ignore1900# show mac-address-table security2950(config-if)#port security max-mac-count count2950(config)#interface fa0/12950(config-if)#port security2950(config-if)#port security max-mac-count 102950(config-if)#port security action {shutdown | trap}2950#show mac-address-table secure2950#show port-security管理配置文件消除NVRAM1900#delete nvram2950#erase startup-configvlan 配置1900 VLAN 成立1900 下 ,使用 vlan [vlan#] name [name] [vlan#]命令 ,以下 :>en#config t(config)#hostname 19001900(config)#vlan 2 name sales1900(config)#vlan 3 name marketing1900(config)#vlan 4 name mis1900(config)#exit端口分派1900(config)#int e0/21900(config-if)#vlan-membership static 21900(config)#int e0/41900(config-if)#vlan-membership static 31900(config)#int e0/51900(config-if)#vlan-membership static 41900(config-if)#exit1900(config)#exitVLAN 考证1900#sh vlan2900 VLAN成立在 2950 下创立VLAN,在特权模式下使用vlan database 命令2950#vlan database2950(vlan)#vlan 2 name MarketingVLAN 2 modified:Name: Marketing2950(vlan)#vlan 3 name AccountingVLAN 3 added:Name: Accounting2950(vlan)#applyAPPLY complete2950(vlan)#Ctrl+C2950#端口分派2950 下的端口配置,使用 switchport access vlan [vlan#] 命令 ,2950(config-if)#int f0/22950(config-if)#switchport access vlan 22950(config-if)#int f0/32950(config-if)#switchport access vlan 32950(config-if)#int f0/42950(config-if)#switchport access vlan 42950(config-if)#exit2950(config)#exit考证配置信息,以下 :2950#sh vlan或2950#sh vlan brieftrunk 配置1900 trunk 配置1900(config)#int f0/261900(config-if)#trunk on2950 下在接口配置模式,使用 switchport命令,以下:2950(config)#int f0/122950(config-if)#switchport mode trunk2950(config-if)# switchport trunk encapsulation {isl|dot1q}2950(config-if)#^Z将某 VLAN 从中继中删除2950(config-if)# switchport trunk allowed vlan remove vlan-list增添某个VLAN 到中继线路2950(config-if)# switchport trunk allowed vlan add vlan-listConfiguring Inter-VLAN Routing给连结1900 的 trunk 端口配置 ,使用 encapsulation isl [vlan#] 命令 ,以下 : 2600Router(config)#int f0/2600Router(config-subif)#encapsulation isl [vlan#]2600Router(config-subif)#ip add ip add submask给连结2950 的这样配置,以下 :2600Router(config)#int f0/2600Router(config-subif)#encapsulation dot1q [vlan#]2600Router(config-subif)#ip add ip add submask--------------------------------------------------------------------------------VTP 配置1900(config)#vtp server1900(config)#vtp domain noco1900(config)#vtp password noko在特权模式下使用show vtp 命令考证 ,以下 :1900#sh vtpVTP version: 1Configuration revision: 0Maximum VLANs supported locally: 1005Number of existing VLANs: 5VTP domain name: nocoVTP password: nokoVTP operating mode: Server2950 以下 :2950(config)#vtp mode server2950(config)#vtp domain noco考证信息 ,以下 :2950#sh vtp ?counters VTP statisticsstatus VTP domain status2950#sh vtp statusNAT 配置配置静态变换Router(config)#ip nat inside source static local-ip global-ipRouter(config-if)#ip nat insideRouter(config-if)#ip nat outside配置动向地点变换Router(config)#ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length} Router(config)#access-list access-list-number permit source [source-wildcard]Router(config)#ip nat inside source listaccess-list-number pool name配置 OverloadingRouter(config)#access-list access-list-number permitsource source-wildcardRouter(config)#ip nat inside source listaccess-list-number interface interface overload消除 NAT Translation TableRouter#clear ip nat translation *消除所有的动向地点变换条目Router#clear ip nat translation inside global-iplocal-ip [outside local-ip global-ip]消除一个简单的动向地点变换条目(内、外)Router#clear ip nat translation outsidelocal-ip global-ip消除一个简单的动向地点变换(外)Router#clear ip nat translation protocol inside global-ipglobal-port local-ip local-port [outside local-iplocal-port global-ip global-port] 消除一个扩展动向地点变换条目 Show命令输出信息Router#show ip nat translations------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------互换机 :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 vlan switch(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)# de脚本ion de脚本ion-string鉴于 CLI的互换机的端口描绘:switch(enable)set port name module/number de脚本ion-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}8.在鉴于 IOS 的互换机上配置静态VLAN: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 enable14.在鉴于 IOS 的互换机上配置以太信道 :switch(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}priority switch(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 secondsswitch(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]--------------------------------------------------------------------------------20.为了将互换机配置成一个集群的命令互换机,第一要给管理接口分派一个IP 地点 ,而后使用以下命令 : switch(config)# cluster enable cluster-name cv 21.为了从一条中继链路上删除VLAN,可使用以下命令 :switch(enable) clear trunk module/port vlan-range22.用 show vtp domain显示管理域的VTP 参数 .23.用 show vtp statistics显示管理域的VTP 参数 .24.在 Catalyst 互换机上定义TrBRF的命令以下 :switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]--------------------------------------------------------------------------------25.在 Catalyst 互换机上定义 TrCRF的命令以下 :switch (enable) set vlan vlan-num [name name] type trcrf{ring hex-ring-num|decring decimal-ring-num} parent vlan-num26. 在创立好TrBRF VLAN以后,就能够给它分派互换机端口.关于以太网互换,能够采纳以下命令给VLAN 分派端口: switch(enable) set vlan vlan-num mod-num/port-num27. 命令 show spantree 显示一个互换机端口的STP状态 .28.配置一个 ELAN 的 LES和 BUS,能够使用以下命令 :ATM (config)# interface atm multiointATM(config-subif)# lane serber-bus ethernet elan-name29. 配置 LECS:ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-addressATM(lane-config-databade)# name--------------------------------------------------------------------------------30.创立完数据库后 ,一定在主接口上启动 LECS命.令以下 :ATM(config)# interface atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个 LEC配置到一个不一样的ATM 子接口上 .命令以下 :32.用 show lane server 显示 LES的状态 .33.用 show lane bus 显示 bus 的状态 .34.用 show lane database 显示 LECS数据库可内容 .35.用 show lane client 显示 LEC的状态 .36. 用 show module 显示已安装的模块列表.37.用物理接口成立与 VLAN 的连结 : router#configure terminal router(config)# interface mediamodule/port router(config-if)# de 脚本 ion de 脚本ion-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来成立与VLAN 的连结 :router(config)# interface module/router(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39.用 LANE 来成立与 VLAN 的连结 :router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/ multipointrouter(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/ multipointrouter(config-if)# ip address ip-address subnet-namerouter(config-if)#--------------------------------------------------------------------------------40.为了在路由办理器长进行动向路由配置 ,能够用以下 IOS 命令来进行 :router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number()41. 配置默认路由:switch(enable) set ip route default gateway42. 为一个路由办理器分派VLANID,可在接口模式下使用以下命令:router(config)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43.在路由办理器启用 MLSP:router(config)# mls rp ip44.为了把一个外置的路由办理器接口和互换机布置在同一个 VTP 域中 :router(config)# interface interface numberrouter(config-if)# mls rp vtp-domain domain-name45.查察指定的 VTP 域的信息 :router# show mls rp vtp-domain vtp domain name46.要确立 RSM 或路由器上的管理接口 ,能够在接口模式下输入以下命令 :router(config-if)#mls rp management-interface47.要查验 MLS-RP的配置状况:router# show mls rp48.查验特定接口上的 MLS 配置:router# show mls rp interface interface number49.为了在 MLS-SE上设置流掩码而又不想在任一个路由办理器接口上设置接见列表:set mls flow [destination|destination-source|full]50.为使 MLS 和输入接见列表能够兼容,能够在全局模式下使用以下命令:router(config)# mls rp ip input-acl--------------------------------------------------------------------------------51.当某个互换机的第 3 层互换无效时,可在互换机的特权模式下输入以下命令:switch(enable) set mls enable52.若想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime53.设置迅速老化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54.确立那些 MLS-RP和 MLS-SE参加了 MLS,可先显示互换机引用列表中的内容再确立:switch(enable) show mls include55.显示 MLS 高速缓存记录:switch(enable) show mls entry56.用命令 show in arp 显示 ARP高速缓存区的内容。

华三交换机命令

华三交换机命令

H3C交换机配置命令大全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 配置IP地址和子网掩码7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、ip route-static description To.R2 配置静态路由11、ip route-static description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置:<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。

华三交换机命令大全(终审稿)

华三交换机命令大全(终审稿)

华三交换机命令大全文稿归稿存档编号:[KKUY-KKIO69-OTM243-OLUI129-G00I-FDQS58-一、<Quidway>system 进入使能模式password:~~~~~~~~~~[Quidway]super password 修改特权用户密码[Quidway]sysname 交换机命名[Quidway]interface ethernet 0/1 进入接口视图[Quidway]interface vlan x 进入接口视图=网关[Quidway]user-interface vty 0 4[S3026-ui-vty0-4]authentication-mode password[S3026-ui-vty0-4]set authentication-mode password simple 222 [S3026-ui-vty0-4]user privilege level 3[Quidway-Ethernet0/1]duplex {half|full|auto} 配置端口双工工作状态[Quidway-Ethernet0/1]speed {10|100|auto} 配置端口工作速率[Quidway-Ethernet0/1]flow-control 配置端口流控[Quidway-Ethernet0/1]mdi {across|auto|normal} 配置端口MDI/MDIX 状态平接或扭接[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} 接口工作模式[Quidway-Ethernet0/1]shutdown 关闭/重起接口[Quidway-Ethernet0/2]quit 退出视图[Quidway]vlan 3 创建/删除一个VLAN/进入VLAN模式[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 在当前VLAN增加/删除以太网接口[Quidway-Ethernet0/2]port access vlan 3 将当前接口加入到指定VLAN[Quidway-Ethernet0/2]port trunk permit vlan {ID|All} 设trunk允许的VLAN[Quidway-Ethernet0/2]port trunk pvid vlan 3 设置trunk端口的PVID[Quidway]monitor-port <interface_type interface_num> 指定和清除镜像端口[Quidway]port mirror <interface_type interface_num> 指定和清除被镜像端口[Quidway]port mirror int_list observing-port int_type int_num 指定镜像和被镜像[Quidway]description string 指定VLAN描述字符[Quidway]description 删除VLAN描述字符[Quidway] vlan [vlan_id]查看VLAN设置[Quidway] {enable|disable} 开启/关闭生成树,默认关闭[Quidway]stp priority 4096 设置交换机的优先级[Quidway]stp root{primary|secondary} 设置交换机为根或根的备份[Quidway-Ethernet0/1]stp cost 200 设置交换机端口的花费[SwitchA-vlanx]isolate-user-vlan enable 设置主vlan[SwitchA]Isolate-user-vlan <x> secondary <list> 设置主vlan包括的子vlan[Quidway-Ethernet0/2]port hybrid pvid vlan <id> 设置vlan的pvid[Quidway-Ethernet0/2]port hybrid pvid 删除vlan的pvid[Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged 设置无标识的vlan如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。

分享一部分简单的华三交换机的命令

分享一部分简单的华三交换机的命令

GigabitEthernet 1/1/1Gigabit Ethernet 1/1/2interface Ethernet 1/0/4port hybrid vlan 27 tagged如何配置VLAN交换机:如何设置交换机VLAN,把VLAN交换机的1端口为“trunk”口,端口2为“1001”端口,端口3为“1002”tag<H3C> User View[H3C] System View-------------------------------------------------------------------------------------------<H3C>system-view */ 进入配置模式[H3C]vlan 1001 */ 创建vlan 1001[H3C-vlan1001] port Ethernet 1/0/2*/ 将指定2端口加入到当前VLAN 1001中[H3C-vlan1001] quit */推出配置vlan 1001 模式[H3C]vlan 1002[H3C-vlan1002]] port Ethernet 1/0/3[H3C-vlan1002]] quit<H3C><H3C>system-viewSystem View: return to User View with Ctrl+Z.[H3C]interface Ethernet 1/0/4[H3C-Ethernet1/0/4]undo flow-control[H3C-Ethernet1/0/4]q[H3C]interface Ethernet 1/0/5[H3C-Ethernet1/0/5]undo flow-control[H3C-Ethernet1/0/5]q[H3C]interface Ethernet 1/0/6[H3C-Ethernet1/0/6]undo flow-control[H3C-Ethernet1/0/6]q[H3C]save[H3C] interface Ethernet 1/0/1*/ 进入以太网1端口配置模式[H3C-Ethernet1/0/1] port link-type trunk*/ 配置端口1的链路类型为Trunk[H3C-Ethernet1/0/1]port trunk permit vlan 1001 */ 将vlan 1001加入当前端口[H3C-Ethernet1/0/1] port trunk permit vlan 1002 */ 将vlan 1001加入当前端口[H3C-Ethernet1/0/1]quit*/ 推出当前端口的配置模式[H3C]save */ 保存前面所配置的数据he configuration will be written to the device.Are you sure?[Y/N]yPlease input the file name(*.cfg)(To leave the existing filenameunchanged press the enter key):Now saving current configuration to the device.Saving configuration. Please wait.........Unit1 save configuration flash:/config.cfg successfully[H3C]%Apr 2 00:13:09:876 2000 H3C CFM/3/CFM_LOG:- 1 -Unit1 saved configuration successfully.[H3C]display vlan 1001 */ 显示vlan 1001 的信息VLAN ID: 1001VLAN Type: staticRoute Interface: not configuredDescription: VLAN 1001Name: VLAN 1001Tagged Ports:Ethernet1/0/1Untagged Ports:Ethernet1/0/2[H3C]display vlan 1002 */ 显示vlan 1002的信息VLAN ID: 1002VLAN Type: staticRoute Interface: not configuredDescription: VLAN 1002Name: VLAN 1002Tagged Ports:Ethernet1/0/1Untagged Ports:Ethernet1/0/3注意:1:红色字体为配置命令2:“ */“命令后的黑子字体为解释语句reset saved-configuration 恢复出厂设置display current-configuration 插看所有端口。

[全]H3C华三交换机基本配置命令大全

[全]H3C华三交换机基本配置命令大全

H3C华三交换机基本配置命令大全一、不知道密码,如何恢复出厂设置1、开机启动,Ctrl+B进入bootrom菜单,选择恢复出厂设置。

2、用com线连上电脑,用超级终端进入,然后重启电脑,看提示按ctrl+b进入bootrom模式,然后按照菜单提示删除flash中的.cfg文件,然后重启就可以了。

二、将Trunk端口添加到vlan中Trunk端口可以允许多个VLAN通过,也就是可以加入多个VLAN,所以Trunk端口的VLAN加入不可能是一个一个地加,而是采取批量添加的方式进行。

但只能在以太网端口视图下进行配置,配置步骤如表7-11所示。

【示例1】使用port trunk permit vlan命令将中继端口Ethernet2/0/1加入到2、6、10、50~100 VLAN中。

1. <H3C> system-view2. System View: return to User View with Ctrl+Z.3. [H3C] interface Ethernet2/0/14. [H3C-Ethernet2/0/1] port trunk permit vlan 2 6 10 50 to 1005. Please wait...6. Done.表7-11 把Trunk端口添加到VLAN中的步骤步骤命令用途说明1system-view例如:<sysname> system-view进入系统视图2interface interface-type interface-number例如:[sysname] interface GigabitEthernet 1/0/1进入以太网端口视图或端口组视图或二层聚合端口(三者必选其一)。

进入以太网端口视图后,下面进行的配置只在当前端口下生效;进入端口组视图后,下面进行的配置将在端口组中的所有端口下生效;在二层聚合端口视图下执行该命令,则该配置将对二层聚合端口以及相应的所有成员端口生效。

h3c交换机命令

h3c交换机命令

h3c交换机命令H3C交换机命令H3C交换机是一款功能强大且可靠的网络设备,广泛应用于企业、学校等各个领域。

它具有丰富的命令行界面,可以通过命令操作实现各种网络设置和管理。

本文将介绍H3C交换机常用的命令及其功能。

一、登录与基本命令1. 登录H3C交换机要登录H3C交换机,首先需要通过串口或网络连接到设备。

使用如下命令登录:login2. 查看系统信息使用如下命令可以查看设备的系统信息:display version3. 查看设备当前配置使用如下命令可以查看设备的当前配置:display current-configuration4.保存配置变更当你对交换机的配置进行了修改之后,为了确保修改的配置不会在重启交换机后丢失,你需要使用如下命令保存配置:save二、端口相关命令1. 查看端口状态使用如下命令可以查看设备的端口状态:display interface2. 配置端口描述你可以使用如下命令为端口添加描述信息:interface GigabitEthernet 1/0/1description This is a test port3. 配置端口速率和双工模式你可以使用如下命令修改端口的速率和双工模式:interface GigabitEthernet 1/0/1speed 1000duplex full4. 配置端口VLAN你可以使用如下命令配置端口的VLAN:interface GigabitEthernet 1/0/1port link-type accessport default vlan 105. 禁用/启用端口使用如下命令可以禁用或启用特定端口:interface GigabitEthernet 1/0/1shutdown #禁用端口undo shutdown #启用端口三、VLAN相关命令1. 创建VLAN使用如下命令可以创建一个新的VLAN:vlan 10name Test_Vlan2. 配置端口VLAN你可以使用如下命令将端口加入到指定的VLAN中:interface GigabitEthernet 1/0/1port link-type accessport default vlan 103. 显示VLAN信息使用如下命令可以查看当前交换机上所有VLAN的信息:display vlan四、静态路由相关命令1. 添加静态路由你可以使用如下命令添加静态路由:ip route-static destination mask next-hop2. 查看静态路由表使用如下命令可以查看当前交换机上的静态路由表:display ip routing-table五、访问控制列表(ACL)相关命令1. 创建ACL使用如下命令可以创建一个ACL:acl number 20002. 配置ACL规则你可以使用如下命令为ACL添加规则:rule permit source destination3. 应用ACL使用如下命令可以将ACL应用到特定的端口或VLAN上:interface GigabitEthernet 1/0/1traffic-filter inbound acl 2000六、SNMP配置命令1. 启用SNMP使用如下命令可以启用SNMP协议:snmp-agent2. 配置SNMP团体名你可以使用如下命令配置SNMP团体名:snmp-agent community read public七、系统管理相关命令1. 修改设备名称使用如下命令可以修改设备的名称:sysname New_Device_Name2. 修改设备登录密码你可以使用如下命令修改设备的登录密码:local-user admin password irreversible-cipher New_Password以上是H3C交换机常用的命令及其功能介绍。

H3C交换机常用命令30个

H3C交换机常用命令30个

H3C交换机常用命令30个H3C交换机有什么命令是经常用的呢?下面yjbys店铺为各位考生带来最新H3C交换机常用命令,希望对考生们复习H3C认证考试有帮助!1.查看Linux下查看端口状态root@root:~# netstat -an|grep -E “6002|6003″2.H3C交换机显示当前配置[H3C]display current-configuration3.H3C交换机显示arp信息[H3C]dis arp4.H3C交换机显示mac列表信息[H3C]dis mac-address5.H3C交换机显示端口信息[H3C]display interface6.进入系统视图system-view7.打开路由器的telnet功能[H3C]telnet server enable8.设置允许同时配置路由器的用户数[H3C]configure-user count 59.添加本地用户(此处为telnet用户登录时使用的用户名)[H3C]local-user telnet10.设置telnet用户登录时所使用的密码[H3C-luser-telnet]password simple h3c11.设置本地用户的'服务类型(此处为telnet)[H3C-luser-telnet]service-type telnet12.设置本地用户的服务级别[H3C-luser-telnet]level 313.退出本地用户视图[H3C-luser-telnet]quit14.进入用户视图[H3C]user-interface vty 0 415.选择“scheme”认证方式[H3C-ui-vty0-4]authentication-mode scheme16.进入某个端口[H3C] interface serial 3/017.为该端口设置ip[H3C-Serial3/0]ip address 200.1.1.1 255.255.255.018.对该端口进行复位[H3C-Serial3/0]undo shutdown19.添加一条静态路由[H3C]ip route-static 192.168.1.0 255.255.255.0 192.168.0.120.添加一条默认路由[H3C]ip route-static 0.0.0.0 0.0.0.0 192.168.0.121.保存配置文件[H3C]save22.查看某端口的状态[H3C]display interface GigabitEthernet 0/023.创建vlan[H3C]vlan 1024.将某个端口加入到vlan中[H3C-vlan100]port ethernet 0/125.创建vlan虚拟口[H3C]interface vlan-interface 126.配置ip地址[H3C-Vlan-interface100]ip address 192.168.1.4 255.255.255.027.将端口类型设置为trunk[H3C]port link-type trunk28.设置trunk口允许所有vlan通过(需要执行save保存)[H3C]port trunk permit vlan all注意:Trunk 可以收发多个vlan的报文,用于交换机与交换机之间的互连29.关闭端口[H3C-GigabitEthernet1/1/1]shutdown30.设置端口备注[H3C-Ethernet1/0/15]description 测试数据【H3C交换机常用命令30个】。

华三交换机常用命令

华三交换机常用命令

华三交换机常⽤命令1、查看全部端⼝的配置display current-configurationdisplay current-configuration interfacedis cu int2、查看指定端⼝的配置display current-configuration interface <int-type int-number>或interface <int-type int-number> 进⼊端⼝配置模式display this 查看当前端⼝⽣效配置其中int-type和int-number为端⼝类型和端⼝号,像e1/0/1、g2/0/10等。

3、查看所有端⼝的详细状态信息display interface4、查看指定端⼝的详细状态信息display interface <int-type int-number>⼀般将故障锁定到某⼀个或⼏个特定端⼝后,然后可以使⽤此条命令,指定查看单个端⼝的详细信息,从中分析故障原因。

如下图所⽰,如果我们要单独查看H3C 3600交换机上e1/0/1的端⼝信息,可以使⽤命令:dis int e1/0/3(这⾥⽤缩写,e表⽰百兆⼝),就可以看到下边列出了e1/0/1端⼝的各项信息。

可能有些⼈还不太清楚上⾯的端⼝信息每⼀项表⽰什么含义,这⾥就简单说明⼀下(其实挺复杂的):第⼀条:Ethernet 1/0/1 current state : DOWN显⽰端⼝状态为DOWN,即关闭状态。

第⼆条:IP Sending Frames Format is PKTFMT_ETHNT_2 , Hardware address is 000f-e265-cfb5显⽰输出数据帧的封装格式为PKTFMT_ETHNT_2,MAC地址为000f-e265-cfb5。

第三条:Media type is twisted pair , lookback not set显⽰接⼝的传输介质类型为双绞线,且没有设置环回⼝。

华三路由器交换机配置命令

华三路由器交换机配置命令

华三路由器交换机配置命令This manuscript was revised by the office on December 22, 2012路由器:1、进入SETUP模式Router#setup2、时间设置router#clock set hh:mm:ss date moth year3、 router>show historyRouter>terminal history size lines4、 router#show version5、 router#show running-config6、 router#show starup-config7、 router(config)#hostname name 主机命名8、 router(config)#banner motd # message # 开机时的固定显示信息9、 router(config)#enable password password 特权模式明文密码10、 router(config)#no enable password11、 router(config)#enable secret password 特权模式加密密码12、 router(config)#no enable secret13、 router(config)#service password-encryption特权模式把明文密码加密密码,但没enable secret安全可以反解14、 router(config)#line console控制台密码15、 router(config-line)#login16、 router(config-line)#password password17、 router(config-line)#exec-timeout mm ss 禁止控制台会话自动退出18、 router(config-line)#logging synchronous重显被打乱的控制台输入router(config)#no ip domain-lookup 禁止域名解析19、 router(config)#line vty 0 4虚拟终端密码20、 router(config-line)#login21、 router(config-line)#password password22、 router(config)#interface type number(slot/port)端口设置23、 router(config-if)#ip address ip summast24、 router(config-if)#clock rate 64000(时钟频率单位为bps,只在DCE端设置)25、 router(config-if)#bandwith 64(带宽设置,单位为KB)26、 router(config-if)#no shutdown(shutdown)27、 router(config-if )#media-type type(10base) 为以太网端口选择适当的介质类型28、 router(config-if )#ctrl+z保存退出到特权模式29、 router#30、 router>用户模式enable进入router#特权模式config terminal进入router(config)#全局配置模式31、Interface Router(config-if)#端口设置Subinterface Router(config-subif)# 子端口设置Controller Router(config-controller)# 控制口设置Line Router(config-line)# 虚拟口设置Router Router(config-router)# 路由设置IPX router Router(config-ipx-router)#IPX路由设置32、 router#show interface33、 router#show interface Ethernet 034、 router#show interface serial 035、 router#show running-config36、 router#show starup-config37、 router#show flash38、 router#show controller39、 router#show controller interface type40、 router#show running-configrouter#copy running-config starup-configrouter#copy running-config tftprouter#copy starup-config tftprouter#copy flash tftprouter#copy tftp star-configrouter#copy tftp flash--------------------------------------------------------------------------------端口状态Serial1 is up, line protocol is up正常工作Serial1 is up, line protocol is down连接问题Serial1 is down, line protocol is down端口问题Serial1 is administratively down, line protocol is down人为关闭配置寄存器的值1、关闭路由器的电源重新启动按住ctrl+break键入进2、>3、>o/r 0×2142(跳过nvarm启动恢复密码)4、>I5、当系统提示是否进入setup模式时,按N6、 router>7、 router>enable8、 router#9、进入修改后(包括密码、寄存器的值:0×2100为rom monitor启动、0×2101为setup模式启动、0×2102为10、 router#copy running-config starup-config11、 router#reload12、也可以在router#setup进入setup模式静态路由协议设置router(config)#ip route network submask(要到达的网络号掩码)ip address(下一跳或出口ip地址)rip设置router(config)#router riprouter(config-router)#network network-numberrouter#show ip protocol查看RIP信息router#show ip route 查看路由表router#debug ip rip查看RIP更新信息router(config-router)#passive-interface e0(阻止发出作息)router(config-router)#ip rip receive version 1 2接收1、2RIP版本信息igrp设置router(config)#router igrp as numberrouter(config-router)#network network numberrouter#show ip route 查看路由表router#debug ip igrp events 查看IGRP路由更新大概信息router#debug ip igrp transaction 查看IGRP路由更新详细信息Router(config-router)#variance multiplier 控制 IGRP load balancingRouter(config-router)#traffic-share {balanced | min}控制load-balanced traffic 的分布eigrp设置router(config)#router eigrp as numberrouter(config-router)#network network numberrouter(config)#no auto-summry 关闭自动汇总router(config)# auto-summry 打开自动汇总(默认是打开的)router#show ip route eigrp 显示当前的路由表里的EIGRP条目router#show ip protocol 显示活动的路由协议进程的参数和当前的状态router#show ip eigrp neighbors 显示被EIGRP发现的邻居router#show ip eigrp traffic 显示发出和收到的IP EIGRP 包的数量router#show ip eigrp topology 显示IP EIGRP的拓扑表Router#debug ip eigrpospf设置1. Router(config)#router ospf process-idRouter(config-router)#network address(可以是网络号也可以是Ip地址 mask(通配掩码)area area-idRouter(config-if)# ip ospf priority numbe 配置OSPF的优先级Router#show ip protocols 验证OSPF的配置Router#show ip route 显示路由器学到的所有路由Router#show ip ospf interface type number 显示 area-ID 和邻接信息Router#show ip ospf neighbor 基于每接口显示OSPF邻居信息Router#debug ip ospf eventsRouter#debug ip ospf packet2. Router(config)# interface loopback number(lookback回路配置)Router(config-if)# ip address ip-address subnet-maskRouter(config-if)# ip ospf cost cost-numbe 修改OSPF 的Cost数值Router(config-if)# ip ospf authentication-key key 配置明文口令Router(config-if)# ip ospf messge-digest-key keyid md5 key 配置MD5口令(keyid和key必须配对一致,两邻居才可以通信)Router(config-route)# area area-id authentication [message-digest]message-digest为可选项,使用后路由器只传送口令消息的摘要(或散列)配置OSPF区域的验证:3. Router(config-if)# ip ospf hello-interval seconds 配置hello间隔:Router(config-if)# ip ospf dead-interval seconds配置down机判断间隔--------------------------------------------------------------------------------访问列表1.标准访问列表(standard access lists):只使用源IP地址来做过滤决定Router(config)#access-list 10 permit anyRouter(config)#int e1Router(config-if)#ip access-group 10 out使用IP标准ACL来控制VTY线路的访问.Router(config)#line vty 0 4Router(config-line)#access-class 50 in删除IP标准ACLRouter(config-line)#no ip access-class 50 inRouter(config)#no access-list 502.扩展访问列表(extended access lists):它比较源IP地址和目标IP地址,层3的协议字段,层4端口号来做过滤决定Router(config)#access-list 110 permit ip any anyRouter(config)#int e1Router(config-if)#ip access-group 110 out3.虚拟通道访问router(config)#line vty 0 4outer(config-line)#access-class 12 in3.show ip interface:只显示IP访问列表信息4.show ip interface:显示所有接口的信息和配置的ACL信息5.show ip interface [接口号]:显示具体某个接口的信息和配置的ACL信息6.show running-config:显示DRAM信息和ACL信息,以及接口对ACL的应用信息.交换机配置交换机上设置登陆口令Switch(config)# enable password level level passwordSwitch(config)# no enable password level level passwordhostname1900/2900(config)#hostname hostnameIP Address1900(config)#ip address {ip address} {mask}2950(config#interface vlan 12950(config-if)#ip address {ip_address} {mask}2950(config)#interface vlan 1default gateway1900/2950(config)#ip default-gateway {ip address}查看交换机的IP地址1900#show ipManagement VLAN: 12950#show interface vlan 1Vlan1 is up, line protocol is up设置双工选项1900(config)#interface e0/11900(config-if)#duplex {auto | full |full-flow-control | half}2950(config)#interface fe0/12950(config-if)#duplex {auto | full | half}设置端口速度:switch(config-if)# speed {10|100|auto}查勘双工选项Switch#show interfaces fastethernet0/3查看MAC地址表1900/2950#show mac-address-table配置永久MAC地址1900(config)#mac-address-table permanent {mac-address type module/port} 1900#show mac-address-table2950(config)#mac-address-table static mac_addr {vlan vlan_id} [interfaceint1 [int2 ... int15]]--------------------------------------------------------------------------------配置受限静态MAC地址1900(config)#mac-address-table restricted static {mac-address typemodule/port src-if-list}1900#show mac-address-table2950(config)#mac-address-table secure mac-addr interface [vlan vlan-id] 2950#show mac-address-table配置端口安全性1900(config-if)#port secure max-mac-count count1900(config)#interface e0/41900(config-if)#port secure1900(config-if)#port secure max-mac-count 11900(config)#address-violation {suspend | disable | ignore1900# show mac-address-table security2950(config-if)#port security max-mac-count count2950(config)#interface fa0/12950(config-if)#port security2950(config-if)#port security max-mac-count 102950(config-if)#port security action {shutdown | trap}2950#show mac-address-table secure2950#show port-security管理配置文件清除 NVRAM1900#delete nvram2950#erase startup-configvlan配置1900 VLAN建立1900下,使用vlan [vlan#] name [name] [vlan#]命令, 如下:>en#config t(config)#hostname 19001900(config)#vlan 2 name sales1900(config)#vlan 3 name marketing1900(config)#vlan 4 name mis1900(config)#exit端口分配1900(config)#int e0/21900(config-if)#vlan-membership static 21900(config)#int e0/41900(config-if)#vlan-membership static 31900(config)#int e0/51900(config-if)#vlan-membership static 41900(config-if)#exit1900(config)#exitVLAN验证1900#sh vlan2900 VLAN建立在2950下创建VLAN,在特权模式下使用vlan database命令2950#vlan database2950(vlan)#vlan 2 name MarketingVLAN 2 modified:Name: Marketing2950(vlan)#vlan 3 name AccountingVLAN 3 added:Name: Accounting2950(vlan)#applyAPPLY complete2950(vlan)#Ctrl+C2950#端口分配2950下的端口配置,使用switchport access vlan [vlan#]命令, 2950(config-if)#int f0/22950(config-if)#switchport access vlan 22950(config-if)#int f0/32950(config-if)#switchport access vlan 32950(config-if)#int f0/42950(config-if)#switchport access vlan 42950(config-if)#exit2950(config)#exit验证配置信息,如下:2950#sh vlan或2950#sh vlan brieftrunk配置1900 trunk配置1900(config)#int f0/261900(config-if)#trunk on2950下在接口配置模式,使用switchport命令,如下:2950(config)#int f0/122950(config-if)#switchport mode trunk2950(config-if)# switchport trunk encapsulation {isl|dot1q}2950(config-if)#^Z将某VLAN从中继中删除2950(config-if)# switchport trunk allowed vlan remove vlan-list添加某个VLAN到中继线路2950(config-if)# switchport trunk allowed vlan add vlan-listConfiguring Inter-VLAN Routing给连接1900的trunk端口配置,使用encapsulation isl [vlan#]命令,如下:2600Router(config)#int f0/0.12600Router(config-subif)#encapsulation isl [vlan#]2600Router(config-subif)#ip add ip add submask给连接2950的这样配置,如下:2600Router(config)#int f0/0.12600Router(config-subif)#encapsulation dot1q [vlan#]2600Router(config-subif)#ip add ip add submask--------------------------------------------------------------------------------VTP配置1900(config)#vtp server1900(config)#vtp domain noco1900(config)#vtp password noko在特权模式下使用show vtp命令验证,如下:1900#sh vtpVTP version: 1Configuration revision: 0Maximum VLANs supported locally: 1005Number of existing VLANs: 5VTP domain name: nocoVTP password: nokoVTP operating mode: Server2950如下:2950(config)#vtp mode server2950(config)#vtp domain noco验证信息,如下:2950#sh vtpcounters VTP statisticsstatus VTP domain status2950#sh vtp statusNAT配置配置静态转换Router(config)#ip nat inside source static local-ip global-ipRouter(config-if)#ip nat insideRouter(config-if)#ip nat outside配置动态地址转换Router(config)#ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length}Router(config)#access-list access-list-number permit source [source-wildcard] Router(config)#ip nat inside source listaccess-list-number pool name配置OverloadingRouter(config)#access-list access-list-number permitsource source-wildcardRouter(config)#ip nat inside source listaccess-list-number interface interface overload清除NAT Translation TableRouter#clear ip nat translation * 清除所有的动态地址转换条目Router#clear ip nat translation inside global-iplocal-ip [outside local-ip global-ip] 清除一个简单的动态地址转换条目(内、外)Router#clear ip nat translation outsidelocal-ip global-ip清除一个简单的动态地址转换(外)Router#clear ip nat translation protocol inside global-ipglobal-port local-ip local-port [outside local-iplocal-port global-ip global-port] 清除一个扩展动态地址转换条目Show命令输出信息Router#show ip nat translations------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------交换机: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-address switch(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)# de脚本ion de脚本ion-string基于CLI的交换机的端口描述:switch(enable)set port name module/number de脚本ion-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}8.在基于IOS的交换机上配置静态VLAN: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 enable14.在基于IOS的交换机上配置以太信道:switch(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 secondsswitch(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]--------------------------------------------------------------------------------20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name cv21. 为了从一条中继链路上删除VLAN,可使用下列命令:switch(enable) clear trunk module/port vlan-range22. 用show vtp domain 显示管理域的VTP参数.23. 用show vtp statistics显示管理域的VTP参数.24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]--------------------------------------------------------------------------------25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf{ring hex-ring-num|decring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:switch(enable) set vlan vlan-num mod-num/port-num27. 命令show spantree显示一个交换机端口的STP状态.28. 配置一个ELAN的LES和BUS,可以使用下列命令:ATM (config)# interface atm number.subint multiointATM(config-subif)# lane serber-bus ethernet elan-name29. 配置LECS:ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-addressATM(lane-config-databade)# name …--------------------------------------------------------------------------------30. 创建完数据库后,必须在主接口上启动LECS.命令如下:ATM(config)# interface atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface atm number.subint multipointATM(config)# lane client ethernet vlan-num elan-num32. 用show lane server 显示LES的状态.33. 用show lane bus显示bus的状态.34. 用show lane database显示LECS数据库可内容.35. 用show lane client显示LEC的状态.36. 用show module显示已安装的模块列表.37. 用物理接口建立与VLAN的连接:router# configure terminalrouter(config)# interface media module/portrouter(config-if)# de脚本ion de脚本ion-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# …--------------------------------------------------------------------------------40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行:router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number ()41. 配置默认路由:switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP:router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)# interface interface numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息:router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:router(config-if)#mls rp management-interface47. 要检验MLS-RP的配置情况:router# show mls rp48. 检验特定接口上的MLS配置:router# show mls rp interface interface number49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination|destination-source|full]50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)# mls rp ip input-acl--------------------------------------------------------------------------------51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:switch(enable) set mls enable52. 若想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录:switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的内容。

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

H3C交换机配置命令大全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 Router1、调整超级终端的显示字号;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-S3600H3C华为交换机端口绑定基本配置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-address 00e0-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-address 00e0-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了,不过上面两个命令顺序不能弄反,除非端口下没有接pcdis 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 interface GigabitEthernet1/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 设置当前端口在指定生成树实例上路径开销。

相关文档
最新文档