Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 interfaces on Solaris box

# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet netmask ff000000 
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet netmask ffffff00 broadcast
        ether x:x:x:x:x:x
hme1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet netmask ffffff00 broadcast
        ether x:x:x:x:x:x 

# netstat -rn

Routing Table: IPv4
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------         U         1     91  hme0         U         1      0  hme1           U         1      0  hme0
default              UG        1     91              UH        1      0  lo0

hme0 the default interface but i want to specify host to use interface hme1. i try to use

route add -interface hme1

but return

hme1: bad value

any idea how can i solve it?

share|improve this question

l1x's solution is correct, but it has some problems; other hosts on the hme0 side don't be able to reach, and might not be able to reach those other hosts.

If this is a problem, it's because your netmasks say that 192.168.1.* is connected to both networks, which isn't true. Perhaps you want to do this without subnets and set the mask to which would allow you to create routes without the -interface line.

Perhaps you can use 192.168.2.* for one side, and route the other, although you'd need access to create the route on the router, or reconfigure all of the machines on your 192.168.1.* network to know about this route.

If you can't do either of these things, you might be able to create a bridge.

If you're not afraid to patch your kernel and load alpha-quality drivers, you can make an Ethernet Bridge (also see RBridge).

If an IP-only solution would be adequate, you can use proxy arp and IP forwarding to make a crude IP-only bridge. Start with something like this:

arp -s macaddress-of-hme0 pub
route add secretip
ndd -set /dev/ip ip_forawrding 1

Under Solaris, proxy_arp is really broken. The only reliable way to do it is to give the machine an additional secret IP address, such as that you only use for this.

,-----,         hme1,-----,   hme0
|hostA|-------------|hostB |----------- ?
`-----'             `-----'  

Although, in this configuration, "hostB" doesn't require both and

share|improve this answer
up vote 1 down vote accepted

It seem all giving replies only applicable on Linux platform.

However on Solaris 10, the command which I found it to be work:

route -p <add/delete> <hostname> <gateway> -ifp <interface>
share|improve this answer

This would the command on Solaris 10:

route add -interface

You don't need to add the interface name after the argument -interface because the IP address is already implicitly saying to use hme1.


share|improve this answer

The solaris route syntax is the follewing:

route [-fn] add | delete | get [net|host|default] [destination] [gateway]

So you command looks like this:

route add -interface hme1
share|improve this answer
i enter the command "# route add -interface hme1" yet i still get the error message "hme1: bad value" – conandor Sep 4 '09 at 1:49

Try this: route add -net -netmask -interface

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.