This was my resolution on the VNIC: route add -host 10.1.1.74 192.168.0.1 -setsrc 192.168.0.67
working fine On Thu, Oct 13, 2011 at 10:31 PM, Lindsay Hill <[email protected]>wrote: > This is a common enough problem with having multiple IPs on one interface - > you don't always get the behaviour you want. If you establish a connection > from 10.1.1.74 TO 192.168.0.67, then the replies have the right source. But > as you've found, sessions initiated from your host will use the primary IP > as the source. > > Static routes aren't going to help you. The OS will choose the source IP > based on the outgoing interface. It will always use the primary IP on that > interface. If you had multiple interfaces on different subnets, then yes, > routes would help, since the OS would select the outbound interface, then > use that IP. Since you're always using the same outbound interface, it won't > do what you want. > > The only ways around it I could think of would be if your application > supports defining a source IP, or if you use NAT on the host itself. E.g. if > this is a Linux host, it's trivial to add some iptables rules to NAT > specific outbound traffic. > > On 14/10/2011, at 2:01 AM, Israel Ogongo wrote: > > > Dear Gurus, > > > > Please i need your expert advise. > > > > I have a host = 192.168.0.8 > > This host has a virtual NIC = 192.168.0.67 > > > > When the virtual communicate to 10.1.1.74 port 7222 it goes via the > > 192.168.0.8 interface. > > I want it to go directly via the 192.168.0.67 interface - please advise > if a > > static route is an option and how I can get it right. > > > > Note that both the host and virtual host have 192.168.0.1 as the default > > gateway. > > > > Thank you in advance. > > Regards, > > Israel Ogongo > > _______________________________________________ > > For more information regarding industry leading CCIE Lab training, please > visit www.ipexpert.com > > > > Are you a CCNP or CCIE and looking for a job? Check out > www.PlatinumPlacement.com > > _______________________________________________ For more information regarding industry leading CCIE Lab training, please visit www.ipexpert.com Are you a CCNP or CCIE and looking for a job? Check out www.PlatinumPlacement.com
