NETWORK筆記4:華爲命令

image.png

<Huawei>      #用戶視圖後端

<Huawei>system-view      #進系統視圖網絡

Enter system view, return user view with Ctrl+Z.      #進入系統視圖,返回用戶視圖用Ctrl+Z。app

[Huawei]interface Ethernet 0/0/1      #接口視圖 Ethernet:接口類型 0/0/1:第一個0表明槽位,第二個0表明子卡號,1表明接口號ide

[Huawei-Ethernet0/0/1]quit      #返回上一試圖ui

[Huawei]ospf      #ospt協議視圖spa

[Huawei-ospf-1]blog

[Huawei-ospf-1]return      #回到用戶視圖接口


[Huawei]sysname Switch     #系統名 交換機ip

[Switch]display version      #顯示 版本信息ci

[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.      #信息:添加 新 用戶

<Switch>save      #保存

The current configuration will be written to the device.      #當前配置將被寫入設備

Are you sure to continue?[Y/N]                                #您肯定繼續嗎?[y/n]

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

<Switch>reboot      #從新啓動

System will reboot! Continue?[Y/N]:y      #系統將重啓!繼續[Y/ N]:Y?

<Switch>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行


<Huawei>display bridge mac-address      #顯示橋(交換機)MAC地址

<Huawei>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        #解開 關掉        啓用


<Huawei>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        #默認路由或缺省路由! 

<Huawei>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


[HuaweiSwitch2]interface GigabitEthernet 0/0/24

[HuaweiSwitch2-GigabitEthernet0/0/24]port link-type trunk        #端口 連接-類型 trunk 

[HuaweiSwitch2-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


未完

相關文章
相關標籤/搜索