Discussion Locked

Assigning multiple addresses

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
For the purpose of subnetting a network, I want to assign multiple of virtual addresses to a interface on my Sun Ultra 10 that is performing routing. Can this be accomplished?

7 replies

by bulch

Locate hostname.'interfacename' file in /etc.
Create hostname.'interfacename':1, hostname.'interfacename':2 and so on.
Put fully qualified domain name of corresponding virtual interface into this files.
Put address/FQDN pairs into /etc/hosts file.
Reboot.
You got it!

by ghislain.levesque

in /etc, you have a file call "hostname.hme0". Create as many file as you need ( max 4096 or some number like this )
call "hostname.hme0:1", "hostname.hme0:2"etc
each of these file will contain a different
hostname. You will need to modify also your
/etc/host file to reflect the number of
virtual host.

by ryttinch

Also, if you want to set multiple IP addresses to a single interface without rebooting you can use the ifconfig command. ie.

# ifconfig hme0:1 inet 1.2.3.4 netmask [whatever your netmask is] broadcast + up

This discussion is closed to new replies.