SUMMARY macaddr

From: Tom Trainor (tjtraino@to.mobil.com)
Date: Thu Oct 24 1996 - 13:33:41 CDT


Managers:

I composed the question, went to lunch, came back and was flooed with answers
to my question. I've only used this list a few times and am always astounded
at the depth and breadth of knowledge and the speed at which people reply.

thanks to:

Mark C. Henderson
Gerald Combs
Reto Lichtensteiger
Shane Bouslough
Frank Pardo
Michael Blandford
James.E.Coby.Jr
Ken Picard
Micky Liu
Don Catey
Alex Finkel
Kevin Woods
Andrew Ho
Rafael Napoles Rodriguez
Andy Mitchell
Jack Goldsmith
Val Popa

And the winners are: (original question included only where answers were
embedded in with the questions)...

On Oct 24, 10:22, Tom Trainor wrote:
> Subject: Macaddr
> Managers:
>
> is it possible to have two network interface cards (le0 and le1) have the
same
> mac address? If I do ifconfig le0 and ifconfig le1 I get the same address for
> both. And if this is possible:
Yes. This is the way Sun traditionally does things. The MAC address for
all interfaces comes from the NVRAM (just as the hostid)

> a) what are the possible effects?
It doesn't matter unless both interfaces are on the same network. As long
as they have a router between them, it doesn't matter if they have the same
MAC address.

> b) should I change?
Only if you need to.

> c) if I do change how do i do it? (and is a reboot necessary?)
ifconfig le1 ether 08:00:20:c0:ff:ee

will change the ethernet address of le1 until the next reboot. No
reboot necessary, although doing this on the fly may confuse some
devices connected to the machine using that interface as they expect
that MAC address for a given IP address to remain static. With most
things this will have no effect or cause the loss of network
connectivity for a minute or so.

If you want the change to persist over reboots you'll need to make the
appropriate change to the system startup files.

--------------------------------------------------------------------------
  Ethernet devices by default get their MAC address from a PROM on the
motherboard. This isn't a problem unless you have both interfaces plugged
into the same subnet. You can change the MAC address with ifconfig, e.g.:

        ifconfig le1 ether 8:0:20:0:1:2

  I don't know if you need to reboot.

  These are the reasons I can think of for changing your MAC address;
there are probably more:

  - To avoid addressing conflicts on a particular subnet (the reason
    I do it)
  - Easily recognizable addresses for sniffing/troubleshooting
  - Network management (DHCP or VLAN configuration)

---------------------------------------------------------------------------
Tom Trainor wrote:

<> is it possible to have two network interface cards (le0 and le1) have
<> the same mac address?

It is if they're Sun NICs ...

<> If I do ifconfig le0 and ifconfig le1 I get the
<> same address for both.

Yup, thy're Sun NICs ... <g>

<> And if this is possible:
<>
<> a) what are the possible effects?
<> b) should I change?
<> c) if I do change how do i do it? (and is a reboot necessary?)

a) No ill effects, assuming the two interfaces are on different nets
b) You +can't+ change it
c) See b) :-)

Sun builds the MAC address from the Sun reserved prefix and the box'
serial number, rather than hardcoding it into the interface. Violates
the restriction on ethernet MACs being globally unique, but doesn't have
a real impact as it is still +host+ unique ...
---------------------------------------------------------------------------
Here is a quote from the Sun Managers FAQ:

  Subject: 12.1) Why do both my net interfaces have the same ethernet
address?

  The Ethernet version 2.0 specification (November 1982) states:

          The physical address of each station is set by network
          management to a unique value associated with the station,
          and distinct from the address of any other station on any
          Ethernet. The setting of the station's physical address
          by network management allows multiple multiple data link
          controllers connected to a single station to respond to
          the same physical address.

  This doesn't normally constitute a problem because each interface will
  typically be on a different subnet. If, for some reason, different
  ethernet addresses are required on different interfaces (for example, to
  attach two interfaces to the same subnet), a new one may be assigned
  using the ifconfig command.
---------------------------------------------------------------------------
> is it possible to have two network interface cards (le0 and le1) have the
same
> mac address? If I do ifconfig le0 and ifconfig le1 I get the same address for
> both. And if this is possible:

Yes. That is Sun's default. They assume you have the two cards on
different networks and won't mind them both having the same MAC address.
See item 12.1 in the FAQ that you received on or about October 17.

>
> a) what are the possible effects?

No effect if the cards are on different networks.

> b) should I change?

Only if you want to put both interfaces onto the same network.

> c) if I do change how do i do it? (and is a reboot necessary?)

Here's the example from the ifconfig man page (Solaris 2.4):

        example% ifconfig le0 ether aa:1:2:3:4:5

>
> .....and anything else you can think of on this subject......thanks a million

The only time I ever had to fiddle with MAC addresses was when checking
out a new firewall machine. Temporarily, both of its interfaces were on
a single network, so I had to make them different this way. Otherwise,
both interfaces respond... EG, a "ping" to either hostname would get two
#0 replies, two #1, and so forth.
---------------------------------------------------------------------------
> is it possible to have two network interface cards (le0 and le1) have the
same
> mac address? If I do ifconfig le0 and ifconfig le1 I get the same address for
> both. And if this is possible:

This is correct.

> a) what are the possible effects?

1) sun doesnt support multiple interfaces on the same network.
2) MAC addresses only have to be unique in the subnet

Net result: No problem.

> b) should I change?

No, why waste addresses?

> c) if I do change how do i do it? (and is a reboot necessary?)

man ifconfig

---------------------------------------------------------------------------
Hi Tom,

   Take a look at this URL I am sure there are others:

http://www.cdc.com/support

      go to websolver
      go to sun faq from usenet

      Look at sun-managers-faq question 12

---------------------------------------------------------------------------
Its Ok if they are on different networks. If they are on the same
network, then you must change the Mac address of one of them
(using ifconfig). We do this for our HA pairs here.
---------------------------------------------------------------------------
Yes, it is possible to do that via the ifconfig program. Be careful,
however, if you are using switches or anything else that wants to
route traffic via the mac address. We had an ATM backbone with
several virtual lans that gave up the ghost because we had devices
with the same mac address within our atm network -- it used to work
fine with our router based network...
---------------------------------------------------------------------------
The way Sun works it, each MACHINE is given an ethernet address, and any
ethernet ports added to the MACHINE will have the same MAC addr. Because
of this, each port must be hooked up to separate physical and logical
sub-nets, or else it gets really ugly (been there, done that). One
unsupported workaround that Sun told me, though, was to create a false
ethernet addr and assign it to le1 using the ifconfig command, but I didn't
try it.
---------------------------------------------------------------------------
If the interface cards are on different subnets, there is no need to change
the Mac addresses as they will be unique on each subnet. This is actually
part of the TCP/IP standard and so this is proper behavior.
---------------------------------------------------------------------------
// Managers:
//
// is it possible to have two network interface cards (le0 and le1) have the sa
// me
// mac address? If I do ifconfig le0 and ifconfig le1 I get the same address fo
// r
// both. And if this is possible:

This is the standard set by the IEEE (I beleive). Either way it is a
"standard".

// a) what are the possible effects?

None as two interfaces are _supposed_ to be on different networks or
subnets in which the "duplicate" MAC address will never be seen.

// b) should I change?

No. Not unless you are trying to setup two interfaces on the same net.

// c) if I do change how do i do it? (and is a reboot necessary?)

You would use ifconfig as in:

    prompt# ifconfig leN ether 8:0:20:XX:XX:XX [ ... ]

// .....and anything else you can think of on this subject......thanks a millio
// n

Hope this helps...
---------------------------------------------------------------------------
No. Every interface card comes with a different mac address, set by
hardware. In fact, if you look at the bit number 2-24, you can tell who
manufactured it. If it was changeable, we would have some interesting
situations on our hands. Imagine a person setting his/her mac and ip
addreess to the same as you mail server or file server. I think the
O'Reilly crab book has some useful info on it

-----------------------------------------------------------------
        Each network card has a unique MAC address and cann't setup its.
With the command ifconfig you configure parameters like IP address,
status, etc.
---------------------------------------------------------------------------
        If I'm not mistaken, no two ethernet cards can have the same
ethernet (MAC) address. MAC addresses are, by design, unique. From you
statement "ifconfig le0 and ifconfig le1 I get the same address.." I get
the feeling you might be confusing MAC and IP addresses (if not then
forgive me as I do not understand your question). As far as I know,
ifconfig does not tell you the ethernet address of the interface, only
the IP address (and some other goop). If your question is, "Can I assign
the same IP to two different ethernet addresses?" then I would GUESS (and
this is only a guess - you will probably get some more definitive
answers from the net) that you can though offhand I can't think of why
you want to do this. Then again, I'm not very imaginative sometimes. ;-)
---------------------------------------------------------------------------
Sollution: SUN does not support multiple interfaces on the same network.
However, I found a workaround ;I configured the second IP address/hostname on
the same NIC thus enableing dual addressing of the same machine.
Thanks everybody for their wisdom.

-- 

Tom Trainor Email: tjtraino@to.mobil.com Mobil Oil Corp. Phone: 703-846-3924 3225 Gallows rd / Rm 2B-308 Fax: 703-846-1460 Fairfax Va. 22037-0001



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:13 CDT