Junos OS

last person joined: yesterday 

Ask questions and share experiences about Junos OS.
  • 1.  dhcp-local-server with advanced dhcp attributes

    Posted 01-10-2010 03:07

    Hello,

    I'm trying to send option 33 to my client.

    The RFC states that:

     

     

    5.8. Static Route Option
    
       This option specifies a list of static routes that the client should
       install in its routing cache.  If multiple routes to the same
       destination are specified, they are listed in descending order of
       priority.
    
       The routes consist of a list of IP address pairs.  The first address
       is the destination address, and the second address is the router for
       the destination.
    
       The default route (0.0.0.0) is an illegal destination for a static
       route.  See section 3.5 for information about the router option.
    
       The code for this option is 33.  The minimum length of this option is
       8, and the length MUST be a multiple of 8.
    
        Code   Len         Destination 1           Router 1
       +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
       |  33 |  n  |  d1 |  d2 |  d3 |  d4 |  r1 |  r2 |  r3 |  r4 |
       +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
               Destination 2           Router 2
       +-----+-----+-----+-----+-----+-----+-----+-----+---
       |  d1 |  d2 |  d3 |  d4 |  r1 |  r2 |  r3 |  r4 | ...
       +-----+-----+-----+-----+-----+-----+-----+-----+---

     

    The problem starts when I'm trying to send out two static routes to the same gateway.

     

    This is what I'm doing:

     

     

    [edit access address-assignment pool lan family inet dhcp-attributes]
    set option 33 array ip-address [ 40.40.1.2 40.40.2.254 40.40.1.3 40.40.2.254 ]

     

    which alters my configuration as follows:

     

     

    option 33 array ip-address [ 40.40.1.2 40.40.2.254 40.40.1.3 ];

     

    As you can see, the array can't have 40.40.2.254 twice.

     

    How can I work around this issue?

    Is it possible to represent a dhcp option with a raw binary-hexdecimal string?

     

    Thanks!



  • 2.  RE: dhcp-local-server with advanced dhcp attributes
    Best Answer

    Posted 01-11-2010 10:34

    Yes.  You need to use byte-stream attribute type, instead of array byte.  The value should be specified as a "Stream of unsigned 8-bit values within quotes." This is available in 9.4R4., 9.5R3, 9.6R3, 10.0R1, and later.

     

    Example:

     

    set option 33 byte-stream "40 40 1 2 40 40 2 254 40 40 1 3 40 40 2 254"

     

     

    Regards,

    Ben



  • 3.  RE: dhcp-local-server with advanced dhcp attributes

    Posted 01-12-2010 09:55

    Hi Ben, and thank you for your reply.

     

    I haven't found where this feature is documented.

     

    How do you know about it?

     

    Thanks!



  • 4.  RE: dhcp-local-server with advanced dhcp attributes

    Posted 01-12-2010 10:40

    The problem was discovered internally.  The documentation has not yet been updated to include the new type.

     

    Regards,

    Ben