要實(shí)現(xiàn)遠(yuǎn)程路由器治理: (config)# int asy 5 (config-if)# en ppp (config-if)# asyn mode dedicated
對(duì)遠(yuǎn)程用戶(hù)分配IP地址: (config)# int asy 5 (config-if)# peer default ip address 192.168.10.2
需要對(duì)撥號(hào)用戶(hù)使用地址池,可以這樣: (config)# ip local pool wolf 192.168.0.50 192.168.0.254 (config)# int asy 5 (config-if)# peer default ip address pool wolf
不過(guò)好象要重啟路由器才有效!
Building configuration... version 12.1 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname Router ! enable password cisco ! memory-size iomem 25 ip subnet-zero ip host modem 2005 1.1.1.1 ! interface Loopback0 ip address 1.1.1.1 255.255.255.0 ! interface Serial0 no ip address shutdown ! interface FastEthernet0 no ip address shutdown speed auto ! interface Async5 ip address 192.168.0.1 255.255.255.0 encapsulation ppp 這個(gè)一定要!不然看到的是亂碼! async mode dedicated 一定要!若改成async mode inter,對(duì)方撥號(hào)時(shí)總是停在檢驗(yàn)用戶(hù)名和密碼那里!若兩個(gè)都不設(shè),撥號(hào)不上! peer default ip address 192.168.0.2 ! ip classless no ip http server ! line con 0 transport input none line aux 0 password cisco login modem InOut transport input all stopbits 1 speed 115200 flowcontrol hardware line vty 0 4 login ! no scheduler allocate end
要讓撥號(hào)用戶(hù)加上認(rèn)證可以這樣做: (config)# username wolf password igpwwk (config)# int asy 5 (config-if)# ppp au pap 也可以使用chap認(rèn)證: (config-if)# ppp au chap 或者同時(shí)使用: (config-if)# ppp au chap ppp (config-if)# ppp au ppp chap
以下是將串口模擬成異步口: Building configuration... version 12.1 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname Router ! enable password cisco ! username wolf password 0 igpwwk ! memory-size iomem 25 ip subnet-zero ip host modem 2001 1.1.1.1 ! interface Loopback0 ip address 1.1.1.1 255.255.255.0 ! interface Serial0 physical-layer async ip address 192.168.0.1 255.255.255.0 encapsulation ppp async mode dedicated peer default ip address 192.168.0.10 ppp authentication chap ! interface FastEthernet0 no ip address shutdown speed auto ! interface Async5 no ip address ! ip classless no ip http server ! line con 0 transport input none line 1 password cisco login modem InOut transport input all stopbits 1 speed 115200 flowcontrol hardware line aux 0 login transport input all speed 115200 line vty 0 4 login ! End