Subject: Setting outgoing packet's source address
To: None <netbsd-users@netbsd.org>
From: Michal Ludvig <michal@logix.cz>
List: netbsd-users
Date: 08/19/2003 17:18:47
Hi all,
is there a way in NetBSD to specify a source IP address of an outgoing 
packet?
Example:
I have a machine on a network 10.0.0.0/16 with two addresses: 10.0.1.1 
and 10.0.2.1. By default I want to use 10.0.1.1 for my outgoing traffic, 
but when accessing any host from a sub-network 10.0.2.0/24 I want to use 
address 10.0.2.1. Can I somehow do this?
In Linux I can use 'ip route add 10.0.2.0/24 dev eth0 src 10.0.2.1' - is 
there an equivalent in NetBSD?

Thanks in advance!

Michal Ludvig

BTW Please keep me in Cc as I'm not subscribed to the list. Thanks.