Sunday, July 15, 2012

PPPoE (Point-to-Point Protocol over Ethernet)

What is the need of PPPoe? Why we use PPPoe? Suppose a DSL user want to communicate with the Service Provider (SP),  that user must be authenticated and we can do that by using PPPoe but we can do so by other ways also so what is the real need for PPPoe to be used ?  Many things we can do with PPPoe like to verify the user before it comes on a link. We can use OSPF or EIGRP for authentication but we need authentication before the routing process starts. So if you want to do the authentication on the link so PPPoe is the cool and right feature.
The DSL will dial ISP and will ask that I want to dial up.  The ISP will reply that let me check your credential like username and password. The DSL will say this is my username and password, the ISP will confirm through AAA or any other server and will allow DSL to communicate to the internet using the ISP backbone if request is successful.
In this lab to see the results we will be using two Cisco-7200 routers where one will act as ISP and other will act as DSL-Client.
First thing we need to do is the bba (Broadband Access group)
SP-SERVER SIDE CONFIGURATION
SP-Server (config)# bba-group pppoe TESTGROUP
SP-Server (config-bba-group)# do show ip int brief            =====> virtual group made
At this point we need to associate a virtual template to bba-group which we define (TESTGROUP). A Virtual Template is define so that any user who will come through the virtual interface (define later) so all parameters which are set in this Virtual Template will be apply on them. Blow is the definition of the virtual template which associate it to the bba-group.
SP-Server (config-bba-group)# virtual-template 1                =====> only this to associate with group
Now I will create the virtual interface and will associate to the virtual template that I define above.
SP-Server (config)# interface virtual-template 1                   ======> same no as defined above
SP-Server (config-if)#                                                               ========> now we are in template interface and what we define here will be for all those user who dial here in on this interface.
SP-Server (config-if)# do show ip int brief
Virtual-Access is the bba-group
Virtual-Template 1
SP-Server (config-if)# ip address 192.168.1.1 255.255.255.0
SP-Server (config)# default interface fast1/0
SP-Server (config)# int fas1/0
SP-Server (config-if)# pppoe enable group TESTGROUP
SP-Server#debug pppoe packet

CLIENT-SIDE CONFIGURATION
DSL-Client(config)# int fa0/0
DSL-Client (config-if)# pppoe-clinet dial-pool-number 10
DSL-Client (config-if)# do show ip int brief
Now we will create a Dialer Interface which is sued to dial virtually out to SP-Server.
DSL-Client (config)# interface dialer 1
NOTE: We can use DHCP or static ip here, i will show both methods here, first static IP
DSL-Client(config-if)# ip address 192.168.1.10 255.255.255.0
DSL-Client(config-if)# encapsulation ppp
Now we will associate this interface (Dialer) to the dial-pool (define above)
DSL-Client (config-if)# dialer pool 10
DSL-Client # debug ppoe packets
We have dialer interface here on DSL-Client and mean while see the debug on DSL-Client side which send the broadcast messages, mac-address, this is basically the DSL-Client is dialling the SP-Server.
DSL-Client#
*Jul 15 19:01:09.431: pppoe_send_padi:
         FF FF FF FF FF FF CA 01 01 FC 00 1C 88 63 11 09
         00 00 00 0C 01 01 00 00 01 03 00 04 64 56 34 5C ...
 
But when we enable the interface on SP-Server to allow the DSL request by unshut the interface so communication between SP and DSL stats as show in the below debug messages:


SP-Server(config-if)#
*Jul 15 19:01:57.927: PPPoE 0: I PADI  R:ca01.01fc.001c L:ffff.ffff
         FF FF FF FF FF FF CA 01 01 FC 00 1C 88 63 11 09
         00 00 00 0C 01 01 00 00 01 03 00 04 64 56 34 5C ...
*Jul 15 19:01:57.931: PPPoE 0: O PADO, R:ca00.01fc.001c L:ca01.01fc
*Jul 15 19:01:57.931:  Service tag: NULL Tag
         CA 01 01 FC 00 1C CA 00 01 FC 00 1C 88 63 11 07
         00 00 00 2D 01 01 00 00 01 03 00 04 64 56 34 5C ...
*Jul 15 19:01:58.435: %LINK-3-UPDOWN: Interface FastEthernet1/0, ch
o up
*Jul 15 19:01:58.435: %ENTITY_ALARM-6-INFO: CLEAR INFO Fa1/0 Physic
istrative State Down
*Jul 15 19:01:59.435: %LINEPROTO-5-UPDOWN: Line protocol on Interfa
et1/0, changed state to up
*Jul 15 19:02:00.015: PPPoE 0: I PADR  R:ca01.01fc.001c L:ca00.01fc
         CA 00 01 FC 00 1C CA 01 01 FC 00 1C 88 63 11 19
         00 00 00 2D 01 01 00 00 01 03 00 04 64 56 34 5C ...
*Jul 15 19:02:00.047: [1]PPPoE 1: O PADS  R:ca01.01fc.001c L:ca00.0
0
         CA 01 01 FC 00 1C CA 00 01 FC 00 1C 88 63 11 65
         00 01 00 2D 01 01 00 00 01 03 00 04 64 56 34 5C ...
*Jul 15 19:02:03.183: [1]PPPoE 1: Vi1.1 O FS

DSL-Client(config-if)#
*Jul 15 19:01:57.879: pppoe_send_padi:
         FF FF FF FF FF FF CA 01 01 FC 00 1C 88 63 11 09
         00 00 00 0C 01 01 00 00 01 03 00 04 64 56 34 5C ...
*Jul 15 19:01:57.979: PPPoE 0: I PADO  R:ca00.01fc.001c L:ca01.01fc.001c Fa1/0
         CA 01 01 FC 00 1C CA 00 01 FC 00 1C 88 63 11 07
         00 00 00 2D 01 01 00 00 01 03 00 04 64 56 34 5C ...
*Jul 15 19:01:59.943: OUT PADR from PPPoE Session
         CA 00 01 FC 00 1C CA 01 01 FC 00 1C 88 63 11 19
         00 00 00 2D 01 01 00 00 01 03 00 04 64 56 34 5C ...
*Jul 15 19:02:00.139: PPPoE 1: I PADS  R:ca00.01fc.001c L:ca01.01fc.001c Fa1/0
         CA 01 01 FC 00 1C CA 00 01 FC 00 1C 88 63 11 65
         00 01 00 2D 01 01 00 00 01 03 00 04 64 56 34 5C ...
*Jul 15 19:02:00.167: %DIALER-6-BIND: Interface Vi1 bound to profile Di1
*Jul 15 19:02:00.267: %LINK-3-UPDOWN: Interface Virtual-Access1, changed state t
o up
*Jul 15 19:02:03.151: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Ac
cess1, changed state to up
*Jul 15 19:02:03.307: [0]PPPoE 1: Vi1 O FS
*Jul 15 19:02:13.555: [0]PPPoE 1: Vi1 O FS
*Jul 15 19:02:23.827: [0]PPPoE 1: Vi1 O FS 

We can also see the PPPoe session made between SP-Server and DSL-Client.
SP-Server#show pppoe session
*Jul 15 19:08:52.779: [1]PPPoE 1: Vi1.1 O FS
     1 session  in LOCALLY_TERMINATED (PTA) State
     1 session  total
Uniq ID  PPPoE  RemMAC          Port                    VT  VA         State
           SID  LocMAC                                      VA-st
      1      1  ca01.01fc.001c  Fa1/0                    1  Vi1.1      PTA
                ca00.01fc.001c                              UP

Using DHCP
I hope you all know about how to configure DHCP on Routers, if not Please see Cisco Router as DHCP Server.
Please remove manual IP address from interface fas1/0 and dialer on DSL-Client and make the method as DHCP and configure DHCP on SP-Server. The configuration is given below:
SP-Server:
ip dhcp excluded-address 192.168.1.1 192.168.1.10
ip dhcp pool POOLFORPPPOE
   network 192.168.1.0 255.255.255.0
interface Virtual-Template1
 ip address 192.168.1.1 255.255.255.0
 peer default ip address dhcp-pool POOLFORPPPOE
DSL-Client
DSL-Client(config)#interface fa1/0
DSL-Client(config-if)#no ip address
DSL-Client(config-if)#ip address dhcp                                               =====> Add this command
DSL-Client(config)#interface dialer 1
DSL-Client(config-if)#no ip address
DSL-Client(config-if)#ip address dhcp
 Verification
DSL-Client#show ip interface brief

Interface                  IP-Address      OK? Method Status                Prot
ocol
FastEthernet0/0            unassigned      YES unset  administratively down down
FastEthernet1/0            unassigned      YES DHCP   up                    up
FastEthernet1/1            unassigned      YES unset  administratively down down
Virtual-Access1            unassigned      YES unset  up                    up
Dialer1                    192.168.1.13    YES DHCP   up                    up

DSL-Client#show pppoe session

     1 client session
Uniq ID  PPPoE  RemMAC          Port                    VT  VA         State
           SID  LocMAC                                      VA-st
    N/A      2  ca00.01fc.001c  Fa1/0                  Di1  Vi1        UP
                ca01.01fc.001c                              UP
 

I hope this will be informative for you !

Cheers :)