[Sunhelp] ethernet question

Bill Bradford mrbill at mrbill.net
Sat Apr 22 21:07:46 CDT 2000


On Sat, Apr 22, 2000 at 05:08:33PM -0700, Gregory Leblanc wrote:
> If you're running Linux, the feature that you're looking for is called "ip
> aliasing", and allows you to assign multiple IPs to a single physical
> interface.  They are implemented as multiple "virtual" interfaces.  I'm sure
> Solaris has something similar, but I don't know what it's called.  If you
> want more info on the Linux stuff, ask, I'm sure somebody will chime in with
> the Solaris info.
> 	Greg

Easy to do on Solaris too.

Normally, you'd have interface hme0.

Configured like this:

ifconfig plumb hme0 (normally not needed)
ifconfig hme0 xxx.xxx.xxx.xxx netmask yyy.yyy.yyy.yyy
ifconfig hme0 up
route add default xxx.xxx.xxx.xxx (for default route)

If you want to add a secondary IP address:

ifconfig plumb hme0:1  (notice the :1)
ifconfig hme0:1 xxx.xxx.xxx.xxx netmask yyy.yyy.yyy.yyy
ifconfig hme0:1 up
route add <whatever>

To add more aliases, just do a :2, :3, etc.

To make aliases active at boot, create the appropriate 
/etc/hostname.hme0:x files, along with IP addresses/hostnames in
/etc/hosts, then you can do "ifconfig hme0:x up" in 
/etc/rc2.d/S99local (or wherever you want).

At least, this is how I do it - I had my Ultra 5 successfully
"multihomed" with only one physical ethernet interface when I had
two DSL lines coming into the house here...

You can do this with ANY Sun and ethernet interface as long as you're
running a recent version of Solaris, as well - works with le0, hme0, 
be0, etc.

Bill

-- 
+--------------------+-------------------+
|   Bill Bradford    |   Austin, Texas   |
+--------------------+-------------------+
| mrbill at sunhelp.org | mrbill at mrbill.net |
+--------------------+-------------------+





More information about the SunHELP mailing list