From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akshat Kakkar Subject: Re: Unable to create ip alias on bridge interface Date: Tue, 29 May 2018 16:11:39 +0530 Message-ID: References: <20180528120540.64qrr3pcylboliew@unicorn.suse.cz> <20180529102954.r7ayncpopip6dcpr@unicorn.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: netdev To: Michal Kubecek Return-path: Received: from mail-pl0-f52.google.com ([209.85.160.52]:37245 "EHLO mail-pl0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932629AbeE2Klk (ORCPT ); Tue, 29 May 2018 06:41:40 -0400 Received: by mail-pl0-f52.google.com with SMTP id w19-v6so8714810plq.4 for ; Tue, 29 May 2018 03:41:40 -0700 (PDT) In-Reply-To: <20180529102954.r7ayncpopip6dcpr@unicorn.suse.cz> Sender: netdev-owner@vger.kernel.org List-ID: Thanks. Thanks a lot for clarifying all this. On Tue, May 29, 2018 at 3:59 PM, Michal Kubecek wrote: > On Tue, May 29, 2018 at 03:39:05PM +0530, Akshat Kakkar wrote: >> For following commands, >> ip addr add 10.10.10.1/24 brd + dev br0 >> ip addr add 10.10.10.2/24 brd + dev br0 >> ip addr add 20.20.20.1/24 brd + dev br0 >> ip addr add 20.20.20.2/24 brd + dev br0 >> >> Both 10.10.10.1 and 20.20.20.1 becomes primary. Which one will be used >> as source IP? >> >> Is it nextHop of route that will decide? > > Unless you have an unusual routing setup, yes. When unsure, you can use > "ip route get ..." which should tell you which route and which source > address will be used. > >> And what about communication in local subnet, say ping to 10.10.10.200 >> and 20.20.20.200? Will source for both will change according to >> destination IP? > > This is the same. Under "normal" circumstances, 10.10.10.1 will be used > for targets from 10.10.10.0/24 and 20.20.20.1 for targets from > 20.20.20.0/24. > > Michal Kubecek