This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

UDP through Switch requires ARP?

0

Hello networks gurus,

I try to achieve UDP transmission between my PC and PCB which has Ethernet Physical Layer chip. They are connected through Switch. I send UDP packets from PC ( 192.168.0.162 192.168.0.222 Length: 46 Source port: 55005 Destination port: 20678 (tool to send packets: http://packetsender.com/)). But any of these packets appears on PCB (I check if any packet with source port 55005 is available).

I don't understand networking very good, but I think it may be because these packets are blocked on Switch and the reason is that I don't have ARP protocol implemented on my PCB. I see in Wireshark that my PC sends ARP to ask who is 192.168.0.222, but has no response. Is that correct? ARP should be always implemented?

asked 08 Apr '14, 02:27

dansci's gravatar image

dansci
1112
accept rate: 0%


One Answer:

1

Yes, ARP must be implemented, or the IP stack of the sender has no way of finding the destination MAC address to send the packet to.

This is sort of like only writing a name on a letter, but no street address/zip code/town. The post office has no chance to deliver the letter because it doesn't know where it has to go to.

BTW, just in case: for IPv6 you could leave ARP out because it is not used for IPv6 anymore, but you'd have to implement ICMPv6 instead, which is more complicated.

answered 08 Apr '14, 04:07

Jasper's gravatar image

Jasper ♦♦
23.8k551284
accept rate: 18%

Thanks.

Because it is FPGA, the simpler is better, I will stay with IPv4. In such a configuration I have to assign some MAC and IP to my device.

IP will be one from my LAN, but other PCs in LAN use DHCP config. Will it be wise enough to don't offer IP which is used already in LAN or the range of allowed/not-allowed IPs must be configured on DHCP server?

I know that there are some restrictions on MAC numbers. Can I use some artificial MAC in my network e.g. 11:22:33:44:55:66 ? Is there any non-restricted range of MAC addresses?

(08 Apr '14, 07:13) dansci
1

If your device is not capable of answering to gratuitous ARP requests (which are used to check for duplicate IP addresses on the network) you should exclude the static IP of your device from the DHCP range.

You can use artificial MAC addresses as long as there is no collision with another system having the same address in the local network. And you should stay away from special MACs like those for Multicast and Broadcast.

By the way, here's the list of MAC ranges that are already in use (first three octets are the vendor octets):

http://standards.ieee.org/develop/regauth/oui/oui.txt

(08 Apr '14, 07:22) Jasper ♦♦