This article provides information on how to send a classless static route ( option 121 ) to a DHCP client.
How to send a classless static route ( option 121 ) to a DHCP client.
For example, the static route is 2.2.2.0/24 with the next hop IP address as 8.8.8.8 , which is to be sent in the DHCP option 121 :
root@SRX210-5# show interfaces ge-0/0/0unit 0 { family inet { address 192.168.1.1/24; }}root@SRX210-5# show security zonessecurity-zone trust { host-inbound-traffic { system-services { all; }protocols { all;}}interfaces { ge-0/0/0.0;}}
set system services dhcp router 192.168.1.1set system services dhcp option 121 array ip-address 24.2.2.2set system services dhcp option 121 array ip-address 8.8.8.8set system services dhcp pool 192.168.1.0/24 address-range low 192.168.1.2set system services dhcp pool 192.168.1.0/24 address-range high 192.168.1.254set system services dhcp propagate-settings ge-0/0/0.0root@SRX210-5#show system services dhcprouter { 192.168.1.1;}option 121 array ip-address [ 24.2.2.2 8.8.8.8 ];pool 192.168.1.0/24 { address-range low 192.168.1.2 high 192.168.1.254;}propagate-settings ge-0/0/0.0;
root@SRX210-5# run show system services dhcp globalGlobal settings:BOOTP lease length infiniteDHCP lease times:Default lease time 1 dayMinimum lease time 1 minuteMaximum lease time infiniteDHCP options:Name: name-server, Value: [ 208.67.222.222, 208.67.220.220 ]Name: router, Value: [ 192.168.1.1 ]Code: 121, Type: ip-address, Value: [ 24.2.2.2, 8.8.8.8 ]
2024-09-02: minor non tech changes2020-07-14: Archived