|
||
|
||
|
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 rl 配置用户名为rl router(config)# #banner welcome# router# show controllers serial0 router# show ip interface 查看端口的IP配置信息 router# show hosts 查看主机表 end or ctrl+z 从各种配置模式退到特权模式 rl(config)# no ip domain-lookup rl(config)# ip domain-lookup 打开动态域名解析 rl(config)# ip name-server 202.106.0.20 rl(config)# interface serial 0 进入serial 0的接口配置模式 rl(config-if)# no shutdown 路由器出厂默认所有端口关闭 rl(config-if)# encapsulation ppp rl(config-if)# clockrate 64000 如果是DCE使需要设置时钟速率 rl(config-if)# bandwidth 64 设置端口带宽为64K rl(config-if)# ctrl+c 或者ctrl+z rl# show interface serial 0 查看s0信息,如果看到serial和 注意:如果出现serial down, line down 可能对方的端口没有打no shutdown或者电缆没有插好;如果出现serial up, line down 可能是DCE端没有设置clock rate, 也可能是封装格式不对 rl# show cdp neighbors 查看CDP邻居信息 rl# show cdp entry * rl(config-if)# ip add 10.0.0.1 255.0.0.0 rl# ping 10.0.0.2 使用ping命令查看邻居的连通性 rl# show ip route 查看路由表,可以看到以C打头的路由 rl(config-if)# router rip 启动RIP路由协议 rl(config-router)# network 10.0.0.0 rl# show ip protocol 查看配置的路由协议 rl(config)# router igrp 300 一定要注意在IGRP后面加自治系统号 rl(config-router)# network 10.0.0.0 rl(config)# line vty0 4 进入虚拟线程配置模式,在这个模式里 rl(config-line)# login rl(config-line)# password cisco rl(config)# enable password cisco rl(config)# enable secret ciscocisco rl(config)# line console 0 rl(config-line)# login rl(config-line)# password cisco 配置进入用户模式的密码 rl(config-line)# logging synchronous rl(config-line)# exec-timeout 0 0 r1# copy tftp startup-config r1# copy running-config tftp r1# copy tftp flash 交换机实验: switch(config)# ip address 192.168.0.177 255.255.255.0 switch(config)# ip default-gateway 192.158.0.1 switch(config)# vlan2 name cisco switch# show interfaces 查看端口状态 switch(config)# interface e0/10 switch(config-if)# vlan-membership static 2 switch(config)# int f0/26 进入快速以太网端口f0/26 switch(config-if)# trunk on 启用trunk,注意:只能在百兆以上端口 switch(config-if)# notrunk-vlan 51 52
|
||