NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: TCP/IP outbound connection "routing"



On Fri, Feb 21, 2014 at 11:31 AM, Scott Burns 
<Scott.Burns%seqent.com@localhost> wrote:
> We are attempting to build a customized monitoring solution for a customer.
>
> The customer would like us to access his remote server over the in facility
> Wi-Fi to basically monitor both the Wi-Fi infrastructure is up and the
> server we are connecting to is working properly.
>
> To facilitate notification we need to have a wired lan connection on the
> same network to dispatch email etc. when a problem is detected.
>
> I know we can easily create a TCP/IP listener that listens only on the WiFi
> NIC interface but is there a way to make a connect() call so that this call
> is only routed over the Wi-Fi NIC connection? We can obviously play with
> Metrics and have the Wi-Fi NIC preferred but if it is down the connect call
> will take the wired NIC path since it is on the same network.
>
> Ie.
> Monitored Server
> -----------------------
> Wired NIC - 200.1.1.100
>
>
> Monitoring Appliance - NetBSD/amd64
> ---------------------------------------------------
> Wi-Fi NIC - 200.1.1.1
> Wired NIC - 200.1.1.2
>
> I want an application on the Monitoring Appliance to connect to the
> Monitored Server (200.1.1.100) only over the Wi-Fi NIC (200.1.1.1).
> If that connection fails (Monitored Server down, Wi-Fi NIC offline, Access
> Point unplugged, switch broken etc.) I want to make a connection over the
> Wired NIC (200.1.1.2) to send email and other notification types.
>
> With NetBSD/amd64 6.x is there any way to force the connect() call to only
> use one interface as it's connect path much like you make the bind() call
> only listen on one NIC?
>
> Thanks
> Scott.
>
>


nc has:
                -s addr         Local source address

would that work?  It might take some scripting to figure out which
interface is using which address.


Home | Main Index | Thread Index | Old Index