要实现远程路由器管理:
(config)# int asy 5
(config-if)# en ppp
(config-if)# asyn mode dedicated
对远程用户分配IP地址:
(config)# int asy 5
(config-if)# peer default ip address 192.168.10.2
需要对拨号用户使用地址池,可以这样:
(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
不过好象要重启路由器才有效!
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 这个一定要!不然看到的是乱码!
async mode dedicated 一定要!若改成async mode inter,对方拨号时总是停在检验用户名和密码那里!若两个都不设,拨号不上!
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
以上配置的效果就是:对方拨号,不需要用户名和密码,连结成功,就和拨96169一样!
要让拨号用户加上认证可以这样做:
(config)# username wolf password igpwwk
(config)# int asy 5
(config-if)# ppp au pap
也可以使用chap认证:
(config-if)# ppp au chap
或者同时使用:
(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