Multiple NIC configuration - how to get different hostnames?

From: Benoît Audet (benoit.audet@carra.gouv.qc.ca)
Date: Thu Jun 16 2005 - 14:21:35 EDT


Hi fellow managers,

I'm trying to figure out something here and I'm not sure if Solaris allows it.
Let me explain the situation...

We have a Solaris 8 server here. There is 2 NICs configured: bge0 and bge1.
Both NIC has its own IP address, let's say bge0: 192.168.0.10 and bge1:
192.168.0.11 . For each of these addresses, there's a name: 192.168.0.10:
server1.test.com, anx 192.168.0.11: server2.test.com.

Everything has been setted ok in local files, as well in DNS. In local files,
I put it this way:

/etc/hosts:
127.0.0.1 localhost loghost
192.168.0.10 server1 server1.test.com
192.168.0.11 server2 server2.test.com

/etc/hostname.bge0:
server1

/etc/hostname.bge1:
server2

/etc/nodename:
server1

When accessing the server via both addresses, it works just perfectly, except
that the "main" name for this server is "server1"... ...like staten in the
"/etc/nodename" file, and this is what it echoes when users connects to the
server, even from the IP address standing for "server2". Well, this is
normal, I know...

What I would like to do, is set the server so that when a user connects using
the IP address standing for "server2", the hostname for this user would be
"server2", and when another user connects using the "server1" IP address, the
hostname of the server for this user would be "server1". It is possible to do
that? Is the "/etc/nodename" file the key point in doing so? Any
suggestion?

Thanks in advance and, of course, will summarise!

Ben Audet
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:30:55 EDT