########################################
PC:--->R1
hostname PC
no ip routing
int f0/0
ip add dhcp
########################################
CPE:--->R2
配置步骤:
1.启用VPDN:
vpdn enable
2.创建dialer0
hostname CPE
ip dhcp excluded-address 192.168.1.254
!
ip dhcp pool cisco
network 192.168.1.0 255.255.255.0
default-router 192.168.1.254
vpdn enable
!
interface FastEthernet0/0
ip address 192.168.1.254 255.255.255.0
ip nat inside
!
interface FastEthernet1/0
no ip address
pppoe enable group global
pppoe-client dial-pool-number 1
!
interface Dialer0
ip address negotiated
ip nat outside
encapsulation ppp
dialer pool 1 //指定此Dialer接口为特定的pool
dialer-group 2 //对特定的流量激活拨号
ppp authentication chap callin
ppp chap hostname cisco
ppp chap password 0 spoto
!
ip route 0.0.0.0 0.0.0.0 Dialer0
!
ip nat inside source list NAT interface Dialer0 overload
!
ip access-list standard NAT
permit 192.168.1.0 0.0.0.255
!
dialer-list 2 protocol ip permit
hostname ISP
vpdn enable
!
username cisco password 0 spoto //要创建本地数据库
!
bba-group pppoe global //Enters BBA group configuration mode and defines a global PPPoE profile.
virtual-template 1 //如果接口下pppoe enable默认是global,没有指定group后参数,那么要先配置PPPoE profile
!
interface Loopback0
ip address 202.1.1.1 255.255.255.0
!
interface FastEthernet1/0
no ip address
pppoe enable group global
!
interface Virtual-Template1
ip unnumbered Loopback0
peer default ip address pool cisco //分配IP
ppp authentication chap
!
ip local pool cisco 10.0.0.1 10.0.0.10