Virtual if same subnet - Solaris 8

Hi,

I am trying to setup a virtual interterface on the same subnet and redirect certain traffic to a specific host through that virtual interface. I am able to reach the virtual interface before I added a route to try and redirect traffic for a specific host out that virtual interface.

Any ideas/suggestions?

# ping 10.87.128.69

ICMP Host Unreachable from gateway db1-b (10.87.19.179)

for icmp from db1-b (10.87.19.179) to dhcp128-69 (10.87.128.69)

ifconfig hme0:1 plumb

ifconfig hme0:1 10.87.19.179 netmask 255.255.252.0 broadcast 10.87.19.255 up

# netstat -nr

Routing Table: IPv4

DestinationGatewayFlags RefUseInterface

-- -- -- --

10.87.128.69 10.87.19.179UGH10

10.87.16.010.87.19.178U120 hme0

10.87.16.010.87.19.179U10 hme0:1

10.0.0.0 10.87.16.254UG13 hme0

224.0.0.010.87.19.178U10 hme0

default 10.87.16.254UG10 hme0

127.0.0.1127.0.0.1 UH4106 lo0

#

# ifconfig -a

lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1

inet 127.0.0.1 netmask ff000000

hme0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 2

inet 10.87.19.178 netmask fffffc00 broadcast 10.87.19.255

ether 8:0:20:f8:64:e7

hme0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

inet 10.87.19.179 netmask fffffc00 broadcast 10.87.19.255

#

Thanks

[1797 byte] By [rachet] at [2007-11-25 22:42:09]
# 1

Hi,

I have exactly the same problem.

I've found that you can select the outgoing interface by changing the IN_ADDR_ANY flag on a socket initialization.

The selection of the outgoing interface is done by the binary. For example, netcat permits it, with the "-s" option (for source address).

Depending on the service you have to use, you have to find a binary whose permits you to select the source address.

I tried changing the route and setting higher metric on the unwanted interface, but this was not efficient.

Have you find any other solution ?

tketterer at 2007-7-5 14:20:33 > top of Java-index,General,Network Configurations...
# 2
I'm actually curious to know why are you trying to do this. What's the point of having some traffic go through a virtual interface, if the traffic is actually going through the same NIC, cable, switch port, subnet?
codename47 at 2007-7-5 14:20:33 > top of Java-index,General,Network Configurations...
# 3
... I have a Tcp Wrapper on the other side. If you have multiple public adresses and you want to use these all or separate the use depending on services...
tketterer at 2007-7-5 14:20:33 > top of Java-index,General,Network Configurations...