欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

路由器的基本配置

程序员文章站 2024-02-11 15:01:10
...

路由器的基本配置

1、配置路由器

<Huawei>sys
[Huawei]sysname AR1
[AR1]interface g0/0/0
[AR1-GigabitEthernet0/0/0]ip address 192.168.0.1 24
[AR1-GigabitEthernet0/0/0]q

配置Telnet远程访问密码。
[AR1]user-interface vty 0 4
[AR1-ui-vty0-4]authentication-mode password 
Please configure the login password (maximum length 16):lyj
[AR1-ui-vty0-4]q

配置Console,设置本地登录密码。
[AR1]user-interface console 0
[AR1-ui-console0]authentication-mode password 
Please configure the login password (maximum length 16):jyl
[AR1-ui-console0]q
[AR1]q
<AR1>save
  The current configuration will be written to the device. 
  Are you sure to continue? (y/n)[n]:y
  It will take several minutes to save configuration file, please wait.......
  Configuration file had been saved successfully
  Note: The configuration file will take effect after being activated

2、配置客户端

<Huawei>sys
[Huawei]sysname AR2
[AR2]interface g0/0/0
[AR2-GigabitEthernet0/0/0]ip address 192.168.0.2 24
[AR2-GigabitEthernet0/0/0]q

3、验证
(1)Telnet远程登录。在客户端AR2中输入Telnet 192.168.0.1,显示登录成功。

[AR2]q
<AR2>telnet 192.168.0.1
  Press CTRL_] to quit telnet mode
  Trying 192.168.0.1 ...
  Connected to 192.168.0.1 ...

Login authentication


Password:
<AR1>

(2)本地登录。完全退出路由器AR1登录界面,再次登录时要求输入密码。

<AR1>

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on


Login authentication


Password:
<AR1>