Network Configurations - known bug in ifconfig addif subcommand on hostname.* files?

Hi there,

does anyone know if there's an "official" bug in ifconfig's subcommand addif?

Adding logical interfaces to a running physical interface manually works without problems. But when I try to configurate a persistent one with the corresponding file hostname.nicdrv the settings (netmask, broadcast address) of the physical one after rebooting are always set automatically to the wrong values, even when I set them explicitly in this file (on the second line; the correct netmask is also set in the netmasks file) no matter what syntax or values I use.

I am using the old style persistent interface configuration now (hostname.nicdrv:1 file), but it would be nice if the new ifconfig syntax worked as described. ;-)

Greetings from Aachen, Germany.

Jochem Ippers

[804 byte] By [jochem_ippersa] at [2007-11-26 23:04:52]
# 1

Hi there,

does anyone know if there's an "official" bug in

ifconfig's subcommand addif?

Adding logical interfaces to a running physical

interface manually works without problems. But when I

try to configurate a persistent one with the

corresponding file hostname.nicdrv the settings

(netmask, broadcast address) of the physical one

after rebooting are always set automatically to the

wrong values, even when I set them explicitly in this

file (on the second line; the correct netmask is also

set in the netmasks file) no matter what syntax or

values I use.

What OS?

Can you show the contents of your hostname file?

The configuration files aren't magic. You can read the startup scripts to find where they are read and fed to ifconfig.

--

Darren

Darren_Dunhama at 2007-7-10 13:57:38 > top of Java-index,General,Network Configurations...
# 2

Hi again,

sorryt: I didn't put the "up"-command on the second line (settings for the physical interface), just for the logical one (no - exactly - corresponding examples in the manpage/documentation for standard configurations). Now the settings are correct after rebooting (always?).

my hostname.rtls0 file

-:

my.ip.add.ress

netmask 255.255.254.0 up

addif 192.168.10.213 netmask + up


(OS: Solaris 10 11/06, Generic_15101-03 )

Greetings

Jochem Ippers

jochem_ippersa at 2007-7-10 13:57:38 > top of Java-index,General,Network Configurations...
# 3

Hi again,

sorryt: I didn't put the "up"-command on the second

line (settings for the physical interface), just for

the logical one (no - exactly - corresponding

examples in the manpage/documentation for standard

configurations). Now the settings are correct after

rebooting (always?).

Yeah, examples for this are hard to find, but once you know what the scripts do, it's not that hard to see how it works.

if there's only one line in the file:

ifconfig <int> plumb

ifconfig <int> inet <line from file> netmask + broadcast + up

If there are multiple lines in the file:

ifconfig <int> plumb

for each line:

ifconfig <int> inet <line from file>

So in the multi-line case, you have to explicitly "up" anything that you would also have to "up" on the command line. It's just that the "up" (and the netmask/broadcast stuff) is taken care of for you in the single line case.

--

Darren

Darren_Dunhama at 2007-7-10 13:57:38 > top of Java-index,General,Network Configurations...
# 4

Ive got no idea why you would want to do this stuff this way.

Just put your netmasks into /etc/netmasks

Put your IP's in to /etc/hosts and /etc/inet/ipnodes.

Then put your primary hostname into

/etc/hostname.rstl0

and your local subnet hostname into

/etc/hostname.rstl0:1

and the scripts will figure it all out for you.

robert.cohena at 2007-7-10 13:57:39 > top of Java-index,General,Network Configurations...
# 5
In most cases, that's probably the right answer. But there are times when you don't want to create a static mapping between a particular virtual interface and an IP address.Also, this is the usual way to create virtual interfaces for IPMP configurations.-- Darren
Darren_Dunhama at 2007-7-10 13:57:39 > top of Java-index,General,Network Configurations...
# 6
Hi,I've also used a hostname.rtls0:1 file in the meantime but the documentation sounded a little bit as if this will be deprecated someday. And Darren is right: I'm testing a cluster installation and so I'd prefer the IPMP version of ifconfig.GreetingsJochem
jochem_ippersa at 2007-7-10 13:57:39 > top of Java-index,General,Network Configurations...