Junos Automation (Scripting)
Junos Automation (Scripting)

DHCP retransmission- attempt how to overcome using event-options

‎11-03-2015 04:07 AM



     As you all are aware that SRX makes only 6 retransmission-attempts for DHCP client association after which the process sleeps unless the interface is disabled/enabled or the dhcp is renewed for the interface. At best we can adjust the retransmission-interval to max 60 secs each. This will give around 6mins for the process to compelete.


In case the association is to be made after 6mins the client fails to negotiate as the process wont start again. To overcome this problem I am trying to use the following event-options but not having much luck. Please guide me how I can automate the DHCP renew for the interface. Issuing the "request system services dhcp renew fe-0/0/4.0" command starts the process again but I am having problems in selecting the right event (dhcpd_bind_failure). Please note the fe-0/0/4.0 interface state never goes down. It remains up without any IP. Please suggest any other way to capture the event maybe a null IP address. Configs are as follows:




root@srx1# show
host-inbound-traffic {
    system-services {
    protocols {
interfaces {

[edit security zones security-zone trust]

root@srx1# show interface fe-0/0/4
unit 0 {
    family inet {
        dhcp {
            retransmission-attempt 2;
            retransmission-interval 4;
            vendor-id ether;

root@srx1# show event-options
policy flapint {
    events dhcpd_bind_failure;
    then {
        execute-commands {
            commands {
                "request system services dhcp renew fe-0/0/4.0";
traceoptions {
    file eventoptions size 10k;
    flag all;









Junos Automation (Scripting)

Re: DHCP retransmission- attempt how to overcome using event-options

‎11-26-2015 04:25 AM



The "dhcpd_*" events are for DHCP server on SRX, not DHCP  client.

You can check details for any event with:


help syslog <event name>

i.e. for dhcpd_bind_failure it would be


help syslog dhcpd_bind_failure

I don't know of any event associated with DHCP client failing to receive IP.


What You could od is to write an SLAX event script, which:


1/ periodically checks the interface for IP address present

2/ if not then script does DHCP renew for that interface.






Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements


Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !