public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] MAC address for BAT0 Intefrace
@ 2013-03-26  9:15 ajeet singh
  2013-03-28 13:36 ` Antonio Quartulli
  0 siblings, 1 reply; 2+ messages in thread
From: ajeet singh @ 2013-03-26  9:15 UTC (permalink / raw)
  To: b.a.t.m.a.n

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.


Thanks in advance.

Thanks
Ajeet

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [B.A.T.M.A.N.] MAC address for BAT0 Intefrace
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Antonio Quartulli @ 2013-03-28 13:36 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-28 13:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox