PPPoE with static ip

Has anyone used a dhcp pool to assign a client a static ip address using the client-id option? If so, can you post a working config?  The only configuration examples I've found on using DHCP pools and PPPoE uses the ip dhcp excluded settings to limit the pool to one ip address. I've tried to get this to work but I cannot get the correct client id.

Comments

  • i am not sure what do you mean exactly

    do you mean this ?

    ip dhcp pool DHCP_POOL
       host 1.1.1.1 255.255.255.248

    host address and mask can be anything (0-255) ...

    Shai

    Has anyone used a dhcp pool to assign a client a static ip address using the client-id option? If so, can you post a working config?  The only configuration examples I've found on using DHCP pools and PPPoE uses the ip dhcp excluded settings to limit the pool to one ip address. I've tried to get this to work but I cannot get the correct client id.


  • Hi farisb,

    I used only dynmaic allocaion for the IP-Adress.  I've setup a PPPoE cliet and - server as follow:

    PPPoE Client: C2621, IOS 12.3.

    interface FastEthernet0/1
     no ip address
     pppoe enable
     pppoe-client dial-pool-number 1
    !
    interface Dialer1
     mtu 1492
     ip address dhcp
     encapsulation ppp
     dialer pool 1
     dialer idle-timeout 0
     dialer persistent
     ppp chap hostname ROUTER0
     ppp chap password 0 CISCO
    !

     

     

    PPPoe-Server, 3640, IOS 12.4.23

    !
    ip dhcp excluded-address 10.1.15.0
    ip dhcp excluded-address 10.1.15.2 10.1.15.255
    !        
    ip dhcp pool PPPoE
       network 10.1.15.0 255.255.255.0
    !
    !
    bba-group pppoe global
     virtual-template 1
    !
    interface Virtual-Template1
     ip address 10.1.15.5 255.255.255.0
     ppp authentication chap callin
    !

    Note: depending of the used IOS-Version tyou may use vpdn dial-out method to configure PPPoE

    After the Client has established the connection you'll see the dialer get the address from the dhcp-server

    Rack1R1#sh int di1
    Dialer1 is up, line protocol is up (spoofing)
      Hardware is Unknown
      Internet address is 10.1.15.1/24
      MTU 1492 bytes, BW 56 Kbit, DLY 20000 usec,
    ...

     

    Rack1R5#sh ip dhcp binding
    Bindings from all pools not associated with VRF:
    IP address          Client-ID/             Lease expiration        Type
                             Hardware address/
                             User name
    10.1.15.1           0063.6973.636f.2d63.    Mar 02 2002 04:21 AM    Automatic
                            3830.302e.3238.3635.
                            2e30.3030.302d.4469.
                            31

    Here you can read the Client-ID as cisco-c800.2865.0000-Di1 (with an leading zero)
    cisco is obviouly the vender of the 'hardtware' running in my dynamips setup
    c800.2865.0000 is the mac-address from the client
    Di1 is the PPP-Interface

    If i change the dialer config on the Client to:
    interface Dialer1
     mtu 1492
     ip address dhcp client-id FastEthernet0/1
     encapsulation ppp
     dialer pool 1
     dialer idle-timeout 0
     dialer persistent
     ppp chap hostname ROUTER0
     ppp chap password 0 CISCO
    !

    The binding on the DHCP Servers changes to the MAC_Adress of the PPPoE Iterface from the Client:

    Rack1R5#sh ip dhcp binding
    Bindings from all pools not associated with VRF:
    IP address          Client-ID/             Lease expiration        Type
                             Hardware address/
                             User name
    10.1.15.1           01c8.0028.6500.01       Mar 02 2002 05:28 AM    Automatic

    Maybe the strings 0063.6973.636f.2d63... is what you are looking for.

    Ueli

  • Thanks Guys, that worked....I was able to set and get the client ID that way. Here is what i wa trying to do.

    ##DHCP CLIENT##

    interface Ethernet0/1
     no ip address
     half-duplex
     pppoe enable group global
     pppoe-client dial-pool-number 1

    interface Dialer1
     ip address dhcp client-id Ethernet0/1
     encapsulation ppp
     dialer pool 1
     dialer idle-timeout 0
     dialer persistent

     

    ###DHCP SERVER####

    ip dhcp pool PPPOE
       host 20.3.35.3 255.255.255.0
       client-identifier 0100.b064.d833.82

    bba-group pppoe global
     virtual-template 1

    interface Ethernet0/0
     no ip address
     half-duplex
     pppoe enable group global

    interface Virtual-Template1
     ip address 20.3.35.5 255.255.255.0
     peer default ip address dhcp-pool PPPOE

    Rack3R5#sh ip dhcp binding
    Bindings from all pools not associated with VRF:
    IP address          Client-ID/              Lease expiration        Type
                        Hardware address/
                        User name
    20.3.35.3           0100.b064.d833.82       Infinite                Manual
    Rack3R5#

     

    Thanks for your help!

     

     

     

     

     

     

     

     

     

     

     

  • IMHO, solution with client-id seems to be more accurate... Why?

    Assuming solution with address exclusions, we can imagine that on multiaccess media someone else will connect a client unit and receive IP address from DHCP server. So there will be no address for your client router.

    Client-Id creates reservation for your client and, excluding MAC address spoofing, no one else will receive desired IP address.

    Obviously, if you get task like this on lab, clarification with Mr. Proctor is highly recommended.

    Cheers,

    Seba

  • Unfortunately, in case of PPPoE the client-id changes slightly after each reboot.

  • Only changes on the "dynamips" and not the real router. I added a mac-address to fix on GNS3 

    Thanks

    James

    Sent from my iPhone 3G

    On 09 Jun 2009, at 4:37, smajewski <[email protected]> wrote:

    Unfortunately, in case of PPPoE the client-id changes slightly after each reboot.




    Internetwork Expert - The Industry Leader in CCIE Preparation

    http://www.internetworkexpert.com



    Subscription information may be found at:

    http://www.ieoc.com/forums/ForumSubscriptions.aspx
  • Hello guys,

    let me share my thoughts to this topic.Even though I've never been there (I mean CCIE LAB exam) In my opinion the solution with the client-identifier is really good choice (and it's definitely clear/better one) but keep in mind that when you finish your LAB, the configurations (probably) will be exported and sent to somewhere far away (let's say San Jose for example). What happens there? The client-identifier (pppoe client mac address for instance) WON'T be the one provided in YOUR configuration! Keep in mind such things every time you make your config! So if you have an option to do it with `ip dhcp exclude-address` just do it in that way, it's really the universal one. It will work even if the PPPoE client router get changed!

    Hope it helps!

    Kind regards,
    Dani

  • Guys, I am going crazy with this DHCP over PPPOE config here. Because this has worked for me before, but not now. The config is ditto:

    Objective is to assign 192.56.2.6 as the IP to the client via DHCP

    Server side

    ip dhcp excluded-address 192.56.2.1 192.56.2.5
    ip dhcp excluded-address 192.56.2.7 192.56.2.255
    !
    ip dhcp pool R6
       network 192.56.2.0 255.255.255.0
    !
    !
    !

    !
    !
    username CISCO password 0 CISCO
    !
    !
    !
    !
    !
    bba-group pppoe global
     virtual-template 1
    !
    !

    interface Ethernet0/0.56
     encapsulation dot1Q 56
     pppoe enable group global
    !!
    interface Virtual-Template1
     ip address 192.56.2.5 255.255.255.0
     peer default ip address dhcp-pool R6
     ppp authentication chap
    !

     

    Client side:

    interface FastEthernet0/0
     no ip address
     duplex auto
     speed auto
     pppoe enable group global
     pppoe-client dial-pool-number 1
    !

    interface Dialer1
     mtu 1492
     ip address dhcp
     encapsulation ppp
     dialer pool 1
     dialer idle-timeout 0
     dialer persistent
     ppp chap hostname CISCO
     ppp chap password 0 CISCO
    !

    However the server complains there is no more IPs to assign since .6 has already been assigned to this on-demand type request.  (which I cannot figure how the heck it got there - is it via IPCP??)

    Rack2R5# sh ip dhcp binding
    Bindings from all pools not associated with VRF:
    IP address          Client-ID/              Lease expiration        Type
                        Hardware address/
                        User name
    192.56.2.6          4349.5343.4f            Infinite                On-demand
    Rack2R5#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    Rack2R5(config)#no ip dhcp excluded-address 192.56.2.7 192.56.2.255
    Rack2R5(config)#
    Rack2R5(config)#do sh ip dhcp binding                             
    Bindings from all pools not associated with VRF:
    IP address          Client-ID/              Lease expiration        Type
                        Hardware address/
                        User name
    192.56.2.6          4349.5343.4f            Infinite                On-demand
    192.56.2.7          0063.6973.636f.2d30.    Sep 18 2009 06:55 PM    Automatic 
                        3064.302e.3538.3336.
                        2e39.3461.312d.4469.
                        31

    How can I prevent .6 from being taken by this on-demand request?   The automatic request is the one I want to be processed and assigned the .6 address.

     

  • Guys, I am going crazy with this DHCP over PPPOE config here. Because this has worked for me before, but not now. The config is ditto:

    Objective is to assign 192.56.2.6 as the IP to the client via DHCP

    Server side

    ip dhcp excluded-address 192.56.2.1 192.56.2.5
    ip dhcp excluded-address 192.56.2.7 192.56.2.255
    !
    ip dhcp pool R6
       network 192.56.2.0 255.255.255.0
    !
    !
    !

    !
    !
    username CISCO password 0 CISCO
    !
    !
    !
    !
    !
    bba-group pppoe global
     virtual-template 1
    !
    !

    interface Ethernet0/0.56
     encapsulation dot1Q 56
     pppoe enable group global
    !!
    interface Virtual-Template1
     ip address 192.56.2.5 255.255.255.0
     peer default ip address dhcp-pool R6         just remove this it will work he he, i don't no reason
     ppp authentication chap
    !

     

    Client side:

    interface FastEthernet0/0
     no ip address
     duplex auto
     speed auto
     pppoe enable group global
     pppoe-client dial-pool-number 1
    !

    interface Dialer1
     mtu 1492
     ip address dhcp
     encapsulation ppp
     dialer pool 1
     dialer idle-timeout 0
     dialer persistent
     ppp chap hostname CISCO
     ppp chap password 0 CISCO
    !

    However the server complains there is no more IPs to assign since .6 has already been assigned to this on-demand type request.  (which I cannot figure how the heck it got there - is it via IPCP??)

    Rack2R5# sh ip dhcp binding
    Bindings from all pools not associated with VRF:
    IP address          Client-ID/              Lease expiration        Type
                        Hardware address/
                        User name
    192.56.2.6          4349.5343.4f            Infinite                On-demand
    Rack2R5#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    Rack2R5(config)#no ip dhcp excluded-address 192.56.2.7 192.56.2.255
    Rack2R5(config)#
    Rack2R5(config)#do sh ip dhcp binding                             
    Bindings from all pools not associated with VRF:
    IP address          Client-ID/              Lease expiration        Type
                        Hardware address/
                        User name
    192.56.2.6          4349.5343.4f            Infinite                On-demand
    192.56.2.7          0063.6973.636f.2d30.    Sep 18 2009 06:55 PM    Automatic 
                        3064.302e.3538.3336.
                        2e39.3461.312d.4469.
                        31

    How can I prevent .6 from being taken by this on-demand request?   The automatic request is the one I want to be processed and assigned the .6 address.

     


    interface Virtual-Template1
     ip address 192.56.2.5 255.255.255.0
     peer default ip address dhcp-pool R6         just remove this it will work he he, i don't no reason

    thank you



  • Re: [CCIE SP] PPPoE with static ip


    Use the client identifier option









    On 9/18/09 4:18 AM, "prasanna26" <[email protected]> wrote:



    Guys, I am going crazy with this DHCP over PPPOE config here. Because this has worked for me before, but not now. The config is ditto:



    Objective is to assign 192.56.2.6 as the IP to the client via DHCP



    Server side



    ip dhcp excluded-address 192.56.2.1 192.56.2.5

    ip dhcp excluded-address 192.56.2.7 192.56.2.255

    !

    ip dhcp pool R6

       network 192.56.2.0 255.255.255.0

    !

    !

    !



    !

    !

    username CISCO password 0 CISCO

    !

    !

    !

    !

    !

    bba-group pppoe global

     virtual-template 1

    !

    !



    interface Ethernet0/0.56

     encapsulation dot1Q 56

     pppoe enable group global

    !!

    interface Virtual-Template1

     ip address 192.56.2.5 255.255.255.0

     peer default ip address dhcp-pool R6

     ppp authentication chap

    !



     



    Client side:



    interface FastEthernet0/0

     no ip address

     duplex auto

     speed auto

     pppoe enable group global

     pppoe-client dial-pool-number 1

    !



    interface Dialer1

     mtu 1492

     ip address dhcp

     encapsulation ppp

     dialer pool 1

     dialer idle-timeout 0

     dialer persistent

     ppp chap hostname CISCO

     ppp chap password 0 CISCO

    !



    However the server complains there is no more IPs to assign since .6 has already been assigned to this on-demand type request.  (which I cannot figure how the heck it got there - is it via IPCP??)



    Rack2R5# sh ip dhcp binding

    Bindings from all pools not associated with VRF:

    IP address          Client-ID/              Lease expiration        Type

                        Hardware address/

                        User name

    192.56.2.6          4349.5343.4f            Infinite                On-demand

    Rack2R5#conf t

    Enter configuration commands, one per line.  End with CNTL/Z.

    Rack2R5(config)#no ip dhcp excluded-address 192.56.2.7 192.56.2.255

    Rack2R5(config)#

    Rack2R5(config)#do sh ip dhcp binding                              

    Bindings from all pools not associated with VRF:

    IP address          Client-ID/              Lease expiration        Type

                        Hardware address/

                        User name

    192.56.2.6          4349.5343.4f            Infinite                On-demand

    192.56.2.7          0063.6973.636f.2d30.    Sep 18 2009 06:55 PM    Automatic

                        3064.302e.3538.3336.

                        2e39.3461.312d.4469.

                        31



    How can I prevent .6 from being taken by this on-demand request?   The automatic request is the one I want to be processed and assigned the .6 address.



     









    Internetwork Expert - The Industry Leader in CCIE Preparation

    http://www.internetworkexpert.com



    Subscription information may be found at:

    http://www.ieoc.com/forums/ForumSubscriptions.aspx





  • Re: [CCIE SP] PPPoE with static ip


    You need the peer default command. So use the client identifier on the client side. On the server side run “debug ip dhcp server packets” to see the client mac-address  to place in the dhcp pool under the network statement which you need to change to host instead of network”









    On 9/18/09 6:32 AM, "Avinashrai" <[email protected]> wrote:



    prasanna26:

    Guys, I am going crazy with this DHCP over PPPOE config here. Because this has worked for me before, but not now. The config is ditto:



    Objective is to assign 192.56.2.6 as the IP to the client via DHCP



    Server side



    ip dhcp excluded-address 192.56.2.1 192.56.2.5

    ip dhcp excluded-address 192.56.2.7 192.56.2.255

    !

    ip dhcp pool R6

       network 192.56.2.0 255.255.255.0

    !

    !

    !



    !

    !

    username CISCO password 0 CISCO

    !

    !

    !

    !

    !

    bba-group pppoe global

     virtual-template 1

    !

    !



    interface Ethernet0/0.56

     encapsulation dot1Q 56

     pppoe enable group global

    !!

    interface Virtual-Template1

     ip address 192.56.2.5 255.255.255.0

    peer default ip address dhcp-pool R6         just remove this it will work he he, i don't no reason

    ppp authentication chap

    !



     



    Client side:



    interface FastEthernet0/0

     no ip address

     duplex auto

     speed auto

     pppoe enable group global

     pppoe-client dial-pool-number 1

    !



    interface Dialer1

     mtu 1492

     ip address dhcp

     encapsulation ppp

     dialer pool 1

     dialer idle-timeout 0

     dialer persistent

     ppp chap hostname CISCO

     ppp chap password 0 CISCO

    !



    However the server complains there is no more IPs to assign since .6 has already been assigned to this on-demand type request.  (which I cannot figure how the heck it got there - is it via IPCP??)



    Rack2R5# sh ip dhcp binding

    Bindings from all pools not associated with VRF:

    IP address          Client-ID/              Lease expiration        Type

                        Hardware address/

                        User name

    192.56.2.6          4349.5343.4f            Infinite                On-demand

    Rack2R5#conf t

    Enter configuration commands, one per line.  End with CNTL/Z.

    Rack2R5(config)#no ip dhcp excluded-address 192.56.2.7 192.56.2.255

    Rack2R5(config)#

    Rack2R5(config)#do sh ip dhcp binding                              

    Bindings from all pools not associated with VRF:

    IP address          Client-ID/              Lease expiration        Type

                        Hardware address/

                        User name

    192.56.2.6          4349.5343.4f            Infinite                On-demand

    192.56.2.7          0063.6973.636f.2d30.    Sep 18 2009 06:55 PM    Automatic

                        3064.302e.3538.3336.

                        2e39.3461.312d.4469.

                        31



    How can I prevent .6 from being taken by this on-demand request?   The automatic request is the one I want to be processed and assigned the .6 address.



     



    interface Virtual-Template1

     ip address 192.56.2.5 255.255.255.0

    peer default ip address dhcp-pool R6         just remove this it will work he he, i don't no reason



    thank you









    Internetwork Expert - The Industry Leader in CCIE Preparation

    http://www.internetworkexpert.com



    Subscription information may be found at:

    http://www.ieoc.com/forums/ForumSubscriptions.aspx



  • Hi

    I noticed same behavior with "bba-group pppoe ...", but if you configure "vpdn-group ...." instead of "bba-group ..." then one address is enough. Give a try and let me know in case I am missing anything.

    thank you

Sign In or Register to comment.