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

王朝other·作者佚名  2008-05-31
窄屏简体版  字體: |||超大  

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

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航