Configure routing (with netmask)

Vitor Flausino vflausino at dti.pga.aero
Thu May 10 15:54:38 UTC 2007


I found a solution in webpage http://www.xrx.ca/hexroute.htm that really sols the problem.

Thanks for the help.

-----Original Message-----
From: dhcp-users-bounce at isc.org [mailto:dhcp-users-bounce at isc.org] On Behalf Of Simon Hobson
Sent: Thursday, May 10, 2007 3:36 PM
To: dhcp-users at isc.org
Subject: RE: Configure routing (with netmask)

Vitor Flausino wrote:
>RFC3442 does not give me the syntax for dhcpd.conf...
>So far what I have and is not working is...
>
>
>option classless-routes code 249 = array of unsigned integer 8;
>option classless-routes 32,  0,0,0,0,  5,22,23,7,   24,  12,68,0,0,
>5,22,23,100;


Is that meant to encode 0.0.0.0/32 via 5.22.23.7 and 12.68.0.0/24 via
5.22.23.100 ?

If so then you haven't read rfc3442 (properly).

That set of routes would be (as I read it) :

32, 0,0,0,0, 5,22,23,7, 24, 12,68,0, 5,22,223,100

32,0,0,0,0 = 0.0.0.0/32
5,22,23,7 =  via 5.22.23.7
24,12,68,0 = 12.68.0.0/24 (note that the redundant 0 is dropped)
5,22,223,100 = via 5.22.223.100

I'm assuming that the DHCP server automatically calculates and
inserts the option length byte.


The problem may be as simple as not allowing for dropping
insignificant octets (ie 12.68.0.0/24 becomes 24,12,68,0) and
possibly leaving off the length.


If you actually meant "default via 5.22.23.7 and 12.68.0.0/24 via
5.22.23.100" then it would be :

0, 5,22,23,7, 24, 12,68,0, 5,22,223,100

where "0, 5,22,23,7" means 0.0.0.0/0 via 5.22.23.7


Does this work ?




More information about the dhcp-users mailing list