[plug] How to add static route?
Jay Turner
jturner at bsis.com.au
Fri Aug 20 13:51:13 WST 2004
I can do it in my head going from dec -> bin -> hex but very very slowly!
> -----Original Message-----
> From: plug-bounces at plug.linux.org.au
> [mailto:plug-bounces at plug.linux.org.au]On Behalf Of Matt Kemner
> Sent: Friday, 20 August 2004 1:27 PM
> To: plug at plug.linux.org.au
> Subject: Re: [plug] How to add static route?
>
>
> On Fri, 20 Aug 2004, quoth Craig Ringer:
>
> > AFAIK you'll need to write a script that takes care of that. Perhaps
> > something that looks at the DHCP response and decides what network it's
> > on and what to do about the route. Unfortunately, I've had trouble in
> > the past getting useful info out of DHCP clients - "WTF was the value of
> > option-201" is not a question the ones I looked at seemed to be good at
> > answering.
>
> dhcpcd understands dhcp option 33 (static routes) as defined in RFC2132,
> although I've not managed to get it to understand option 121 (RFC3442)
> which allows for classless routing, whereas Windows understands them fine,
> but as option 249 instead (just to be different)
>
> Fortunately the only routes I needed are class-based, but if I needed to
> add a static route for 10.0.1.0/24 via one gateway, and 10.0.2.0/24 via
> another, I would not have been able to do it under Linux.
>
> I'm still hoping I've missed something, and that I can get one of the
> Linux dhcp clients to understand classless static routes.
>
> I could not get pump or dhclient to accept any form of static routes.
>
> In my dhcpd.conf I have:
>
> # For Windows
> option new-static-routes code 249 = string;
>
> # 192.168.201/24 via 192.168.18.2 24:192:168:201:192.168.18:02
> # and 10/8 via 192.168.18.2 8:10:192:168:18:02
> option new-static-routes 18:c0:a8:c9:c0:a8:12:02:8:0a:c0:a8:12:02;
>
> # For Linux
> option static-routes code 33 = string;
>
> # 192.168.201.0 via 192.168.18.2 192:168:201:0:192.168.18:02
> # and 10.0.0.0 via 192.168.18.2 10:00:00:00:192:168:18:02
> option static-routes c0:a8:c9:0:c0:a8:12:02:0a:00:00:00:c0:a8:12:02;
>
> If you can figure out the hex encoding in less than 5 minutes when you've
> never seen it before, you're a better (wo)man than me.. :)
>
> - Matt
>
> _______________________________________________
> PLUG discussion list: plug at plug.linux.org.au
> http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug
> Committee e-mail: committee at plug.linux.org.au
>
>
More information about the plug
mailing list