From owner-freebsd-questions@FreeBSD.ORG Fri Dec 9 16:38:24 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5594016A41F for ; Fri, 9 Dec 2005 16:38:24 +0000 (GMT) (envelope-from ml.diespammer@netfence.it) Received: from parrot.aev.net (parrot.aev.net [212.31.247.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF91B43D45 for ; Fri, 9 Dec 2005 16:38:22 +0000 (GMT) (envelope-from ml.diespammer@netfence.it) Received: from soth.ventu (adsl-ull-84-135.51-151.net24.it [151.51.135.84]) (authenticated bits=128) by parrot.aev.net (8.13.5/8.13.5) with ESMTP id jB9GrgKG087727 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 9 Dec 2005 17:53:49 +0100 (CET) (envelope-from ml.diespammer@netfence.it) Received: from [10.1.2.18] (alamar.ventu [10.1.2.18]) (authenticated bits=0) by soth.ventu (8.13.5/8.13.3) with ESMTP id jB9GbfTi098531 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 9 Dec 2005 17:37:41 +0100 (CET) (envelope-from ml.diespammer@netfence.it) Message-ID: <4399B2F5.2030306@netfence.it> Date: Fri, 09 Dec 2005 17:38:13 +0100 From: Andrea Venturoli User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051202) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dan Nelson , freebsd-questions@freebsd.org References: <43999C2E.7010506@netfence.it> <20051209154453.GE95420@dan.emsphone.com> In-Reply-To: <20051209154453.GE95420@dan.emsphone.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.53 on 212.31.247.179 X-Scanned-By: MIMEDefang 2.53 on 10.1.2.13 Cc: Subject: Re: Sligtly OT: setting static routes on clients X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Dec 2005 16:38:24 -0000 Dan Nelson wrote: > In the last episode (Dec 09), Andrea Venturoli said: > >>Hello. >>I've got a network of clients on which I'd like to set static routes; >>these are mainly (but not only) Windows machines, administered through a >>couple of FreeBSD servers. >>Is there any way to do this with DHCP? >>Or via Samba (netlogon.cmd)? > > > You can try using the DHCP Classless Static Route option (#121, see RFC > 3442). MSDN claims that Windows XP and Server 2003 will process them. > FreeBSD's dhclient does not, but you should still be able to set its > dhcp server to send them. > You mean, from man dhcp-options: option static-routes ip-address ip-address [, ip-address ip-address...]; This option specifies a list of static routes that the client should install in its routing cache. If multiple routes to the same desti- nation are specified, they are listed in descending order of prior- ity. The routes consist of a list of IP address pairs. The first address is the destination address, and the second address is the router for the destination. The default route (0.0.0.0) is an illegal destination for a static route. To specify the default route, use the routers option. Also, please note that this option is not intended for classless IP routing - it does not include a subnet mask. Since classless IP routing is now the most widely deployed routing standard, this option is virtu- ally useless, and is not implemented by any of the popular DHCP clients, for example the Microsoft DHCP client. ? Well, I tryed this one, it seemed the most obvious thing. However I didn't succeed, unless I was trying to specify a route to *a single IP*. In case I wanted for example to specify a route to 192.168.101.*, what should I put in there? Here's what I tryed: option static-routes 192.168.101.0 10.1.2.13; Here's what I get on a Windows 2000 client with netstat -rn: Network destination Netmask Gateway 192.168.101.0 255.255.255.255 10.1.2.13 Now, I don't think that netmask is so good, isn't it? bye & Thanks av.