Link to home
Start Free TrialLog in
Avatar of rags_cdot
rags_cdot

asked on

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.
Avatar of turnbulld
turnbulld

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.
or...perhaps you are searching for this?
Avatar of rags_cdot

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of turnbulld
turnbulld

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.