This article provides information about the default behavior of DHCP clients in custom routing instances on SRX devices.
When an interface is a member of a routing instance (type: virtual-router) and configured to obtain IP address via DHCP, the default route received is installed in the default routing instance (table 0.inet) instead of corresponding routing instance (table <instance-name> .0.inet). In the DHCP trace log error message is seen:
"DHCP RPD route add failed (error 4)"
interfaces { fe-0/0/1 { unit 0 { family inet { dhcp; } } } } security { zones { security-zone VR { interfaces { fe-0/0/1.0 { host-inbound-traffic { system-services { all; } protocols { all; } } } } } } } routing-instances { VR1 { instance-type virtual-router; interface fe-0/0/1.0; } }
root@SRX> show route inet.0: 9 destinations, 11 routes (9 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 0.0.0.0/0 *[Access-internal/12] 00:17:19 > to 192.168.1.1 via fe-0/0/1.0 . VR1.inet.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 192.168.1.0/24 *[Direct/0] 00:17:19 > via fe-0/0/1.0 192.168.1.50/32 *[Local/0] 00:17:19 Local via fe-0/0/1.0
This is per current design. DHCPv4 client is configured on the interface, but the default route which is learned from the DHCP server is only added to the default routing table, even though that interface belongs to some routing instance. For a workaround, please refer to KB21169 - How to setup DHCP server on SRX with DHCP clients in non-default routing-instance. [juniper.net]