用17500的aux口传异步拨号:
(config)# line aux 0
(config-line)# login
(config-line)# passWord cisco
(config-line)# speed 115200
(config-line)# flowcontrol hardware
(config-line)# stopbits 1
(config-line)# transport input all
(config-line)# modem inout
再配置反向telnet:
(config)# int lo0
(config-if)# ip address 1.1.1.1 255.255.255.0
(config)# ip host modem 2005 1.1.1.1
用show line看到aux口的线序号是5,那么反向telnet的端口就是2000+5=2005
可以用where命令查看打开的对话!
上面配置好以后,将接1750上Modem设为ats0=1(最开始没有将这个设为1,所以一直拨不通!),对方的Modem就可以拨号成功,但是按回车以后还是没有反应。不能进入路由器!因为没有对异步口进行配置!
要实现远程路由器治理:
(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
Router#sh line
Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns Int
* 0 CTY - - - - - 2 0 0/0 -
A 1 TTY 115200/115200- inout - - - 2 7 0/0 Se0
5 AUX 115200/115200- - - - - 1 0 0/0 -
6 VTY - - - - - 0 0 0/0 -
7 VTY - - - - - 0 0 0/0 -
8 VTY - - - - - 0 0 0/0 -
9 VTY - - - - - 0 0 0/0 -
10 VTY - - - - - 0 0 0/0 -
Line(s) not in async mode -or- with no hardware support: 2-4