您所在的位置: 首页>>组网建网>>路由技术>>路由器设置>>

用aux口背对背连接两台路由器

  • 摘要:一般做实验时,一般都用serial口来连接两台路由器,但要哪一天,你的serial口用完了怎么办呢?别着急,其实你还可以使用aux口,运用PPP来连接两台路由器。 下面将告诉你应该如何去做.
  • 标签:aux口  路由器

一般做实验时,一般都用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。

【相关文章】

责任编辑: 雪花(TEL:(010)68476636-8008)

路由器产品导购
中小企业安全路由器手册
华为路由器配置
无线路由器故障处理
路由器设置与口令恢复
 
 验证码: (点击刷新验证码)   匿名发表
  • Visual C++ 完全自学宝典

  • 作者:强锋科技,朱洪波
  • Visual C++ 6.0是微软公司为程序人员提供的Visual Studio 6.0工具套件中的重要组成部分。本书由浅入深地介绍使用Visual C++ 6.0..
Copyright©2005-2008 51CTO.COM 版权所有