h3c 基本配置方法

  • 格式:doc
  • 大小:25.50 KB
  • 文档页数:3

h3c 基本配置
=========================================================================

#名字,时间配置
sysname R1
clock timezone GMT add 8
clock timezone UTC add 8
clock datetime 9:30:20 2001/02/08

#告警
header motd XXXXXXXXXXXXXXXXXXXXXXXXXXX
Please input banner content, and quit with the character 'X'.
X
#Telnet配置
telnet server enable
user-interface vty 0 4
authentication-mode password
set authentication password simple cisco
user privilege level 3
acl 2000 inbound
acl number 2000
rule 5 deny source 1.1.1.1 0

#Telnet配置实用用户名验证
telnet server enable
local-user user
service-type telnet level 3
password simple ciscocisco
user-interface vty 0 4
acl 2000 inbound
authentication-mode scheme
#保存配置文件
save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
flash:/startup.cfg exists, overwrite? [Y/N]:y
dir
Directory of flash:/
0 drw- - Dec 25 2009 19:34:36 logfile
1 -rw- 1363 Feb 08 2001 18:06:13 startup.cfg
2 -rw- 47646 Feb 08 2001 17:38:37 default.diag
#清除保存的配置文件
reset saved-configuration
copy startup.cfg f1.cfg
dir
Directory of flash:/
0 drw- - Dec 25 2009 19:34:36 logfile
1 -rw- 1363 Feb 08 2001 18:10:24 startup.cfg
2 -rw- 47646 Feb 08 2001 17:38:37 default.diag
3 -rw- 1363 Feb 08 2001 18:10:40 f1.cfg
2540 KB total (2448 KB free)
#设置下次启动配置文件
startup saved-configuration f1.cfg
Please wait ....... Done!
dis startup
Current startup saved-configuration file: flash:/startup.cfg
Next startup saved-configuration file: flash:/f1.cfg

#利用tftp备份和还原配置文件
backup startup-configuration to xxxx
restore startup-configuration from xxxx

startup-conf=save-conf
running-config=curr-conf
tftp 1.1.1.1 ?
get Download file from remote TFTP server
put Upload local file to remote TFTP server
sget Download securely from remote TFTP server
[R1-Ethernet0/4/0]port link-mode ?
bridge Switch to layer2 ethernet
route Switch to layer3 ethernet
#设置启动镜像
boot-loader file flash:/xxx.bin
reboot
schedule reboot at 11:11
#打开调试
terminal debugging
un deb all
#配置vlan,并把端口加入vlan
[SW1]vlan 30
[SW1-vlan30]port Ethernet 0/4/5 to Ethernet 0/4/7
#trunk配置
int e0/4/2
port link-type trunk
port trunk permit vlan all
port trunk pvid vlan xxx //native vlan
#配置stp
stp enable
stp mode rstp
stp priority 4096
stp edged-port enable //portfast
stp bpdu-protection
#mst
stp region-configuration
region-name zxc
instance 1 vlan 10 30
instance 2 vlan 20
active region-configuration
[SW2]int e0/4/2
[SW2-Ethernet0/4/2]stp cost ?
INTEGER<1-200000> Port path cost
[SW2-Ethernet0/4/2]stp instance 1 cost ?
INTEGER<1-200000> Port path cost
#配置dot1x
[SW1]dot1x
802.1x is enabled globally.
dot1x interface e0/4/4 to Ethernet 0/4/5
[SW1]local-user user
New local user added.
[SW1-luser-user]service-type lan-access
[SW1-luser-user]password simple cicso
#端口隔离
port-isolate enable
port-isolate uplink-port
[SW1-Ethernet0/4/7]user-bind ip-address 1.1.1.1 mac-address 1111-1111-1111
#链路汇集
[SWA] interface bridge-aggregation 1
[SWA-Ethernet1/0/1] port link-aggregation group 1
[SWA-Ethernet1/0/2] port link-aggregation group 1
display link-aggregation summary