DHCP and Route Priority

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

DHCP and Route Priority

David G.
Hi,

How can I communicate the priority of routes and routers via DHCP? I'm
trying to get computers on my network to use another router for a
specific subnet but everything is just going to the default gateway. I'm
using DHCP option 121 to set the route.

Thanks!

--
http://www.fastmail.com - Same, same, but different...

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP and Route Priority

Pavel Zhukov
"David G." <[hidden email]> writes:

> Hi,
>
> How can I communicate the priority of routes and routers via DHCP? I'm
> trying to get computers on my network to use another router for a
> specific subnet but everything is just going to the default gateway. I'm
> using DHCP option 121 to set the route.
Hi,
Which OS are you using? Classless routes should be set by dhclient script which is
vendor specific.
>
> Thanks!

--
Pavel
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP and Route Priority

Bill Shirley-2
Classless static routes are used by an OS because they're more specific:
# ------------------------------------------------------------------------------
option classless-static-routes          code 121 = array of unsigned integer 8; # for Windows Vista and other non Windows DHCP clients
option classless-static-routes-ms       code 249 = array of unsigned integer 8; # for Windows 2000 and XP clients
# ------------------------------------------------------------------------------

subnet 10.0.0.0 netmask 255.0.0.0 {
    option routers              10.96.0.12;
.
.
    option
classless-static-routes
        24,192,168,1,           10,96,0,9,      # lan1 192.168.1.0/24 gw 10.96.0.9
        23,192,168,64,          10,96,0,9,      # site #2 192.168.64.0/23
        32,192,168,5,2,         10,96,0,76;     # serverB    192.168.5.2/32

    option classless-static-routes-ms
        24,192,168,1,           10,96,0,9,      # lan1 192.168.1.0/24
gw 10.96.0.9
        23,192,168,64,          10,96,0,9,      # site #2 192.168.64.0/23
        32,192,168,5,2,         10,96,0,76;     # serverB    192.168.5.2/32

Not all dhcp clients are capable of utilizing them though.

Bill

On 6/2/2017 2:31 AM, Pavel Zhukov wrote:
"David G." [hidden email] writes:

Hi,

How can I communicate the priority of routes and routers via DHCP? I'm
trying to get computers on my network to use another router for a
specific subnet but everything is just going to the default gateway. I'm
using DHCP option 121 to set the route.
Hi,
Which OS are you using? Classless routes should be set by dhclient script which is
vendor specific.
Thanks!

    


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP and Route Priority

Bob Harold

On Fri, Jun 2, 2017 at 3:36 PM, Bill Shirley <[hidden email]> wrote:
Classless static routes are used by an OS because they're more specific:
# ------------------------------------------------------------------------------
option classless-static-routes          code 121 = array of unsigned integer 8; # for Windows Vista and other non Windows DHCP clients
option classless-static-routes-ms       code 249 = array of unsigned integer 8; # for Windows 2000 and XP clients
# ------------------------------------------------------------------------------

subnet 10.0.0.0 netmask 255.0.0.0 {
    option routers              10.96.0.12;
.
.
    option
classless-static-routes
        24,192,168,1,           10,96,0,9,      # lan1 192.168.1.0/24 gw 10.96.0.9
        23,192,168,64,          10,96,0,9,      # site #2 192.168.64.0/23
        32,192,168,5,2,         10,96,0,76;     # serverB    192.168.5.2/32

    option classless-static-routes-ms
        24,192,168,1,           10,96,0,9,      # lan1 192.168.1.0/24
gw 10.96.0.9
        23,192,168,64,          10,96,0,9,      # site #2 192.168.64.0/23
        32,192,168,5,2,         10,96,0,76;     # serverB    192.168.5.2/32

Not all dhcp clients are capable of utilizing them though.

Bill


On 6/2/2017 2:31 AM, Pavel Zhukov wrote:
"David G." [hidden email] writes:

Hi,

How can I communicate the priority of routes and routers via DHCP? I'm
trying to get computers on my network to use another router for a
specific subnet but everything is just going to the default gateway. I'm
using DHCP option 121 to set the route.
Hi,
Which OS are you using? Classless routes should be set by dhclient script which is
vendor specific.
Thanks!


Try adding this to your DHCP configuration:

on commit {
  log(info,
    concat("REQUEST-LIST",
      " IP=",binary-to-ascii(10,8,".",leased-address),
      " MAC=",binary-to-ascii(16,8,":",hardware),
      " req-list=",binary-to-ascii(10,8,",",option dhcp-parameter-request-list)
    )
  );
}

Each time a lease is issued, it will log the list of DHCP options that the client requested.  If the client does not request code 121 or 249, then the server will not send them, because the client does not expect them and probably won't know what to do with them.

-- 
Bob Harold
 


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: DHCP and Route Priority

David G.
On Fri, Jun 2, 2017, at 12:44 PM, Bob Harold wrote:

On Fri, Jun 2, 2017 at 3:36 PM, Bill Shirley <[hidden email]> wrote:
Classless static routes are used by an OS because they're more specific:

# ------------------------------------------------------------------------------
option classless-static-routes          code 121 = array of unsigned integer 8; # for Windows Vista and other non Windows DHCP clients
option classless-static-routes-ms       code 249 = array of unsigned integer 8; # for Windows 2000 and XP clients
# ------------------------------------------------------------------------------

subnet 10.0.0.0 netmask 255.0.0.0 {
    option routers              10.96.0.12;
.
.
    option
classless
-static-routes

        24,192,168,1,           10,96,0,9,      # lan1 192.168.1.0/24 gw 10.96.0.9
        23,192,168,64,          10,96,0,9,      # site #2 192.168.64.0/23
        32,192,168,5,2,         10,96,0,76;     # serverB    192.168.5.2/32

    option
classless
-static-routes
-ms
        24,192,168,1,           10,96,0,9,      # lan1 192.168.1.0/24
gw 10.96.0.9

        23,192,168,64,          10,96,0,9,      # site #2 192.168.64.0/23
        32,192,168,5,2,         10,96,0,76;     # serverB    192.168.5.2/32
Not all dhcp clients are capable of utilizing them though.

Bill


On 6/2/2017 2:31 AM, Pavel Zhukov wrote:
"David G." [hidden email] writes:


Hi,

How can I communicate the priority of routes and routers via DHCP? I'm
trying to get computers on my network to use another router for a
specific subnet but everything is just going to the default gateway. I'm
using DHCP option 121 to set the route.

Hi,
Which OS are you using? Classless routes should be set by dhclient script which is
vendor specific.

Thanks!




Try adding this to your DHCP configuration:

on commit {
  log(info,
    concat("REQUEST-LIST",
      " IP=",binary-to-ascii(10,8,".",leased-address),
      " MAC=",binary-to-ascii(16,8,":",hardware),
      " req-list=",binary-to-ascii(10,8,",",option dhcp-parameter-request-list)
    )
  );
}

Each time a lease is issued, it will log the list of DHCP options that the client requested.  If the client does not request code 121 or 249, then the server will not send them, because the client does not expect them and probably won't know what to do with them.

-- 
Bob Harold
 
_______________________________________________
dhcp-users mailing list

Thank you for the answers. I'll look into these options. I'm actually using a mix of different clients, so the operating systems vary across the machines. A major problem was the DHCP software was sending a 'classful' route with a netmask of 255.255.255.255. That was pretty useless in my case.


-- 
http://www.fastmail.com - Choose from over 50 domains or use your own

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users