CARP source ip

Is there a way to setup CARP for it to send packets with the carp ip as the source ip?

I currently have carp setup with 2 VM's. When I do packet captures to test pings I see the interface ip as the source and not the carp ip.

Any guidance would be much appreciated.

Thank you.
 
We're going to need more information. How are your interfaces configured? Are the CARP addresses and interface addresses in the same subnet?
 
When I do packet captures to test pings I see the interface ip
Use the -S option with ping.

Code:
     -S src_addr
             Use the following IP address as the source address in outgoing
             packets.  On hosts with more than one IP address, this option can
             be used to force the source address to be something other than
             the IP address of the interface the probe packet is sent on.  If
             the IP address is not one of this machine's interface addresses,
             an error is returned and nothing is sent.
 
We're going to need more information. How are your interfaces configured? Are the CARP addresses and interface addresses in the same subnet?
Thank you and sorry for the late reply. Yes they are in the same subnet.
 
Use the -S option with ping.

Code:
     -S src_addr
             Use the following IP address as the source address in outgoing
             packets.  On hosts with more than one IP address, this option can
             be used to force the source address to be something other than
             the IP address of the interface the probe packet is sent on.  If
             the IP address is not one of this machine's interface addresses,
             an error is returned and nothing is sent.
Thank you SirDice, so by default icmp protocol will use the interface outgoing ip and not the carp ip, right?
 
so by default icmp protocol will use the interface outgoing ip and not the carp ip, right?
Everything (not only ping) will use the first IP address on the interface, that's usually the IP of the host, the CARP address is an alias. So your applications/services will need to be configured to bind to the CARP address too.
 
Back
Top