Help needed on changing IP address

Help needed on changing IP address

Post by Edwin de Vaa » Thu, 31 May 2001 21:09:15



Hi,

I have to change the IP address of a SUN 5500 system here at the office.
Although I'm totally unexperienced with Solaris, I was asked to advice on
this matter, since the network has to be renumbered. What files should I
review and what settings should I change? Or is the only step to (first
plump hme0 and then) add a second logical interface to the physical network
interface? Please help me....

Regards,
Edwin de Vaan
The Netherlands

 
 
 

Help needed on changing IP address

Post by WhoKnow » Thu, 31 May 2001 21:43:45


Before a reboot:
change the IP in the /etc/hosts file for the hostname(s) named in
/etc/hostname.hmex, where x is a number.

Then reboot

Without reboot:

- Change also the IP in the /etc/hosts described above.
- Bring down the network interface
  ifconfig <interface> down
- Change IP
  ifconfig <interface> inet <ip-address>
- Bring up interface
  ifconfig <interface> up

Beware of the router settings in /etc/defaultrouter if present.

Leo

 
 
 

Help needed on changing IP address

Post by Gizm » Thu, 31 May 2001 23:09:35


alternatively you can use the command /usr/sbin/sys-unconfig to reconfig the
box.


Quote:> Before a reboot:
> change the IP in the /etc/hosts file for the hostname(s) named in
> /etc/hostname.hmex, where x is a number.

> Then reboot

> Without reboot:

> - Change also the IP in the /etc/hosts described above.
> - Bring down the network interface
>   ifconfig <interface> down
> - Change IP
>   ifconfig <interface> inet <ip-address>
> - Bring up interface
>   ifconfig <interface> up

> Beware of the router settings in /etc/defaultrouter if present.

> Leo

 
 
 

Help needed on changing IP address

Post by DHobb » Thu, 31 May 2001 23:09:52



> Hi,

> I have to change the IP address of a SUN 5500 system here at the office.
> Although I'm totally unexperienced with Solaris, I was asked to advice on
> this matter, since the network has to be renumbered. What files should I
> review and what settings should I change? Or is the only step to (first
> plump hme0 and then) add a second logical interface to the physical network
> interface? Please help me....

ifconfig hme0 down
ifconfig hme0 <newipaddress>
ifconfig hme0 up

if you are using non-standard subnetmasks, you have to put them into the
second command.  Also check

/etc/hosts
/etc/networks
/etc/hostname.hme0
/etc/netmasks
/etc/defaultrouter

Netmasks and networks are basically only if you're dealing with
non-standard subnet masks.  For instance, we chopped a 10.x.x.x network
into four class C subnets.  Make sure the files stay the same as they
are right now with only the old information changed out for the new, do
not change the style or the ordering of the information.

Dan

 
 
 

Help needed on changing IP address

Post by Mathew Kirsc » Fri, 01 Jun 2001 05:13:07



> I have to change the IP address of a SUN 5500 system here at the office.
> Although I'm totally unexperienced with Solaris, I was asked to advice on
> this matter, since the network has to be renumbered. What files should I
> review and what settings should I change? Or is the only step to (first
> plump hme0 and then) add a second logical interface to the physical network
> interface? Please help me....

All you should have to do is change the IP address in /etc/hosts, and possibly
the default router in /etc/defaultrouter, then reboot. This is the simplest
way, without having to know lots of UNIX commands.
 
 
 

Help needed on changing IP address

Post by Mathew Kirsc » Fri, 01 Jun 2001 05:15:58



> alternatively you can use the command /usr/sbin/sys-unconfig to reconfig the
> box.

Be warned that the sys-unconfig method for changing the IP address of your
system is like pounding carpet tacks with a sledgehammer.

sys-unconfig completely unconfigures the networking on your computer, so
things you expect to work might not work without some tweaking after the
reconfiguration, like NIS, NIS+, DNS... (no default router)

 
 
 

Help needed on changing IP address

Post by Reinier Po » Fri, 01 Jun 2001 20:16:43



>All you should have to do is change the IP address in /etc/hosts, and possibly
>the default router in /etc/defaultrouter, then reboot. This is the simplest
>way, without having to know lots of UNIX commands.

Change /etc/net/*/hosts as well and yuou won't even have to reboot.

--
Reinier

 
 
 

Help needed on changing IP address

Post by Reinier Po » Fri, 01 Jun 2001 20:16:56



>All you should have to do is change the IP address in /etc/hosts, and possibly
>the default router in /etc/defaultrouter, then reboot. This is the simplest
>way, without having to know lots of UNIX commands.

Change /etc/net/*/hosts as well and you won't even have to reboot.

--
Reinier