LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 03-10-2006, 10:22 AM   #1
flowerman
Member
 
Registered: Sep 2005
Location: Tripoli/Libya
Distribution: Solaris
Posts: 73

Rep: Reputation: 15
configuring new IP


please can any one help me with this I have S OS 5.10 and i have been changed my IP by #ifconfig command and editing /etc/hosts but when I reboot the machine it takes the old one I think there is anotther file need to edit but I forget it bc I did it before and it's work so any one one can remind me by the right way
 
Old 03-10-2006, 12:02 PM   #2
AbrahamJose
Member
 
Registered: Feb 2006
Location: India
Posts: 167

Rep: Reputation: 31
check files

find /etc -name hosts -print

Check the listed files
 
Old 03-10-2006, 12:06 PM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
running "sys-unconfig" is the supported way.

Otherwise, look for /etc/hostname.*, /etc/hosts, /etc/inet/ipnodes and /etc/nodename

That may depend on the name service you choosed too.

Last edited by jlliagre; 03-10-2006 at 12:08 PM.
 
Old 03-12-2006, 03:17 PM   #4
javier.e.menendez
Member
 
Registered: Jan 2006
Posts: 168

Rep: Reputation: 30
jallegre is right.

You probably forgot to change the /etc/inet/ipnodes. In solaris 10, it takes precedence over /etc/inet/hosts regardless if you use ipv6.
 
Old 03-12-2006, 09:50 PM   #5
lennoguard
LQ Newbie
 
Registered: Feb 2006
Posts: 29

Rep: Reputation: 15
One more question: how to set DNS server to connect to the internet, now i can't ping www.yahoo.com or other websites
 
Old 03-13-2006, 01:13 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Either by telling the Solaris installer or directly with two files:

/etc/resolv.conf:
nameserver 123.45.67.89

/etc/nsswitch.conf:
hosts files dns
 
Old 03-13-2006, 02:39 AM   #7
lennoguard
LQ Newbie
 
Registered: Feb 2006
Posts: 29

Rep: Reputation: 15
sorry, but no file names resolv.conf in /etc
 
Old 03-13-2006, 02:54 AM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
What about creating it ?
 
Old 03-13-2006, 03:54 AM   #9
lennoguard
LQ Newbie
 
Registered: Feb 2006
Posts: 29

Rep: Reputation: 15
I created file /etc/resolv.conf like this:
Code:
execve("/usr/bin/cat", 0xEFFFF740, 0xEFFFF74C) argc = 2
open("/dev/zero", O_RDONLY) = 3
mmap(0x00000000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0xEF7B0000
open("/usr/lib/libc.so.1", O_RDONLY) = 4
fstat(4, 0xEFFFF2DC) = 0
mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0xEF7A0000
mmap(0x00000000, 704512, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) =
0xEF680000
munmap(0xEF714000, 57344)
= 0
mmap(0xEF722000, 28368, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|
MAP_FIXED, 4, 598016) = 0xEF722000
mmap(0xEF72A000, 2528, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|
MAP_FIXED, 3, 0) = 0xEF72A000
close(4) = 0
open("/usr/lib/libdl.so.1", O_RDONLY) = 4
fstat(4, 0xEFFFF2DC) = 0
mmap(0xEF7A0000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|
MAP_FIXED, 4, 0) = 0xEF7A0000
close(4) = 0
open("/usr/platform/SUNW,Ultra-2/lib/libc_psr.so.1", O_RDONLY) = 4
fstat(4, 0xEFFFF0BC) = 0
mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0xEF790000
mmap(0x00000000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) =
0xEF780000
close(4) = 0
close(3) = 0
munmap(0xEF790000, 8192) = 0
fstat64(1, 0xEFFFF648) = 0
open64("resolv.conf", O_RDONLY) = 3
fstat64(3, 0xEFFFF5B0) = 0
llseek(3, 0, SEEK_CUR) = 0
mmap64(0x00000000, 98, PROT_READ, MAP_SHARED, 3, 0) = 0xEF790000
read(3, " d", 1) = 1
memcntl(0xEF790000, 98, MC_ADVISE, 0x0002, 0, 0) = 0
domain paulwatters.com
nameserver 192.168.40.2
nameserver 58.187.7.111
nameserver 58.187.7.111
write(1, " d o m a i n p a u l w a t t e r s .".., 98) = 98
llseek(3, 98, SEEK_SET) = 98
munmap(0xEF790000, 98) = 0
llseek(3, 0, SEEK_CUR) = 98
close(3) = 0
close(1) = 0
llseek(0, 0, SEEK_CUR) = 57655
_exit(0)
is this right?

Last edited by lennoguard; 03-13-2006 at 04:06 AM.
 
Old 03-13-2006, 04:34 AM   #10
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
/etc/resolv.conf should only contain ip addresses of your nameservers e.g.
Code:
nameserver 192.168.2.100
nameserver 192.168.1.100
search somedomain.com
 
Old 03-13-2006, 05:10 AM   #11
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Why did you send a truss output ???

anyway your resolv.conf file looks ok:

Code:
domain paulwatters.com
nameserver 192.168.40.2
nameserver 58.187.7.111
nameserver 58.187.7.111

Last edited by jlliagre; 03-13-2006 at 05:13 AM.
 
Old 03-14-2006, 10:40 AM   #12
flowerman
Member
 
Registered: Sep 2005
Location: Tripoli/Libya
Distribution: Solaris
Posts: 73

Original Poster
Rep: Reputation: 15
yes i found it /etc/ipnodesthatis it thx every one for fast replying
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
configuring X johnvillegas Slackware 15 03-10-2006 12:28 AM
Configuring g++ or ld? zhangmaike Programming 12 12-16-2004 03:42 PM
configuring sunil_lc Linux - Networking 2 10-28-2003 12:30 PM
configuring X evian Linux - Distributions 7 07-05-2003 06:29 PM
configuring x topho_man Linux - Newbie 2 11-26-2002 02:26 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 02:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration