1748069 Members
5473 Online
108758 Solutions
New Discussion юеВ

Can't assign IP address

 

Can't assign IP address

Hola,

I'm trying to congigure the IP address to my server, but when i restart the server the IP adrress is set to 0.0.0.0.

Inside the system i restart the net service like this
/sbin/init.d/net stop
/sbin/init.d/net start
and set the IP address like
ifconfig lan0 192.25.10.2
The system don't issue any errors and works well. However i restart the server and again the IP address is 0.0.0.0.
I modified the file /etc/rc.config.d/netconf with the IP before mentioned, restart the server and again the IP is set to 0.0.0.0.

What can i do?



10 REPLIES 10

Re: Can't assign IP address

I forgot it when the server startup at the console display the message:
ifconfig: check plumbing error: Bad file Number

I do the troubleshooting for that error but the fail persists!!

Tks all for your help!
Coolmar
Esteemed Contributor

Re: Can't assign IP address

See if this entry is there in /etc/hosts file

127.0.0.1 localhost loopback
Coolmar
Esteemed Contributor

Re: Can't assign IP address

Also, what does the following show:

# ioscan -funC lan
Coolmar
Esteemed Contributor

Re: Can't assign IP address

Also, what is the output of the following command:

# ioscan -funC lan
siva0123
Trusted Contributor

Re: Can't assign IP address

Hi ,

After restarting the server have u checked the /etc/rc.log , is there any errors logged for /sbin/init.d/net start


In the /etc/rc.config.d directory are the corresponding files for network card types are configured

something like hpbase100conf , hpetherconf files are there to be checked under /etc/rc.config.d

In my system the following configured in the file hpbase100conf

HP_BASE100_INTERFACE_NAME[0]=lan0
# HP_BASE100_STATION_ADDRESS[0]=0XXXXXXX
HP_BASE100_STATION_ADDRESS[0]=
HP_BASE100_SPEED[0]=100FD

thanks,
Siva
Joshua Scott
Honored Contributor

Re: Can't assign IP address

ifconfig only sets the IP address for the current boot. You will need to set the IP address in /etc/rc.config.d/netconf as well, so that it will be set each time the system boots.

The easy way to set the IP address would be to go into SAM and set it:

SAM -> Networking and Communications -> Network Interface Cards
-Select the interface which you would like to change and select 'Configure'

Once you set the Address and exit from SAM, you can view /etc/rc.config.d/netconf to see the changes that have been made.

Here's an example block from a netconf file that sets the IP address:

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=192.25.10.2
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=192.25.10.255
INTERFACE_STATE[0]=up
DHCP_ENABLE[0]=0

You may wish to set the default gateway as well:
ROUTE_DESTINATION[0]=default
ROUTE_GATEWAY[0]=192.25.10.1
ROUTE_COUNT[0]=1


What are the chances...
V. Nyga
Honored Contributor

Re: Can't assign IP address

Hi,

to set ip address you should use
'set_parms ip_address'
This is also used when you install UX for the first time.

See also 'man set_parms'

HTH
Volkmar
*** Say 'Thanks' with Kudos ***

Re: Can't assign IP address

Greetings all.

Ok.
The /etc/hosts its ok.
I put the ip in the /etc/rc.config.d/netconf but when i restart the server again doesn't keeps the configuration and the ip address is 0.0.0.0

What can i do?
James R. Ferguson
Acclaimed Contributor

Re: Can't assign IP address

Hi Alberto:

OK, so you editted '/etc/rc.config.d/netconf'. You may be over-writing the correct hostname if you have an improperly named file in the '/etc/rc.config.d/' directory.

It *is* allowed to have backup files in '/etc/rc.config.d/' as long as their basename contains any one of the characters:

.,~#

...as an extension of the file's basename.

Files with these extensions are *skipped*. Thus, you could have a current 'netconf' and a backup one named:

netconf
netconf.old

...BUT you should *NOT* have something like:

netconf
oldnetconf

...because, in that case, 'netconf' would be sourced first, followed by 'oldnetconf' causing the variables in 'oldnetconf' to overwrite those already set in the environment when 'netconf' was sourced.

Regards!

...JRF...