From owner-freebsd-net@FreeBSD.ORG Thu May 18 17:52:26 2006 Return-Path: X-Original-To: freebsd-net@FreeBSD.ORG Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA3F916A527 for ; Thu, 18 May 2006 17:52:26 +0000 (UTC) (envelope-from ale@seudns.net) Received: from connectmed.com.br (s200-189-171-55.ipb.diveo.net.br [200.189.171.55]) by mx1.FreeBSD.org (Postfix) with SMTP id 4991443D5D for ; Thu, 18 May 2006 17:52:24 +0000 (GMT) (envelope-from ale@seudns.net) Received: (qmail 25010 invoked from network); 18 May 2006 17:51:35 -0000 Received: from unknown (HELO ?192.168.3.109?) (192.168.3.109) by donald.connectmed.com.br with SMTP; 18 May 2006 17:51:35 -0000 Message-ID: <446CB453.4000707@seudns.net> Date: Thu, 18 May 2006 14:52:19 -0300 From: Alexandre Biancalana User-Agent: Thunderbird 1.5 (X11/20060213) MIME-Version: 1.0 To: freebsd-net@FreeBSD.ORG References: <200605181615.k4IGFr1h020752@lurza.secnetix.de> In-Reply-To: <200605181615.k4IGFr1h020752@lurza.secnetix.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: Can't delete route X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2006 17:52:35 -0000 Oliver Fromme wrote: > Alexandre Biancalana wrote: > > Today I had to add a new route in the company gateway. So I ran the > > command: > > > > # route add 128.110.0.0 255.255.0.0 10.0.0.17 > > add net 128.110.0.0: gateway 255.255.0.0 > > You used the wrong syntax. Correct syntax is: > # route add -net [] > > So what your command actually did was to add 255.255.0.0 > as a gateway for 128.110.0.0 (with an illegal netmask of > 10.0.0.17). You certainly didn't want that, but the > route command did exactly what you told it to do. ;-) > Ok ! Right ! My fault ! In the running of make the new configuration I typed the command in wrong order.... :-( > > Running netstat -nr I get the following: > > > > 0&0xa000011 255.255.0.0 UGSc 15 332 fxp0 => > > > > this is incorrect, the interface should be fxp1 not fxp0 (that is the > > default interface). > > That's expected. 255.255.0.0 is probably on your default > route, so it'll be routed to fxp0. > > > And Why the destination network is 0&0xa000011 and > > not 128.110.0.0 > > You specified 10.0.0.17 as the netmask, which is 0xa000011 > in hexadecimal. When you perform a bitwise-and operation > between your destination (128.110.0.0) and your netmask > (10.0.0.17), you get zero. That's why netstat(1) displays > "0". It also displays the netmask, usually CIDR notation > if possible (i.e. "/x"), but that's not possible with your > weird netmask, so it just displays "&" followed by the mask > in hex. > Have some way to remove this stupid route without flushing the routing table ??? This machine is main gateway of the company and I can't do a route flush now, but I need to have this new route working... # route delete -net 128.110.0.0 route: writing to routing socket: No such process delete net 128.110.0.0: not in table > Best regards > Oliver > > Thank you for ALL the replies, all of then was great !! Alexandre