Link to home
Start Free TrialLog in
Avatar of mkunesh
mkunesh

asked on

Change the IP on a unix server

I need to change the IP on a unix box and I don't know the command or syntax to do this.  I am an Apple shop sys admin with a very very old unix server for some rare operations.  On a Mac, networksetup command will do this.  What is the Unix varient?
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Which UNIX do you use?
uname -a
will tell you.
wmp
Avatar of mkunesh
mkunesh

ASKER

Output from uname -a:

HP-UX  B.11.11 U 9000/800 2363024365 unlimited-user license
Which UNIX are you using (Solaris, HP-UX, AIX, XENIX, BSD, IRX, ...)?  They all tend to have their own idiosyncrasies. Look up the syntax for the ifconfig command for your version of UNIX.
In HP-UX  the easiest way is most probably SAM -
sam -> networking and communications --> network interface cards --> ...
You should work on the system console to do this, else you will loose the connection to your server.
wmp

 
ifconfig does only temporary changes ...
Run the following command to see the existing config.

ifconfig

Then you can change the ip with the following command substituting the interface and address_family info from the previous command and adding the new ip address you want.

ifconfig interface [address_family] [address [dest_address]] [parameters]

It may be easier to just edit /etc/rc.config.d/netconf changing the ip info and rebooting the machine.
ASKER CERTIFIED SOLUTION
Avatar of ReN501
ReN501
Flag of Australia image

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
sorry ,  extra info re0 in the above example is your network card , the command ifconfig will give you the info for your currently installed card , then just adjust to match.
The ifconfig command with "-p" flag usually changes the IP address permanently with the 'p' flag for persistent.
Avatar of mkunesh

ASKER

Thanks!