Chinaunix首页 | 论坛 | 博客
  • 博客访问: 646182
  • 博文数量: 751
  • 博客积分: 5000
  • 博客等级: 大校
  • 技术积分: 4990
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-28 09:48
文章分类

全部博文(751)

文章存档

2011年(1)

2008年(750)

我的朋友

分类:

2008-10-28 09:52:02


  一般做实验时,一般都用serial口来连接两台器,但要哪一天,你的serial口用完了怎么办呢?别着急,其实你还可以使用aux口,运用PPP来连接两台路由器。
  我们知道,一般路由器都会带个aux口,接口类型有两种,一种是RJ45(比如25系列,26系列等),还有一种就是DB25(比如45系列,7000系列等);aux属于DTE设备,所以两个DTE设备相连就需要用到反转线(rollover);如果两端都是RJ45的,那就直接用一根反转网线相连;如果两端是DB25,那就要用到RJ45-DB25的转换头中间连接一个反转线,或直接做一根两头都是DB25头的线,线的连接顺序如下:
  
  DB25 DB25
  RxD23TxD
  TxD32RxD
  CTS45RTS
  RTS54CTS
  DTR620CD
  DSR820CD
  CD206DTR
  CD208DSR
  GND77GND
  
  拓扑图见上。
  
  配置如下:
  
  Router 1
  version 11.1
  service udp-small-servers
  service tcp-small-servers
  !
  hostname Router1
  !
  interface Ethernet0
  no ip address
  shutdown
  !
  interface Serial0
  no ip address
  shutdown
  !
  interface Serial1
  no ip address
  shutdown
  !
  interface Async1
  !---将拨号端口分配给AUX口
  !---具体的拨号端口号码可以用#sh line 来查看AUX口的line号
  ip address 192.168.0.1 255.255.255.0
  !---两台路由器设的地址必须在一个子网里面
  encapsulation ppp
  !---用PPP来封装数据包
  async dynamic routing
  !---允许在此线路上运行路由
  async mode dedicated
  !
  no ip classless
  ip route 0.0.0.0 0.0.0.0 Async1
  !---将async1设置为默认路由端口
  logging buffered
  !
  line con 0
  exec-timeout 0 0
  line aux 0
  !---配置AUX的链路层属性
  modem InOut
  transport input all
  !---在此线路上允许跑所有--此点非常重要,切记!
  rxspeed 38400
  !---设置Rx速率 (这个设置两台路由器必须一致)
  txspeed 38400
  !---设置Tx速率 (这个设置两台路由器必须一致)
  flowcontrol hardware
  line vty 0 4
  login
  !
  end
  
  -------------------------------------------------
  
  Router 2
  version 11.1
  service udp-small-servers
  service tcp-small-servers
  !
  hostname Router1
  !
  interface Ethernet0
  no ip address
  shutdown
  !
  interface Serial0
  no ip address
  shutdown
  !
  interface Serial1
  no ip address
  shutdown
  !
  interface Async1
  !---将拨号端口分配给AUX口
  !---具体的拨号端口号码可以用#sh line 来查看AUX口的line号
  ip address 192.168.0.2 255.255.255.0
  !---两台路由器设的地址必须在一个子网里面
  encapsulation ppp
  !---用PPP来封装数据包
  async dynamic routing
  !---允许在此线路上运行路由
  async mode dedicated
  !
  no ip classless
  ip route 0.0.0.0 0.0.0.0 Async1
  !---将async1设置为默认路由端口
  logging buffered
  !
  line con 0
  exec-timeout 0 0
  line aux 0
  !---配置AUX的链路层属性
  modem InOut
  transport input all
  !---在此线路上允许跑所有协议--此点非常重要,切记!
  rxspeed 38400
  !---设置Rx速率 (这个设置两台路由器必须一致)
  txspeed 38400
  !---设置Tx速率 (这个设置两台路由器必须一致)
  flowcontrol hardware
  line vty 0 4
  login
  !
  end
  
  如果出现问题,如何调试呢?可以使用如下命令来查看:
  show line
  show line aux 0
  shutdown和no shutdown来开始和重制aux口的状态
  debug ppp negotiation 查看ppp的状态
  好了,就写这么多了,愿大家都能调试成功!
  遗憾:我试过用动态路由,比如rip,igrp,eigrp,ospf;但都不支持啊!看来这个功能还不是很强大啊!
  
  哈哈,在两边的端口上来一个async default routing 吧,否则跑不了动态路由协议的,async dyn routing可以不要,因为有async mode de。
  
【责编:admin】

--------------------next---------------------

阅读(360) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~