anchor.diff:          socket_options = SocketOptions
       } = State, ClientState) ->
   
  -    case Protocol:new(Ip, Port, SocketOptions) of
  -        {ok, Socket} ->
  -            {ok, ClientState2} = Client:init(),
  -            inet:setopts(Socket, [{active, false}]),
  -
  -            case Client:setup(Socket, ClientState2) of
  -                {ok, ClientState3} ->
  -                    inet:setopts(Socket, [{active, true}]),
  -
  -                    {ok, State#state {
  -                        reconnect_state = reconnect_state_reset(ReconnectState),
  -                        socket = Socket
  -                    }, ClientState3};
  -                {error, Reason, ClientState3} ->
  +    case inet:getaddrs(Ip, inet) of
  +        {ok, Addrs} ->
  +            Ip2 = shackle_utils:random_element(Addrs),
  +            Headers = shackle_udp:header(Ip2, Port),
  +            case Protocol:new(Ip2, Port, SocketOptions) of
  +                {ok, Socket} ->
  +                    {ok, ClientState2} = Client:init(),
  +                    inet:setopts(Socket, [{active, false}]),
  +
  +                    case Client:setup(Socket, ClientState2) of
  +                        {ok, ClientState3} ->
  +                            inet:setopts(Socket, [{active, true}]),
  +
  +                            {ok, State#state {
  +                                header = Headers,
  +                                reconnect_state =
  +                                    reconnect_state_reset(ReconnectState),
  +                                socket = Socket
  +                            }, ClientState3};
  +                        {error, Reason, ClientState3} ->
  +                            shackle_utils:warning_msg(PoolName,
  +                                "setup error: ~p", [Reason]),
  +
  +                            reconnect(State, ClientState3)
  +                    end;
  +                {error, Reason} ->
                       shackle_utils:warning_msg(PoolName,
  -                        "setup error: ~p", [Reason]),
  -
  -                    reconnect(State, ClientState3)
  +                        "~p connect error: ~p", [Protocol, Reason]),
  +                    reconnect(State, ClientState)
               end;
  +
           {error, Reason} ->
               shackle_utils:warning_msg(PoolName,
  -                "~p connect error: ~p", [Protocol, Reason]),
  +                "~p getaddrs error: ~p", [Protocol, Reason]),
               reconnect(State, ClientState)
       end;
   handle_msg(#cast {} = Cast, #state {
  
positive.code: 
  -record(state, {
      client           :: client(),
      header           :: iodata(),
      ip               :: inet:ip_address() | inet:hostname(),
      name             :: server_name(),
      parent           :: pid(),
  
negative.code:     SocketOptions = ?LOOKUP(socket_options, ClientOptions,
          ?DEFAULT_SOCKET_OPTS),
  
      loop(#state {
          client = Client,
          ip = Ip,
          name = Name,
          parent = Parent,
          pool_name = PoolName,
  