华为交换机基本配置

一、配置时间

sys
ntp-service unicast-server 192.168.1.1
ntp-service unicast-server 192.168.1.2
clock timezone UTC add 8
clock timezone CST add 08:00:00
undo ntp-service disable
q

手动设置一个时间
clock datetime 13:43:00 2023-10-10

save
y


sys

保存!保存!保存!


更改NTP服务器
sys
undo ntp-service unicast-server 192.168.1.1
undo ntp-service unicast-server 192.168.1.2
ntp-service unicast-server 172.16.1.1
q
save
y

保存!保存!保存!

二、重命名

sysname hahaha

三、配置VLAN

vlan batch 100 200 300
vlan 100                                  
 description fuwuqi
vlan 200
 description jiankong
vlan 300
 description guanli

ip route-static 0.0.0.0 0 192.168.100.1
interface Vlanif 300

ip address 192.168.100.2 24

保存!保存!保存!

四、配置SNMP

snmp-agent
snmp-agent sys-info version v2c v3
snmp-agent community read  tuantizi mib-view View_ALL acl 2000
snmp-agent protocol source-status all-interface
snmp-agent mib-view included View_ALL iso

保存!保存!保存!

五、远程登录

dsa local-key-pair create


user-interface vty 0 4
authentication-mode aaa
protocol inbound all
quit

aaa
local-user admin password irreversible-cipher mimamimamima
local-user admin privilege level 15
local-user admin service-type ssh http telnet
quit

ssh user admin authentication-type password
stelnet server enable
ssh server-source all-interface
y
ssh user admin service-type all


quit
load-module weakea
install-module weakea.mod
system

undo ssh server hmac
undo ssh server cipher
undo ssh server publickey
undo ssh server key-exchange

ssh server port 10023
y
http server port 10024
y
telnet server port 10025
y
telnet server-source all-interface
y
http secure-server enable
y
http secure-server port 10026
y
http server-source all-interface
y

保存!保存!保存!

六、批量端口配置

TRUNK配置
port-group group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/22
port link-type trunk
port trunk allow-pass vlan all
q

port-group group-member XGigabitEthernet 0/0/1 to XGigabitEthernet 0/0/2
port link-type trunk
port trunk allow-pass vlan all
q

port-group group-member GigabitEthernet 0/0/9 to GigabitEthernet 0/0/12
port link-type trunk
port trunk allow-pass vlan all
q

ACCESS配置
port-group group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/8
port link-type access
port default vlan 100
poe enable
q

保存!保存!保存!

七、ACL规则

ssh server acl 2000
telnet server acl 2000
http acl 2000
acl 2000
 rule permit source 192.168.100.0 0.0.0.255
 rule permit source 192.168.12.0 0.0.0.63
 rule permit source 192.168.6.33 0
 rule permit source 172.16.12.39 0
 rule permit source 172.16.12.101 0
 rule permit source 172.16.12.102 0
 rule permit source 172.16.12.103 0
 rule permit source 172.16.12.105 0
 rule permit source 172.16.12.63 0
 rule permit source 172.26.252.113 0
 rule 100 deny
q
q
save
y

保存!保存!保存!

八、手工链路聚合LACP

核心-链路聚合-手工模式LACP

interface Eth-Trunk 12
mode lacp
trunkport GigabitEthernet 0/0/12
trunkport GigabitEthernet 1/0/12
port link-type trunk
port trunk allow-pass vlan all

保存!保存!保存!


汇聚-链路聚合-手工模式LACP
interface Eth-Trunk 1
mode lacp
trunkport XGigabitEthernet 0/0/3 to 0/0/4
port link-type trunk
port trunk allow-pass vlan all

保存!保存!保存!


  • 18
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值