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.
rags_cdotAsked:
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.

turnbulldCommented:
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 192.168.7.45.  You add the following line to /etc/hosts:

192.168.7.45      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:

myhost-bge4

If you don't put the /etc/hosts entry in, change myhost-bge4 to the IP address of the NIC (192.168.7.45 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.
0
RowleyCommented:
or...perhaps you are searching for this?
0
RowleyCommented:
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy 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
like
ether MAC-address
hostname
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.
0
turnbulldCommented:
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: http://docs.sun.com/app/docs/doc/816-4554/ipconfig-13?l=en&a=view&q=hostname.

Second, look here in bullet 5. for an example showing more settings possible: http://docs.sun.com/app/docs/doc/816-4554/gbwxb?l=en&a=view&q=hostname.

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 255.255.255.0 broadcast 192.168.7.255 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 255.255.255.0 broadcast 192.168.7.255 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: http://docs.sun.com/source/817-5625-10/Solaris_x86_IPMP.html#82272.  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.
0

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.
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.