# UDP Send and receive when using node red in docker container

**URL:** <https://discourse.nodered.org/t/udp-send-and-receive-when-using-node-red-in-docker-container/11114>\
**Category:** General\
**Created:** [14 May 2019 10:53 UTC](https://discourse.nodered.org/t/udp-send-and-receive-when-using-node-red-in-docker-container/11114 "2019-05-14T10:53:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![echtelerp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/echtelerp/32/535_2.png) [@echtelerp](https://discourse.nodered.org/u/echtelerp)\
**Post date:** [14 May 2019 10:53 UTC](https://discourse.nodered.org/t/udp-send-and-receive-when-using-node-red-in-docker-container/11114/1 "2019-05-14T10:53:09Z")

</div>

Hi There,

I'm trying to send and receive massages via UDP with two Node-Red instances installed via Docker containers.

Flows on instance 1:

```auto
[
    {
        "id": "3affecfb.85c07c",
        "type": "inject",
        "z": "3fccb497.9b16f4",
        "name": "",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 320,
        "y": 160,
        "wires": [
            [
                "8cf7dc9a.c37c7"
            ]
        ]
    },
    {
        "id": "311c30f9.5930d8",
        "type": "udp in",
        "z": "3fccb497.9b16f4",
        "name": "",
        "iface": "",
        "port": "2001",
        "ipv": "udp4",
        "multicast": "false",
        "group": "",
        "datatype": "buffer",
        "x": 320,
        "y": 260,
        "wires": [
            [
                "41fca546.e83e2c"
            ]
        ]
    },
    {
        "id": "41fca546.e83e2c",
        "type": "debug",
        "z": "3fccb497.9b16f4",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "x": 490,
        "y": 260,
        "wires": []
    },
    {
        "id": "8cf7dc9a.c37c7",
        "type": "udp out",
        "z": "3fccb497.9b16f4",
        "name": "",
        "addr": "192.168.2.101",
        "iface": "",
        "port": "1999",
        "ipv": "udp4",
        "outport": "2000",
        "base64": false,
        "multicast": "false",
        "x": 600,
        "y": 160,
        "wires": []
    }
] 

```

Flow on Instance 2:

```auto
[
    {
        "id": "3e48491b.09f93e",
        "type": "udp in",
        "z": "5ea6d14d.86d94",
        "name": "",
        "iface": "",
        "port": "1999",
        "ipv": "udp4",
        "multicast": "false",
        "group": "",
        "datatype": "buffer",
        "x": 220,
        "y": 340,
        "wires": [
            [
                "12cc1018.37d628"
            ]
        ]
    },
    {
        "id": "12cc1018.37d628",
        "type": "debug",
        "z": "5ea6d14d.86d94",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "x": 450,
        "y": 340,
        "wires": []
    },
    {
        "id": "45d00fe0.41e258",
        "type": "inject",
        "z": "5ea6d14d.86d94",
        "name": "",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 220,
        "y": 300,
        "wires": [
            [
                "f01672f5.c1bee8"
            ]
        ]
    },
    {
        "id": "f01672f5.c1bee8",
        "type": "udp out",
        "z": "5ea6d14d.86d94",
        "name": "",
        "addr": "192.168.2.111",
        "iface": "",
        "port": "2001",
        "ipv": "udp4",
        "outport": "",
        "base64": false,
        "multicast": "false",
        "x": 490,
        "y": 300,
        "wires": []
    }
]

```

Wireshark picture, of what happens:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/7/7fa872c38e8479eb3e508fab4e24bbb1192596ba.png)

So what I expected was sending and receiving from one to the other... 🙂  
but that doesn't happen.

Docker Statement on both instances: (running on two different pi's) same network, static IP's

docker run -d -p1880:1880 --name nodered echteler/nodered:arm32v7

so I hope for some help fixing the issue 🙂

Thank You very much for Your help 🙂

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [14 May 2019 10:55 UTC](https://discourse.nodered.org/t/udp-send-and-receive-when-using-node-red-in-docker-container/11114/2 "2019-05-14T10:55:09Z")

</div>

Did you map the (udp) ports in the docker containers ?

---

<div class="post-metadata">

**Author:** ![echtelerp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/echtelerp/32/535_2.png) [@echtelerp](https://discourse.nodered.org/u/echtelerp)\
**Post date:** [14 May 2019 11:00 UTC](https://discourse.nodered.org/t/udp-send-and-receive-when-using-node-red-in-docker-container/11114/3 "2019-05-14T11:00:13Z")

</div>

nope, not yet... from what I read, that should not be neccesary. But I'll try that right now.

---

<div class="post-metadata">

**Author:** ![echtelerp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/echtelerp/32/535_2.png) [@echtelerp](https://discourse.nodered.org/u/echtelerp)\
**Post date:** [14 May 2019 11:21 UTC](https://discourse.nodered.org/t/udp-send-and-receive-when-using-node-red-in-docker-container/11114/4 "2019-05-14T11:21:18Z")

</div>

Just in Case someone has the same issues 🙂

I added the Port mappings according to the ports I want to use 🙂

docker run -d -p 1881:1880 -p 2001:2001/udp -p 1998:1998/udp --name nodered3 ...
