Description

How do I obtain an Internet IP address via DHCP to load on the SRX device?

Symptoms

  • SRX firewall configured to obtain DHCP IP address from ISP
  • Configure DHCP client on the SRX firewall
  • show interface terse does not show an IP address

Solution

To obtain an IP address from your ISP via DHCP to load on an interface on the SRX firewall, you will need to enable DHCP client on the interface, and also as a host inbound service on the interface on the security zone.

For example, assume interface fe-0/0/2.0 is directly connected to a cable modem, which obtains an IP address from the ISP via DHCP.  Navigate to the interface level to specify DHCP:

interfaces {
    fe-0/0/2 {
        unit 0 {
            family inet {
                dhcp;
            }
        }
    }               
}

Then, navigate to the security zone that the interface is tied to, and specify dhcp as a host-inbound service:

security {
    zones {
        security-zone untrust {
            screen untrust-screen;
            interfaces {
                fe-0/0/2.0 {
                    host-inbound-traffic {
                        system-services {
                            dhcp;
                        }
                    }
                }
            }
        }
    }

}

To force a DHCP renewal, from operational mode, issue the following command:

root> request system services dhcp renew fe-0/0/2.0