From owner-freebsd-net@FreeBSD.ORG Wed Aug 21 17:48:22 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 950E917A; Wed, 21 Aug 2013 17:48:22 +0000 (UTC) (envelope-from sfourman@gmail.com) Received: from mail-ve0-x236.google.com (mail-ve0-x236.google.com [IPv6:2607:f8b0:400c:c01::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 30DC92D02; Wed, 21 Aug 2013 17:48:22 +0000 (UTC) Received: by mail-ve0-f182.google.com with SMTP id m1so628021ves.41 for ; Wed, 21 Aug 2013 10:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=0J5qkxJkdwgdthaD+hYAaAs3hws9Vu2zNPa8AReZnhQ=; b=foIc5vNM/+RHyMjTmDryByzPMOawu1GjuvYqbmF9WGrb8Lx8h2wfVFKevxIKtFHBWn lzoderko2cuzKiZZdgoWJ3bSnHiJlrWFZ21tgO6vr239z4B615RfpYuzvbehJuynAv16 aY5DHn0WuPYUx0TZI2THOXm+G+YzZ3thiuJ0oIWz8OTyJFuSpus6Era5dVa8uRloC3Yv fdrpqv9muBj3lQvVYVPaaX9Spq7HggWoxr9EQKnx43cGUxd8AMuHPioXAvzoMt27iINJ GPC3cqTbAK3fl+FDnBRSwg2xyLjAwWO//ce2vEN9InujOc0gCFf6Cbc14AufJHSVqldR xHQQ== MIME-Version: 1.0 X-Received: by 10.58.197.5 with SMTP id iq5mr1755298vec.30.1377107301335; Wed, 21 Aug 2013 10:48:21 -0700 (PDT) Received: by 10.220.96.78 with HTTP; Wed, 21 Aug 2013 10:48:21 -0700 (PDT) In-Reply-To: References: Date: Wed, 21 Aug 2013 13:48:21 -0400 Message-ID: Subject: Re: CFR: FIB handling improvements From: "Sam Fourman Jr." To: Will Andrews Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-net@freebsd.org, "Justin T. Gibbs" , Alan Somers X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 17:48:22 -0000 * Use of dhclient with non-zero FIBs. With this patch, it is possible > to use DHCP on a specific interface with a non-zero FIB and have it > work correctly with this rc.conf snippet: > > ifconfig_em1="SYNCDHCP" > dhclient_fib_em1=1 > This patch is needed, I have a situation where we have 2 internet providers, one is a static ip set in rc.conf, the other provider forces the use of DHCP, but trying to use the "DHCP" connection only for a "Backup" caused the problem of the primary gateway being overwritten on fib0 (the static) I tried to solve it by the following in /etc/rc.local: /usr/sbin/setfib 1 /sbin/dhclient re2 setfib 0 route delete default setfib 1 route delete default setfib 1 route add default 99.55.240.1 setfib 0 route add default 75.133.75.193 this sorta works, but in practice after several hours (not sure why) all of the traffic on the machine tries to use the gateway of FIB1. this problem ONLY shows up when the use of DHCP is in the mix. So my question is twofold, is my situation what this patch is supposed to fix? or did I simply find a bug in the interface code? that will sort of eludes to Thank you for your work -- Sam Fourman Jr.