From owner-freebsd-net@FreeBSD.ORG Tue Aug 13 12:11:44 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 374739E8 for ; Tue, 13 Aug 2013 12:11:44 +0000 (UTC) (envelope-from artemkuchin76@gmail.com) Received: from mail-lb0-x22e.google.com (mail-lb0-x22e.google.com [IPv6:2a00:1450:4010:c04::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B2EBD2185 for ; Tue, 13 Aug 2013 12:11:43 +0000 (UTC) Received: by mail-lb0-f174.google.com with SMTP id w20so272432lbh.5 for ; Tue, 13 Aug 2013 05:11:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=XjTaEJaChlIdhvGyqTyKK9pqmTQaoyGoF05nDnaLfOk=; b=KZ5iyQOWkglIGLf+PNL8rtIMlMYQoWoS7ejGnGqBqhMAIiyn5o7dPhshZg82JIc6uX a4KaNjl8zQhMHFSnn14wbk+09knWr5sDTJ5RkGQNQJU2te2Zf/6w46n0Ryu3HlsnvVrH ZfPRkV8ja72IkWvBnEYftnAhQ6C/W5QyEs6Et4FvaECnFZEuQDCc6LVq5hwoW6omcfDp BH/ilJMcJf4Iy1dDN/ilgSoE8fwtRKKShtLxsdyOCjZfdJhorHxDQIglBo5mDmwbTdZg VoWqpaRoJCuiH8jorPO8SJKFoNMdaQgL5opaY9WZhsQiqg21FfuJsmM8KIN1XRND/oTm YXrA== X-Received: by 10.152.26.72 with SMTP id j8mr3601428lag.19.1376395901631; Tue, 13 Aug 2013 05:11:41 -0700 (PDT) Received: from [192.168.0.12] ([94.228.240.133]) by mx.google.com with ESMTPSA id k9sm13775673lbe.6.2013.08.13.05.11.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 Aug 2013 05:11:41 -0700 (PDT) Message-ID: <520A2279.6050600@artem.ru> Date: Tue, 13 Aug 2013 16:11:37 +0400 From: "artem@artem.ru" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: freebsd-net@freebsd.org Subject: Different providers for different nat clients Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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:11:44 -0000 Hello! 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? Artem