1825759 Members
2223 Online
109687 Solutions
New Discussion

Hostname and IP

 
SOLVED
Go to solution
rp3440
Occasional Advisor

Hostname and IP

Hi All,

I am new to HP and know about how to set a new IP and hostname at a server?

Kindly help.
8 REPLIES 8
Asif Sharif
Honored Contributor

Re: Hostname and IP

You can run the command "set_params" to setup hostname and IP address.

#set_parms ip_address
#set_parms hostname

set_parms â set system initial identity parameters: host name, date, time, root password, networking
http://docs.hp.com/en/B2355-60105/set_parms.1M.html

Regards,
Asif Sharif
Regards,
Asif Sharif
rp3440
Occasional Advisor

Re: Hostname and IP

Can we do it without reboot?
Asif Sharif
Honored Contributor
Solution

Re: Hostname and IP

IP-Address

# ifconfig ip-address gw gateway up

http://docs.hp.com/en/B2355-90691/ifconfig.1M.html

To configure and initialize LAN manually, you must edit the /etc/rc/config.d.netconf file.

http://docs.hp.com/en/B2355-90796/ch03s04.html

#hostname [name_of_host]
http://docs.hp.com/en/B2355-90689/hostname.1.html

Regards,
Asif Sharif
Regards,
Asif Sharif
Kenan Erdey
Honored Contributor

Re: Hostname and IP

Hi,

Please note that configuration with ifconfig is not permanent. To keep ip and hostname after reboot, you must edit netconf file.

Kenan.
Computers have lots of memory but no imagination
yunardi
Frequent Advisor

Re: Hostname and IP

Hi,

just simply use :
#set_parms ip_address
#set_parms hostname

It will also automatic update entry in netconf file and /etc/hosts.

If you want to do it manual by using ifconfig you can use (example) :
# ifconfig lan0 10.128.1.200 255.255.255.0 up

And for hostname you can use command:
# hostname myhost

But better edit /etc/rc.config.d/netconf add line below for permanent hostname and ipaddress :
HOSTNAME="myhost"
ROUTE_DESTINATION[0]=default
ROUTE_GATEWAY[0]=10.128.1.1
ROUTE_COUNT[0]=1
IP_ADDRESS[0]=10.128.1.200
SUBNET_MASK[0]=255.255.255.0
INTERFACE_NAME[0]=lan0
BROADCAST_ADDRESS[0]=10.128.1.255
INTERFACE_STATE[0]=up

And after do this, restart network service using:
# inetd -c

It's better run this from console, because sometime missconfiguration make the network can not be startup and your session (ssh/telnet) already disconnected because restarting network.

EKO
dipesh_2
Regular Advisor

Re: Hostname and IP

set_parms_initial will hepl you interactively to set system host name ip address.


Bond
Mohammad Sanaullah
Frequent Advisor

Re: Hostname and IP

Dear

Asif has given you the best option to set the IP and Hostname.

Other option is using SAM (In TUI or GUI)
> Select Networking and Communication
> Select Network Interface Card
> Select the Enabled Lan (Default is Lan0)
> Then Go to the Action Button and Select Modify System Name to Change the Hostname and again go to action and select Modify to Modify the IP address, and Subnet Mask.

Mohammad Sanaullah
Alive
rp3440
Occasional Advisor

Re: Hostname and IP

Thanks every body.