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;但都不支持啊!看來這個功能還不是很強大?。?