0
I have a simple UDP device (ENC28J60 ) connected to my computer with a direct cable. The device configured to send UDP packet to 192.168.133.1 IP, 6661 port.
The computer ,Fedora 22 OS, interface name is enp7s0. When an IP address assigned to the interface, tcpdump hangs, netcat silent. When no IP address assigned to the interface, netcat silent (no output), tcpdump receive packets.
The packets really comes from a device, I can see with tcpdump, only when the interface is UP, but no IP address assigned to.
First try to bring up the interface with an IP address.:
[root@d7520 ~]# nmcli connection up toArd
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/20)
[root@d7520 ~]# ip a s dev enp7s0
2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 74:86:7a:1e:e0:85 brd ff:ff:ff:ff:ff:ff
inet 192.168.133.1/24 brd 192.168.133.255 scope global enp7s0
valid_lft forever preferred_lft forever
inet6 fe80::7686:7aff:fe1e:e085/64 scope link
valid_lft forever preferred_lft forever
Try with netcat and tcpdump. No answer. tcpdump hangs.
[root@d7520 ~]# ncat -u -l 6661
^C
[root@d7520 ~]# tcpdump -vvv -i enp7s0 -X
tcpdump: listening on enp7s0, link-type EN10MB (Ethernet), capture size 262144 bytes
[root@d7520 ~]# nc -v -l -u 6661
Ncat: Version 6.47 ( http://nmap.org/ncat )
Ncat: Listening on :::6661
Ncat: Listening on 0.0.0.0:6661
^C
Now , try to remove the IP address. tcpdump got the UDP packets, but netcat still silent.:
[root@d7520 ~]# nmcli connection down toArd
Connection 'toArd' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/21)
[root@d7520 ~]# ip a s dev enp7s0
2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 74:86:7a:1e:e0:85 brd ff:ff:ff:ff:ff:ff
[root@d7520 ~]# tcpdump -vvv -i enp7s0 -X
tcpdump: listening on enp7s0, link-type EN10MB (Ethernet), capture size 262144 bytes
13:41:39.423449 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 37)
192.168.133.2.6660 > 192.168.133.1.6661: [udp sum ok] UDP, length 9
0x0000: 4500 0025 0000 4000 4011 af73 c0a8 8502 E..%..@.@..s....
0x0010: c0a8 8501 1a04 1a05 0011 0630 7465 7374 ...........0test
0x0020: 2031 3233 0000 0000 0000 0000 0000 .123..........
^C
1 packet captured
1 packet received by filter
0 packets dropped by kernel