Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to spoof the MAC address in Solaris 10, running in a ESXi VM. The MAC I need is outside the range permitted by vSphere.

So I add an "ether" entry to /etc/hostname.e1000g0 so the file says


ether 1:2:3:4:5:6

and reboot. To my horror, the netmask is now ff000000. It was fffffe00 before. so I add


to /etc/hostname.e1000g0

and reboot. ifconfig -a looks fine at first glance, but can't ping the IP. To my horror, the broadcast address is now, instead of

What can I do to set the MAC addy with config files in Solaris 10? I have tried a rc.local approach using SMF to fire it off. What an absolute pain it is to work with SMF. I'd rather do this using config files. In Windows and Linux I would have done this in 10 seconds - but Solaris has beaten me up badly. Help please.

share|improve this question
try put hostname and ether in one line. The system thinks network is a class A network so that's the mask. You can override this in /etc/netmasks. – inntran Sep 14 '12 at 18:14

I had a look at this in a VM earlier. I noticed that when I had

ether 10:20:30:40:50:60

in /etc/hostname.e1000g0, when the system booted it logged an error for

Sep 15 20:10:46 hostname svc.startd[7]: [ID 748625 daemon.error] network/physical :default misconfigured: transitioned to maintenance (see 'svcs -xv' for details)

Looking at the e1000g0 interface we see

e1000g0: flags=1000843<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
    inet netmask ffffff00 broadcast
    ether 0:c:29:25:22:f8

As you say this looks normal but it's not, it's not UP so it won't respond to pings etc. This would explain your horrors!

To change the mac address you have to put the hostname and ether address on the same line

hostname ether 10:20:30:40:50:60

then after a reboot looking at e1000g0 we see

e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
    inet netmask ffffff00 broadcast
    ether 10:20:30:40:50:60

which is what you want.

share|improve this answer
That worked. All the options one line does this trick. Ok, so does anyone know where this /etc/hostname.{nic} format documented? I have been googling for days. Or perhaps this is just "common knowledge" for Solaris admins.... – Jepper Sep 19 '12 at 14:18
@Jepper: I haven't found it documented anywhere, in fact the only documentation I've found is – Iain Sep 19 '12 at 15:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.