From owner-freebsd-net@freebsd.org Tue Jun 21 00:34:14 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A62DDA7A4CE for ; Tue, 21 Jun 2016 00:34:14 +0000 (UTC) (envelope-from freebsd@grem.de) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id 0CB731AB0 for ; Tue, 21 Jun 2016 00:34:13 +0000 (UTC) (envelope-from freebsd@grem.de) Received: (qmail 54158 invoked by uid 89); 21 Jun 2016 00:27:25 -0000 Received: from unknown (HELO bsd64.grem.de) (mg@grem.de@194.97.158.70) by mail.grem.de with ESMTPA; 21 Jun 2016 00:27:25 -0000 Date: Tue, 21 Jun 2016 02:27:23 +0200 From: Michael Gmelin To: freebsd-net@freebsd.org Subject: ARP table entries / ifconfig needs to be issued twice when moving IP Message-ID: <20160621022723.5e785573@bsd64.grem.de> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd10.2) X-Face: $wrgCtfdVw_H9WAY?S&9+/F"!41z'L$uo*WzT8miX?kZ~W~Lr5W7v?j0Sde\mwB&/ypo^}> +a'4xMc^^KroE~+v^&^#[B">soBo1y6(TW6#UZiC]o>C6`ej+i Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWJBwe5BQDl LASZU0/LTEWEfHbyj0Txi32+sKrp1Mv944X8/fm1rS+cAAAACXBIWXMAAAsTAAAL EwEAmpwYAAAAB3RJTUUH3wESCxwC7OBhbgAAACFpVFh0Q29tbWVudAAAAAAAQ3Jl YXRlZCB3aXRoIFRoZSBHSU1QbbCXAAAAAghJREFUOMu11DFvEzEUAGCfEhBVFzuq AKkLd0O6VrIQsLXVSZXoWE5N1K3DobBBA9fQpRWc8OkWouaIjedWKiyREOKs+3PY fvalCNjgLVHeF7/3bMtBzV8C/VsQ8tecEgCcDgrzjekwKZ7TwsJZd/ywEKwwP+ZM 8P3drTsAwWn2mpWuDDuYiK1bFs6De0KUUFw0tWxm+D4AIhuuvZqtyWYeO7jQ4Aea 7jUqI+ixhQoHex4WshEvSXdood7stlv4oSuFOC4tqGcr0NjEqXgV4mMJO38nld4+ xKNxRDon7khyKVqY7YR4d+Cg0OMrkWXZOM7YDkEfKiilCn1qYv4mighZiynuHHOA Wq9QJq+BIES7lMFUtcikMnkDGHUoncA+uHgrP0ctIEqfwLHzeSo+eUA66AqzwN6n 2ZHJhw6Qh/PoyC/QENyEyC/AyNjq74Bs+3UH0xYwzDUC4B97HgLocg1QLYgDDO1v f3UX9Y307Ew4AHh67YAFFsxEpkXwpXY3eIgMhAAE3R19L919nNnuD2wlPcDE3UeT L2ytEICQib9BXgS2fU8PrD82ToYO1OEmMSnYTjSqSv9wdC0tPYC+rQRQD9ESnldF CyqfmiYW+tlALt8gH2xrMdC/youbjzPXEun+/ReXsMCDyve3dZc09fn2Oas8oXGc Jj6/fOeK5UmSMPmf/jL+GD8BEj0k/Fn6IO4AAAAASUVORK5CYII= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2016 00:34:14 -0000 Hi, I'm not sure if it's just me being tired, but I'm facing the following problem on 10.3-RELEASE when moving an IPv4 alias from one host to the other. This is an example of what I'm seeing: Configuration: Box 1: ifconfig_bge0_name="uplink" ifconfig_uplink="inet 10.1.1.253/24 description 'uplink'" ifconfig_uplink_ipv6="inet6 fd8e:1111:1111:1f::fd" mac: 14:18:77:11:22:33 Box 2: ifconfig_bge0_name="uplink" ifconfig_uplink="inet 10.1.1.254/24 description 'uplink'" ifconfig_uplink_ipv6="inet6 fd8e:1111:1111:1f::fe" mac: 14:18:77:44:55:66 Test: Box 1: Configure alias address # ifconfig uplink alias 10.1.1.33/32 # arp -an | grep 10.1.1.33 ? (10.1.1.33) at 14:18:77:11:22:33 on uplink permanent [ethernet] Box 2: Ping, check it's in the ARP table # ping 10.1.1.33 ... # arp -an | grep 10.1.1.33 ? (10.1.1.33) at 14:18:77:11:22:33 on uplink expires in 1188 seconds [ethernet] Box 1: Remove alias # ifconfig uplink -alias 10.1.1.33 Box 2: Add alias # ifconfig uplink alias 10.1.1.33/32 # arp -an | grep 33 ? (10.1.1.33) at 14:18:77:11:22:33 on uplink expires in 1156 seconds [ethernet] It's still in the arp table as a non-permanent entry, pointing to the Box 1. Box 2: Issue ifconfig once more: # ifconfig uplink alias 10.1.1.33/32 # arp -an | grep 33 ? (10.1.1.33) at 14:18:77:44:55:66 on uplink permanent [ethernet] Now it's set to the local ethernet address in the arp table permanently. This is not a big deal in case of a simple setup (packets still flow correctly), but as soon as you add multiple FIBs and interface routes into the mix, things get problematic[1]. Is this intended behaviour, am I missing something? - Michael [1] While the example above was done on two separate boxes, the FIB setup in production is something like this: sysctl net.add_addr_allfibs=0 vlan1: fib 1 vlan2: fib 2 route add -host 10.1.1.33 -interface vlan2 -fib 1 route add -host 10.2.1.32 -interface vlan1 -fib 2 ... -- Michael Gmelin