From owner-freebsd-net@FreeBSD.ORG Thu Sep 13 00:12:42 2012 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 D3F69106566B for ; Thu, 13 Sep 2012 00:12:42 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id 96C9E8FC0C for ; Thu, 13 Sep 2012 00:12:42 +0000 (UTC) Received: by oagm1 with SMTP id m1so1785876oag.13 for ; Wed, 12 Sep 2012 17:12:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=pGqDlSUiNotkjGngE2wilDC+VXeosUDP4qhHPms6TgM=; b=wrONfAHcKa3fFrmuvVIa4AcNvn0if3+pbJx9JL0cJB8jZ4pIqexEKxtOqyIHrGcPmM 2LO2qn6Kdn5qqbKmIjod9JUqV5YvqzXGiMWccsdv5fXSELs7rPswLqy0gghBXDSdrqq2 SRyT7JBHelMiAQKuKS2xVRXLdwQ72e5+B+amPfw7Vli8Cz1sIG9H2OxC2f/3FkStA34Y PoHc/+X35u6Xvg+MfotH2gsX2WJqmPvfeJ3CzNKJlyRiuGgW7C0q60v7KO/XCAu7/NZp wDJtGn5oJaugTrHYHQelEQ3okrFiYW6yyvR53p3KHZs/Gk0DaoHJfi+Wc8pT9k6PrmVt Z68g== MIME-Version: 1.0 Received: by 10.60.2.134 with SMTP id 6mr173101oeu.62.1347495156658; Wed, 12 Sep 2012 17:12:36 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Wed, 12 Sep 2012 17:12:36 -0700 (PDT) Date: Wed, 12 Sep 2012 17:12:36 -0700 Message-ID: From: Garrett Cooper To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Restarting interfaces and routing table stickiness 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, 13 Sep 2012 00:12:42 -0000 Hi -net! I've been doing some IPv6 testing lately, and one of the issues that I've run into in the past (since at least 7.0-CURRENT) is that if I do `service netif restart `, e.g. `service netif restart` multiple times, and have addresses statically configured in rc.conf, more often than not the routing table doesn't properly get flushed and my addresses become unreachable (even after I call `service routing restart`). Recently, I ran into an issue with 9.1-RC1 where had to kill ntpd before it would allow me to reach one of the addresses I had assigned on a test server (server has a total of 4 physical NICs and 1 vlan'ed interface). The only surefire method to get things back to a sane state is to reboot the box (of course, please keep in mind that I'm using the netif rc script and not using other commands like route flush, route delete, etc). This behavior can be simply triggered like so on 8.x and below like so: /etc/rc.d/network_ipv6 restart /etc/rc.d/network_ipv6 restart The second restart typically results in the following messages from route(8): route: writing to routing socket: File exists add net fe80::: gateway ::1: route already in table route: writing to routing socket: File exists add net ff02::: gateway ::1: route already in table Similar methods should exist on all FreeBSD versions by doing `/etc/rc.d/netif restart` or `service netif restart`. Furthermore, this issue is exacerbated by using `service netif restart cxgb0` as the rc script might not be doing the right thing when clearing the routing tables. Thanks! -Garrett PS I'm wondering if this is a known issue and if there's anything I can do to reproduce/isolate this issue further.