NETWORK笔记4:华为命令
admin
2023-02-18 14:20:05
0次

NETWORK笔记4:华为命令

      #用户视图

system-view      #进系统视图

Enter system view, return user view with Ctrl+Z.      #进入系统视图,返回用户视图用Ctrl+Z。

[Huawei]interface Ethernet 0/0/1      #接口视图 Ethernet:接口类型 0/0/1:第一个0代表槽位,第二个0代表子卡号,1代表接口号

[Huawei-Ethernet0/0/1]quit      #返回上一试图

[Huawei]ospf      #ospt协议视图

[Huawei-ospf-1]

[Huawei-ospf-1]return      #回到用户视图


[Huawei]sysname Switch     #系统名 交换机

[Switch]display version      #显示 版本信息

[Switch]display current-configuration       #显示 当前配置


[Switch]user-interface console 0      #用户 接口 控制台 0

[Switch-ui-console0]authentication-mode password      #认证模式 密码

[Switch-ui-console0]set authentication password {simple|cipher} 123      #设置 认证 密码 简单|暗文 123    简单|暗文二选一!


[Switch]user-interface console 0

[Switch-ui-console0]authentication-mode aaa

[Switch-ui-console0]aaa

[Switch-aaa]local-user huawei password cipher huawei123      #本地用户 huawei 密码 暗文 huawei123

Info: Add a new user.      #信息:添加 新 用户

save      #保存

The current configuration will be written to the device.      #当前配置将被写入设备

Are you sure to continue?[Y/N]                                #您确定继续吗?[y/n]

Save the configuration successfully.      #保存配置成功。

reboot      #重新启动

System will reboot! Continue?[Y/N]:y      #系统将重启!继续[Y/ N]:Y?

reset saved-configuration       #重置 保存 配置

Warning: The action will delete the saved configuration in the device.      #警告:该操作将删除设备中保存的配置。

The configuration will be erased to reconfigure. Continue? [Y/N]:y      #配置将被擦除以重新配置。 继续?[Y/ N]:Y

Info: Succeeded in clearing the configuration in the device.      #信息:成功清除设备中的配置。


[Huawei]user-interface console 0

[Huawei-ui-console0]idle-timeout 120      #闲置-时间 120分钟     120分钟后自动退出

[Huawei-ui-console0]screen-length 24      #屏幕-长度24      显示24行


display bridge mac-address      #显示桥(交换机)MAC地址

display mac-address        #显示MAC地址       

[Huawei]lldp enable        #LLDP协议 启用

[Huawei]display lldp neighbor brief        #显示LLDP邻居简介


[Huawei]interface GigabitEthernet 0/0/1

[Huawei-GigabitEthernet0/0/1]undo negotiation auto        #撤消协商自动

[Huawei-GigabitEthernet0/0/1]duplex {half|full}        #双工 半|全

[Huawei-GigabitEthernet0/0/1]speed {10|100|1000}        #速度 10|100|1000  M


[Huawei]interface vlan 1

[Huawei-Vlanif1]ip address 192.168.1.250 255.255.255.0        #IP地址192.168.1.250 255.255.255.0 

[Huawei-Vlanif1]undo shutdown        #解开 关掉        启用


system-view 

[Huawei]sysname R1

[R1]interface GigabitEthernet 0/0/0

[R1-GigabitEthernet0/0/0]ip address 192.168.2.1  255.255.255.0

[R1]ip route-static 192.168.4.0 255.255.255.0 192.168.2.2        #IP 路由-静态   ip route-static 目标网络ID 子网掩码 下一跳

[R1]ip route-static 0.0.0.0 0.0.0.0 192.168.2.2        #默认路由或缺省路由! 

display ip routing-table        #显示IP路由表


[Router]user-interface vty 0 4      #远程用户登录接口


[HuaweiSwitch]vlan 12        #创建Vlan12

[HuaweiSwitch-vlan12]description HAHA        #描述 HAHA (思科name)


[HuaweiSwitch]interface GigabitEthernet 0/0/1

[HuaweiSwitch-GigabitEthernet0/0/1]port link-type access        #端口 链接-类型 access 

[HuaweiSwitch-GigabitEthernet0/0/1]port default vlan 12       #端口 默认 vlan12


[HuaweiSwitch3]interface GigabitEthernet 0/0/24

[HuaweiSwitch3-GigabitEthernet0/0/24]port link-type trunk        #端口 链接-类型 trunk 

[HuaweiSwitch3-GigabitEthernet0/0/24]port trunk allow-pass vlan all        #端口 trunk 允许通过 VLAN 全部


[HuaweiSwitch]port-group 1        #端口-组 1

[HuaweiSwitch-port-group-1]group-member GigabitEthernet 0/0/1 GigabitEthernet 0/0/3 GigabitEthernet 0/0/5        #组-成员 1 3 5

[HuaweiSwitch-port-group-1]group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/9        #组-成员 123456789


[HuaweiSwitch]port-group group-member GigabitEthernet 0/0/1 GigabitEthernet 0/0/3 GigabitEthernet 0/0/5

[HuaweiSwitch]port-group group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/9

永久组临时组


华为交换机删除Vlan后端口自动回到Vlan1


[HuaweiSwitch]vlan 1        #创建Vlan1

[HuaweiSwitch]vlan batch 1 3 5        #创建Vlan1 3 5

[HuaweiSwitch]vlan batch 1 to 9        #创建Vlan123456789


[HuaweiSwitch]undo vlan 1        #解开Vlan1

[HuaweiSwitch]undo vlan batch 1 3 5        #解开Vlan1 3 5 

[HuaweiSwitch]undo vlan batch 1 to 9        #解开Vlan123456789


未完


相关内容

热门资讯

空调连续工作多久需要停机休息 空调连续工作的时间取决于多个因素,包括空调的型号、功率、使用环境和维护情况等。一般来说,空调可以连续...
空调哪个符号是除湿的 空调除湿功能通常用一个水滴形状的符号表示。不同品牌和型号的空调遥控器可能会有所差异,但一般来说,除湿...
格力空调多长时间加一次氟利昂 1、一般情况下,空调对氟利昂的使用量是非常小的,所以在空调使用了四年左右的时候再考虑加也没问题。2、...
空调用多长时间需要加氟一次 一般情况下是五年。当出现以下这几种情况时,空调才需要加氟。1、空调的室内机和室外机各有两个接口,当接...
格调生活·C标思享荟:卡萨帝在... 9月12日的郑州龙湖金融岛,夜风轻拂,灯光璀璨。“C标时刻共传奇——卡萨帝思享荟暨20周年品牌盛典郑...
品牌价值破千亿、高端份额持续领... 9月12日,“C标时刻共传奇——卡萨帝思享荟暨20周年品牌盛典郑州站”在郑州龙湖金融岛举办。2026...
空调主板坏了修800还是换新的 空调主板坏了是修还是换新,需要考虑多个因素,以下是一些建议:1. 维修成本:如果维修费用较低,比如 ...
空调开多久需要休息多长时间 问题:空调开多久需要休息多长时间回答:1、在使用空调的过程中,一般空调开7~8个小时左右需要休息2~...
中央空调多长时间清洗一次 1、一般空调开机前清洗一次即可,空调开机中间时段再清洗一次,空调关机时清洗一次,这样比较合理。2、空...
中央空调氟利昂多久加一次 看空调制热和制冷程度,很多人的观点认为氟利昂必须一年放一次,其实这个观点是错误的,理解上面有点偏差,...