Discussion:
ifconfig & MAC addr?
Steve Tremblett
2002-08-05 19:16:14 UTC
Permalink
Both ethernet interfaces on my Sparc 5 have the same MAC address after
boot. I've been told that I can change the MAC address with "ifconfig
interface ether address" but it doesn't work at all for me, and isn't
documented in the manpg for ifconfig. The source (1.5.3) has no
reference to "ether" as an address family.

Any suggestions?

# ifconfig -a
le0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
address: 08:00:20:72:38:f7
media: Ethernet autoselect (10base5)
status: no carrier
inet 192.168.1.3 netmask 0xffff0000 broadcast 192.168.255.255
le1: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
address: 08:00:20:72:38:f7
media: Ethernet 10baseT
status: active
inet 10.0.0.1 netmask 0xff000000 broadcast 10.255.255.255
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33228
inet 127.0.0.1 netmask 0xff000000

# ifconfig le0 ether 08:00:20:72:38:f8
ifconfig: ether: bad value
# ifconfig le0 ether 0800207238f8
ifconfig: ether: bad value
--
Steve Tremblett
Andrew Gillham
2002-08-05 19:22:10 UTC
Permalink
Post by Steve Tremblett
Both ethernet interfaces on my Sparc 5 have the same MAC address after
boot. I've been told that I can change the MAC address with "ifconfig
interface ether address" but it doesn't work at all for me, and isn't
documented in the manpg for ifconfig. The source (1.5.3) has no
reference to "ether" as an address family.
Any suggestions?
Do you really need them on the same physical segment? Otherwise it doesn't
matter at all.

-Andrew
Steve Tremblett
2002-08-06 01:11:01 UTC
Permalink
+---- Steve Tremblett wrote:
| Both ethernet interfaces on my Sparc 5 have the same MAC address after
| boot. I've been told that I can change the MAC address with "ifconfig
| interface ether address" but it doesn't work at all for me, and isn't
| documented in the manpg for ifconfig. The source (1.5.3) has no
| reference to "ether" as an address family.
|
| Any suggestions?

There was a suggestion to setenv "local-mac-addr" to true in the Sun
boot PROM. This had no effect. I then saw a note stating to keep both
interfaces on separate IP subnets as well as separate physical ethernet
segments. This worked perfectly - thanks all!
--
Steve Tremblett
Chuck Yerkes
2002-08-10 17:14:11 UTC
Permalink
Post by Steve Tremblett
Both ethernet interfaces on my Sparc 5 have the same MAC address after
boot. I've been told that I can change the MAC address with "ifconfig
interface ether address" but it doesn't work at all for me, and isn't
documented in the manpg for ifconfig. The source (1.5.3) has no
reference to "ether" as an address family.
Just to clarify:
Your Sun has a MAC address that all the ethernet devices will use.
Multiple MAC addresses are a side effect of machines that were
made into network workstations after the fact (PCs). They had
no MAC address available (and no boot prom or other useful things),
so vendors had to include a MAC address with the add on card.

The command you site works fine on SunOS and Solaris. It was important
when developing HA software as it let us toss a MAC address between
a pair of machines' 'virtual HA interface'.

AFAIK, that command is Sun unique. You haven't mentioned an
actual problem you are trying to solve, so I'll just presume
it's an intellectual exercise and say, "no, you can't easily
do it in NetBSD" (there was an sea.c program for OpenBSD that
might work - Set Ethernet Address).

Continue reading on narkive:
Loading...