LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   How to change IP in Solaris? (https://www.linuxquestions.org/questions/solaris-opensolaris-20/how-to-change-ip-in-solaris-485717/)

LAN-Dominator.nl 09-21-2006 01:45 PM

How to change IP in Solaris?
 
Ok since i restarted working with Sun Solaris, i just forgot how solaris works...

Can anybody tell me how i can change my Solaris IP adress into the LAN-adress.

oh and i'm new here!!

jlliagre 09-21-2006 01:52 PM

127.0.0.1 is the loopback interface (lo0), you shouldn't change it.

What return these commands ?
Code:

ifconfig -a plumb
ifconfig -a


LAN-Dominator.nl 09-21-2006 03:06 PM

i'm working with a KVM-Switch and i put my messages with my Windows pc on the web (yes unfortunally i use windows).

so typing the codes from screen on screen will be a lotta work...

jlliagre 09-22-2006 07:52 AM

You do not need to post the whole answer.

The first command is creating interfaces for all NICs recognized by the drivers.

The second one is showing the configuration of each interface present, at least lo0 which is always there.

Just tell me if you have more than what interface returned, and what is its name.

mdhmi 09-22-2006 09:59 AM

Here are a few files worth checking:

/etc/hosts
/etc/resolv.conf
/etc/defaultroute

/etc/hostname.*

LAN-Dominator.nl 09-26-2006 12:36 PM

i got the main message edited!

jlliagre 09-26-2006 02:37 PM

Quote:

Originally Posted by LAN-Dominator.nl
i got the main message edited!

You'd rather answer in the flow of the thread, that's simpler to follow for readers.

Anyway, your interface name is rtls0, meaning you have a realtek chip based NIC.

First add an entry for your machine in /etc/hosts, eg.
Code:

192.168.2.10 lan-dominator-pc
Then create a file named "/etc/hostname.rtls0" and simply put either the wanted IP there or your machine hostname. That will make this address persist across reboots.

Finally, set the address with this command:
Code:

ifconfig rtls0 192.168.2.10 up
You may also need to know how to setup the dns and routing.
Just search defaultrouter and nsswitch.conf in this forum.
I'm sure I already explained that a half a dozen times, and other before me.

LAN-Dominator.nl 09-30-2006 03:50 AM

ehm my lan has ip range 192.168.2.100 not 10 (my modem is a router to)

jlliagre 09-30-2006 05:01 AM

Quote:

Originally Posted by LAN-Dominator.nl
ehm my lan has ip range 192.168.2.100

That's not a range but a single address
Quote:

not 10
How would I guess, you wrote 192.168.2.xxx in your first question.
As stated, 192.168.2.10 was an example of setting, not necessarily yours.
Quote:

(my modem is a router to)
That's fine.

LAN-Dominator.nl 09-30-2006 06:06 AM

8-( i don't have the file "defaultroute"

Can i create it and/or what should be written?

jlliagre 09-30-2006 07:31 AM

Quote:

Originally Posted by LAN-Dominator.nl
8-( i don't have the file "defaultroute"

Nobody has one, there is no such file.

I believe mdhmi was thinking about /etc/defaultrouter.

Quote:

Can i create it and/or what should be written?
You certainly can create this file, and just put your default router IP inside.

"man defaultrouter" if you are unsure.

LAN-Dominator.nl 10-01-2006 04:00 AM

ok can you give me a website or full mail with all the things i should do to make a full internet connection.

Like the mods towards adress, subnet, router, etc..

greetz

jlliagre 10-01-2006 05:07 AM

All you need is an IP connection to your Router (I belive you have it now), defaultroute set (please tell what you do not understand if needed), and DNS enabled and set.

/etc/nsswitch.conf must contain this line:
hosts files dns

/etc/resolv.conf must contain at least this line
nameserver a.b.c.d

where a.b.c.d is the IP address of your DNS server (usually the one your ISP is telling you).

Alternatively, you can use DHCP and all this should be set automatically with recent Solaris releases.

LAN-Dominator.nl 01-01-2007 12:53 PM

How do i configure my DHCP??

jlliagre 01-01-2007 12:57 PM

Is there a DHCP server already configured on your network ?

LAN-Dominator.nl 01-01-2007 01:11 PM

No, i didn't installed/configured it on the os-installation.

i still need to add it.. it's the same ip as my router i gues... but don't know how to add it into solaris..

jlliagre 01-01-2007 02:05 PM

You are misunderstanding my question.

For DHCP to work, there must be some device or server that provides IP addresses to its DHCP client. Usually, a router is the DHCP server, at least on home and other small networks.

LAN-Dominator.nl 01-02-2007 03:00 AM

i have a router yes... that would be my DHCP-server

jlliagre 01-02-2007 03:46 AM

The simplest way would be for you to run /usr/sbin/sys-unconfig and provide suitable answers when the system reboots.

Run "man sys-unconfig" for details.

LAN-Dominator.nl 01-02-2007 05:28 AM

while reconfiguring the system, the message appears that Solaris can't find the DHCP Server and must be added Manually... How do i do that?

jlliagre 01-02-2007 07:53 AM

Is your router actually configured to supply IP addresses with DHCP ?

LAN-Dominator.nl 01-02-2007 08:29 AM

*deleted, watch new post*

LAN-Dominator.nl 01-03-2007 06:18 AM

*deleted, watch new post*

LAN-Dominator.nl 01-05-2007 01:30 PM

THis happend:
I clicked on "Shut Down Computer", but it returned on the LogIn screen.
And because i didn't had time, i just switch off the Power...

Now, when i started my SolarisPC, it just doesn't wants to go on the internet.

All Confirgurations are still there, no changes are made (RTLS0, DHCP, Router, Subnetmask)..
I logged into my router, but everything was the same...
But just no internet....

Screenshots:
http://files.myopera.com/Armanius/pi...e-terminal.png
http://files.myopera.com/Armanius/pics/Screenshot.png
http://files.myopera.com/Armanius/pics/Screenshot-1.png

jlliagre 01-05-2007 02:08 PM

Looks like the routing settings have been lost.

Have a look at /etc/resolv.conf and /etc/nsswitch.conf

LAN-Dominator.nl 01-05-2007 02:39 PM

resolv.conf data: nameserver 192.168.2.1

nsswitch.conf data: it points towards: /dev/oss/softoss0/mix0

Huh?

jlliagre 01-05-2007 03:04 PM

Quote:

Originally Posted by LAN-Dominator.nl
nsswitch.conf data: it points towards: /dev/oss/softoss0/mix0

Huh?

Ouch !

You mean nswwitch.conf is now a symbolic link ?

LAN-Dominator.nl 01-06-2007 11:38 AM

well yeah, the link is the only thing that is in the file...

jlliagre 01-06-2007 02:55 PM

What do you mean "in the file" ?

Can you post the result of these commands:

Code:

ls -l /etc/nsswitch.conf
cat /etc/nsswitch.conf


LAN-Dominator.nl 01-06-2007 06:31 PM

well it's all running again... (juts re-installed my solaris)... my whole network died..

i'm going to back up my Configuration-files!

gavin watson 02-03-2008 10:34 AM

hi, sorry to bump this post, but im having terrible problems trying to get onto the internet on my first install of solaris and am requesting kind help from someone more specialised than me!

this is what i have:

- a new clean install of Solaris 10
- a router for the internet on IP '172.26.0.1' (which works fine, as i have other machines running windows connected fine)
- for arguements sake, this new solaris machine will use IP '172.26.0.44' and the name of the machine is 'unix'
- i have made the following changes:

/etc/hosts
172.26.0.44 localhost loghost unix

/etc/netmasks
172.26.0.0 255.255.255.0

/etc/nsswitch.conf
(contains) host: files dns

/etc/nsswitch.dns
(contains) host: files dns
ipnodes: files dns


created /etc/hostname.lo0
172.26.0.44 unix

created /etc/defaultrouter
172.26.0.1

created /etc/resolv.conf
nameserver 80.58.0.33
nameserver 80.58.32.97


/etc/inet/hosts
172.26.0.44 unix

/etc/inet/ipnodes
172.26.0.44 unix

and it does still not work...

in addition, as suggested elsewhere, i have doen the following:

# svcadm /network/dns/client:default
# svcadm /network/dns/server:default

but it still doesnt work...

at this stage, i think im making a small mistake, but not sure where... any help would be greatly appreciated.

thank you in advance

edit :

i can ping my own machine (172.26.0.44) but not the router (172.26.0.1) or anything obviously past the router

jlliagre 02-04-2008 10:05 PM

Quote:

Originally Posted by gavin watson (Post 3044637)
/etc/hosts
172.26.0.44 localhost loghost unix

Ouch, here is the mistake. You do not want to change localhost IP address which is by definition 127.0.0.1.
Quote:

created /etc/hostname.lo0
172.26.0.44 unix
Same issue here. The loopback interface isn't meant to be configured that way. Remove this file.

What is your NIC ? This is what you need to configure instead of the loopback which cannot propagate network packets to the outside by design, being a software only driver.

gavin watson 02-05-2008 01:59 AM

hi, thanks for that, i've just realised that my network card isnt supported, which is where the problem has been all along, hence me trying to configure the localhost settings by mistake thinking they were the NIC.

I'll try again on another system (or with another network card) and hopefully it'll be a lot more straight forward. thanks again for your reply.

jlliagre 02-05-2008 02:48 AM

What is your NIC model ? Perhaps is there a third party driver available.

gavin watson 02-05-2008 04:20 AM

Havent got details to hand, its VIA RhineII, there seems to be one available which i've tried my best to install and configure, but it's proving difficult as there is an updated version so the instructions are not exactly the same, even thoguh I have followed them through as best I can, I'll give more information later (when I'm at home) and maybe you could help me through it.

Thanks again


All times are GMT -5. The time now is 09:57 AM.