ITPub博客

首页 > IT职业 > IT生活 > CCNA的SimulatorLab命令总结(转)

CCNA的SimulatorLab命令总结(转)

原创 IT生活 作者:post0 时间:2007-08-12 19:58:27 0 删除 编辑
CCNA的SimulatorLab命令总结(转)[@more@]

  路由器实验:

  router> enable 从用户模式进入特权模式

  router# disable or exit 从特权模式退出到用户模式

  router# show sessions 查看本机上的TELNET会话

  router# disconnect 关闭所有的TELNET会话

  router# show users 查看本机上的用户

  router# erase startup-config 删除NVRAM中的配置

  router# reload 重启路由器

  router# config terminal 从用户模式进入特权模式

  router(config)# hostname r1 配置用户名为r1

  router(config)# #banner welcome# 配置开机话语

  router# show controllers serial 0 查看串口0的物理层信息,主要是查看DTE/DCE

  router# show ip interface 查看端口的IP配置信息

  router# show hosts 查看主机表

  end or ctrl+z 从各种配置模式退到特权模式

  

  r1(config)# no ip domain-lookup 关闭动态域名解析

  r1(config)# ip domain-lookup 打开动态域名解析

  r1(config)# ip name-server 202.106.0.20 打开动态域名解析之后便可以指定DNS服务器

  r1(config)# interface serial 0 进入serial 0的接口配置模式

  r1(config-if)# no shutdown 路由器出厂默认所有端口关闭,使用此命令使它打开

  r1(config-if)# encapsulation ppp 封装ppp

  r1(config-if)# clock rate 64000 如果是DCE便需要设置时钟速率,如果是DTE便不需要

  r1(config-if)# bandwidth 64 设置端口带宽为64K

  r1(config-if)# ctrl+c 或者ctrl+z 快捷键退出到到特权模式

  r1# show interface serial 0 查看S0信息,如果看到serial和line protocol都显示up说明链路两端都设置成功

  注意: 如果出现 serial down , line down 可能对方的端口没有打 no shutdown或者电缆没有插好

   如果出现 serial up , line down 可能是DCE端没有设置 clock rate , 也可能是封装格式不对

  r1# show cdp neighbors 查看CDP邻居信息.

  r1# show cdp entry *

  r1(config-if)# ip add 10.0.0.1 255.0.0.0 进入相应的接口配置相应的IP地址

  r1# ping 10.0.0.2 使用ping 命令查看邻居的连通性

  r1# show ip route 查看路由表,可以看到以C打头的路由信息,这是直连的路由信息;可以看到以R开头的路由信息,是从rip学来的路由信息

  可以看到以I开头的路由信息取代了以R开头的路由信息,这是因为igrp的管理距离是100,小于rip的120

  r1(config)# router rip 启动RIP路由协议

  r1(config-router)# network 10.0.0.0 发布网段,注意network 后面是接的是网络号而不是IP地址

  r1# show ip protocol 查看配置的路由协议

  r1(config)# router igrp 300 (一定要注意要在igrp后面加自治系统号,考试的时侯题目会告诉你AS number,照敲就是)

  r1(config-router)# network 10.0.0.0

  r1(config)# line vty 0 4 进入虚拟线程配置模式,在这个模式里面可以对telnet功能进行配置

  r1(config-line)# login

  r1(config-line)# password cisco 配置telnet密码,默认的网络设备telnet的功能是关闭的,配了密码之后会自动打开

  r1(config)# enable password cisco 配置进入enable模式的密码,区分大小写

  r1(config)# enable secret ciscocisco 配置进入enable模式的密码,是加密的密码,show run是看不见的

  r1(config)# line console 0

  r1(config-line)# login

  r1(config-line)# password cisco 配置进入用户模式的密码

  r1(config-line)# logging synchronous 输入同步

  r1(config-line)# exec-timeout 0 0 禁止因为一段时间没有输入而跳出(类似windows里面的屏保)

  r1# copy running-config startup-config 保存配置,考试的时侯注意题目的要求,如果题目要求里面要求你保存配置就一定不能少了这一项

  r1# copy tftp startup-config

  r1# copy running-config tftp

  r1# copy tftp flash

  

  

  交换机实验:

  swich(config)# ip address 192.168.0.177 255.255.255.0 与路由器在接口上配置ip不同,交换机是在全局配置模式配置

  swich(config)# ip default-gateway 192.158.0.1 给交换机配置一个缺省网关,请注意,不用写掩码

  swich(config)# vlan 2 name cisco 配置一个vlan 2并且指定名字就叫cisco

  swich# show interfaces 查看端口状态

  swich(config)# interface e0/10 进入端口e0/10

  swich(config-if)# vlan-membership static 2 将端口放进vlan 2 里面

  swich(config)# int f0/26 进入快速以太网端口f0/26

  swich(config-if)# trunk on 启用trunk,注意: 只能在百兆以上端口启用trunk

  swich(config-if)# no trunk-vlan 51 52 在主干上关闭VLAN51、52的传输

  


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/8225414/viewspace-951710/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    2018
  • 访问量
    8225994