溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

NETWORK筆記4:華為命令

發(fā)布時(shí)間:2020-06-16 15:34:22 來源:網(wǎng)絡(luò) 閱讀:734 作者:福祿緣 欄目:網(wǎng)絡(luò)安全

NETWORK筆記4:華為命令

<Huawei>      #用戶視圖

<Huawei>system-view      #進(jìn)系統(tǒng)視圖

Enter system view, return user view with Ctrl+Z.      #進(jìn)入系統(tǒng)視圖,返回用戶視圖用Ctrl+Z。

[Huawei]interface Ethernet 0/0/1      #接口視圖 Ethernet:接口類型 0/0/1:第一個(gè)0代表槽位,第二個(gè)0代表子卡號,1代表接口號

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

[Huawei]ospf      #ospt協(xié)議視圖

[Huawei-ospf-1]

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


[Huawei]sysname Switch     #系統(tǒng)名 交換機(jī)

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

[Switch]display current-configuration       #顯示 當(dāng)前配置


[Switch]user-interface console 0      #用戶 接口 控制臺 0

[Switch-ui-console0]authentication-mode password      #認(rèn)證模式 密碼

[Switch-ui-console0]set authentication password {simple|cipher} 123      #設(shè)置 認(rèn)證 密碼 簡單|暗文 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.      #當(dāng)前配置將被寫入設(shè)備

Are you sure to continue?[Y/N]                                #您確定繼續(xù)嗎?[y/n]

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

<Switch>reboot      #重新啟動

System will reboot! Continue?[Y/N]:y      #系統(tǒng)將重啟!繼續(xù)[Y/ N]:Y?

<Switch>reset saved-configuration       #重置 保存 配置

Warning: The action will delete the saved configuration in the device.      #警告:該操作將刪除設(shè)備中保存的配置。

The configuration will be erased to reconfigure. Continue? [Y/N]:y      #配置將被擦除以重新配置。 繼續(xù)?[Y/ N]:Y

Info: Succeeded in clearing the configuration in the device.      #信息:成功清除設(shè)備中的配置。


[Huawei]user-interface console 0

[Huawei-ui-console0]idle-timeout 120      #閑置-時(shí)間 120分鐘     120分鐘后自動退出

[Huawei-ui-console0]screen-length 24      #屏幕-長度24      顯示24行


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

<Huawei>display mac-address        #顯示MAC地址       

[Huawei]lldp enable        #LLDP協(xié)議 啟用

[Huawei]display lldp neighbor brief        #顯示LLDP鄰居簡介


[Huawei]interface GigabitEthernet 0/0/1

[Huawei-GigabitEthernet0/0/1]undo negotiation auto        #撤消協(xié)商自動

[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        #解開 關(guān)掉        啟用


<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 路由-靜態(tài)   ip route-static 目標(biāo)網(wǎng)絡(luò)ID 子網(wǎng)掩碼 下一跳

[R1]ip route-static 0.0.0.0 0.0.0.0 192.168.2.2        #默認(rèn)路由或缺省路由! 

<Huawei>display ip routing-table        #顯示IP路由表


[Router]user-interface vty 0 4      #遠(yuǎn)程用戶登錄接口


[HuaweiSwitch]vlan 12        #創(chuàng)建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       #端口 默認(rèn) 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

永久組臨時(shí)組


華為交換機(jī)刪除Vlan后端口自動回到Vlan1


[HuaweiSwitch]vlan 1        #創(chuàng)建Vlan1

[HuaweiSwitch]vlan batch 1 3 5        #創(chuàng)建Vlan1 3 5

[HuaweiSwitch]vlan batch 1 to 9        #創(chuàng)建Vlan123456789


[HuaweiSwitch]undo vlan 1        #解開Vlan1

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

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


未完


向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI