I have several computers that are multi-homed, and have different static IP addresses for each of several network connections. How can I tell which of these IP addresses is used when I'm connecting to some other specific domain?
The rule is rather simple.
By default, with no NAT rules involved, the IP addresses of the respective networks of interfaces are used when communicating with the very same logical network defined by the pair IP address/netmask ; otherwise when going out by the default gateway, the primary address of the first interface is used.
Be aware that some services can be bind to a specific IP address, and in that case that IP is used.
NAT rules can and will change this behaviour.
ip route get dest_IP
will also tell you which IP address will be used when routing.
Be also aware that IPv6 services take precedence over IPv4 by default.