Linux營運課程 第一階段 重痛點摘要(三)CISCO

來源:互聯網
上載者:User

標籤:linux營運

第一階段重痛點筆記匯總(三)cisco

一、簡介:IOS(Internetwork Operating System),其配置通常通過基於文本的命令列介面(command line interface,CLI)進行的。

  • 1、基本操作:

操作模式切換

a使用者模式:Router>       通常查看統計資訊

b特權模式:Router>enable

       Router#           #查看和修改路由器的配置

       Router#disable

C全域配置模式:Router#configuration terminal

             Router(config)#exit (ctrl+Z)

2、協助與命令補全:?和<tab>鍵

3、支援的快速鍵:ctrl+U,ctrl+E,ctrl+A

4、曆史命令:#show terminal      #查看終端配置與曆史命令儲存數

       #show history              #查看曆史命令

       #按方向鍵的上下鍵可切換最近操作的命令

       #terminal history size ?  #可修改曆史命令儲存條數

       #show version

  • 路由器和交換器的密碼管理:

1、         設定主機名稱:R1(config)#hostname SC

2、         設定登入提示資訊:

A定義日期資訊標記     #banner motd i(i是分割界定符,可以是任一字元)

B定義登入資訊標記     #banner login i

3、         設定口令:

介面:console口(本地介面,不用密碼也可管理);虛擬介面密碼(TELNET、SSH);aux介面。

           a 設定特權模式密碼:

           R1(config)#enable password 123設定特權非密口令

           R1(config)#enable secret 456     設定特權加密口令

      b 設定console介面登入口令

      R1(config)#line console 0

      R1(config-line)#password 123

      R1(config-line)#login      啟用密碼檢查,讓密碼生效,如無密碼會報錯

      R1(config-line)#exec-timeout 0 0設定回話逾時時間,格式是0分0秒,預設10分鐘不操作會被踢出

      R1(config-line)#logging synchronous       阻止控制台資訊,避免打擾命令輸入

      c 設定TELNET登入口令

      R1(config)#line vty 0 15

      R1(config)#password 123

      R1(config)#login      (no login表示允許telnet無密碼登入,不允許使用)

      d 密碼加密

      R1(config)#service password-encryption  可開啟Data Encryption Service,所有密碼都密文儲存

4、         SSH登入

R1(config)#hostname SC

SC(config)#ip domain-name lamp

SC#clock set 23:32:17 9 apr 2015   #設定主機名稱網域名稱及時間,產生密鑰時要用到

SC(config)#crypto key generate rsa      #產生加密金鑰,用rsa加密,產生1024位密鑰,如果位元小於768位,不能使用2代SSH

SC(config)#aaa new-model#啟用AAA模式(authentication\authorization\accounting,認證、授權、記賬)

SC(config)#username cisco password cisco#設定使用者名稱和密碼

SC(config)#ip ssh time-out 120#設定逾時時間

SC(config)#ip ssh authentication-retries 5    #設定最大失敗次數

SC(config)#ip ssh version 2

SC(config)#line vty 0 15

SC(config)#transport input SSH#僅允許SSH登入,遠程登入一定要設定特權模式密碼,否則無法登入

 

Linux營運課程 第一階段 重痛點摘要(三)CISCO

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.