From owner-freebsd-net@FreeBSD.ORG Fri Oct 10 14:15:03 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D39C81065686 for ; Fri, 10 Oct 2008 14:15:03 +0000 (UTC) (envelope-from jhugo@meraka.csir.co.za) Received: from marge.meraka.csir.co.za (marge.meraka.csir.co.za [IPv6:2001:4200:7000:3::1]) by mx1.freebsd.org (Postfix) with ESMTP id 1B55D8FC17 for ; Fri, 10 Oct 2008 14:15:03 +0000 (UTC) (envelope-from jhugo@meraka.csir.co.za) Received: from jeep.meraka.csir.co.za (jeep.meraka.csir.co.za [IPv6:2001:4200:7000:3:211:43ff:feba:aff1]) by marge.meraka.csir.co.za (Postfix) with ESMTP id 62F8578C5C for ; Fri, 10 Oct 2008 16:15:01 +0200 (SAST) From: Johann Hugo Organization: CSIR To: freebsd-net@freebsd.org Date: Fri, 10 Oct 2008 16:15:00 +0200 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810101615.00557.jhugo@meraka.csir.co.za> Subject: Should "route flush" delete all routes ? 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: Fri, 10 Oct 2008 14:15:03 -0000 According to the man page it looks like it: The route utility provides six commands: add Add a route. flush Remove all routes. ...... but I cannot get it to delete routes created with -interface option. -------------------------------------------------------------------------------- My setup: route add 146.64.80.0/24 192.168.0.100 route add 146.141.0.0 -interface tun1 route add 146.182.0.0 -interface tun1 netstat -rn inet 146.64.80.0/24 192.168.0.100 UGS 0 0 sis0 146.141.0.0/16 tun1 US 0 0 tun1 146.182.0.0/16 tun1 US 0 0 tun1 If I do "route -n flush -inet" then it does not delete the routes created with a -interface option. see verbose output: route -vn flush -inet RTM_GET: Report Metrics: len 204, pid: 0, seq 0, errno 0, flags: locks: inits: sockaddrs: 146.64.80.0 192.168.0.100 (255) ffff ffff ff sis0:0.0.24.c7.8b.80 192.168.0.44 RTM_DELETE: Delete Route: len 204, pid: 0, seq 2, errno 0, flags: locks: inits: sockaddrs: 146.64.80.0 192.168.0.100 (255) ffff ffff ff sis0:0.0.24.c7.8b.80 192.168.0.44 RTM_GET: Report Metrics: len 260, pid: 0, seq 0, errno 0, flags: locks: inits: sockaddrs: 146.141.0.0 tun1 (255) ffff ffff tun1 dsl-146-145-96.telkomadsl.co.za dsl-146-144-01.telkomadsl.co.za RTM_GET: Report Metrics: len 260, pid: 0, seq 0, errno 0, flags: locks: inits: sockaddrs: 146.182.0.0 tun1 (255) ffff ffff tun1 dsl-146-145-96.telkomadsl.co.za dsl-146-144-01.telkomadsl.co.za netstat -rn inet 146.141.0.0/16 tun1 US 0 0 tun1 146.182.0.0/16 tun1 US 0 0 tun1 uname -a FreeBSD groenwifi.cids.org.za 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #19: Tue Aug 26 13:40:13 UTC 2008