路由器是工作在OSI参考模型第三层_第1页
路由器是工作在OSI参考模型第三层_第2页
路由器是工作在OSI参考模型第三层_第3页
路由器是工作在OSI参考模型第三层_第4页
路由器是工作在OSI参考模型第三层_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、路由器是工作在OSI参考模型第三层一一网络层的数据包转发设备。路由器通过转发数据包来 实现网络互连。虽然路由器可以支持多种协议(如TCP/IP、IPX/SPX、AppleTalk等协议), 但是在我国绝大多数路由器运行TCP/IP协议。路由器通常连接两个或多个由IP子网或点到点 协议标识的逻辑端口,至少拥有1个物理端口。路由器根据收到数据包中的网络层地址以及路 由器内部维护的路由表决定输出端口以及下一跳地址,并且重写链路层数据包头实现转发数据 包。路由器通过动态维护路由表来反映当前的网络拓扑,并通过与网络上其他路由器交换路由和 链路信息来维护路由表。路由器设备厂商最有名的是Cisco公司,以下

2、是Cisco路由器配置的 常用命令汇总,希望对正在学习和应用思科路由器的你有帮助。启动接口,分配IP地址:routerrouter enablerouter#router# configure terminalrouter(config)#router(config)# interface Type Portrouter(config-if)# no shutdownrouter(config-if)# ip address IP-Address Subnet-Maskrouter(config-if)# z配置RIP路由协议:30秒更新一次router(config)# router rip

3、router(config-if)# network Network-Number router(config-if)# z配置IGRP路由协议:90秒更新一次router(config)# router igrp AS-Number router(config-if)# network Network-Number router(config-if)# z配置Novell IPX路由协议:Novell RIP 60秒更新一次 router(config)# ipx routing node addressrouter(config)# ipx maximum-paths Paths rout

4、er(config)# interface Type Portrouter(config-if)# ipx network Network-Number encapsulation encapsulation-type secondary router(config-if)# z配置DDR:router(config)# dialer-list Group-Number protocol Protocol-Type permitlist ACL-Numberrouter(config)# interface bri 0router(config-if)# dialer-group Group-

5、Numberrouter(config-if)# dialer map Protocol-Type Next-Hop-Address name Hostname Telphone-Number配置ISDN:router(config)# isdn swith-type Swith-Type router(config-if)# zPAP单向认证配置实例:验证方:router-server(config)# username Client password 12345 router-server(config)# interface serial 0router-server(config-if

6、)# encapsulation ppprouter-server(config-if)# ppp authentication pap router-server(config-if)# z被验证方:router-client(config-if)# encapsulation ppprouter-client(config-if)# ppp pap sent-username Client password 12345 router-client(config-if)# zPAP双向认证配置实例:路由器A:routerA(config)# username B password 12345

7、routerA(config)# interface serial 0routerA(config-if)# encapsulation ppprouterA(config-if)# ppp authentication paprouterA(config-if)# ppp pap sent-username A password 54321routerA(config-if)# z路由器 B:routerB(config)# username A password 54321routerB(config)# interface serial 1routerB(config-if)# enca

8、psulation ppprouterB(config-if)# ppp authentication paprouterB(config-if)# ppp pap sent-username B password 12345routerB(config-if)# zCHAP单向认证配置实例:验证方:router-server(config)# username router-client password 12345router-server(config)# interface serial 0router-server(config-if)# encapsulation ppproute

9、r-server(config-if)# ppp authentication chaprouter-server(config-if)#被验证方:router-client(config-if)# encapsulation ppp router-client(config-if)# ppp authentication chap router-client(config-if)# ppp chap hostname router-client router-client(config-if)# ppp chap password 12345 router-client(config-if)

10、# z配置 Frame Relay:router(config-if)# encapsulation frame-relay cisco ietf router(config-if)# frame-relay lmi-type ansi cisco q933a router(config-if)# bandwidth kilobits router(config-if)# frame-relay invers-arp Protocol dlci router(config-if)# z配置标准ACL:router(config)# access-list Access-List-Number

11、permit deny source source-mask router(config)# interface Type Port router(config-if)# ip access-group Access-List-Number in out router(config-if)# z配置扩展ACL: router(config)# access-list Access-List-Number permit deny Protocol Protocol-Number source source-wildcard Source-Port destination destination-

12、wildcard Destination-Port established router(config)# interface Type Port router(config-if)# ip access-group Access-List-Number in out router(config-if)# z配置命名ACL: router(config)# ip access-list standardextended ACL-Namerouter(config std-ext- nacl)# permitdeny IP-Access-List-Test-Conditions router(c

13、onfig std-ext- nacl)# no permitdeny IP-Access-List-Test-Conditions router(config std- ext- nacl)# z router(config)# interface Type Port router(config-if)# ip access-group ACL-Name 1199 in out router(config-if)# z配置DCE时钟:router# show controllers Type Port router(confin-if)# clock rate 64000 router(co

14、nfig-if)# z配置PPP协议: router(config)# username Name password Set-Password-Here router(config)# interface Type Port router(config-if)# encapsulation ppp router(config-if)# ppp outhentication chap chap pap pap chap pap router(config-if)# ppp pap sent-username Name password Password router(config-if)# zC

15、HAP双向认证配置实例:路由器A:routerA(config)# username routerB password 12345 routerA(config)# interface serial 0 routerA(config-if)# encapsulation ppp routerA(config-if)# ppp authentication chap routerA(config-if)# ppp chap hostname routerA routerA(config-if)# ppp chap password 54321 routerA(config-if)# z路由器 B

16、: routerB(config)# username routerA password 54321routerB(config)# interface serial 1routerB(config-if)# encapsulation ppprouterB(config-if)# ppp authentication chaprouterB(config-if)# ppp chap hostname routerBrouterB(config-if)# ppp chap password 12345routerB(config-if)# zTelnet 使用:routerA# termina

17、l monitor routerA# telnet IP-Address Router-Name routerB# exit logout routerB# + + 再按 routerA# show sessions routerA# Connect-Number routerA# disconnect IP-Address Router-Name routerA# show user routerA# clear line 01234 禁止任何Telnet到本机:router(config)# line vty 0 4router(config-line)# access-class ACL

18、-Numberrouter(config)# z设置主机名:router(config)# hostname Set-Hostnamerouter(config)# zrouter(config)# z设置用户模式密码:router(config)# line console 0router(config-line)# loginrouter(config-line)# password Set-Passwordrouter(config-line)# z设置Telnet密码:router(config)# line vty 0 4router(config-line)# loginroute

19、r(config-line)# password Set-Passwordrouter(config-line)# z设置特权模式密码:router(config)# enable password Set-Password router(config)# enable secret Set-Password router(config)# z给所有密码加密:router(config)# service password-ancryption Set-Password-Hererouter(config)# no service password-ancryption router(conf

20、ig)# z设置登录Banner:router(config)# banner motd 分隔符 Set-Banner-InFORMation-Here 分隔符 设置接口的描述信息:router(config-if)# description Set-Port-InFORMation-Hererouter(config)# zCDP的控制:router(config-if)# cdp enable router(config-if)# no cdp enable router(config)# cdp run router(config)# no cdp run Ping的使用:router#

21、 ping IP-Addressrouter# ping Protocol ip: Protocol-Type Target IP address: IP-Address Repeat count 5: Datagram size 100: Timeout in seconds 2: Extended commands n: y Sweep range of sizes n:Tracke的使用:router# trace IP-Address Host-Name 为Cisco 4000路由器指定媒体类型:router(config-if)# media-type 10baset router(

22、config-if)# z更改路由器启动顺序:router(config)# boot system flash IOS-FileNamerouter(config)# boot system tftp IOS-FileName TFTP-IP-Addressrouter(config)# boot system romrouter(config)# z修改寄存器数值:router(config)# config-register value 在ROM监视器中更改寄存器数值:o/r value路由器密码的恢复:o/r 0 x2142 或 confreg 0 x2142 router Irout

23、er nrouter enablerouter# copy startup-config running-configrouter# configure terminalrouter(config)# enable secret New-Passwordrouter(config)# config-register 0 x2102router(config)# zrouter# copy running-config startup-configrouter# reload冷关机,然后再开机并在60秒内按 +进入ROM监视器模式配置名称一主机入口:router(config)# ip host

24、 Set-Name TCP-Port-Number IP-Address IP-Address2 .router(config)# z定义DNS主机:router(config)# ip name-server Server-Address Server-Address 2 .router(config)# z禁用DNS:router(config)# no ip domain-lookuprouter(config)# z配置水平分割:router(config-if)# ip split-horizonrouter(config-if)# no ip split-horizonrouter

25、(config-if)# z配置静态路由:router(config)# ip route IP-Address Subnet-Mask Next-Hop-Address Local-Out-Port Distace router(config)# z配置缺省路由:router(config)# ip defoult-network IP-Address router(config)# ip route Next-Hop-Address Local-Out-Port Distace router(config)# z其它命令:router# show versionrouter# show running-configrouter# show startup-configrouter# show flashrouter# show interface Type Port router# show buffersrouter# show protocolrouter# show memrouter# show stacksrouter# show processesrouter# s

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论