Multicast data cannot be received by programs - wireshark

Connection Schema
As given above, we connected two computers with one ethernet cable. Then using different programs we tried to sent data using as unicast,broadcast and multicast. However, we could not achieve to sent data as multicast. I mean, we can capture the data using wireshark, however both vlc,ffplay could not achieve to receive data.
We disabled firewalls of computers.
We achieved to send unicast and broadcast.
Wireshark can capture multicast data and there are not any checksum issues.
We use 239.5.5.5 as multicast address.
We checked ttl of packets.
We used different computers, but we get same result.

We forgot to turn off other interfaces in the computer including wifi and virtual machine interfaces. After turning off other interfaces, we are able to get multicast stream from Ethernet interface.

Related

Multicast not working at Windows 10 PC. How to Enable multicast at Local LAN at Windows 10

I can multicast at 224.0.0.1 and my all others local LAN PCs can listen the stream.
But when I multicast at other multicast IP like: 224.0.0.130, no LAN PCs can listen that. Though I can get at wireshark in source PC.
There are several reasons not to work multicast in windows 10. I have solved it by following 2 steps:
Interface Metric: From network settings, go to advance option and uncheck Automatic metric and set Interface matric a number. Lower the prior.
Change C# code:
By default, multicast send data to loopback interface. Hence need to specify which interface you want to use, means which ip you want use to send the multicast stream (ie. At which network you want to send multicast).
Here’s a sample C# code:
m_Socket.SetSocketOption(
SocketOptionLevel.IP,
SocketOptionName.MulticastInterface,
IPAddress.Parse("192.168.0.104").GetAddressBytes()
);
M_Socket is the socket to send the stream and “192.168.0.104” is the interface ip at which network I want to send the stream.
By following above, Now I can send multicast successfully.

How to send UDP packets to a MAC address from an Android app?

Is there a way to send UDP packets to a network MAC address?
Neither DatagramSocket nor DatagramPacket seems to have a mechanism of doing this.
Because of the layered network stack, the first response is that you cannot send a UDP message to a MAC address. My statement means that you don't have any means of setting a MAC address in a UDP datagram field. You can send a UDP datagram to an IP address and port. This IP address can be unicast, multicast, or broadcast.
If you intend to send a UDP datagram to a specific MAC address, you need to implement a more complex solution (DHCP is an example of a more complex solution). There are different strategies you can apply:
If you just need to send a datagram to a MAC address without having received any datagram from that NIC, and knowing that MAC address, first you will need to send a layer 2 frame to that MAC address (a layer 2 protocol allows you to set a MAC address). You can implement a protocol listening to that MAC address frames and being able to send a response back providing you the corresponding IP address. RARP is a protocol that lets you get an IP given the MAC address
You can implement your protocol that uses a multicast group. From your PC you send a multicast message containing the MAC address you are targeting. All nodes (applications in nodes) subscribed to that multicast group receive that message. The one with the targeted MAC address can respond. Once it responds, you have its IP address and can send a unicast UDP datagram.
The short answer is no. The networking stack is set up for the hardware address to be addressable in the OS's media layer with only a defined interface with the transport layer exposed to the application. You would need to tap into the low-level OS. It looks like you are trying to make this call within Java and it's highly unlikely that you will be able to accomplish this.

UDP Packets IOS 9 LTE Network GCDASYNCUDP

I have a basestation (beaglebone running linux) at my home which is connected to multiple cameras. I connect my iPhone iOS9 to the basestation via TCP and the basestation will stream the video of each camera to a specific UDP port. All is well.
I want to be able to see the cameras when I am not connected to the local network. When my phone is connected to LTE, I have the iPhone connecting to the public address of my router via TCP and with port forwarding, all data is forwarded to the basestation. I am connecting and talking just like it was on the local network with the TCP client. All is well.
The problem is when the video is streamed via UDP on a specific port, no different than when on the local network, the basestation has no problem sending the packets, but the iPhone is not receiving anything. I am using GCDASYNCUDPSOCKET and my cellular carrier is Verizon.
I am wondering if this issue is due to Verizon blocking UDP packets? Or possibly there needs to be something else done other than just binding the iPhone UDP socket to a specific port and calling the beginreceiving function. I feel if it works on the local network, it should work on the cellular network.
I have also tried to ping the address of my cellphone from my computer which does not work. I am guessing the reason is because the iPhone has blocked this. It should be no different than pinging the address of google or anything else.
Please give me some insight on the possible issues or work arounds. I don't think I need to port forward the UDP since it is only outgoing and my Netgear router does not limit any outbound traffic (from the router to the iPhone). I was doing all this TCP before trying to send the video via UDP. It is much slower waiting to receive acks for 5 cameras streaming live video. And when it doesn't receive a packet it backs up the buffer and causes more issues. Also I had an issue with the TCP packets combining together so then I had to implement some kind of custom ack which made the delay worse, or add an end of message, but then it slows down on parsing and since I don't know exactly what data is coming it made things more difficult.
UDP is the way to go, just cannot receive the packets at this time. My understanding is a lot of games use UDP and they work on LTE network, so I'm not quite sure what the problem is. Is there special UDP ports that only work with Verizon?

Wireshare Check for Torrentz

I want to use wireshark to check which network users is using Port 59666 for downloads. Is it possible to use wireshark? and how would I begin to do this?
It may be possible to do this with wireshark, but it may require you to adjust your network topology to achieve this.
Firstly you need to decide where to run wireshark.
Wireshark can only tell you about network packets that it can see. To assist, wireshark can put the network card into promiscuous mode, but if the network card is connected to a switch, the switch will not send other network packets to you - so wireshark cannot report on them.
If your users are connected using wifi, then you can run wireshark on a wifi addapter and inspect all wifi network packets from all users on that wifi network. You may also install wireshark on a computer operating as the router / firewall, and inspect all the packets there.
The final option depends on your switch hardware. On managed switches it is usually possible to duplicate all network traffic to an additional port. That would allow you to connect your computer to this port, and then run wireshark on this network connection.
When you are receiving the wireshark trace, set up a filter for the ports you are interested in, and wait for your users to send packets. Inspect the packets, and you will see the source IP address. You now need to translate this IP address to a physical computer (DNS / DHCP servers may help with this).
Depending on your computer environment, tracking it down to a single computer may not identify an individual responsible. Someone could have left a torrent running in the background and someone else could have logged onto and used the machine.

Best way to find is my custom ethernet device is online and what IP it has got for iOS?

Ideas:
1. Pinging all my subnet ( using simple ping etc )
2. Sending GET to all IP in my subnet? ( may be too slow) waiting for 200 or 404 reply.
Thanx
Can you program your ethernet device to respond to Bonjour (mDNS) requests? That's the preferred discovery mechanism in the OSX/iOS ecosystem. avahi is an open-source mDNS daemon you might be able to run if your device runs a UNIX-like OS. You might also be able to find or write an embeddable mDNS server that you could integrate into your server if you're not running an OS as such.
Otherwise, I'd probably go with a custom broadcast UDP packet that the device will respond to. (which is basically what Bonjour/mDNS does, but less general) To send a broadcast UDP packet, open a UDP (datagram) socket and send a packet to the local subnet's broadcast IP. Make the packet contents suitably unique, and get your device to respond, e.g. using an HMAC, to avoid picking up any other devices or daemons which coincidentally answer on the same port.
This is a pure IP networking question. What you want to do is to send a TCP/IP broadcast message to the network and have you custom device respond to it. See TCP/IP Guide for some basic details.

Resources