Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Sep 2012 17:12:36 -0700
From:      Garrett Cooper <yanegomi@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   Restarting interfaces and routing table stickiness
Message-ID:  <CAGH67wSemVK2FtGHgHX2tMicHd7fEs27M6_RCxdKiJxFPveRCQ@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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 <foo>`, 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wSemVK2FtGHgHX2tMicHd7fEs27M6_RCxdKiJxFPveRCQ>