What should be hostname for second network interface?

Hi All,

I am having a sun server. The primary network interface is having name "sun1" and IP address "192.168.2.10". Now when I add second network interface with different IP address "10.1.1.100" and same hostname, it doesn't work.

What I want to know is that should the second interface having different hostname like IP address or can any one tell me how to configure second network interface with different IP address...

Thanks in advance,
Deepak

Here is the output of /etc/inet/hosts, /etc/inet/ipnodes, /etc/nodename, /etc/hostname.hme0 and /etc/hostname.hme1 files:

#cat /etc/inet/hosts
192.168.2.10      sun1    loghost
10.1.1.100         sun1
#cat /etc/inet/ipnodes
192.168.2.10      sun1    loghost
10.1.1.100         sun1
#cat /etc/nodename
sun1
#cat /etc/hostname.hme0
sun1
#cat /etc/hostname.hme1
sun1

Thanks,
Deepak

two possibilities:

  1. put the ip inside the "hostname.interface" file
  2. choose ANY OTHER name (not the same name as for the other interface) and enter it with the ip inside /etc/hosts and put that name inside "hostname.interface"

Thanks DukeNuke2,

Should I choose a different name for the second interface other than the previous one?

Thanks,
Deepak

yes, thats the only way it works...

Thanks again !

I did as per your suggestion and it works. One more trouble for you, how can I work with only one hostname even if we have multiple interfaces. We simply can't or there are any way??

Thanks again,
Deepak

there is only one hostname. it's the name inside /etc/nodename.