[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

10026.0. "How to define multiple interfaces aliases?" by CSC32::A_LICAUSE () Tue Jun 03 1997 10:35

    Can someone please give the correct syntax for rc.config for multiple
    interface alias addresses?
    
    I've tried adding them on a single line:
    
    IFCONFIG_0="10.10.10.2 netmask 255.255.255.0 alias 10.1.1.1 alias
    10.1.1.2 alias 10.1.1.3"
    
    I've also tried putting them on multple lines not as aliases but
    additional addresses increasing NUM_NETCONFIG to #of_aliases + 1,
    then using NETDEV_n as "ln0", for example.
    
    Also when I tried to do this using netconfig, it only lets you define
    a single alias address. There is not help on the sub net of interface
    aliases in the netconfig GUI!
    
    Thanks,
    Al
T.RTitleUserPersonal
Name
DateLines
10026.1QAR time...NNTPD::"[email protected]"Farrell WoodsTue Jun 03 1997 11:0928
It looks like the code that parses alias lists isn't working correctly.
You should be able to do something like this:

ifconfig ln0 16.140.32.161 aliaslist 10.1.1.2,3,4 netmask 255.255.255.0

But I can't get ifconfig to swallow that...  (note that in this example the
aliases will receive the same netmask as the primary address.  This may or
may NOT be what you wanted.)

For now you'll have to add lines like this to the file /etc/inet.local:

ifconfig ln0 alias 10.1.1.2
ifconfig ln0 alias 10.1.1.3
...

Note that in the above the netmask will default to 255.0.0.0.  You can give
a more resrictive netmask if you like.

Lastly, you can check to see if the aliases were added and that the masks
are correct with this:

netstat -ia -Iln0



	-- Farrell

[Posted by WWW Notes gateway]
10026.2I should have asked...NNTPD::"[email protected]"Farrell WoodsTue Jun 03 1997 11:1910
When I tried ifconfig with the "aliaslist" command, it was on a V4.2 system
(steel).  I should have asked which version of the OS you were using.

The "aliaslist" feature of the ifconfig command should work as documented
in V4.0.  If that's what you're running then please give it a shot.


	-- Farrell

[Posted by WWW Notes gateway]
10026.3fingers runneth away...NNTPD::"[email protected]"Farrell WoodsTue Jun 03 1997 11:3210
...before the brain is fully engaged.

I was having difficulty w/steel because I was typing "alias" instead of
"aliaslist".  No qar necessary.

Time for that coffee...

	-- Farrell

[Posted by WWW Notes gateway]
10026.4use /etc/inet.localSMURF::DUSTINTue Jun 03 1997 12:056
    The best place for alias definitions is in the /etc/inet.local
    file, starting in V4.0 and beyond.  You can put anything you want
    in there and not have to worry about rc.config style variables.
    
    John
    
10026.5ThanksCSC32::A_LICAUSETue Jun 03 1997 12:365
    Thanks very much.  I'm doing this on a V4.0 system.
    
    Both suggestions seem to work.
    
    Al