From owner-freebsd-net@freebsd.org Thu Feb 15 17:51:37 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20C4CF0C00D for ; Thu, 15 Feb 2018 17:51:37 +0000 (UTC) (envelope-from leeb@ratnaling.org) Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AFF5085D53 for ; Thu, 15 Feb 2018 17:51:36 +0000 (UTC) (envelope-from leeb@ratnaling.org) Received: by mail-io0-x22e.google.com with SMTP id t126so1469241iof.4 for ; Thu, 15 Feb 2018 09:51:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ratnaling-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=XaqbSBhp4xt0em587+HiM+z5YBmUdVudHBVXX2rh1s0=; b=sBGD+YgCyE1CxWXCyBCoaGIHbckJpGTxCARxU8XVBfS8Hi98TQyYUOoR9FaBkVPpjK jCnLosF3AyrctmDtPtWQnD5liSMHJ4vtHkmxGGVsz1yEWzdFR6Sk1Zd+NrhWmxIaox5q mlO8q7VGxjeVgudWbpZm9rUCLssdfKfZGfN49uW60CfCmVzylceNNhPQu5MGwPjeJqfK Bg3Ih49a4x3J5MRk8Oy8Z/BWouhXOzUwqqe+f8+IglFq6g6XsoWuzAzucPIWPj2OOevw w2s+p0Gijl2zGsYgSgGzefdX/hqHm1SY/V03rVAtNqnJL1mW7HzNJt7Hw/czDJLN4Qfp LFrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=XaqbSBhp4xt0em587+HiM+z5YBmUdVudHBVXX2rh1s0=; b=Cj3v/inQNR139omYqaHbiQlQ4b2CVxpqS7ioPGaaScQieUfJ7Kpdu+T70Vpd+RTVC5 B/Gb1pCVIxaurOxtkCJRrdIbfU/Aa7ls73HwcvAeYMXOiSoHgNfMcI/n1ZXzSm4LJghM tt1K1zGcMen/Ntp2tvLHqlRrbK87Q2ohielUPI9KLCm2H8+t2rX6E2qF2VV/YwrBJuiE YhJuEnQIsJx7ivPaWvVpMQ+GPUt7KoSj5JzgqLB3hN8g5rScySN8rmDnhUcFRm02DPOL EqjCoIUMqxfUGUW1IEXAFk/fNBDzKELty9nSTsLGh3pICjBcCbfb+PmCCTETkHF4a6L8 kLGA== X-Gm-Message-State: APf1xPC/ZJ2YdUpXgM4W34nINaTVSXIs3ZBQucotFPUwiSA/KeCUtWUW MMIX5TtZKhvWhYkCQMBVkGagSjf1n9wvWqvW3Qg2hPgV X-Google-Smtp-Source: AH8x226TAHUkXKweJabQ2lSummZZQVkoLyGDA+Rg6TNkiQjKDLRTSyNQhmL8IKQyMWXKYR3iLHLwFbDyCJbb11hFWnE= X-Received: by 10.107.7.153 with SMTP id g25mr4553917ioi.271.1518717095714; Thu, 15 Feb 2018 09:51:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.225.66 with HTTP; Thu, 15 Feb 2018 09:51:35 -0800 (PST) In-Reply-To: References: From: Lee Brown Date: Thu, 15 Feb 2018 09:51:35 -0800 Message-ID: Subject: Re: How to remove a screwed up route? To: freebsd-net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 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, 15 Feb 2018 17:51:37 -0000 On Thu, Feb 15, 2018 at 9:47 AM, Scott Ellentuch wrote: > Hi, > > I did a very foolish thing.... > > route add -net 61.177.172.137 gw 127.0.0.1 > > > 1) Thats not a net, thats a host > 2) Thats my Linux's syntax, not what I expected > > So now I have the following in my netstat -rn > > 61.0.0.1&0x7f000001 MY.GW.IP.HERE UGSc 1 0 fxp0 > > > And I don't know the right magic to delete it. > > Thanks, Tuc > > > =E2=80=8C > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > What version of FreeBSD? That command did not work on my 11.1-RELEASE-p6 system. root@apron:~ # route add -net 1.2.3.4 gw 127.0.0.1 route: bad address: gw Here's what worked for me. Just use route del with the same parameters root@apron:~ # route add -net 1.2.3.4 127.0.0.1 add net 1.2.3.4: gateway 127.0.0.1 root@apron:~ # netstat -nr Routing tables Internet: Destination Gateway Flags Netif Expire default 10.1.10.1 UGS bge0 1.2.3.4/32 127.0.0.1 UGS lo0 10.0.0.0/8 10.1.10.1 UGS bge0 10.1.10.0/24 link#1 U bge0 10.1.10.175 link#1 UHS lo0 127.0.0.1 link#2 UH lo0 Internet6: Destination Gateway Flags Netif Expire ::/96 ::1 UGRS lo0 ::1 link#2 UH lo0 ::ffff:0.0.0.0/96 ::1 UGRS lo0 fe80::/10 ::1 UGRS lo0 fe80::%lo0/64 link#2 U lo0 fe80::1%lo0 link#2 UHS lo0 ff02::/16 ::1 UGRS lo0 root@apron:~ # route del -net 1.2.3.4 127.0.0.1 del net 1.2.3.4: gateway 127.0.0.1 root@apron:~ # netstat -nr Routing tables Internet: Destination Gateway Flags Netif Expire default 10.1.10.1 UGS bge0 10.0.0.0/8 10.1.10.1 UGS bge0 10.1.10.0/24 link#1 U bge0 10.1.10.175 link#1 UHS lo0 127.0.0.1 link#2 UH lo0 Internet6: Destination Gateway Flags Netif Expire ::/96 ::1 UGRS lo0 ::1 link#2 UH lo0 ::ffff:0.0.0.0/96 ::1 UGRS lo0 fe80::/10 ::1 UGRS lo0 fe80::%lo0/64 link#2 U lo0 fe80::1%lo0 link#2 UHS lo0 ff02::/16 ::1 UGRS lo0 root@apron:~ # uname -a FreeBSD apron.ad.nyingma.org 11.1-RELEASE-p6 FreeBSD 11.1-RELEASE-p6 #0 r328506M: Sat Jan 27 23:09:57 PST 2018 root@apron.ad.nyingma.org:/usr/obj/usr/src/sys/GENERIC amd64