EqLlyHJ5w6,694hQRgLWm

华三命令篇

配置系统时间:

clock datetime ?

配置系统时间:

display clock

查看版本信息:

display version

查看当前配置:

display current-configuration

显示接口信息:

display interface

显示接IP口状态与配置信息

display ipinterface brief

显示系统运行统计信息

display siagnostic-information

使能SSH服务器功能:

[H3C] ssh server enable



配置SSH客户端登录时的用户界面 :

[H3C-ui-vty0-4]authentication-mode scheme

[H3C-ui-vty0-4]protocol inbound ssh

配置SSH用户:

[H3C]local-user username

[H3C-luser-xxx] password { cipher | simple } password

[H3C-luser-xxx] service-type ssh

[H3C-luser-xxx] level level

生成RSA密钥:

[H3C]rsa local-key-pair export ssh2



销毁RSA密钥:

[H3C]rsa local-key-pair destroy

保存配置:

<H3C>save



擦除配置:

<H3C>reset saved-configuration

设置下次启动的配置文件:

<H3C>startup saved-configuration filename

备份/恢复下次启动配置文件:

<H3C>backup startup-configuration to dest-addr [ filename ]

<H3C>restore startup-configuration from src-addr filename

查看保存的配置文件:

<H3C>display saved-configuration

查看系统启动配置文件:

<H3C>display startup

查看当前生效的配置:

<H3C>display current-configuration  

查看当前视图下生效的配置:

[H3C-ui-vty0]display this

使能FTP服务器端功能:

[H3C]ftp server enable

创建用户:

[H3C]local-user username

设置服务类型及登录密码:

[H3C-luser-xxx]service-type ftp

[H3C-luser-xxx]password { cipher | simple } password

FTP操作示例:

C:\>ftp 192.168.0.1

Connected to 192.168.0.1.

220 FTP service ready.

User (192.168.0.1:(none)): h3c

331 Password required for h3c.

Password:

230 User logged in.

ftp> put config.cfg

200 Port command okay.

150 Opening ASCII mode data connection for config.cfg.

226 Transfer complete.

ftp:发送 1329 字节,用时 0.00Seconds 1329000.00Kbytes/sec.

ftp>

指定下次启动加载的应用程序文件:

<H3C>boot-loader file file-url

显示下次启动加载的应用程序文件:

<H3C>display boot-loader

重启系统:

<H3C>reboot

开启设备定时重启功能,并指定重启的具体时间:

<H3C>schedule reboot at  hh:mm [ date ]

开启设备定时重启功能,并指定重启的等待时延:

<H3C>schedule reboot delay { hh:mm | mm }

显示设备的重启时间:

<H3C>display schedule reboot

开启控制台对系统信息的监视功能:

<H3C>terminal monitor

打开调试信息的屏幕输出开关:

<H3C>terminal debugging

打开模块调试开关:

<H3C>debugging  module-name

显示调试开关:

<H3C>display debugging



































创建VLAN并进入VLAN视图:

[Switch] vlan vlan-id

将指定端口加入到当前VLAN中:

[Switch-vlan10] port interface-list

配置端口的链路类型为Trunk类型:

[Switch-Ethernet1/0/1] port link-type trunk

允许指定的VLAN通过当前Trunk端口:

[Switch-Ethernet1/0/1]port trunk permit vlan { vlan-id-list | all }

设置Trunk端口的缺省VLAN:

[Switch-Ethernet1/0/1] port trunk pvid vlan vlan-id

将指定端口加入到隔离组中,端口成为隔离组的普通端口:

[Switch-Ethernet1/0/1] port-isolate enable

将指定端口加入到隔离组中,端口成为隔离组的上行端口:

[Switch-Ethernet1/0/2] port-isolate uplink-port

创建RIP进程并进入RIP视图

[Router] rip [ process-id ]

在指定网段接口上使能RIP

[Router-rip-1] network network-address

使能RIP毒性逆转功能:

[Router-Ethernet1/0] rip poison-reverse
















显示RIP当前运行状态及配置信息:display rip


OSPF基本配置命令:


配置OSPF接口优先级:

[Router-Ethernet0/0] ospf dr-priority priority

配置OSPF接口Cost:

[Router-Ethernet0/0] ospf cost value

配置Router ID:

[Router]router id ip-address

启动OSPF进程:

[Router]ospf [ process-id ]

重启OSPF进程:

<Router>reset ospf [ process-id ]

配置OSPF区域:

[Router-ospf-100]area area-id

在指定的接口上启动OSPF:

[Router-ospf-1-area-0.0.0.0] network network-address wildcard-mask

显示OSPF路由信息:

<H3C>display ospf routing

显示OSPF摘要信息:

[Router] display ospf brief

显示启动OSPF的接口信息:

[Router] display ospf interface

显示OSPF的出错信息:

[Router] display ospf error

显示OSPF的进程信息:

[Router] display ospf INTEGER<1-16635>

















# 进入系统视图

<H3C>sys


# 配置设备名

[H3C]sysname RouterA


# 设置super(明文)密码

[RouterA]super password simple quidway


# 设置super(密文)密码

[RouterA]super password cipher quidway


# 启用telnet 管理功能

[RouterA]user-interface vty 0 4

[RouterA-ui-vty0-4]authentication-mode password

[RouterA-ui-vty0-4]set authentication password quidway

[RouterA-ui-vty0-4]user privilege level 3

[RouterA-ui-vty0-4]quit

[RouterA]telnet server enable


# 配置端口IP地址

[RouterA]int e 0

[RouterA-Ethernet0]ip add 192.168.1.1 24


# 启动端口

[RouterA-Ethernet0]undo shutdown

[RouterA-Ethernet0]quit


# 保存,在任何视图下

<RouterA>save


# 查看当前设备配置信息

[RouterA]display current-configuration


# 查看Flash中的配置(相当于CISCO start-config)

[RouterA]display saved-configuration


# 删除FLASH中的配置信息(重置设备配置)

[RouterA]reset saved-configuration


# 重新启动设备

<RouterA>reboot


# 显示系统软件版本

[RouterA]display version


# 访问TFTP服务器

<H3C>tftp 服务器IP {put|get} 源文件名 目的文件名

<H3C>tftp 192.168.1.2 put startup.cfg startup.cfg  //上传

<H3C>tftp 192.168.1.2 get test.txt test.txt         //下载


交换机、路由器基本命令


# 交换机IP地址

[H3C]int vlan 1

[H3C-Vlan-interface1]ip add 192.168.1.1 24

[H3C-Vlan-interface1]undo ip add 192.168.1.1 24


# 创建VLAN

[H3C]vlan 10

[H3C]undo vlan 10



# 向VLAN添加一个、多个端口

[H3C-vlan10]port e 1/0/1

[H3C-vlan10]port e 1/0/5 to e 1/0/7

[H3C-vlan10]port e 1/0/8 to e 1/0/9 e 1/0/11 to e 1/0/1


# 显示VLAN信息

[H3C]dis vlan


# 设置以太网端口的链路类型为TRUNK

[H3C-Ethernet1/0/1]port link-type trunk

[H3C-Ethernet1/0/1]port trunk permit vlan all

[H3C-Ethernet1/0/1]port trunk pvid vlan 1


# 设置以太网端口的链路类型为ACCESS

[H3C-Ethernet1/0/1]port link-type access

[H3C-Ethernet1/0/1]port access vlan 10

[H3C-Ethernet1/0/1]undo port access vlan


# 配置Loopback环回接口

[H3C]int loopback 0

[H3C-Lookback0]ip add 10.1.1.1 24


# 静态路由

[H3C]ip route 192.168.3.0 255.255.255.0 s 1/0

[H3C]undo ip route 192.168.3.0 255.255.255.0 s 1/0


# 默认路由

[H3C]ip route 0.0.0.0 0.0.0.0 s 1/0




















































































































































EqLlyHJ5w6