telnet遠程登錄AAA認證

在這裏插入圖片描述

R1設置IP地址
<Huawei>system-view     //進入全局配置模式
[Huawei]sysname R1     //改名
[R1]undo info-center enable     //關閉信息告警提示
[R1]interface g0/0/0     //進入g/0/0接口
[R1-GigabitEthernet0/0/0]ip address 192.168.100.1 24     //配置IP地址
R1配置認證模式爲AAA認證
[R1]user-interface vty 0 4     //用戶界面vty 0 4     
//user-interface 是指用戶界面
//vty ,全稱爲Virtual Teletype Terminal,指虛擬終端。不帶vty的,就是實實在在的端口。
//0 4 :0是初始值,4是結束值。表示可同時打開5個會話,進入交換機去配置命令,並且使用的配置都是一樣的。
[R1-ui-vty0-4]authentication-mode aaa     //使用AAA認證模式
[R1-ui-vty0-4]quit     //退出
[R1]aaa     //進入AAA認證模式
[R1-aaa]local-user admin password cipher admin@123     //創建用戶名和密碼
[R1-aaa]local-user admin service-type telnet     //設置用戶需要的服務,telnet
[R1-aaa]local-user admin privilege level 15     //設置用戶權限登記
[R1-aaa]quit     //退出
[R1]  
R2設置IP地址
<Huawei>system-view      //進入全局配置模式
[Huawei]sysname R2     //改名
[R2]undo info-center enable     //關閉信息告警提示 
[R2]interface g0/0/0     //進入g/0/0接口
[R2-GigabitEthernet0/0/0]ip address 192.168.100.2 24     //配置IP地址
[R2-GigabitEthernet0/0/0]quit     //退出
R2測試是否可以跟R1通信
[R2]ping 192.168.100.1     //測試是否可以ping通
  PING 192.168.100.1: 56  data bytes, press CTRL_C to break
    Reply from 192.168.100.1: bytes=56 Sequence=1 ttl=255 time=100 ms     //可以ping通
    Reply from 192.168.100.1: bytes=56 Sequence=2 ttl=255 time=80 ms
    Reply from 192.168.100.1: bytes=56 Sequence=3 ttl=255 time=70 ms
    Reply from 192.168.100.1: bytes=56 Sequence=4 ttl=255 time=80 ms
    Reply from 192.168.100.1: bytes=56 Sequence=5 ttl=255 time=60 ms

  --- 192.168.100.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 60/78/100 ms

[R2]quit
R2遠程R1路由器
 <R2>telnet 192.168.100.1     //telnet連接192.168.100.1
  Press CTRL_] to quit telnet mode
  Trying 192.168.100.1 ...
  Connected to 192.168.100.1 ...

Login authentication


Username:admin     //輸入用戶名
Password:     //輸入密碼
<R1>     //成功登陸
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章