环境

R1-client-pppoe(f0/0)------(f0/1)r2-server-pppoe

Server side:

r2-server-pppoe(config)#username fuyi password fuyi

r2-server-pppoe(config)#ip local pool PPPOEPOOL 12.1.1.10012.1.1.150

 

 

r2-server-pppoe(config)#interface virtual-template 1

r2-server-pppoe(config-if)#encapsulation ppp

r2-server-pppoe(config-if)#ip add 12.1.1.254 255.255.255.0

r2-server-pppoe(config-if)#ppp authentication chap

r2-server-pppoe(config-if)#peer default ip address poolPPPOEPOOL

r2-server-pppoe(config-if)#ppp ipcp dns 8.8.8.8

 

 

r2-server-pppoe(config)#bba-group pppoe fuyi

r2-server-pppoe(config-bba-group)#virtual-template 1

 

r2-server-pppoe(config)#int f0/1

r2-server-pppoe(config-if)#pppoe enable group fuyi

 

 

 

 

R1-client-pppoe(config)#interface dialer 1

R1-client-pppoe(config-if)#ip mtu 1492

R1-client-pppoe(config-if)#ip tcp adjust-mss 1452

R1-client-pppoe(config-if)#ip address negotiated

R1-client-pppoe(config-if)#encapsulation ppp

R1-client-pppoe(config-if)#dialer pool 100

R1-client-pppoe(config-if)#ppp authentication chap callin

R1-client-pppoe(config-if)#ppp chap hostname fuyi

R1-client-pppoe(config-if)#ppp chap password fuyi

R1-client-pppoe(config-if)#ppp ipcp dns request

R1-client-pppoe(config-if)#int f0/0

R1-client-pppoe(config-if)#no ip add

R1-client-pppoe(config-if)#pppoe enable group global

R1-client-pppoe(config-if)#no cdp enable

R1-client-pppoe(config-if)#no shut

 

Show pppoe session

 PPPOE on cisco router_pppoe cisco

 

 

 

1Server(config)#vpdnenable-----------------------------启用vpdn功能

2Server(config)#servicedhcp----------------------------启用DHCP功能

3Server(config)#ipdhcp excluded-address 192.168.1.254--------移除DHCPtest里的一

个地址

4Server(config)#ipdhcp pool test---------------开启名为testDHCP地址池,改地址池

是为PPPOE客户端分配地址的地址池

5Server(dhcp-config)#network192.168.1.0 255.255.255.0-----客户端地址池范围 6Server(config)#interfacevirtual-Template 1------------------定义虚模板

7Server(config-if)#ipaddress 192.168.1.254 255.255.255.0---给虚模板配置地址 8R1(config-if)#peer default ip addressdhcp-pool test----------让客户端从DHCP地址池

test请求地址

9R1(config-if)#pppipcp dns 201.201.201.222 201.201.201.221----给客户端分配DNS

10R1(config-if)#pppauthentication chap--------------------在接口接口上开启PPPchap

的认证

12Server(config)#bba-grouppppoe global

13Server(config-bba-group)#virtual-template1----------------套用虚拟模板1

14R1(config)#interfacefastEthernet 0/0

15Server(config-if)#pppoeenable group global-------------将和客户端连接的接口调用在

上述配置的PPPOE gloabl组内并激活

 

1Client(config)#vpdnenable----------------------------启用vpdn功能   

 2Client(config)#interface dialer0---------------------创建PPPOE拨号器

3Client(config-if)#ipadd negotiated --------------让拨号器和PPPOE-Server自动协商地

址(可以自动协商,也可手动配置,在自动协商的情况下两端不能传输路由协议)

4Client(config-if)#ipmtu 1492--------------------修改数据的MTU值,因为PPPOE数据在封装时,在二层帧和三层数据报头之间插入了pppoe8个相关字节

5Client(config-if)#encapsulationppp-------------封装成PPP

 6Client(config-if)#dialer pool 100

7Client(config-if)#pppauthentication chap callin

8Client(config-if)#pppchap hostname admin1       

   9Client(config-if)#ppp chap passwordcisco

10Client(config-if)#pppipcp dns request

11Client(config)#interfaceFastEthernet0/0

 12Client(config-if)# no ip address

13Client(config-if)#pppoe enable group global

 14Client(config-if)# pppoe-clientdial-pool-number 100

15Client(config-if)#no cdp enable

 16Client(config-if)#no shutdown