public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <ordex@autistici.org>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] MAC address for BAT0 Intefrace
Date: Thu, 28 Mar 2013 14:36:25 +0100	[thread overview]
Message-ID: <20130328133625.GG5152@ritirata.org> (raw)
In-Reply-To: <CAHQ_bgjaBemwFJA4JH2c9+R9MS58BPAFt8z-6fEX5DOciYBsQQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1612 bytes --]

On Tue, Mar 26, 2013 at 02:45:23PM +0530, ajeet singh wrote:
> Hello All,
> 
> I saw in the batman-adv code that random MAC address is being assigned
> to BAT0 Interface.
> I need some clarification regarding this.
> 
> 
> I have tested the following tests,
> Test Scenarios:
>         Batman_Node_ A (192.0.0.1) ----------------------
> Batman_Node_B (192.0.0.2)
> 
> Test 1: First, I used batman code without any change. I used
> eth_hw_addr_random () for BAT0 MAC assignment.
>     Result: I am able to ping from node A to Node B
> 
> 
> Test 2: I commented “eth_hw_addr_random ()” and assigned MAC address
> of primary interface to BAT0 interface at both nodes. Now, we have
> same MAC for primary interface and BAT0 at both nodes.
>      Result: I am able to ping from node A to Node B
> 
> As you guys have assigned the random MAC to BAT0 interface, I wanted
> to know that what would be potential problems if we assign the MAC
> addresses of primary interface to the bat0 interface.

Hello Ajeet,

personally I think that using the primary_if mac address for bat0 might lead to
mac collisions whenever a user removes the primary_if from bat0 and add it to
bat1 (for example). What would you do? whatever your answer is, using a random
mac address is probably the cleanest way to address any possible issue like
that.

Any user which prefer to set a particular address to bat0 can easily change it
using ifconfig or macchanger (no need to change the source code).

Cheers,

-- 
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2013-03-28 13:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-26  9:15 [B.A.T.M.A.N.] MAC address for BAT0 Intefrace ajeet singh
2013-03-28 13:36 ` Antonio Quartulli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130328133625.GG5152@ritirata.org \
    --to=ordex@autistici.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox