SRX Services Gateway
Reply
Contributor
WingDog
Posts: 40
Registered: ‎06-24-2011
0

dhcp static-binding fixed-address - how to set description?

Hello!

I've some SRX boxes working as DHCP server for branch sites, and I want to set descriptions to some static bingings

like

00:00:00:00:00:10 192.168.0.1 "HP LJ 4014n main room"

00:00:00:00:00:20 192.168.0.2 "HP LJ 4014n 12 room"  

 

is it possible?

 

Thanks! 

 

Distinguished Expert
dfex
Posts: 642
Registered: ‎04-17-2008
0

Re: dhcp static-binding fixed-address - how to set description?

Hi Wingdog,

 

There is no description field available, but you can make use of the annotate command:

 

[edit system services dhcp]
bdale@gw210# annotate static-binding b8:27:eb:cc:6d:5c "Raspberry Pi" 

[edit system services dhcp]
bdale@gw210# show 
...
/* Raspberry Pi */
static-binding b8:27:eb:cc:6d:5c {
    fixed-address {
        172.16.10.40;
    }
}

 you can use annotate on any Junos configuration element.  

 

The only downside is that the label will not show up when you do a "show configuration | display set".

 

Hope this helps,

 

Ben

 

Ben Dale
JNCIP-ENT, JNCIS-SP, JNCIE-SEC #63
Juniper Ambassador
Follow me @labelswitcher
Contributor
WingDog
Posts: 40
Registered: ‎06-24-2011
0

Re: dhcp static-binding fixed-address - how to set description?

If nothing esle available - that will be enought.

thanks a lot! 

Contributor
WingDog
Posts: 40
Registered: ‎06-24-2011
0

Re: dhcp static-binding fixed-address - how to set description?

unfortunally no, this isn't enought

>show system services dhcp binding 
IP address Hardware address Type Lease expires at
192.168.132.15 00:00:aa:c1:11:a9 dynamic 2012-07-10 12:23:18 MSK
192.168.132.14 00:15:f2:05:0a:f6 dynamic 2012-07-10 12:35:52 MSK
192.168.132.12 00:19:66:0d:cf:85 dynamic 2012-07-10 12:18:47 MSK
192.168.132.13 00:c0:ee:49:c5:32 static never
192.168.132.11 00:c0:ee:4a:1e:84 static never
192.168.132.10 d0:27:88:1b:eb:a1 dynamic 2012-07-10 12:44:33 MSK 

here is no annotations =(

so it's useless 

Contributor
gosi
Posts: 82
Registered: ‎12-11-2009
0

Re: dhcp static-binding fixed-address - how to set description?

Hi,

 

as there is no availible option for a description, what about using host-name as the "description" for your static-bindings as a workaround?

 

Kind regards,

Sebastian

Contributor
WingDog
Posts: 40
Registered: ‎06-24-2011
0

Re: dhcp static-binding fixed-address - how to set description?

Hi gosi.

 

root@j100-medved> show configuration system services dhcp static-binding 00:c0:ee:49:c5:32 | display set
set system services dhcp static-binding 00:c0:ee:49:c5:32 fixed-address 192.168.132.13
set system services dhcp static-binding 00:c0:ee:49:c5:32 host-name Kyocera-1 

 

root@j100-medved> show system services dhcp binding detail
IP address Hardware address Type Lease expires State
192.168.132.15 00:00:aa:c1:11:a9 dynamic 2012-07-10 14:53:25 MSK active
192.168.132.14 00:15:f2:05:0a:f6 dynamic 2012-07-10 15:05:56 MSK active
192.168.132.12 00:19:66:0d:cf:85 dynamic 2012-07-10 14:48:48 MSK active
192.168.132.13 00:c0:ee:49:c5:32 static never active
192.168.132.11 00:c0:ee:4a:1e:84 static never active
192.168.132.10 d0:27:88:1b:eb:a1 dynamic 2012-07-10 14:44:33 MSK active 

 

here is no hostname information, so each time I have to look to config to see annotate or hostname at config.

that isn't  comfortable and easy-to-use.

 

Contributor
bobjunga
Posts: 63
Registered: ‎02-29-2012
0

Re: dhcp static-binding fixed-address - how to set description?

[ Edited ]

I have recently run into this same issue also. I plan to write two op scripts when I get a chance -- one to set a static binding with discription an one to list the static bindings with description

 

op setDHCPStaticBinding  mac nn:nn:nn:nn:nn:nn ip xxx.xxx.xxx.xxx. description "description"

 

it would annotate the binding config with the description

 

op listDHCPStaticBindings

 

It would do the same as "show system services dhcp binding" but it would also lookup the description and add it to the output. I suspect this will be noticebly slower though.

 

The other thing thta bugs me is that the SRX won't accept a static binding outside the DHCP address pool. I think its common practice to reserver a portion of the subnet for statically reserved IPs that will not ever be used as DHCP addresses and manually allocate those for static bindings.

 

 

It would be nice if a future version of Junos added a decription field for static bindings and allowed static bindings with IPs outside the pool range.

 

--BobG

 

Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.