Routing

Expand all | Collapse all

DHCP Deployment on the MX

Jump to Best Answer
  • 1.  DHCP Deployment on the MX

    Posted 04-10-2018 21:53

    Hi All,

     

    for easier IP alocation we want to change our adress assigment which is currently static to either DHCP (dhcp-local server on the MX itself or external server having MX as relay) or PPPoE style with radius server.

     

    1. between PPPoE and DHCP any considerations on choosing one over the other? we have 2 MX 480s and one MX 960 as PEs.
    2. almost every client is assigned unique vlan at the moment and no SVLAN deployment, new client comes, we creat new logical interface and assign IP/vlan/bandwidth filter under that unit.
    3. if i were to go with DHCP, having MX as local-server, will i still need to create the logical interface with vlan-ID and bandwidth filter and let the MX handle the IP allocation? example: current typical setup looks like this : 
       unit 117 {
          vlan-id 117;
          family inet {
              filter {
                  input 50MB-POLICER-FILTER;
                  output 50MB-POLICER-FILTER;
              }
              address 1.2.3.4/30;
          }
      }
      DHCP-LOCAL-SERVER sectio: do i need to have every logical interface defined here or i can i just add ge physical interface? 
      -re0# show system services dhcp-local-server
      group test {
          interface ge-1/0/1.0;
          interface ge-1/0/1.117;
      }
      

    Thank you All.



  • 2.  RE: DHCP Deployment on the MX

    Posted 04-10-2018 21:56

    Appreciate beter opinios!



  • 3.  RE: DHCP Deployment on the MX

    Posted 04-12-2018 05:18

    Replying to myself so that it comes to the surface and attention of the forum.

     

    I appreciate your time and siggestions.



  • 4.  RE: DHCP Deployment on the MX

     
    Posted 04-12-2018 07:30

    Hi 

     

    Can you use either PPPoE or DHCP,  i'd perfer PPPoE over DHCP but that depends on setup to setup.

    In your case, you require a Dynamic-profile in which the logical interface creation would automated using demux0 or can also use IFD and configure predefined-variable-defaults within the dynamic-profile that pull policer-filter to be applied on the client (or just call policer/filter with dynamic profile if same filter is to be used). Call the dynamic-profile under interface with auto-configure. This way, you dont require configuring static units/vlan.

     

    Do you want to deploy DHCP-LS or PPPoE? Choose one and i'll build you a sample config!

     

     

     



  • 5.  RE: DHCP Deployment on the MX

    Posted 04-12-2018 21:43

    Hi!

     

    It mostly depends on the clients you have in your network and if they support pppoe or dhcp address assignment. 

    You can define static logical units for vlan and call them under dhcp or pppoe stanza.

    You may also choose to have dynamic vlan interface (demux) created for the vlan automatically. That will largely depend on your requirements based on the scale of logical interfaces.

     

    The guide below you may find useful as it covers most of the scenario and configuration details.

     

    https://www.juniper.net/documentation/en_US/junos/information-products/pathway-pages/subscriber-access/subscriber-mgmt-getting-started.pdf

     

     



  • 6.  RE: DHCP Deployment on the MX

    Posted 04-13-2018 00:10

    Hi Karand,

     

    Thanks for the detailed options!

    i have a PPPoE setup on one of the MXs serving small section of clients within our network, my only challenge with it is that my radius server (Freeradius) isnt returning bandwidth filters properly to the MX hence i dont have bandwidth applied to the dynamicaly ceated pp0 interface.

     

    will be happy if you could build up something on DHCP.



  • 7.  RE: DHCP Deployment on the MX

     
    Posted 04-13-2018 04:44

    Hi Lish,

     

    In case if your free radius isn't returning the VSA (vendor specfic attributes) such in Unisphere-Ingress-Policy-Name & Unisphere-Egress-Policy-Name for bandwithd policer, you should check the radius dictionary file on FreeRadius.

     

    http://www.juniper.net/documentation/software/junos/junos161/radius-dictionary/unisphereDictionary_for_JUNOS_v16-1.dct

    http://www.juniper.net/documentation/software/junos/junos151/radius-dictionary/unisphereDictionary_for_JUNOS_v15-1.dct

     

    And say in case if your radius is not returning the VSA, you config "predefined-variable-defaults" within the dynamic-profile.
    So when if attributes are pushed from radius, subscriber/cpe will get input/out filter using predefined-variable-defaults.

     

    lab@re0# show dynamic-profiles test predefined-variable-defaults | display set
    set dynamic-profiles test predefined-variable-defaults input-filter Infilter
    set dynamic-profiles test predefined-variable-defaults output-filter Outfilter

     

    For DHCP;  I'll build a sample DHCP and will share in sometime.

     



  • 8.  RE: DHCP Deployment on the MX
    Best Answer

     
    Posted 04-14-2018 23:32

    Here is Sample Conf:

     

    lab@re0# show system services dhcp-local-server | display set
    set system services dhcp-local-server group test authentication password test123
    set system services dhcp-local-server group test authentication username-include user-prefix "karand@dhcp-ls"
    set system services dhcp-local-server group test interface xe-2/0/1.0
    set system services dhcp-local-server group test interface demux0.0

    lab@re0# show interfaces xe-2/0/1 | display set
    set interfaces xe-2/0/1 flexible-vlan-tagging
    set interfaces xe-2/0/1 auto-configure vlan-ranges dynamic-profile DHCP-LS accept dhcp-v4
    set interfaces xe-2/0/1 auto-configure vlan-ranges dynamic-profile DHCP-LS ranges any
    set interfaces xe-2/0/1 auto-configure remove-when-no-subscribers

    lab@re0# show dynamic-profiles DHCP-LS | display set
    set dynamic-profiles DHCP-LS predefined-variable-defaults output-filter default-output
    set dynamic-profiles DHCP-LS predefined-variable-defaults input-filter default-input
    set dynamic-profiles DHCP-LS routing-instances "$junos-routing-instance" interface "$junos-interface-name"
    set dynamic-profiles DHCP-LS interfaces demux0 unit "$junos-interface-unit" proxy-arp restricted
    set dynamic-profiles DHCP-LS interfaces demux0 unit "$junos-interface-unit" vlan-id "$junos-vlan-id"
    set dynamic-profiles DHCP-LS interfaces demux0 unit "$junos-interface-unit" demux-options underlying-interface "$junos-interface-ifd-name"
    set dynamic-profiles DHCP-LS interfaces demux0 unit "$junos-interface-unit" family inet filter input "$junos-input-filter"
    set dynamic-profiles DHCP-LS interfaces demux0 unit "$junos-interface-unit" family inet filter output "$junos-output-filter"
    set dynamic-profiles DHCP-LS interfaces demux0 unit "$junos-interface-unit" family inet unnumbered-address "$junos-loopback-interface"


    lab@re0# run show subscribers
    Interface           IP Address/VLAN ID                      User Name                      LS:RI
    demux0.3221225606    100                                                              default:default
    demux0.3221225607   192.168.1.2                             karand@dhcp-ls            default:default

    lab@re0# run show subscribers address 192.168.1.2 extensive
    Type: DHCP
    User Name: karand@dhcp-ls
    IP Address: 192.168.1.2
    IP Netmask: 255.255.255.255
    Domain name server inet: 10.1.2.3 10.1.2.3
    Logical System: default
    Routing Instance: default
    Interface: demux0.3221225607
    Interface type: Dynamic
    Underlying Interface: demux0.3221225606
    Dynamic Profile Name: DHCP-LS
    Dynamic Profile Version: 2
    MAC Address: 28:09:1b:21:00:00
    State: Active
    Radius Accounting ID: 199
    Session ID: 199
    PFE Flow ID: 195
    VLAN Id: 100
    Login Time: 2018-04-15 11:21:32 IST
    DHCP Options: len 28
    35 01 01 3d 07 01 28 09 1b 21 00 00 33 04 00 01 51 80 39 02
    02 40 37 04 01 03 3a 3b
    DHCP Header: len 44
    01 01 06 00 7e 6d de 2a 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 28 09 1b 21 00 00 00 00 00 00 00 00
    00 00 00 00
    IPv4 Input Filter Name: default-input-demux0.3221225607-in
    IPv4 Output Filter Name: default-output-demux0.3221225607-out
    Accounting interval: 600