I have the following situation:
A freebsd 7.2 server, at colocation site.
With 'ping -S' I can select any of the source addresses I have at my disposal. I have confirmed that the correct source address sends the ICMP packets.
I need the ability to select the source address for a particular destination through the routing table (or any other means, that doesn't involve recompiling the kernel, or extra devices at the colocation site).
For instance on a Cisco router with an interface with multiple ip addresses I can manipulate the default route like this:
and let all traffic destined for 213.239.152.0/21 source from 95.xxx.xxx.43 instead of 95.xxx.xxx.41
I want to do the same on the fbsd box. Any help is highly appreciated.
PS I have tried route add 213.239.152.0/21 95.xxx.xxx.42 and it doesn't work (since it selects gateway and not outgoing interface or ip).
A freebsd 7.2 server, at colocation site.
Code:
ifconfig_fxp0="inet 95.xxx.xxx.41 netmask 255.255.255.128"
ifconfig_fxp0_alias0="95.xxx.xxx.42 netmask 255.255.255.128"
ifconfig_fxp0_alias1="95.xxx.xxx.43 netmask 255.255.255.128"
ifconfig_fxp0_alias2="95.xxx.xxx.44 netmask 255.255.255.128"
ifconfig_fxp0_alias3="95.xxx.xxx.45 netmask 255.255.255.128"
ifconfig_fxp0_alias4="95.xxx.xxx.46 netmask 255.255.255.128"
ifconfig_fxp0_alias5="95.xxx.xxx.47 netmask 255.255.255.128"
defaultrouter="95.xxx.xxx.1"
With 'ping -S' I can select any of the source addresses I have at my disposal. I have confirmed that the correct source address sends the ICMP packets.
I need the ability to select the source address for a particular destination through the routing table (or any other means, that doesn't involve recompiling the kernel, or extra devices at the colocation site).
For instance on a Cisco router with an interface with multiple ip addresses I can manipulate the default route like this:
Code:
ip route 213.239.152.0 255.255.248.0 95.xxx.xxx.43
and let all traffic destined for 213.239.152.0/21 source from 95.xxx.xxx.43 instead of 95.xxx.xxx.41
I want to do the same on the fbsd box. Any help is highly appreciated.
PS I have tried route add 213.239.152.0/21 95.xxx.xxx.42 and it doesn't work (since it selects gateway and not outgoing interface or ip).