[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Ip address change

Posted on 2004-10-25
8
Medium Priority
?
558 Views
Last Modified: 2013-12-27
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
Comment
Question by:bt74
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 34

Expert Comment

by:PsiCop
ID: 12400671
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
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12402305
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
 
LVL 10

Expert Comment

by:Nukfror
ID: 12402550
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 51

Expert Comment

by:ahoffmann
ID: 12412016
you have to adapt /etc/inet/netmasks (and probably /etc/init.d/ip_aliases)
0
 

Expert Comment

by:RayZilla
ID: 12489338
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
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12490982
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
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12848320
PAQed with no points refunded (of 50)

modulo
Community Support Moderator
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question