华为交换机常用命令

2021-08-19 582 0

华为交换机常用命令

指定管理IP

system-view
interface vlan 1
ip add 192.168.1.2 24
#ip address 192.168.1.2 255.255.255.0
quit

开启常用服务

http server enable
telnet server enable
stelnet server enable

配置认证模式为aaa

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

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

配置aaa帐户密码权限

aaa
 local-user root password cipher sunday
 local-user root privilege level 15
 local-user root service-type terminal http telnet ssh 

 local-user admin password cipher sunday
 local-user admin privilege level 15
 local-user admin service-type terminal http telnet ssh

ssh帐户认证类型

ssh user root authentication-type password
ssh user root service-type all

lacp

system-view
interface eth-trunk10
mode lacp
lacp timeout fast
quit

interface gigabitethernet 0/0/1
eth-trunk 10
quit

interface gigabitethernet 0/0/2
eth-trunk 10
quit

接口限速

interface gigabitethernet 0/0/3
qos lr outbound cir 5120 #5M
quit
display qos lr outbound
undo qos lr outbound #取消qos

查看相关信息

display current-configuration  #查看配置信息显示系统运行配置信息
dis int brief #查看接口
display this #查看接口配置
display transceiver interface XGigabi 0/0/2 verbose

vlan

Vlan
interface g0/0/1
port link-type access
port default vlan 10
quit

Vlan
interface g0/0/2
port link-type access
port default vlan 20
quit

display vlan

interface g0/0/23
port link-type trunk # 交换机
port allow-pass vlan 10 20
quit

undo link-type
vlan batch 10 20 30 #创建多个vlan 

vlan 30
port gigabitethernet 0/0/1 to 0/0/3 #批量加入vlan

Trunk
vlan 40
quit
port-group pg1
group-member g 0/0/4 to g 0/0/6
port link-type trunk
port trunk allow-pass vlan 40

相关文章

UFW+IPSET 禁用非法IP
ip_local_port_range: prefer different parity for start/end values
Linux Sudo 权限配置
阿里云ECS云盘IOPS压测
nextcloud preview-generate 报错文件无权限解决
tcpdump 抓包使用小结

发布评论