[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 564
  • Last Modified:

Ip address change

Hi

I am having a Solaris box 2.5.1 and i need to change the ip address.

i have done it by ifconfig command.

ifconfig le0 inet 111.111.0.2 netmask 255.255.255.224 broadcast 111.111.0.31

also i made changes in the following files also.

/etc/hosts

111.111.0.2 hostname

/etc/netmasks

111.111.0.0  255.255.255.224

also i have the gateway entry.

route add default 111.111.0.1 1

---------------------------------------------------

the pblm is when am rebooting my server, my broadcast address is not setting properly. due to this from some of my local networks, they r unable to reach my server....
after rebooting my broadcast addrees is setting to 111.255.255.255 instted of 111.111.0.31
where is the pblm..???
my mask is showing ff000000 ( is this equals to == 255.255.255.224 )
this is my interface output.
 
$ ifconfig le0
le0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500
        inet 111.111.0.2 netmask ff000000 broadcast 111.255.255.255

i need the output like this..

le0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500
        inet 111.111.0.2 netmask 255.255.255.224 broadcast 111.111.0.31


where am making the mistakes..???

regards
0
bt74
Asked:
bt74
1 Solution
 
PsiCopCommented:
You need to change /etc/hostname.le0

You should put the "hostname" in that file (I'm assuming the hostname also changed).

You can also try using the sys-unconfig script.
0
 
wesly_chenCommented:
Hi,

    ff000000 is 255.0.0.0, not 255.255.255.224. It is standard Class A netmask.

   As my experience, Solaris 2.5.1 (which is not supported by Sun anymore) has problem to set the netmask which is not standard Class A, B, C. In other words, /etc/netmasks might not work for 255.255.255.224.

   Since your IP address 111.*.*.* is in the Class A range, so your netmask is set to 255.0.0.0.

   The other workaround is adding one line in /etc/rc2
"ifconfig le0 down; ifconfig le0 111.111.0.2 netmask 255.255.255.224 up"

PsiCop, the question is "change IP", not hostname. Besides, there are 6 files need to be changed for hostname change for Solaris.

Regards,

Wesly
0
 
NukfrorCommented:
From what I remember about older Solaris revs, you had to be pretty verbose in /etc/netmasks.  So something like this:

111.0.0.0  255.255.255.0
111.111.0.0 255.255.255.224

I can't remember exactly but you have to put more in /etc/netmasks then what you would think you would really need to.
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
ahoffmannCommented:
you have to adapt /etc/inet/netmasks (and probably /etc/init.d/ip_aliases)
0
 
RayZillaCommented:
The best way to deal with this is :

at the root prompt # type sys-unconfig

this will allow you to reconfigure all network settings in a question / answer fashion.

Don't be scared about the warning though ( Below) it only refers to the network settings beeing cleared to
allow you to change them.

"This program will unconfigure your system. It will cause it
to revert to a "blank" system - it will not have a name or know
about other systems or networks "



Regards

Ray
0
 
wesly_chenCommented:
Hi,

> ifconfig le0 inet 111.111.0.2 netmask 255.255.255.224 broadcast 111.111.0.31
How about put
---------
/etc/hosts
111.111.0.34  hostname

/etc/netmasks
111.111.0.32    255.255.255.224
-------
Back to my CCNA study material, for variable length subnet, the first and the last subnet are not the valid subnet.
So 111.111.0.1 to 111.111.0.31 are not valid.

Wesly
0
 
moduloCommented:
PAQed with no points refunded (of 50)

modulo
Community Support Moderator
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now