# Node-red-node-ping always return false

**URL:** <https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165>\
**Category:** General\
**Created:** [3 November 2021 10:17 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165 "2021-11-03T10:17:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![RainerGa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rainerga/32/50441_2.png) [@RainerGa](https://discourse.nodered.org/u/RainerGa)\
**Post date:** [3 November 2021 10:17 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/1 "2021-11-03T10:17:21Z")

</div>

Hello,

I am new to node-red. And new to this forum too! In the links please replace "-" with "." 🙂

For learning purposes I want to try ping a target and show the result on an dashboard 🙂

I use "node-red-node-ping" and hoped to get the Roundtriptime in ms as msg.payload. But I was wrong...

The following targets are "not pingable" and I get "false" as return value:

(IPVx = Automatic or =IPV6)  
www-google-de  
google-de  
localhost  
heise-de

The following URL does work correct:  
(IPVx = Automatic)  
ipv4-google-com

(IPVx = IPV4)  
heise-de

For me it seems that ping to IPV6 targets does not work correct.

My Desktop is a Windows 10 with IPv6 as default.

Please try to reproduce. And If you have a hint for me I would be very thankfull.

Kind Regards  
Rainer

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [3 November 2021 12:29 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/2 "2021-11-03T12:29:49Z")

</div>

> [@RainerGa](#):
>
> it seems that ping to IPV6 targets does not work correct.

Does the command line `ping` command work with ipv6?

---

<div class="post-metadata">

**Author:** ![RainerGa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rainerga/32/50441_2.png) [@RainerGa](https://discourse.nodered.org/u/RainerGa)\
**Post date:** [3 November 2021 14:10 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/3 "2021-11-03T14:10:26Z")

</div>

yes in the "cmd" Commandline everything works fine

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [3 November 2021 14:48 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/4 "2021-11-03T14:48:03Z")

</div>

I thought it was necessary to use `ping6` for IPV6 addresses.

---

<div class="post-metadata">

**Author:** ![RainerGa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rainerga/32/50441_2.png) [@RainerGa](https://discourse.nodered.org/u/RainerGa)\
**Post date:** [3 November 2021 14:50 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/5 "2021-11-03T14:50:17Z")

</div>

Hello Colin,

what do you mean with "ping6"? This is not an windows cmd command nor an node-red task.

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [3 November 2021 15:01 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/6 "2021-11-03T15:01:46Z")

</div>

Linux = ping6  
Windows = ping -6 [IPV6 address]

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [3 November 2021 15:30 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/7 "2021-11-03T15:30:54Z")

</div>

Have you tried both options ?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/8/f87c3255791068a344208434a98747d50c1179c9.png)

---

<div class="post-metadata">

**Author:** ![RainerGa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rainerga/32/50441_2.png) [@RainerGa](https://discourse.nodered.org/u/RainerGa)\
**Post date:** [3 November 2021 16:03 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/8 "2021-11-03T16:03:13Z")

</div>

@dceejay,

yes I tried IPV6 also and for better reading. I edited the original Forumstext.

@edje, Colin11: ping -6 force the usage of ipv6 but in my environment it is not necessary cause my host use ipv6 as default. ping -6 does work correct 🙂

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [3 November 2021 21:16 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/9 "2021-11-03T21:16:29Z")

</div>

Which version of node-red, nodejs and node-red-node-ping are you using?  
`node -v` to get nodejs version.

It is working ok for me on Ubuntu, specifying my own ipv6 local address.

---

<div class="post-metadata">

**Author:** ![RainerGa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rainerga/32/50441_2.png) [@RainerGa](https://discourse.nodered.org/u/RainerGa)\
**Post date:** [4 November 2021 13:06 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/10 "2021-11-04T13:06:26Z")

</div>

Node-RED version: v2.1.3  
Node.js version: v16.13.0  
Windows\_NT 10.0.19042 x64 LE

node-red-node-ping 0.3.1

Everything installed on Monday (this week).

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [4 November 2021 13:41 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/11 "2021-11-04T13:41:37Z")

</div>

> [@RainerGa](#):
>
> Windows\_NT 10.0.19042 x64 LE

Is your system set up to use IPV6?

---

<div class="post-metadata">

**Author:** ![RainerGa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rainerga/32/50441_2.png) [@RainerGa](https://discourse.nodered.org/u/RainerGa)\
**Post date:** [4 November 2021 13:43 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/12 "2021-11-04T13:43:39Z")

</div>

Hello ghayne,

my Desktop is a Windows 10 with IPv6 as default.

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [4 November 2021 13:45 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/13 "2021-11-04T13:45:04Z")

</div>

Like this?  
 ![ipv6](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/9/a9de758b84bad4c478dab429a73845f13131c646.png)

---

<div class="post-metadata">

**Author:** ![RainerGa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rainerga/32/50441_2.png) [@RainerGa](https://discourse.nodered.org/u/RainerGa)\
**Post date:** [4 November 2021 13:47 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/14 "2021-11-04T13:47:37Z")

</div>

![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/5/a58839f223807b11ac1ccba73ab84db3f3fe57ab.png)  
Yes, it looks as your screenshot 🙂

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [4 November 2021 13:48 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/15 "2021-11-04T13:48:35Z")

</div>

Just a thought 🙂  
[edit - I missed that you had done it successfully from the command line!]

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [4 November 2021 14:01 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/16 "2021-11-04T14:01:03Z")

</div>

Can you post your flow please.

---

<div class="post-metadata">

**Author:** ![RainerGa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rainerga/32/50441_2.png) [@RainerGa](https://discourse.nodered.org/u/RainerGa)\
**Post date:** [4 November 2021 14:04 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/17 "2021-11-04T14:04:18Z")

</div>

Do you mean export and upload?

---

<div class="post-metadata">

**Author:** ![RainerGa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rainerga/32/50441_2.png) [@RainerGa](https://discourse.nodered.org/u/RainerGa)\
**Post date:** [4 November 2021 14:07 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/19 "2021-11-04T14:07:37Z")

</div>

[flows.json](https://discourse.nodered.org/uploads/short-url/aXfcdqhkPlm3Y4bGDuHrJMOVWNn.json) (1.5 KB)  
Hope this works 🙂

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [4 November 2021 14:25 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/20 "2021-11-04T14:25:33Z")

</div>

This is the correct way:

[https://discourse.nodered.org/t/how-to-share-code-or-flow-json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json)

---

<div class="post-metadata">

**Author:** ![RainerGa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rainerga/32/50441_2.png) [@RainerGa](https://discourse.nodered.org/u/RainerGa)\
**Post date:** [4 November 2021 14:29 UTC](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165/21 "2021-11-04T14:29:59Z")

</div>

```auto
[
    {
        "id": "4b37492f5991db3d",
        "type": "tab",
        "label": "Buggy Ping Flow",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "97f6a13019a172f9",
        "type": "ping",
        "z": "4b37492f5991db3d",
        "protocol": "Automatic",
        "mode": "triggered",
        "name": "",
        "host": "www.google.de",
        "timer": "20",
        "inputs": 1,
        "x": 310,
        "y": 160,
        "wires": [
            [
                "14af382d190e8dc9"
            ]
        ]
    },
    {
        "id": "7b60a8ab623186d5",
        "type": "inject",
        "z": "4b37492f5991db3d",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 110,
        "y": 160,
        "wires": [
            [
                "97f6a13019a172f9"
            ]
        ]
    },
    {
        "id": "14af382d190e8dc9",
        "type": "debug",
        "z": "4b37492f5991db3d",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 620,
        "y": 180,
        "wires": []
    }
]

```

[Next page](https://discourse.nodered.org/t/node-red-node-ping-always-return-false/53165.md?page=2)
