H3C学习笔记

  • 格式:pdf
  • 大小:344.75 KB
  • 文档页数:38

一、H3C命令1、设置“system-view”命令为0 级,执行视图为用户视图(Shell)<Sysname> system-view[Sysname] command-privilege level 0 view shell system-view2、查看历史命令:display history-command 默认是10条(1)设置历史命令的缓冲区的大小:history-command max-size3、super:命令是使用用户从当前级别切换到level级别,如果没有指定具体的级别,则默认表示从当前级别切换到级别3(1)super authentication-mode、super password相关配置密码的命令(2)super authentication-mode { super-password | scheme }*●super-password:用户级别切换采用super 密码认证方式。

●scheme:用户级别切换采用HWTACAS 认证方式二、登录以太网交换机命令1、authentication-mode(1)命令:authentication-mode { none | password | scheme [ command-authorization ] }(2)参数:none:不认证。

password:进行本地口令认证。

scheme:进行本地或远端用户名和口令认证。

command-authorization:在TACACS 认证服务器上进行命令行授权。

(3)举例●配置Console 口的认证方式为本地口令认证,且认证口令为明文cdw。

<Sysname> system-viewSystem View: return to User View with Ctrl+Z.[Sysname] user-interface aux 0[Sysname-ui-aux0] authentication-mode password[Sysname-ui-aux0] set authentication password simple cdw配置通过Telnet 登录的VTY 用户认证方式为scheme 认证<Sysname> system-viewSystem View: return to User View with Ctrl+Z.[Sysname] user-interface vty 0[Sysname-ui-vty0] authentication-mode scheme[Sysname-ui-vty0] quit指定system 域为缺省域,并设置该域Scheme 认证方式local。

[Sysname] domain default enable system[Sysname] domain system[Sysname-isp-system] scheme local设置本地认证的用户名和密码。

[Sysname] local-user guest[Sysname-luser-guest] password simple 123456[Sysname-luser-guest] service-type telnet level 22、auto-execute command:(1)auto-execute command 命令用来设置自动执行命令,当某条命令被设置后,在用户登录时将自动执行该命令(2)undo auto-execute command 命令用来取消自动执行命令。

(3)通常的用法是在终端用auto-execute command 配置telnet 命令,使用户自动连接到指定的设备(4)设置用户从VTY0 登录后,自动执行telnet 10.110.100.1 命令<Sysname> system-view[Sysname] user-interface vty 0[Sysname-ui-vty0] auto-execute command telnet 10.110.100.1% This action will lead to configuration failure through ui-vty0. Are you sure?[ Y/N]y 完成命令配置后,当用户通过VTY0 用户界面登录设备时,设备将自动执行所设置的命令,并注销当前用户3、copyright-info enable(1)copyright-info enable 命令用来设置用户登录时终端显示版权声明提示信息(缺省)(2)undo copyright-info enable 命令用来设置用户登录时终端不显示版权声明提示信息4、display telnet-server source-ip(1)命令用来显示当前为Telnet Server 设置的源IP地址(2)显示当前为Telnet Server 设置的源IP 地址<Sysname> display telnet-server source-ipThe source IP you specified is 192.168.1.15、display telnet source-ip(1)命令用来显示当前为Telnet Client 设置的源IP 地址(2)显示当前为Telnet Client 设置的源IP 地址<Sysname> display telnet source-ipThe source IP you specified is 192.168.1.16、display users(1)命令用来显示用户界面的用户信息。

(2)all:参数all是显示所有用户界面的用户信息。

7、free user-interface(1)命令用来释放指定的用户界面,命令执行后对应的用户连接将被断开。

(2)通过用户界面0 登录交换机,释放用户界面VTY1<Sysname> free user-interface vty 1Are you sure you want to free user-interface vty1 [Y/N]? y8、header(1)描述:header 命令用来设置用户登录以太网交换机时,以太网交换机向用户提示的相关信息。

undo header 命令用来取消相关信息的设置(2)参数:●incoming:配置Modem 登录用户进入用户视图时的显示信息。

●legal:配置登录用户进入用户视图前的授权信●login:配置登录验证时的显示信息●shell:配置非Modem 登录用户进入用户视图时的显示信息9、history-command max-size(1)history-command max-size 命令用来设置当前用户视图历史命令缓冲区的大小(2)undo history-command max-size 命令用来恢复缺省情况(3)缺省情况下,历史命令缓冲区的大小为10,即可存放10 条历史命令(4)配置:[Sysname] user-interface aux 0[Sysname-ui-aux0] history-command max-size 2010、idle-timeout(1)idle-timeout 命令用来配置用户超时断开连接的时间,如果在所设定的时间内登录到当前用户界面上的用户没有对交换机执行任何操作,则交换机将断开与该用户的连接。

undo idle-timeout 命令用来恢复超时断开连接的缺省值。

(2)参数●minutes:分钟数,取值范围为0~35791●seconds:秒数,取值范围为0~59(3)配置[Sysname] user-interface aux 0[Sysname-ui-aux0] idle-timeout 111、ip http shutdown(1)ip http shutdown 命令用来关闭WEB Server。

undo ip http shutdown 命令用来启动WEB Server12、lock(1)lock 命令用来锁住当前用户界面,防止未授权的用户操作该界面13、protocol inbound(1)protocol inbound 命令用来配置用户界面支持的协议。

(2)缺省情况下,系统对Telnet 和SSH 协议均支持(3)参数●all:支持所有的协议,包括Telnet 和SSH。

●ssh:支持SSH 协议●telnet:支持Telnet 协议(4)举例[Sysname] user-interface vty 0[Sysname-ui-vty0] protocol inbound ssh14、screen-length(1)screen-length 命令用来配置终端屏幕上一屏中能够显示的终端信息的行数。

(2)undo screen-length 命令用来恢复终端屏幕上一屏中能够显示的终端信息的行数为缺省值(3)缺省情况下,每屏显示24 行。

取值为0 表示关闭分屏显示功能15、service-type(1)service-type 命令用来设置某用户登录类型及登录后可以访问的命令级别。

(2)undo service-type 命令用来取消对用户登录类型的设置(3)举例:[Sysname] local-user zbr[Sysname-luser-zbr] service-type telnet level 016、set authentication password(1)set authentication password 命令用来设置本地认证的口令。

(2)undo set authentication password 命令用来取消本地认证的口令(3)参数●cipher:设置本地认证口令以密文方式存储。

●simple:设置本地认证口令以明文方式存储(4)举例[Sysname] user-interface vty 0[Sysname-ui-vty0] set authentication password simple 12317、speed(1)speed 命令用来配置用户界面的传输速率。

(2)undo speed 命令用来恢复用户界面的传输速率为缺省值。

(3)缺省情况下,传输速率为9600bit/s。

note3(4)speed-value:传输速率,单位为bit/s,可以取值为:300、600、1200、2400、4800、9600、19200、38400、57600 和115200(5)举例[Sysname] user-interface aux 0[Sysname-ui-aux0] speed 11520018、telnet(1)telnet 命令用来使用户可以方便地从当前以太网交换机登录到其它设备进行远程管理。