(2012-09-05 06:51:26)
作者:李家红 |
建立UDP和TCP服务
在全局配置命令下键入:
# service udp-small-servers
# service tcp-small-servers
建立拨号用户及连接密码
# conf t
# username xxx privilege password xxxx
其中xxx为用户名,xxxx为连密码。
# ip address-pool local
配置以太网地址和出口路由限制
# conf t
# inter e0
# ip address x.x.x.x 255.255.255.0
# ip access-group 111 out
对从E0口出去的路由遵循111限制。
配置拨号端口
# conf t
# interface serial 2
指定串口2。
# physical-layer ansync
设定为异步方式。
# ip unnumbered Ethernet0
使IP无编号处理指向E0。
# ip tcp header-compression passive
配置TCP/IP报头压缩,可提高数据传输速度。
# encapsulation ppp
封装ppp协议。
# async mode interactive
设定串口的工作方式为人机交互式。
# peer default ip address pool default
# no cdp enable
# ppp authentication pap
配置ppp验证方式。在本地和远程路由器之间的ppp验证支持CHAP 和PAP两种验证方式,PAP为两次握手验证,口令为明文,CHAP为三次握手,口令为密文。
配置地址池
# conf t
# ip local pool default 192.102.1.100 192.102.1.168
# ip classless
# loging 192.102.1.99
# access-list 111 permit ip 192.102.1.0 0.0.0.255 host 192.102.1.99
允许192.102.1.0网段访问192.102.1.99主机。
# privilege exce level 1 ppp
配置Modem
根据线路质量和使用设备的不同,可分别设置Modem的通信速率,或单独设定接收、发送速率,也可一起通配设置。
# conf t
# line con 0
# line 2 9
指定串口2-9。
# autoselect ppp
选择ppp协议。
# login local
# modem dialin
允许Modem拨入。
# modem autoconfigure type default
Modem类型使用缺省值。
# transport input all
# speed 115200
接口速率为115200。
# flowcontral hardware
使用硬件流控。
# line aux 0
# transport input all
配置虚拟端口
# line vty 0 4
# password xxxx
# login
允许Telnet访问。
中华人民共和国备案号:浙ICP备10018243号