! vpdn enable no vpdn logging ! vpdn-group pppoe request-dialin protocol pppoe ! interface FastEthernet0 ip address 192.168.0.1 255.255.255.0 ip nat inside ! interface ATM0 no ip address no atm ilmi-keepalive bundle-enable dsl operating-mo
!
vpdn enable
no vpdn logging <=由于ADSL的PPPoE应用是通过虚拟拨号来实现的所以在路由器中需要使用VPDN的功能
!
vpdn-group pppoe <=为PPPoE启动了VPDN的进程
request-dialin
protocol pppoe <=设置拨号协议为PPPoE
!
interface FastEthernet0 <=设置公司内部网络地址
ip address 192.168.0.1 255.255.255.0
ip nat inside <=为启用NAT转换,设置Fast ethernet端口为内部网络,从内部网络收到的数据的原地址转换为公网地址
!
interface ATM0 <=设置ADSL端口
no ip address <=请不要设置地址
no atm ilmi-keepalive
bundle-enable
dsl operating-mode auto
hold-queue 224 in
interface ATM0.1 point-to-point <=ADSL的通讯 依靠VC,所以必须设定点到点VC
pvc 8/35 <=设置PVC的相关参数, 即VCI和VPI的值,如果不清楚请向局端查询
pppoe-client dial-pool-number 1 <=PPPoE拨号进程使用了常规的拨号进程,这里引用了dialer-pool 1
!
interface Dialer1 <=建立一个虚拟拨号端口 ip address negotiated <=由于局端提供动态地址,所以必须设定地址为协商获得
ip mtu 1492 <=修改mtu值以适用于ADSL网络
ip nat outside <=为启用NAT转换,设置该端口为外部网络
encapsulation ppp <=使用PPP的帧格式
dialer pool 1
ppp authentication pap callin <=设置拨号的验证方式为pap
ppp pap sent vip pass vip <=发送用户名和密码
ip nat inside source list 1 interface Dialer1 overload
<=设置了NAT的转换方式,使用了dialer 1端口的动态地址
ip classless
ip route 0.0.0.0 0.0.0.0 dialer1
<=将所有不可路由的数据报转发给ADSL线路,设定缺省路由
no ip http server
!
access-list 1 permit 10.92.1.0 0.0.0.255