How to fix (new mac adress, ip address, hostname) to a add-on pci NIC card in solairs 10 permanently(even after reboot).

Above question is for solaris 10 only.
I should be able to see the entries with ifconfig -a; arp -an; netstat -nr; /etc/hosts...etc.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Well, it is possible to change a MAC on a NIC but each NIC comes with a MAC so it isn't very common.  To do this persistently, you should be able to specify it in the /etc/hostname.[NIC] file.  This is where you set the IP address as well.

So, this starts by putting an entry into /etc/hosts to map an IP address to the desired hostname for the NIC.  Suppose, for example, you added a NIC to your server and it comes up at bge4.  You want it to be known as myhost-bge4 with an ip address of  You add the following line to /etc/hosts:      myhost-bge4

Next, you want to assign a MAC of 00:25:45:0f:00:01 and make the IP assignment persistent over reboots.  To do this, you create the file /etc/hostname.bge4 and put this line in it:

myhost-bge4 netmask + broadcast + ether 00:25:45:0f:00:01

If you are willing to live with the default MAC on the NIC, the only thing you need in this file is:


If you don't put the /etc/hosts entry in, change myhost-bge4 to the IP address of the NIC ( in the running example).

Finally, if you need a specific netmask or broadcast address, change the + signs in the example to the specific netmask and broadcast addresses required.
or...perhaps you are searching for this?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

rags_cdotAuthor Commented:
Hi turnbuild,

I am not sure of syntax of adding entries to hostname.NIC; Can you point me to a sun solaris doc/resource ?

Meanwhile I am trying out what you have suggested. Until now I was making entries row wise
ether MAC-address
But they are not working. Hope your suggestion works.
I will wait for the link of doc about hostname.NIC     and after that I will give points and close the question.
Sadly,  Sun has never fully documented the possibilities in this file.  

There are a few places to look.  First, for the basic function of the file:

Second, look here in bullet 5. for an example showing more settings possible:

What it turns out is that this file should contain that ifconfig command you would use to configure the NIC without the words ifconfig and inet or the name of the NIC.  So, if you would manually configure your nic like this:

ifconfig bge0 inet myhost-bge0 netmask broadcast ether 00:25:45:0f:00:01

then you could put this into /etc/hostname.bge0 to have that ifconfig command run at boot:

myhost-bge0 netmask broadcast ether 00:25:45:0f:00:01

This should be on one line if you would execute it in one ifconfig statement.

Another example of this can be found in IPMP (IP multi-path) configuration here:  Again, look in bullet #5 to see how the hostname.interface file sould be configured to set up IPMP.  In this case, it is two ifconfig commands so there are two lines.  The first set up the the NIC to belong to a group and the second adds a virtual IP address that is ued to float between two or more NICs in an HA configuration.

The point here is not that you need IPMP but that IPMP is an example of how the contents of hostname.interface can be more than merely the hostname.  From this and from the other link, you can infer that the ether statement on the ifconfig command can be included in your hostname.interface file to make the MAC address change persistent.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rags_cdotAuthor Commented:
How come some NICs (sun antares make) don't have MAC address ? Are they belongs to pre-internet era ?
Can you share if you come across some literature about it! Thanks for your time and patience.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.