From owner-freebsd-questions@freebsd.org Mon Dec 2 17:04:34 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A73531B066A for ; Mon, 2 Dec 2019 17:04:34 +0000 (UTC) (envelope-from kudzu@tenebras.com) Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47RWgQ40v1z45N9 for ; Mon, 2 Dec 2019 17:04:34 +0000 (UTC) (envelope-from kudzu@tenebras.com) Received: by mail-qv1-xf34.google.com with SMTP id d17so116533qvs.2 for ; Mon, 02 Dec 2019 09:04:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tenebras-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=31ueg7y/1jeyF6c/8F6K4Kz4xuBCIiOWWYfEj5nAI9I=; b=r9Z/f8+8LD6VmH8yhg+cwZ1gRdiltiQDVVpW9VPly57lguo1r07pNyXtvhyx9UXZIH 1zTLv7HY8GHAsq+HkvecsYf0tk3lJgqNx/PL6VfHiC25IjDpV2ISxarnrJ/o9ID8cQYd TUMlHsebttSKqdsMkpEzLG9il/5V3Iq4rTAW90NPmK2WAM+BczMuJ/1tJPy+KxhVvNJ8 JuTbeMYM0vxx4eeljCOhuI6hnaQiWV59zTOkJhE1VYJFHVeYCQXRbFlMjw4N6Zr8mhgU Mje3+zEk41+D5V5w7TaJHMt8cZVIKNh7I9RpGqDmByChhHjKEISx5ZUVMsBrgb3yBe1l T+wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=31ueg7y/1jeyF6c/8F6K4Kz4xuBCIiOWWYfEj5nAI9I=; b=GUEZgHshqffOk/eqno+BNY1OPRwiAyPItbrwM7q00P35CrcpLn7SEfTjUszEm8VQ9o 0UqGfqcAtranoNUaTs5NxPKl0dwXSxjiyfTtNQWgJKa4uSsSsPn/eDMKDr7izfh4XLX3 tDjy59dz9+/8ec+XX2kmkGTyYkdDFtfX+ac2dDfWpR6EuQeyFV5MZL39NlgcR5/4Uggp WIxM1cwJ6a2Vy8kYog3qQT5cjBzUlPcdwpdU0aFmX6OWlC89zGHbuPgE5XmB66u8jtLd czJyrW4Hn2zdn66L2/n3vYt0d82Yqn9Mos0r7Bh9Grml8gciwHxcfT6lg0wBLLR2TOJx hDgw== X-Gm-Message-State: APjAAAXI9ndf9+2HwpR0OZFZZ4metoXJcWV4G6ScidNhWIgKJuVX2J9G Ofzt2V25wJQ+fplNrt9DDbdOabzZtDFLW4ts0hMOdT4fWEOXdA== X-Google-Smtp-Source: APXvYqyxgNRhoO4xjySUbjWnzbH3YvN912+6sHqLYQe24w1upkk9YjbE6JvL8CzRSWAewvyVN85s5jLj0+fZP43x4FY= X-Received: by 2002:a05:6214:108a:: with SMTP id o10mr17969346qvr.246.1575306267031; Mon, 02 Dec 2019 09:04:27 -0800 (PST) MIME-Version: 1.0 References: <20191202060719.000059a1@seibercom.net> In-Reply-To: <20191202060719.000059a1@seibercom.net> From: Michael Sierchio Date: Mon, 2 Dec 2019 09:03:50 -0800 Message-ID: Subject: Re: Network Aggregation To: FreeBSD Questions X-Rspamd-Queue-Id: 47RWgQ40v1z45N9 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2019 17:04:34 -0000 The python library netaddr? import netaddr import sys cidr_list =3D [] for line in sys.stdin: cidr_list.append(netaddr.IPNetwork(line)) ec2_nets =3D netaddr.cidr_merge(cidr_list) for net in ec2_nets: sys.stdout.write(str(net)+'\n') On Mon, Dec 2, 2019 at 3:07 AM Jerry wrote: > I am looking for a program that will automate combining IP addresses, > usually referred to as aggregation. I have been doing it by hand, and > it is a real PIA. > > Thanks! > > -- > Jerry > --=20 "Well," Brahm=C4=81 said, "even after ten thousand explanations, a fool is = no wiser, but an intelligent person requires only two thousand five hundred." - The Mah=C4=81bh=C4=81rata