天天看點

華為交換機路由器登陸密碼詳細操作

準備1台路由器,2台二層交換機,4台PC機

華為交換機路由器登陸密碼詳細操作

一.設定交換機路由器名字,端口IP,登陸密碼,遠端登陸

system-view 進入全部模式

[Huawei]sysname lsw1 設定交換機1名字

[Huawei]sysname lsw2 設定交換機2名字

[Huawei]sysname AR1 設定路由器名字

設定2台交換機IP:

[lsw1]interface vlanif 1

[lsw1-Vlanif1]ip address 192.168.1.2 24

[lsw2]interface vlanif 1

[lsw2-Vlanif1]ip address 192.168.2.2 24

設定路由器端口IP

[AR1]interface GigabitEthernet 0/0/0

[AR1-GigabitEthernet0/0/0]ip address 192.168.1.1 24

[AR1]interface GigabitEthernet 0/0/1

[AR1-GigabitEthernet0/0/1]ip address 192.168.2.1 24

PC設定IP位址,路由器端口IP為網關位址:全網互通

設定2台交換機登陸密碼:

[lsw1]user-interface console 0 進入console口

[lsw1-ui-console0]authentication-mode password 準備密碼

[lsw1-ui-console0]set authentication password cipher 123 設定密文123

[lsw2]user-interface console 0

[lsw2-ui-console0]authentication-mode password

[lsw2-ui-console0]set authentication password cipher 123

設定2台交換機遠端登陸密碼:

[lsw1]interface vlanif 1 進入vlan1

[lsw1-Vlanif1]user-interface vty 0 3 限制登陸人數4人

[lsw1-ui-vty0-3]user privilege level 3 設定3級操作權限

[lsw1-ui-vty0-3]authentication-mod aaa 設定3a認證

[lsw1-ui-vty0-3]aaa 進入3a模式

[lsw1-aaa]local-user xx password cipher 123 設定使用者xx,密文123

[lsw1-aaa]local-user xx service-type telnet 設定連接配接協定telnet

[lsw2]interface vlanif 1

[lsw2-Vlanif1]user-interface vty 0 3

[lsw2-ui-vty0-3]user privilege level 3

[lsw2-ui-vty0-3]authentication-mod aaa

[lsw2-ui-vty0-3]aaa

[lsw2-aaa]local-user xx password cipher 123

[lsw2-aaa]local-user xx service-type telnet

設定路由器登陸密碼:

[AR1]user-interface console 0 進入console口

[AR1-ui-console0]set authentication password cipher 456 設定密文456

設定路由器遠端登陸密碼:

路由器每個端口都是一個完整的廣播域,兩個端口都需要設定遠端登陸

[AR1]interface GigabitEthernet 0/0/0 進入路由端口

[AR1-GigabitEthernet0/0/0]user-interface vty 0 3 限制登陸人數4人

[AR1-ui-vty0-3]user privilege level 3 設定3級操作權限

[AR1-ui-vty0-3]authentication-mode aaa 設定3a認證

[AR1-ui-vty0-3]aaa 進入3a模式

[AR1-aaa]local-user xx password cipher 456 設定使用者xx,密文456

[AR1-aaa]local-user xx service-type telne 設定連接配接協定telnet

[AR1]interface GigabitEthernet 0/0/1

[AR1-GigabitEthernet0/0/1]user-interface vty 0 3

[AR1-ui-vty0-3]user privilege level 3

[AR1-ui-vty0-3]authentication-mode aaa

[AR1-ui-vty0-3]aaa

[AR1-aaa]local-user xx password cipher 456

[AR1-aaa]local-user xx service-type telnet

額外知識點:

1)display bridge mac-address 檢視本機MAC位址

2)display mac-address 檢視MAC位址表

3)檢視直連的裝置

lldp enable 全部裝置啟用鄰居發現協定

display lldp neighbor brief 發現直連裝置

4)undo negotiation auto 先進端口,後取消端口的自動協商模式

duplex half|full 設定端口為半雙工或全雙工模式

speed 10|100 設定配置速率10M或100M

5)display interface Ethernet brief 顯示端口資訊

繼續閱讀