tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dhcp classless routes



On Thu, Jan 06, 2011 at 05:12:29PM +0000, Roy Marples wrote:
> Hi Patrick
> 
> On 06/01/2011 13:37, Patrick Welche wrote:
> >I can see how to write the equivalent of
> >
> >   route add -net w.x.y.z/m g.a.t.e
> >
> >in /etc/dhcpd.conf using the base system's dhcpd and dhcpcd a la
> >rfc3442. Am I right in thinking that there is no way of doing the
> >equivalent of
> >
> >   route add -net w.x.y.z/m g.a.t.e -iface
> 
> You can do this :)
> You need this in dhcpd.conf
> 
> option classless-static-routes code 121 = array of unsigned integer 8;
> 
> option classless-static-routes m,w,x,y,z,g,a,t,e ... ;
> 
> Like so, adding a default route
> option classless-static-routes 0,192,168,0,1;
> 
> Something more complex
> option classless-static-routes 0,10,73,1,1,24,10,73,0,10,73,1,1,24,10,73,2,
> 10,73,1,1,32,10,0,0,1,10,73,1,1;

Decoding:
route add default 10.73.1.1
route add -net 10.73.0/24 10.73.1.1
route add -net 10.73.2/24 10.73.1.1
route add -host 10.0.0.1  10.73.1.1

That looks exactly like what I did to do the equivalent of

> >   route add -net w.x.y.z/m g.a.t.e

I don't see what you did differently for the equivalent of

> >   route add -net w.x.y.z/m g.a.t.e -iface

eg
route add -net 10.73.2/24 10.99.99.99 -iface
(I know that doesn't look pretty, but they are all on the same switch)

Have I missed something in your explanation?


Cheers,

Patrick


Home | Main Index | Thread Index | Old Index