zoukankan      html  css  js  c++  java
  • 思科基本配置命令综合实验训练

    要求1

    R2配置

    Router>en
    Router#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    Router(config)#host R2
    
    R2(config)#interface s0/3/0
    R2(config-if)#ip add 172.16.1.1 255.255.255.0
    
    R2(config-if)#clock rate  6400
    
    R2(config-if)#no shutdown 
    
    %LINK-5-CHANGED: Interface Serial0/3/0, changed state to down
    
    R2(config-if)#end
    -------------------------------------
    提示:怎么看设备上是否设置时钟
    R2#show controllers s0/3/0
    
    Interface Serial0/3/0
    Hardware is PowerQUICC MPC860
    DCE V.35, clock rate 2000000
    -----
    显示 DCE V.35
    --------------------------------------

    R1配置

    Router>en
    Router#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    Router(config)#hos R1
    
    R1(config)#interface s0/3/0
    R1(config-if)#ip add 172.16.1.2 255.255.255.0
    R1(config-if)#no sh
    
    R1(config-if)#
    %LINK-5-CHANGED: Interface Serial0/3/0, changed state to up
    
    R1(config-if)#
    %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/3/0, changed state to up
    
    R1(config-if)#inter f0/0
    R1(config-if)#ip add 192.168.2.254 255.255.255.0
    R1(config-if)#no shu
    
    R1(config-if)#
    %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
    
    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
    
    
    R1(config)#interface f0/1
    R1(config-if)#ip add 192.168.1.254 255.255.255.0
    R1(config-if)#no sh
    
    
    配置好后ping测试
    R1(config)#do ping 172.16.1.1
    
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/9 ms

    SW1配置

    Switch>en
    Switch#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    
    Switch(config)#interface vlan 1
    Switch(config-if)#ip add 192.168.2.253 255.255.255.0
    Switch(config-if)#no sh
    
    Switch(config-if)#
    %LINK-5-CHANGED: Interface Vlan1, changed state to up
    
    %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
    
    Switch(config-if)#exit
    
    Switch(config)#hostname SW1

    PC 和服务器配置IP地址后可以通信正常

    要求2

    R1 R2 SW1  统一配置

    R1(config)#no ip domain-lo
    
    R1(config)#line console 0
    
    
    R1(config-line)#logging synchronous 
    
    R1(config-line)#exec-timeout 00
    
    R1(config-line)#line vty 0 4
    
    
    R1(config-line)#logging synchronous 
    
    R1(config-line)#exec-timeout 5 30
    R1(config-line)#end

    要求3

    R1 和 R2 配置

    R1#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    
    R1(config)#enable se
    R1(config)#enable secret ciscoccna@
    
    R1(config)#line console 0
    
    R1(config-line)#password ciscoccnp#
    
    R1(config-line)#login 
    R1(config-line)#line vty 0 4
    
    R1(config-line)#password ciscoccie$
    
    R1(config-line)#logging 
    R1(config)#service password-encryption

    R2另外配置

    R2(config)#banner motd # this is R2 #
    R2(config-if)#description  connect R1
    R2(config-if)#end

    SW1

    SW1(config)#enable secret ciscoccna@
    SW1(config)#line console 0
    SW1(config-line)#password ciscoccnp#
    R2(config)#service password-encryption

    要求4

    R1

    R1#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    
    R1(config)#interface fa0/1
    R1(config-if)#no cdp ?
      enable  Enable CDP on interface
    
    R1(config-if)#no cdp enable 
    R1(config-if)#END

    SW1

    SW1# conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    
    SW1(config)#interface range fa0/1-4
    
    SW1(config-if-range)#no cdp enable

    要求5

    SW1配置

    交换机需要配置默认网关,

    R1 192.168.2.254 就是交换机的默认网关

    SW1#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    
    SW1(config)#ip default-gateway 192.168.2.254
    SW1(config)#end
    SW1#
    %SYS-5-CONFIG_I: Configured from console by console
    
    
    SW1#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    SW1(config)#user
    SW1(config)#username ccna
    SW1(config)#username ccna password ccna
    
    SW1(config)#username ccnp
    SW1(config)#username ccnp password ccnp
    
    SW1(config)#username ccie
    SW1(config)#username ccie password ccie
    
    SW1(config)#line vty 0 4
    
    SW1(config-line)#login local 
    SW1(config-line)#end

  • 相关阅读:
    mysql 查询结果中增加序号
    mycat配置文件备份
    解决Python安装模块出错 ImportError: No module named setuptools
    sed 详解【转】
    CentOS下配置SFTP操作日志
    解决redis aof文件过大的问题
    mysql主从复制搭建中几种log和pos详解
    Linux下使用命令行配置IPMI
    Zabbix笔记
    zabbix_agentd.conf配置文件详解
  • 原文地址:https://www.cnblogs.com/peter1007/p/9318747.html
Copyright © 2011-2022 走看看