LinuxQuestions.org

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

LAN-Dominator.nl 09-21-2006 02: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 02: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 04: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 08: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 10:59 AM

Here are a few files worth checking:

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

/etc/hostname.*

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

i got the main message edited!

jlliagre 09-26-2006 03: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 04:50 AM

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

jlliagre 09-30-2006 06: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 07:06 AM

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

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

jlliagre 09-30-2006 08: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 05: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 06: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 01:53 PM

How do i configure my DHCP??

jlliagre 01-01-2007 01:57 PM

Is there a DHCP server already configured on your network ?


All times are GMT -5. The time now is 06:07 AM.