Will /16 imply a prefix of only 2 hex numbers? I guess the system should do so, otherwise the netmask wouldn't be asked of course. But it's still a guess.
Thanks in advance.
Original Message:
Sent: 12-22-2021 04:39
From: VASILE GORBATOVSCHI
Subject: DHCP Option 121, multiple destinations
Hi @smicker,
Thank you for the reply, I made it work! For everyone else who has this problem, the solution is here:
Then you get the entire hex string from the first prefix and next-hop and second and concatenate. Then adding them as option 121 hex-string and it works:
network 10.240.0.0/20;range range { low 10.240.0.2; high 10.240.0.254;}dhcp-attributes { option 121 hex-string 18C0A80A0AF0000118C0A80B0AF00001;}
Result from the router:
09:31:59.207556 In IP (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto: UDP (17), length: 384) 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:50:02:00:03:00, length 300, xid 0xdc8e9656, Flags [none] Client-Ethernet-Address 00:50:02:00:03:00 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Request Requested-IP Option 50, length 4: 10.240.0.2 Hostname Option 12, length 20: "user-virtual-machine" Parameter-Request Option 55, length 18: Subnet-Mask, BR, Time-Zone, Default-Gateway Domain-Name, Domain-Name-Server, Option 119, Hostname Netbios-Name-Server, Netbios-Scope, MTU, Classless-Static-Route NTP, Classless-Static-Route, Classless-Static-Route-Microsoft, Static-Route Option 252, NTP09:31:59.207922 Out IP (tos 0x0, ttl 64, id 20586, offset 0, flags [none], proto: UDP (17), length: 327) 10.240.0.1.67 > 10.240.0.2.68: BOOTP/DHCP, Reply, length 299, xid 0xdc8e9656, Flags [none] Your-IP 10.240.0.2 Client-Ethernet-Address 00:50:02:00:03:00 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: ACK Lease-Time Option 51, length 4: 86400 Subnet-Mask Option 1, length 4: 255.255.240.0 Server-ID Option 54, length 4: 10.240.0.1 Classless-Static-Route Option 121, length 16: (192.168.10.0/24:10.240.0.1),(192.168.11.0/24:10.240.0.1)
And the result from the host:
------------------------------
Kind regards,
VASILE GORBATOVSCHI
Original Message:
Sent: 12-21-2021 03:28
From: VASILE GORBATOVSCHI
Subject: DHCP Option 121, multiple destinations
Hi,
I'm trying to configure DHCP option 121 (Classless Staci Route Option) on MX platform that acts as DHCP Server. I'm able to push only one destination route using the next configuration:
dhcp-attributes {
option 121 array ip-address [ 24.192.168.10 10.240.0.1 ];
}
monitor traffic interface from the router:
Client-Ethernet-Address 00:50:02:00:03:00
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: ACK
Lease-Time Option 51, length 4: 86400
Subnet-Mask Option 1, length 4: 255.255.240.0
Server-ID Option 54, length 4: 10.240.0.1
Classless-Static-Route Option 121, length 8: (192.168.10.0/24:10.240.0.1)
I'm not able to add one more destination with the same next-hop, it's just not being added in the configuration itself and it's not being pushed to the DHCP Client as well:
set dhcp-attributes option 121 array ip-address 24.192.168.11
set dhcp-attributes option 121 array ip-address 10.240.0.1
router# show
network 10.240.0.0/20;
range range {
low 10.240.0.2;
high 10.240.0.254;
}
dhcp-attributes {
option 121 array ip-address [ 24.192.168.10 10.240.0.1 24.192.168.11 ];
}
It only works if I add a different next-hop for the second destination:
set dhcp-attributes option 121 array ip-address 24.192.168.11
set dhcp-attributes option 121 array ip-address 10.240.0.2
dhcp-attributes {
option 121 array ip-address [ 24.192.168.10 10.240.0.1 24.192.168.11 10.240.0.2 ];
}
Result:
Client-Ethernet-Address 00:50:02:00:03:00
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: ACK
Lease-Time Option 51, length 4: 86400
Subnet-Mask Option 1, length 4: 255.255.240.0
Server-ID Option 54, length 4: 10.240.0.1
Classless-Static-Route Option 121, length 16: (192.168.10.0/24:10.240.0.1),(192.168.11.0/24:10.240.0.2)
Does anyone have any ideas on how to configure multiple destinations with the same next-hop?
------------------------------
Kind regards,
VASILE GORBATOVSCHI
------------------------------