交换机路由器的启动和简单操作

    技术2022-05-11  11

    作者:gdy1039

    目标

    了解交换机的启动过程 使用命令行操作IOS软件 使用在线帮助

    1900交换机状态灯系统状态灯(System Status LED)判断整个系统是否正常绿色正常红色或黄色不正常

    端口模式灯(Port Mode LED)通过模式按钮(Mode Button),端口模式灯在三种状态下切换:STAT,UTL和FDUPSTAT:在该模式下,端口状态灯表示每个端口的状态,是好的还是坏的UTL:在该模式下,通过多个端口状态灯的组合来表示交换机的资源占用情况。具体表应表请查说明书FDUP:端口状态灯亮表示该端口工作在全双工状态,熄灭表示工作在半双工状态

    2900交换机状态灯2900交换机状态灯基本和1900一样。差别在于1900的是10M的端口,而2900是10M/100M自适应端口。

    交换机启动时的状态灯在刚通电时,所有端口灯变绿色每个端口状态灯在端口自检完成后熄灭如果测试失败,,端口灯会变成黄色系统指示灯变黄色,如果有任何测试失败如果没有测试失败,启动完成在启动完成时,LED灯全亮,然后全灭。

    1900交换机启动后可以选择进入菜单模式或命令行模式2900交换机启动后进入一个交互的启动过程或直接进入命令行模式

    1900交换机里面NVRAM和RAM是合并在一起的2900以上是独立的。

    路由器启动后可进入SETUP模式或命令行模式在特权模式下SETUP命令可进行SETUP模式

    错误提示1:只输入CLOCK,这时因为未输入参数,会提示以下信息incomplete command2:输入一个完全不存在的命令,如GDY,这时系统会视它为一个主机名去尝试连接,并提示unknown command or computer name,or unable to find computer3:只输入CL,这时因为完全不能确定一条命令,所以会提示以下信息Ambigious command4:一条命令在^提示符前的命令都是对的,提示符之后的命令出错,例router#clock set 19:56:00 s    <--s为错误输入#invaild input detected at the "^"

    路山器模式摘要Router>enableRouter#configure terminalRouter(config)#全局配置模式下可用的模式Interface  --对路由器的某个端口配置Subinterface  --对路由器的每个端口划成子接口时配置Controller -- 在路由器里配置E1,T1或PRI时所用的配置模式Line --  相对于路由器的PACKET模式,LINE是用于配置CHARACTER模式。该模式处理的信息以字符存在,例如从CONSOLE口输入的命令Router

     


     

     #privilage moderouter>enable router##user moderouter#disablerouter>

    #Global configuration moderouter#configure terminalrouter(config)##Interface configuration moderouter(config)#interface e0/1router(config-if)#

    #change hostnameroute(config)#hostname

    #chagne ipswitch(config)#ip address 10.5.5.11 255.255.255.0

    #chage default-gatewayswitch(config)#ip default-gateway 192.168.1.1

    #查看软件版本,启动时间,交换机自身MAC地址,通常端口的MAC地址是该地址+1,例如交换机MAC是111111111111,则端口1的MAC是111111111112router#show version

    #查看当前正在运行的配置信息,该信息在RAMrouter#show running-configuration

    #查看启动的配置信息,该信息在NVRAMrouter#show startup-configuration

    #能够看到端口的信息,如果不加类型,则显示所有端口的信息,如果加类型再加端口,就会显示具体端口的信息router#show interfaces ethernet 0/1

    #显示IP,网关,DNS,这种做法只在交换机上可以router#show ip 

    #调用当前模式所有可用的命令?

    #如果记得命令前部,可用?查找该命令.下例显示CL开头的所有命令cl?

    #如果记得命令,不记得参数,可在命令后加上空格,再加?clock ?

    #如果命令未输齐,可按TAB键补齐命令,下例在输入CLO后按TAB即可被全命令clo<tab>

    # 查找上一条命令 <ctrl>+<p> or Up Arrow #查找最近一条命令 <ctrl>+<n> or Down Arrow # 显示历史命令,默认10条,最大256条 show history #改BUFFER大小 history size line #设定BUFFER里存放的命令 terminal history size line 

    #把RAM信息保存到NVRAMcopy running-config startup-config

    #设置路由器启动时提示的欢迎信息。router(config)#banner motd

    #Description可设置端口的注解,show running-config或show interface可查看router(config)#interface ethernet 0router(config-if)#Description

    密码配置#配置console passwordrouter(config)#line ocnsole 0router(config-line)#loginrouter(config-line)#password cisco

    #配置Virtual Terminal Password  远程登录密码#路由器默认有4个终端,"line vty 0 4"这条命令表示同时配置4个终端的密码router(config)#line vty 0 4router(config-line)loginrouter(config-line)#password gdy

    #enable password,router(config)#enable password gdy

    #secret passwordrouter(config)#enable secret gdy

    在SHOW RUN时,enable password会以明文显示,enable password密码比SECRET优先级要低如果同时配置这个密码,进入特权模式时,生效的会是SECRET密码

    #加密路由器中的所有密码router(config)#service password-encryption

    #使得命令之后的提示信息完成后,自动进入另一个命令提示符,而不是需要敲回车才能输入新的命令。router#configure terminalrouter(config)#line console 0router(config-line)#logging synchronous

    #取消某条命令的设置,只需要NO加上该命令router(config)#no loginrouter(config)#no enable password

    #防止控制台会话超时,超时设置中,第一个零表示多少分钟,第二个零表示多少秒router(config)#line console 0router(config-line)#exec-timeout 0 0

    #router(config)#line console 0router(config-line)#logging synchronous

    #该方法用于配置固定端口,TYPE表示端口类型,NUMBER表示第几个端口router(config)#interface type numberrouter(config-if)#

    #该命令用于配置模块化端口,TYPE表示端口类型,slot第几个槽/port第几个端口router(config)#interface type slot/portrouter(config-if)#

    #退出端口配置router(config-if)#exit

    配置一个串行接口

    #进入全局配置模式router#configure terminalrouter(config)##进入指定端口router(config)#interface serial 0router(config-if)##设置时钟频率(只在DCE接口有效),单位bpsrouter(config-if)#clock rate 64000#设置带宽,路由器判断线路好坏将以此为依据,单位kbpsrouter(config-if)#bandwidth 64

    #显示某接口的状态,下例显示串口的状态router#show interface serial 0

    #设置连接介质类型router(config)#interface ethernet 2router(config-if)#media-type 10baset

    #默认情况下路由器的所有端口都是SHUTDOWN的,如果要启用一个端口,必需要在该端口的状态下NO SHUTDOWNrouter#configure terminalrouter(config)#interface serial 0router(config-if)#no shutdownrouter(config-if)#shutdown

    #检查端口连接的线路是DTE还是DCERouter#show controller serial 0HD unit 0, idb = 0x1AE828, driver structure at 0x1B4BA0buffer size 1524  HD unit 0,V.35 DTE cablecpb = 0x7, eda = 0x58DC, cda = 0x58F0RX ring with 16 entries at 0x4075800


    最新回复(0)