# How to join multicast group on specific interface

**URL:** <https://discourse.julialang.org/t/how-to-join-multicast-group-on-specific-interface/97724>\
**Category:** General Usage\
**Created:** [April 20, 2023, 10:53pm UTC](https://discourse.julialang.org/t/how-to-join-multicast-group-on-specific-interface/97724 "2023-04-20T22:53:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![perfecto25](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/perfecto25/32/49185_2.png) [@perfecto25](https://discourse.julialang.org/u/perfecto25)\
**Post date:** [April 20, 2023, 10:53pm UTC](https://discourse.julialang.org/t/how-to-join-multicast-group-on-specific-interface/97724/1 "2023-04-20T22:53:47Z")

</div>

Hello, I need to join a MC group lets say 224.0.0.2 port 21000

and I need to join on a local interface with IP of 192.168.38.10

I want to test to see if Im recieving any data from the group

looking at docs, how do I specify the MC port 21000 ?

also, do I bind to my local 192.168 address? ie, bind(socket, ip"192.168.38.10", 6789) ?

```julia
using Sockets
group = ip"228.5.6.7"
socket = Sockets.UDPSocket()
bind(socket, ip"0.0.0.0", 6789)
join_multicast_group(socket, group)
println(String(recv(socket)))
leave_multicast_group(socket, group)
close(socket)

```
