监控安装 ERP

系统集成论坛

 找回密码
 注册通行证

QQ登录

只需一步,快速开始

路由器交换机防火墙系统集成商城 优质产品采购平台
查看: 3324|回复: 4
打印 上一主题 下一主题

cisco常用的配置含注释(转)

[复制链接]
跳转到指定楼层
1
发表于 2009-6-11 13:41:38 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
华为金牌代理
cisco常用的配置含注释(转)
Router 命令行
1、 enable    (进入到Router# 模式下)
2、 conf t    (进入到Router(config)#模式下 )
3、 show      ( 显示现在配置 )
4、 Router(config)#host
     Router(config)#hostname cisco2500
     cisco2500(config)#
     (改变名字)
5、cisco2500(config)#ena
    cisco2500(config)#enable pass
    cisco2500(config)#enable password password
    cisco2500(config)#enable sec
    cisco2500(config)#enable secret cisco
    (设置路由器密码;enable password 设置明文密码,enable secret 设置加密密码)
6、cisco2500(config)#line con
    cisco2500(config)#line console 0 (设定console 0 口)
    cisco2500(config-line)#log
    cisco2500(config-line)#loging      (设定需要登录)
    cisco2500(config-line)#loging
    % login disabled on line 0,until 'password' is set
    cisco2500(config-line)#pass
    cisco2500(config-line)#password cisco   (设定登录密码为cisco)
    cisco2500(config-line)#exit             (退出)
7、cisco2500(config)#line vty 0 4          (所有的路由器的vty模式,缺省有5个vty端口打开,自动分配;一般同时配置)   
    cisco2500(config-line)#loging           (配置需要登录)
    % Login disabled on line 2, until 'password' is set
    % Login disabled on line 3, until 'password' is set
    % Login disabled on line 4, until 'password' is set
    % Login disabled on line 5, until 'password' is set
    % Login disabled on line 6, until 'password' is set
    cisco2500(config-line)#pass
    cisco2500(config-line)#password cisco    (设定密码为cisco)
    cisco2500(config-line)#exit
8、cisco2500(config)#bann       (配置触动警告提示信息)
    cisco2500(config)#bannner mo
    cisco2500(config)#bannner motd || warnning !! Don't touch it !!
    cisco2500(config)#exit
9、cisco2500#show run          (查看刚才配置信息)
    cisco2500#show start        (NVRAM信息)
10、cisco2500#copy run
     cisco2500#copy running-config st
     cisco2500#copy running-config startup-config
     Destination filename [startup-config]?
     Building configuration
     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11、!
     version 12.1
     service timestamps debug uptime
     service timestamps log uptime
     no service password-encryption        (去除该命令,对密码加密)
     !
     boot system flash                     (去除该命令)
     !
     cisco2500#conf t
     cisco2500(config)#no boot
     cisco2500(config)#no boot sy
     cisco2500(config)#no boot sytem f
     cisco2500(config)#no boot sytem fl
     cisco2500(config)#no boot sytem flash
     cisco2500(config)#serv
     cisco2500(config)#service pass
     cisco2500(config)#service password-encryption   (加密密码命令)

12、!
     interface BRI0
     no ip address
     shutdown
     isdn x25 static-tei 0
     !
     cisco2500(config)#int
     cisco2500(config)#interface bri
     cisco2500(config)#interface ?
     cisco2500(config)#interface bri ?
       <0-0> BRI interface number
     cisco2500(config)#interface bri 0
     cisco2500(config-if)#no isdn x
     cisco2500(config-if)#no isdn x25 ?
       dchannel     set this BRI to support x25 on the D channel
       static-tei   specify a static TEI for x25 on the D channel
     cisco2500(config-if)#no isdn x25 st
     cisco2500(config-if)#no isdn x25 static-tei
     Warning:No ISDN switch-type defined. Cannot change a static TEI
     (无ISDN类型,不让删除,增加一个类型)
     cisco2500(config)#isdn
     cisco2500(config)#isdn sw
     cisco2500(config)#isdn switch- type ba
     cisco2500(config)#isdn switch- type basic-
     cisco2500(config)#isdn switch- type basic-net3
     (全局模式下配置,则所有端口都会有影响)
     (接口模式下配置,则会使用自己的配置)
13、cisco2500(config-line)#e xec-timeout 0 5   (配置超时设定)
     cisco2500(config-line)#e xec-timeout 0 0
14、cisco2500#conf t
     cisco2500(config)#line con 0
     cisco2500(config-line)#loggin
     cisco2500(config-line)#loggin syn
     cisco2500(config-line)#loggin synchronous   (配置节省命令)
     cisco2500(config-line)#end
     cisco2500#

15、cisco2500(config)#int serial 0   (两个serial口,选择一个)
     cisco2500(config-if)#clo
     cisco2500(config-if)#clock r
     cisco2500(config-if)#clock rate 64000   (如果接了dce线就可以配置,如果接了dt的线就不能配置)
     cisco2500(config-if)#band
     cisco2500(config-if)#bandwidth 64 千字节每秒Kbit
     cisco2500(config-if)#no shut          (启用端口)
     cisco2500(config-if)#no shutdown
     cisco2500(config-if)end               (启用端口前先退出来,查看端口)
     cisco2500#show interfaces serial 0     (查看端口当前状态)
     cisco2500#conf t
     cisco2500(config)#int s0
     cisco2500(config-if)#ip add 192.168.12.1 255.255.255.0    (配置IP地址和子网掩码)
     cisco2500(config-if)#no shut
     cisco2500(config-if)#no shutdown
     cisco2500(config-if)#
     00:20:05:%LINK-3-UPDOWN: Interface Serial0, changed state to ......
     cisco2500(config-if)#end
     cisco2500#sh int s
     00:20:20: %SYS-5-CONFIG_I:Configured from console by console
     cisco2500#sh int serial 0
     Serial0 is down, line protocol is down   (不是管理性down掉)
     cisco2500#conf t
     cisco2500(config)#int e0
     cisco2500(config-if)#no shutdown
     cisco2500(config-if)#end
     cisco2500#
     00:21:09: %SYS-5-CONFIG_I: Configured form console by console
     cisco2500#
     00:20:05:%LINK-3-UPDOWN: Interface Serial0, changed state to ......
     cisco2500#sh int e0
     Ethernet0 is up, line protocol is down     (端口是UP,协议是down)
     cisco2500#conf t
     Enter configuration commands, one per line. End with CNTL/Z
     cisco2500(config)#int loop        (配置虚拟端口)
     cisco2500(config)#int loopback 0
     cisco2500(config-if)#no shut
     cisco2500(config-if)#no shutdown
     cisco2500(config-if)#end
     cisco2500#sh int
     00:21:58: %SYS-5-CONFIG_I: Configured form console by console
     cisco2500#sh int loopback
     00:21:59: %LINKPROTO-5-UPDOWN: Line protocol on Interface Loopback... te to up
     cisco2500#sh int loopback 0

16、
Router#show interfaces serial 1
   Serial1 is up, line protocol is up
(Carrier Detect) (Keepalives)
(对电信号的判断)(链路两端的端口彼此之间互相协商、互相认证)
     Hardware is HD64570
     Description: 64Kb Line to San Jose
a、协议认证成功的前题是通道物理上是通的;
Operational............Serial1 is up, line protocol is up
Connection problem.....Serial1 is up, line protocol is down
Interface problem......Serial1 is down, line protocol is down
Disabled...............Serial1 is administratively down, line protocol is down

a、整个工作是OK的,反应是第二层DataLink?的状态
b、物理层OK,数据链路层有问题,协议配置错了;
    协议配置两边没有问题,但彼此间不能协调同步;同步时钟没有配置;
c、排错目标放在物理层上,不能检测到链路上的载波,对方提供载波,
    回路通过对方行程的,广域网内;
    以太网回路是在本地内行程的;
d、对方路由器的端口根本没有打开,如果检测不到电路反馈表示断开;

CCNA05
   Router#show interface serial 0
   Router#show controller serial 0
   HD unit 0, idb = 0x121C04, driver structure at 0x12707B
   buffer size 1524 HD unit 0, V.35 DTE Cable
                  .
                  .
                  .
   (主要看第二行或者第三行的中后部,是V.35还是V.24连接类型,是DTE还是DCE,DCE需要配置?)

网络环境的管理:
1、设备本地的资源管理;
2、互连
3、启动过程
Cisco网络邻居
CDP协议
Cisco Discovery Protocol 思科发现协议
(工作在第二层的 Data Link,数据链路层的子层协议,网络支持SNAP,)
特点:
能发现邻居设备上层协议的特点(参数),邻居设备端口连接方式;对直连邻居有效;
Summary infomation includes:
--- Device identifilers       邻居的主机名
--- Address list              邻居的上层地址
--- Port identifier           双方端口的标记 通过哪个端口连接到邻居的哪个端口
--- Capabilities list         性能列表 在网络中起什么作用
--- Platform                  硬件平台

    Router#show CDP   ?
路由器一起动其CDP就会自动缺省启动,如果要关闭所有CDP则使用:(在全局模式下)
    Router(config)#no CDP run  
    Router(config)#interface serial0
    Router(config-if)#no cdp enable     (关掉某接口的CDP)
网络拓扑结构:SwitchA <--> RouterA <--> RouterB
    Router#show cdp neighbors
    Capability Codes:R - Router, T - Trans Bridge, B - Source Route Bridge
                     S - Switch, H - Host, I - IGMP, r - Repeater
    Device ID         Local Intrfce     Holdtme         Capability          platform     Port ID
    RouterB              Ser 0          148                R                2522         Ser 1
    SwitchA0050BD855780 Eth 0          167               T S               1900          2
    Device ID : 设备名称,主机名
Local Intrfce: A哪个端口连接
       Holdtme: 连接时间是多久
    Capability: 起到什么角色作用
      platform: 什么硬件平台
       Port ID: B用什么端口连接A

查看详细信息:
    Router#show cdp entry *
    Router#show cdp neighbors detail
    Router#show cdp traffic    作用:查CDP的进出流量
    Router#show cdp interface 作用:哪些端口启用了CDP协议

作用:通过CDP能创建网络地图

Using Telnet to Connect to Remote Devices
1、如果远程主机没有配置vty密码或者enable密码,则不允许用Telnet登录
2、超级终端能动态显示信息;需要使用telnet mon才能用vty端口得到提示信息
    Router#show sessions
      看到本地有多少telnet信息出去,有几条会话,主动
      看到向外发出去的信息
    Router#show users
      有哪些人登录到本地路由器的列表
    Router#disconnect        Closes the curret session opened by you
      关闭本地发出的会话
    Router#clear line 11     Closes a session opended by a remote devices
      关闭远程连接的会话
    Router#resume 1    继续某一个会话,主要用于路由器打开多条会话,进行切换
    Ctrl+Shift+6 紧接敲“S”建


Using the ping and trace Commands
是否连通、时间
    Router#ping 10.1.10.1
发五个数据包
    Router#trace 10.1.10.1
从源到目的,所经过网关的数量,每次发三个数据包
traceroute    1 2 3
               TTL 存在的时间
    第一批     TTL=1    会自动减1
    第二批     TTL=2
    第三批     TTL=3
    缺省30次

CCNA06   2006-10-11
路由器启动IOS(操作系统)
三大步骤,
   一、POST加电自检
   二、加载操作系统
   三、应用用户配置
实际分为7小步完成:Router Power-On/Bootup Sequence
   1、Perform power-on self test (POST). 加电自检
   2、Load and run bootstrap code.        读取引导
   3、Find the Cisco IOS software.        寻找IOS软件
   4、Load the Cisco IOS software.        加载IOS软件,到内存
   5、Find the configuration.             寻找配置文件
   6、Load the configuration.             加载配置文件
   7、Run the configured Cisco IOS software. 运行IOS软件

Router Internal Components(路由器的主要硬件组成)
               RAM             NVRAM (Configuration Register) (不会掉电,加入微型电池供电)

(只读存储器)   ROM             interfaces

(可移动存储器)Flash           CPU

ROM Functions
ROM 存放什么东西?
         ROM      
                    |              |
         Bootstrap   |     POST      |show version
      ----------------------------|------------->
         Mini IOS    |     ROM       |
         software    |    Monitor    |
            file     |              |
Bootstrap:固化的自动启动选项。
      POST:加电自检代码。最新读取的信息和现在的比较如果OK就执行;
      Mini:(现在已经不提供)安全配置模式,简化版本,启动基本命令;
   Monitor:桥式的,最小的IOS状态;

路由器启动过程;
Router Startup Flowchart
Configuration Register Values (路由器配置注册码)
例如:
      Configuration register is 0x2102 (16进制) Max=FFFF 一个16进制用4个2进制表示
              四段     |    三段    |     二段    |    一段
              0010    |    0001    |    0000    |    0010
                                             

一段:boot filed 启动字段值; 定义路由器如何启动的
       0000 :启动 ROM Monitor 状态
       0001 :启动 Mini IOS software file 状态(没有Mini情况,向低端靠拢)
       0010 :从 Flash 中启动
       0100 :看是否有 命令 boot system
         .
         .
       1111 :
       Router#c onfigure terminal
       Router(config)#c onfig-register 0x2102 (2102尽量不要更改)
just do it......................................................

0

主题

20

帖子

25

积分

实习生

2
发表于 2009-6-12 18:03:02 | 只看该作者
华为金牌代理
看看

1

主题

2

帖子

24

积分

实习生

3
发表于 2012-10-16 13:00:12 | 只看该作者
华为金牌代理
楼主 做类很好 收藏啦 ,
4
发表于 2012-11-22 21:56:33 | 只看该作者
顶。。
求购(回收)服务器硬盘,交换机,路由器,单板等
QQ:838686985,电话:13212330307

0

主题

0

帖子

0

积分

实习生

5
发表于 2014-3-9 00:45:00 | 只看该作者
学习了
您需要登录后才可以回帖 登录 | 注册通行证

本版积分规则

联系我们| 手机版|系统集成论坛 ( 京ICP备11008917号 )

GMT+8, 2024-9-22 17:34 , Processed in 0.114370 second(s), 24 queries .

系统集成论坛

BBS.XTJC.COM

快速回复 返回顶部 返回列表