LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Multiple NICS in Solaris 8 (https://www.linuxquestions.org/questions/solaris-opensolaris-20/multiple-nics-in-solaris-8-a-274306/)

triley 01-05-2005 03:58 PM

Multiple NICS in Solaris 8
 
I'm trying to configure a Sun Ultra 80 running Solaris 8 with multiple NICS. hme0 has an ip address of 192.168.1.2/24. I installed a second nic and ran the following:

ifconfig hme1 plumb
ifconfig hme1 192.168.2.2 netmask 255.255.255.0 up

This worked great, however upon reboot, system did not retain configuration. Found out that I need to edit the following files:

/etc/hostname.hme1
/etc/hosts
/etc/netmasks

/etc/hostname.hme0 looks like this:

<hostname>

/etc/hostname.hme1 looks like this:

<hostname>

/etc/hosts looks like this:

127.0.0.1 localhost
192.168.1.2 <hostname> loghost
192.168.2.2 <hostname> loghost

/etc/netmasks looks like this:

192.168.1.0 255.255.255.0
192.168.2.0 255.255.255.0

Now both interfaces show up with ip address 192.168.2.2

What am I doing wrong? Thanks.

jlliagre 01-05-2005 04:28 PM

Quote:

What am I doing wrong?
You are hiding in your posting the piece of information that would help understanding the issue ...
<hostname> is an invalid hostname !

triley 01-05-2005 08:47 PM

hostname is akira.

jlliagre 01-06-2005 01:23 AM

There should be more than one hostname if you want more than one IP address !
Otherwise, only the first line matching a given hostname is used to pick the IP address.

If you enter the same name in hostname.hme0 and hostname.hme1, how could they have different IP addresses ...
You can either give different hostnames or directly enter different IP address instead of a name in these files, and it should work.

triley 01-06-2005 09:01 AM

Thanks. That worked really well. Appreciate the help.

jlliagre 01-06-2005 09:42 AM

Thanks, just one more comment:

You should only have one loghost entry and best is to associate it to localhost:

127.0.0.1 localhost loghost

triley 01-06-2005 10:11 AM

So /etc/hosts should look like this?


127.0.0.1 localhost loghost
192.168.1.2 <hostname1>
192.168.2.2 <hostname2>

jlliagre 01-06-2005 10:26 AM

Precisely !

triley 01-06-2005 11:12 AM

Thanks for the help!


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