路由器与交换机的配置代码.doc

  1. 1、本文档共10页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多

1.配置路由器的主机名和提示信息。

Router(config)#

Router(config)#hostnameR1

R1(config)#bannermotd%

EnterTEXTmessage.Endwiththecharacter%.

2.配置enable密码、配置console和vty密码。

R1(config)#enablesecretclass

R1(config)#lineconsole0

R1(config-line)#passwordcisco

R1(config-line)#login

R1(config-line)#linevty04

R1(config-line)#passwordcisco

R1(config-line)#login

3.配置接口(s0/0和f0/0),并显示接口信息。

R1(config)#interfaceFastEthernet0/0

R1(config-if)#ipaddress

R1(config-if)#noshutdown

保存配置

R1#copyrunning-configstartup-config

Destinationfilename[startup-config]?

Buildingconfiguration...

[OK]

删除启动配置

R1#erasestartup-config

Erasingthenvramfilesystemwillremoveallconfigurationfiles!Continue?[confirm]

[OK]

Eraseofnvram:complete

%SYS-7-NV_BLOCK_INIT:Initializedthegeometryofnvram

查看R1的cdp邻居

R1#showcdpneighbors

关闭R1接口下的cdp

R1(config)#interfaces0/0/0

R1(config-if)#nocdpenable

打开R1接口下的cdp

R1(config)#interfaces0/0/0

R1(config-if)#cdpenable

ble

关闭和打开整个路由的cdp

关闭R1整个路由的cdp

R1(config)#nocdprun

打开R1整个路由的cdp

R1(config)#cdprun

关闭R2整个路由的cdp

R2(config)#nocdprun

打开R2整个路由的cdp

R2(config)#cdprun

在R1和R2上的s0/0上配置IP地址,以及enable密码和vty密码

对R1进行配置

R1(config)#interfaces0/0/0

R1(config-if)#ipaddress

R1(config-if)#noshutdown

R1(config)#enablesecretclass

R1(config-line)#linevty04

R1(config-line)#passwordcisco

R1(config-line)#login

Write)

把IOS从路由器备份到TFTP服务器上。

Router#copyrunning-configtftp:

Addressornameofremotehost[]?

Destinationfilename[Router-confg]?aa.bak

Writingrunning-config...!!

[OK-494bytes]

在各路由器上用rip进行配置

R1:Router(config-router)#network

使用passive在Lo1接口上禁止rip发送信息

Router(config-router)#passive-interfacelo1

Router(config-router)#RIP:receivedv1updatefromonSerial0/0/0

in1hops

在各路由器上用ospf进行配置(进程号自定,单区域)

R1:R1(config-router)#network55area0

查看R1和R2上的f0/1链路谁是DR。在R1上改变router-id,使得R1为DR(要执行clearipospfprocess)。

由上图的showip?ospfneighbor看出R2的优先级最高,所以R2是DR,R1为B

文档评论(0)

偶遇 + 关注
实名认证
内容提供者

个人介绍

1亿VIP精品文档

相关文档