I am configuring a pgpool instance to get a HA of postgresql services. I am following this configuration.

I found a command and I ran it manually in my console:

arping_cmd = 'arping -U $_IP_$ -w 1'

But it doesn't work, then I want to find a similar behaviour because I am on ubuntu 12.04. How can I do that ?

The $_IP_$ variable is replaced by the ip value in the configuration. The main problem is the arping command.

  • Welcome to askubuntu. Why do you think it didn't work? did you get an error of some kind? by using -U you are guaranteeing you won't get a response. (source man arping)
    – Elder Geek
    Sep 30, 2014 at 15:52

3 Answers 3


When running the arping command in the terminal, I get the following output:

$ arping -U -w -1
arping: device (option -I) is required.
Usage: arping [-fqbDUAV] [-c count] [-w timeout] [-I device] [-s source] destination
  -f : quit on first reply
  -q : be quiet
  -b : keep broadcasting, don't go unicast
  -D : duplicate address detection mode
  -U : Unsolicited ARP mode, update your neighbours
  -A : ARP answer mode, update your neighbours
  -V : print version and exit
  -c count : how many packets to send
  -w timeout : how long to wait for a reply
  -I device : which ethernet device to use
  -s source : source ip address
  destination : ask for what ip address

The solution is in the first line after running the command. Use -I and -s to fix your problem. -I specifies the interface to do the arping on and -s is to specify the source your are doing the arping from. It's crappy, I know, but update your command to look like the below:

arping_cmd = 'arping -U $_IP_$ -w 1 -I ethX -s SOURCE_IP'

where ethx is your ethernet and SOURCE_IP is the IP you are going to do the arping from.

Hope this helps, Cheers


I had a similar problem on Fedora:

$ arping
arping: Suitable device could not be determined. Please, use option -I.

My solution was:

$ arping $ip_addr -I $(ip route get $ip_addr |  cut -d\  -f 3 |xargs)

Where ip_addr would contain the IP to be pinged.

To brake it down:

ip route get

would return the route and interface used by kernel for the specified ip: dev eth1  src

then use:

cut -d\  -f 3

to split the string by delimiter '\ ' (escaped space) and return 3-th substring:


then use xargs to remove all whitespaces around interface.

Hope it will be helpfull.


I get the same error as the submitter, saying that "-U" is not a valid option:

root@pgpool-2:/var/log# arping -U -w -1
arping: invalid option -- 'U'
ARPing 2.11, by Thomas Habets <thomas@habets.se>
usage: arping [ -0aAbdDeFpqrRuv ] [ -w <us> ] [ -S <host/ip> ]
              [ -T <host/ip ] [ -s <MAC> ] [ -t <MAC> ] [ -c <count> ]
              [ -i <interface> ] <host/ip/MAC | -B>
For complete usage info, use --help or check the manpage.

I'm on Ubuntu 14.04 and there is no mention of "-U" in the manpage:

root@pgpool-2:/var/log# man arping | grep '\-U'

I changed mine to this:

arping_cmd = 'arping -v $_IP_$ -w 1 -c 100'

So basically:

  • -U doesn't exist, so remove it
  • Add -v to get verbose output, which may be helpful
  • Add -c 100 so that it eventually finishes... otherwise it runs forever

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.