From owner-freebsd-net@FreeBSD.ORG Tue Aug 13 12:19:18 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 C72FCBCC for ; Tue, 13 Aug 2013 12:19:18 +0000 (UTC) (envelope-from olivier2553@gmail.com) Received: from mail-qc0-x230.google.com (mail-qc0-x230.google.com [IPv6:2607:f8b0:400d:c01::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8B3C22200 for ; Tue, 13 Aug 2013 12:19:18 +0000 (UTC) Received: by mail-qc0-f176.google.com with SMTP id u12so4039271qcx.35 for ; Tue, 13 Aug 2013 05:19:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=yl1tJAOy7/mPoHvZ1FjsfiIkobvQizDNp4TXClJ5kV4=; b=PMKnDh+5fe6MOy8PyjiGMrFbqaf0/50DgRvipqQxBG0T/LOgYt9Pmbeg8p2/e1+IzV j2DmiUogOpWkkZza+U9TLpHakdpVaGvRP+cWT1+V7UPd69S3l67A+xhY/cV4kLhCI8ly hkiIWHb6iqX/uPYxNksNMF2BXJd9da48dAJ0rwJpmd4isWbl5tMpCx229ffrlY16NQNA RiS/L1RRkSzi+ZbGKI5dF37MlvpjkB1m9DC5XQn6Fyw/gNULkuuQNq7Cr0TDFQzZAkxM XSv4jq+EoEeqz+lMI4QUXXzCpr1xTcNsIQ4b5RQOL4Lo0ewnoi2BatXaSJ758dazPLDn EaeA== MIME-Version: 1.0 X-Received: by 10.229.240.67 with SMTP id kz3mr1037204qcb.29.1376396357718; Tue, 13 Aug 2013 05:19:17 -0700 (PDT) Sender: olivier2553@gmail.com Received: by 10.49.62.41 with HTTP; Tue, 13 Aug 2013 05:19:17 -0700 (PDT) In-Reply-To: <520A2279.6050600@artem.ru> References: <520A2279.6050600@artem.ru> Date: Tue, 13 Aug 2013 19:19:17 +0700 X-Google-Sender-Auth: G7cPRFo1tfplSdPctQ0DuPQpk94 Message-ID: Subject: Re: Different providers for different nat clients From: Olivier Nicole To: "artem@artem.ru" Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Net 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: Tue, 13 Aug 2013 12:19:18 -0000 Artem, > I have a strange task and don't understand how to implement such scheme. > > There is a router with 3 interfaces: > > IF1: PROVIDER A > IF2: PROVIDER B > IF3: LAN > > Clients served via NAT. There are about 15 clients. > > Now, what i need to do: > > By default all traffic from all clients goes to PROVIDER A via IF1. > But, if total incoming traffic for any particular client becomes over X Mb > then that client > and only that client must be switch for PROVIDER B. The switch must be > automatic and must > not use any software on the client side. > While i know how to count traffic i don't understand how to route external > traffic to/from > nat clients on particular external interface. > > Any idea how it is done? I would think that you have to dynamically change the configuration of the NAT to associate the client to the IP from provider B. Now, how you do that depends on the NAT software you are using, that ou did not say. Good luck, Olivier