天天看點

在路由器上配置Telnet

    路由器用于連接配接多個子網時,通常放置位置都相距較遠,察看和修改配置都比較麻煩, 此時如果可以遠端登入到路由器上進行操作,将能夠大大降低管理者的工作量。那麼我們就要學會如何配置路由的Telnet服務,以及如何通過Telnet登入到路由器進行操作的方法。

    實驗裝置:路由器(帶序列槽),V.35DCE/DTE線纜,pc機。

    實驗原理:将兩台路由器通過序列槽,以 V.35 DTE/DCE 電纜連接配接在一起,分别配置 Telnet,可以互 相以 Telnet 方式登入對方。 路由器提供廣域網接口(serial 高速同步序列槽),使用 V.35 線纜連接配接廣域網接口鍊路。 在廣域網連接配接時一端為 DCE(資料通信裝置),一端為 DTE(資料終端裝置)。要求必須在 DCE 端配置時鐘頻率(clock rate)才能保證鍊路的連通。 

    實驗過程及操作:

      登入到路由器;指令enable進入特權模式,當然,也可en縮打指令,回車;

      sh ip int b:(show路由的端口各ipshi是多少,也可看到serial口有哪些)

      configure terminal(簡打:conf t),進入全局配置模式;

      int serial 2/0進入序列槽的接口的配置模式;

      clock rate 51000 設定DCE端的時鐘頻率;

      ip address 172.128.39.22 255.255.255.0 為接口配置IP位址;

      no shutdown 啟用端口;

       接下來配置telnet:

    enable password 123456 給進入特權模式時設定密碼;不然Telnet登入不能進入特權模式;

    line vty 0 5 進入線程模式;可登入使用者6個  password jjs 設定進入的密碼;

    login 登入時需進行身份認證 end退出;

       測試網絡的連通性 ping 172.128.39.22 ping通則網絡通暢;

    telnet 172.128.39.22 通過Telnet登入 ;接下來根據提示輸入相應的密碼可對路由進行操作;

    設定密碼的時候可以使用 enable secret 123456 設定,級别及安全性更高可以覆寫password

設定的密碼,no enable secret 取消密碼時password設定的密碼有生效了;

        通過對路由的配置,讓我覺得網絡比想象中更加有趣,指令的觸發,讓電腦與電腦互聯共通,神奇!

R3740#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

R3740(config)#hostname RouterB

RouterB(config)#interface serial 2/0

RouterB(config-if)#ip address 172.128.39.22 255.255.255.0

RouterB(config-if)#no shutdown

RouterB(config-if)#exit

RouterB(config)#enable password ruijie

RouterB(config)#line vty 0 5

RouterB(config-line)#password star

RouterB(config-line)#login

RouterB(config-line)#end

RouterA#ping 172.128.39.22

Sending 5, 100-byte ICMP Echoes to 192.168.1.2, timeout is 2 seconds:

< press Ctrl+C to break >

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/10 ms

RouterA#telnet 172.128.39.22

Trying 192.168.1.2, 23...

User Access Verification

Password:

RouterB>en

繼續閱讀