From owner-freebsd-questions@FreeBSD.ORG Thu Apr 24 16:47:39 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E63F1065673 for ; Thu, 24 Apr 2008 16:47:39 +0000 (UTC) (envelope-from iaccounts@ibctech.ca) Received: from pearl.ibctech.ca (pearl.ibctech.ca [208.70.104.210]) by mx1.freebsd.org (Postfix) with ESMTP id ADC238FC24 for ; Thu, 24 Apr 2008 16:47:38 +0000 (UTC) (envelope-from iaccounts@ibctech.ca) Received: (qmail 86897 invoked by uid 1002); 24 Apr 2008 16:47:38 -0000 Received: from iaccounts@ibctech.ca by pearl.ibctech.ca by uid 89 with qmail-scanner-1.22 (spamassassin: 2.64. Clear:RC:1(208.70.104.100):. Processed in 0.068834 secs); 24 Apr 2008 16:47:38 -0000 Received: from unknown (HELO ?192.168.30.110?) (steve@ibctech.ca@208.70.104.100) by pearl.ibctech.ca with (DHE-RSA-AES256-SHA encrypted) SMTP; 24 Apr 2008 16:47:37 -0000 Message-ID: <4810B935.3050509@ibctech.ca> Date: Thu, 24 Apr 2008 12:45:41 -0400 From: Steve Bertrand User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: magalhj@yahoo.com.br References: <505569.92862.qm@web31602.mail.mud.yahoo.com> In-Reply-To: <505569.92862.qm@web31602.mail.mud.yahoo.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Change gateway 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: Thu, 24 Apr 2008 16:47:39 -0000 > I'm trying to set the gateway 10.0.253.1 to the host 10.0.253.161/27 but i've received the answer: > > # route flush > # route add default 10.0.253.1 > > route: writing to routing socket: Network is unreachable > > The gateway and the host are connected in the same switch Even though the physical connection is the same, the .1 address is in a different subnet entirely than .161, due to the /27 prefix length. 10.0.253.160/27 encompasses 161-190. It's a good thing FreeBSD breaks in this case ;) You will need to change your prefix length to /24 on the host, or add a secondary IP from the 160/27 range to the gateway to make this work. Regards, Steve