From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C668C2BB1D for ; Wed, 15 Apr 2020 01:43:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 386F6206D5 for ; Wed, 15 Apr 2020 01:43:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392710AbgDOBng (ORCPT ); Tue, 14 Apr 2020 21:43:36 -0400 Received: from smtp.netregistry.net ([202.124.241.204]:50460 "EHLO smtp.netregistry.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392682AbgDOBnd (ORCPT ); Tue, 14 Apr 2020 21:43:33 -0400 X-Greylist: delayed 326 seconds by postgrey-1.27 at vger.kernel.org; Tue, 14 Apr 2020 21:43:32 EDT Received: from pa49-197-21-111.pa.qld.optusnet.com.au ([49.197.21.111]:60208 helo=localhost) by smtp-1.servers.netregistry.net protocol: esmtpa (Exim 4.84_2 #1 (Debian)) id 1jOX06-00079J-7o; Wed, 15 Apr 2020 11:38:04 +1000 Date: Wed, 15 Apr 2020 11:38:00 +1000 From: Russell Strong To: Stephen Hemminger Cc: netdev@vger.kernel.org Subject: Re: vxlan mac address generation Message-ID: <20200415113800.134f2530@strong.id.au> In-Reply-To: <20200414172348.365896e5@hermes.lan> References: <20200415100524.1ed7f9f9@strong.id.au> <20200414172348.365896e5@hermes.lan> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Authenticated-User: russell@strong.id.au Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, 14 Apr 2020 17:23:48 -0700 Stephen Hemminger wrote: > On Wed, 15 Apr 2020 10:05:24 +1000 > Russell Strong wrote: > > > Hi Stephen, > > > > I've hit a problem with vxlan not communicating because mac > > addresses being duplicated when I use the same IFNAME across > > multiple virtual machines. The mac address appears to be some sort > > of hash related to the IFNAME. Changing the name changes the mac > > address. > > > > Looking at vxlan_setup this should be random (eth_hw_addr_random) > > but it is not. > > > > Is there a bug here? > > > > Regards, > > Russell Strong > > Please forward questions to netdev@vger.kernel.org. > Do you have weak seeding on your platform? This happens early in boot > process and maybe PRNG is not seeded yet. I have checked the diff of /var/lib/systemd/random-seed. Each machine has a different seed. Plus each machine has been running for a long period of time. They are however, cloned from the same source machine wayback. As an example, if I execute the following commands ip link add v0 type vxlan id 1 I get the mac address 6e:7a:da:1c:12:0c then delete and recreate, ip link del v0 ip link add v0 type vxlan id 1 I get back the same address 6e:7a:da:1c:12:0c I would have expected a different mac as the PRNG should have advanced. Also, if I change v0 to something else, I get a different mac address but the same repeatability.