[Router]dialer-rule 1 ip permit //配置拨号列表,相当于cisco中的dialer-list 1
!
[Router]acl 1 match-order auto //配置acl 1
[Router-acl1]rule permit source 192.168.1.0
0.0.0
.255 //允许访问外网的内网IP网段
[Router-acl1]rule deny source any
!
[Router]interface Ethernet0
[Router-Ethernet0]tcp mss 1024
[Router-Ethernet0]ip address 192.168.1.1 255.255.255.0 //内网e0端口ip,即内网网关ip
!
[Router]interface Ethernet1 //接拨号modem的端口
[Router-Ethernet1]pppoe-client dial-bundle-number 1 //绑定该端口为拨号池1中端口 ,类似于cisco中的pppoe-client dial-poor-number 1
!
[Router] interface Dialer1 //配置虚拟拨号口 dialer 1
[Router-Dialer1] link-protocol ppp //PPP协议
[Router-Dialer1] tcp mss 1024
[Router-Dialer1] ppp pap local-user adsl password simple test //配置adsl拨号用户和密码
[Router-Dialer1] ip address ppp-negotiate //动态协商获取外网IP
[Router-Dialer1] dialer bundle 1 //应用拨号池1,类似于cisco中的dialer pool 1
[Router-Dialer1] nat outbound 1 interface //将acl 1中的地址nat
!
[Router] ip route-static
0.0.0
.0 0.0.0.0 Dialer 1 preference 60 //配置默认路由
!
命令注释:
1、tcp mss 1024: 详见[url]http://bbs.stcore.com/thread-680-1-26.html[/url]
本文转自 intelboy 51CTO博客,原文链接:http://blog.51cto.com/intelboy/13544,如需转载请自行联系原作者