does hostname really do the job for a name change?

From: Ian Ivo Veach (imail@nevada.edu)
Date: Wed Mar 12 2003 - 20:05:14 EST


Greetings -

We've got an unusual situation where we're testing jumping a netra x1 from
it's second interface [the jumpstart network], and then configuring it as
if it were the host based from it's primary interface. I'm wondering the
best way to go about the name change?

The netra is jumped as "foojump," [dmfe1] but we eventually want the
machine to be called "foo." [dmfe0] The jumpstart process has correctly
set up the hosts, hostname*, netmasks, and defaultrouter to use the
hostname "foo" on reboot - I've confirmed these are accurate. Two
questions:

[1] What is the best way to change the system name? We can use hostname,
which doesn't seem to help much. We can change /etc/nodename and
/etc/net/tic*/hosts so that they all refer to foo. This does seem to
change the name after reboot, but...

[2] Even after 1, the system is in a state of confusion. It thinks it is
called "foo" at a glance. But snooping traffic from another machine
indicates traffic is coming from "foojump" [dmfe1] and NOT "foo." [dmfe0]
What's worse, is that routing is very weird. Given:

foo# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
dmfe0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.10.1.9 netmask ffffff00 broadcast 10.10.1.255
        ether 0:3:ba:6:1a:e4
dmfe1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 10.10.2.20 netmask ffffff00 broadcast 10.10.2.255
        ether 0:3:ba:6:1a:e4
foo# netstat -nr

Routing Table: IPv4
  Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
10.10.1.0 10.10.1.9 U 1 2 dmfe0
10.10.2.0 10.10.2.20 U 1 3 dmfe1
224.0.0.0 10.10.1.9 U 1 0 dmfe0
default 10.10.1.254 UG 1 11
127.0.0.1 127.0.0.1 UH 3 12 lo0

foo# more /etc/hosts |grep foo
10.10.2.20 foojump oldloghost
10.10.1.9 foo

Would you expect a remote snoop to see traffic from 10.10.2? Because that
is what we are seeing still - traffic from foojump, associated with
10.10.2, even though the default gateway is 10.10.1.254 (and
/etc/notrouter exists). Any suggestions?

cheers and thanks,

Ian Veach, imail@nevada.edu
_______________________________________________
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:25:58 EDT