Tuesday, July 3, 2012

ifconfig -a--->after reboot interface is lost

When buiding a solaris box, after reboot the nic interface is lost ifconfig -a. 

Any idea why and how this can be resolved?

Please check your configuration in /etc/hostname.<ifname>, eg if hme0 
isn't restored, then check /etc/hostname.hme0. 

create the file? /etc/hostname.interface 

Use ifconfig to know interface 

e.g touch /etc/hostnme.qfe0 ----content is ip addr
I hope you set path to /usr/sbin 
or you can try /usr/sbin/ifconfig -a 

I assume that you use the correct command but it return no infomation. 
First, you should check and find the /etc/hostname.<nic name>. 
Use the simple comman: ls -l /etc/host* 
If there is /etc/hostname.<nic name>. 
(nic name is a network interface card's pseudo name). 
You may have to check that the /etc/hostname.<nic name> has the current host name in it. Type "cat /etc/hostname.<nic name> ". If it is incorrect host name you can change it to the correct hostname and reboot the machine. I think the problem is going to fixed. 

If it is not a problem of /etc/hostname.<nic name>, There are two solutions: 
1) as root, Check whether your system can reach to the network card. 
Type the following command 
# prtdiag -v | grep network 
If it find your network it will display the network information. Something like (for example): 

I/O PCI 9 B 6 33 33 2,0 ok network-pci100b,35.30 SUNW,pci-ce 

The last word has the name of you network interface. In this case, it is "CE0".(CE zero be default). 
So, you should find the file hostname.ce0 in the /etc, too. If it is not named in a correct nic name. Delete this file then : 
1.1 type the following command: 

# devfsadm -C 
1.2 check for the /etc/hostname.<nic name> and check it contain. 
If you get the correct /etc/hostname.<nic name> after the above process you can check the ifconfig -a. 

2) If 1 not works. 
2.1 create a /reconfigure file 
and reboot the system with boot -r option. 
Check your nic by step 1.1 and 1.2 . You should get the correct nic. 


Post a Comment

Design by BABU | Dedicated to grandfather | welcome to BABU-UNIX-FORUM