sakko51150 发表于 2018-7-16 08:36:45

Linux运维课程 第一阶段 重难点摘要(三)CISCO-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>  #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可开启加密服务,所有密码都密文保存
  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登录,远程登录一定要设置特权模式密码,否则无法登录
  注:本文由互联网收集整理(51CTO、360DOC、百度百科、兄弟连免费视频等)。
页: [1]
查看完整版本: Linux运维课程 第一阶段 重难点摘要(三)CISCO-Linux运维重难点学习笔记