[Bug 246108] ue0 (ASIX Elec. Corp. AX88178) does not capture packets in promisc mode w/o IP address assigned
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat May 2 12:24:38 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246108
Tomasz "CeDeROM" CEDRO <tomek at cedro.info> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tomek at cedro.info
--- Comment #2 from Tomasz "CeDeROM" CEDRO <tomek at cedro.info> ---
Hello world :-)
The problem seems to be with IF UP and IF IP assignment:
* Onboard Ethernet can tcpdump after ifconfig up (no IP assigned).
* USB Ethernet needs to have IP assigned in addition to ifconfig up to tcpdump.
* Setting ifconfig em/ue ip also brings the interface up without "up"
parameter!!!
root at 0xCFMX4:~ # uname -a
FreeBSD 0xCFMX4 12.1-RELEASE-p3 FreeBSD 12.1-RELEASE-p3 GENERIC amd64
1. Onboard Intel - looks like it needs to be only up, no IP assigned tcpdumps
packets.
root at 0xCFMX4:~ # dmesg|grep em0
em0: <Intel(R) PRO/1000 Network Connection> port 0xf080-0xf09f mem
0xf7300000-0xf731ffff,0xf7344000-0xf7344fff irq 20 at device 25.0 on pci0
em0: Using 1024 TX descriptors and 1024 RX descriptors
em0: Using an MSI interrupt
em0: Ethernet address: XXX
em0: netmap queues/slots: TX 1/1024, RX 1/1024
em0: link state changed to UP
em0: link state changed to DOWN
em0: link state changed to UP
root at 0xCFMX4:~ # ifconfig em0 down delete
root at 0xCFMX4:~ # ifconfig em0
em0: flags=8c02<BROADCAST,OACTIVE,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=81249b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LRO,WOL_MAGIC,VLAN_HWFILTER>
ether XXX
inet6 XXX%em0 prefixlen 64 tentative scopeid 0x1
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
root at 0xCFMX4:~ # tcpdump -ni em0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on em0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig em0 1.2.3.4 up
root at 0xCFMX4:~ # tcpdump -ni em0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on em0, link-type EN10MB (Ethernet), capture size 262144 bytes
13:37:29.046739 STP 802.1w, Rapid STP, Flags [Proposal], bridge-id
8000.XXX.8007, length 43
13:37:29.896857 IP XXX.5678 > 255.255.255.255.5678: UDP, length 120
13:37:29.896867 CDPv1, ttl: 120s, Device-ID 'XXX', length 87
13:37:29.896868 LLDP, length 105: XXX
^C
4 packets captured
4 packets received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig em0 down delete
root at 0xCFMX4:~ # tcpdump -ni em0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on em0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig em0 up
root at 0xCFMX4:~ # ifconfig em0
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=81249b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LRO,WOL_MAGIC,VLAN_HWFILTER>
ether XXX
inet6 XXX%em0 prefixlen 64 scopeid 0x1
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
root at 0xCFMX4:~ # tcpdump -ni em0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on em0, link-type EN10MB (Ethernet), capture size 262144 bytes
13:38:53.971397 STP 802.1w, Rapid STP, Flags [Learn, Forward], bridge-id
8000.XXX.8007, length 43
13:38:55.972179 STP 802.1w, Rapid STP, Flags [Learn, Forward], bridge-id
8000.XXX.8007, length 43
^C
2 packets captured
2 packets received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig em0 down delete
ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
root at 0xCFMX4:~ # tcpdump -ni em0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on em0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig em0 1.2.3.4
root at 0xCFMX4:~ # tcpdump -ni em0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on em0, link-type EN10MB (Ethernet), capture size 262144 bytes
14:16:44.987838 STP 802.1w, Rapid STP, Flags [Proposal], bridge-id
8000.XXX.8007, length 43
^C
1 packet captured
1 packet received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig em0
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=81249b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LRO,WOL_MAGIC,VLAN_HWFILTER>
ether XXX
inet6 XXX%em0 prefixlen 64 scopeid 0x1
inet 1.2.3.4 netmask 0xff000000 broadcast 1.255.255.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
2. USB RTL driver GigaBit UNITEK 3xUSB3.0 HUB + GBE - needs an IP to tcpdump.
root at 0xCFMX4:~ # usbconfig
(..)
ugen0.9: <Generic 4-Port USB 3.0 Hub> at usbus0, cfg=0 md=HOST spd=SUPER
(5.0Gbps) pwr=SAVE (0mA)
ugen0.10: <Realtek USB 10/100/1000 LAN> at usbus0, cfg=0 md=HOST spd=SUPER
(5.0Gbps) pwr=ON (72mA)
root at 0xCFMX4:~ # dmesg|grep ue0
ue0: <USB Ethernet> on ure0
ue0: Ethernet address: XXX
ue0: link state changed to DOWN
ue0: link state changed to UP
root at 0xCFMX4:~ # ifconfig ue0 down delete
root at 0xCFMX4:~ # ifconfig ue0
ue0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
ether XXX
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
root at 0xCFMX4:~ # tcpdump -ni ue0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ue0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig ue0 1.2.3.4 up
root at 0xCFMX4:~ # tcpdump -ni ue0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ue0, link-type EN10MB (Ethernet), capture size 262144 bytes
13:47:02.430378 STP 802.1w, Rapid STP, Flags [Learn, Forward], bridge-id
8000.XXX.8008, length 43
^C
1 packet captured
1 packet received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig ue0 down delete
root at 0xCFMX4:~ # ifconfig ue0 up
root at 0xCFMX4:~ # tcpdump -ni ue0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ue0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig ue0 1.2.3.4
root at 0xCFMX4:~ # tcpdump -ni ue0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ue0, link-type EN10MB (Ethernet), capture size 262144 bytes
13:47:56.477440 STP 802.1w, Rapid STP, Flags [Learn, Forward], bridge-id
8000.XXX.8008, length 43
^C
1 packet captured
1 packet received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig ue0 down delete
root at 0xCFMX4:~ # ifconfig ue0 1.2.3.4
root at 0xCFMX4:~ # tcpdump -ni ue0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ue0, link-type EN10MB (Ethernet), capture size 262144 bytes
14:03:26.008995 STP 802.1w, Rapid STP, Flags [Proposal], bridge-id
8000.XXX.8008, length 43
^C
1 packet captured
1 packet received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig ue0
ue0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
ether XXX
inet 1.2.3.4 netmask 0xff000000 broadcast 1.255.255.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
3. USB GBE AXGE "Manhattan USB 3.0 Gigabit Ethernet Adapter" - also needs IP to
tcpdump.
root at 0xCFMX4:~ # usbconfig
(..)
ugen0.11: <ASIX Elec. Corp. AX88179> at usbus0, cfg=0 md=HOST spd=SUPER
(5.0Gbps) pwr=ON (124mA)
root at 0xCFMX4:~ # dmesg|grep ue1
ue1: <USB Ethernet> on axge0
ue1: Ethernet address: XXX
ue1: link state changed to DOWN
root at 0xCFMX4:~ # ifconfig ue1 down delete
ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
root at 0xCFMX4:~ # tcpdump -ni ue1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig ue1 1.2.3.4 up
root at 0xCFMX4:~ # tcpdump -ni ue1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes
13:54:09.022119 STP 802.1w, Rapid STP, Flags [Proposal], bridge-id
8000.XXX.8008, length 47
13:54:10.573592 IP XXX.5678 > 255.255.255.255.5678: UDP, length 120
13:54:10.573601 CDPv1, ttl: 120s, Device-ID 'XXX'[|cdp]
13:54:10.573602 LLDP, length 109: XXX
13:54:10.845218 STP 802.1w, Rapid STP, Flags [Proposal], bridge-id
8000.XXX.8008, length 47
^C
5 packets captured
5 packets received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig ue1 down delete
root at 0xCFMX4:~ # ifconfig ue1 up
root at 0xCFMX4:~ # tcpdump -ni ue1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes
^V^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig ue1 1.2.3.4
root at 0xCFMX4:~ # tcpdump -ni ue1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes
13:55:34.931786 STP 802.1w, Rapid STP, Flags [Learn, Forward], bridge-id
8000.XXX.8008, length 47
^C
1 packet captured
1 packet received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig ue1 down delete
root at 0xCFMX4:~ # ifconfig ue1 1.2.3.4
root at 0xCFMX4:~ # tcpdump -ni ue1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes
14:01:42.011043 STP 802.1w, Rapid STP, Flags [Proposal], bridge-id
8000.XXX.8008, length 47
14:01:42.140449 IP XXX.5678 > 255.255.255.255.5678: UDP, length 120
14:01:42.140459 CDPv1, ttl: 120s, Device-ID 'XXX'[|cdp]
14:01:42.140459 LLDP, length 109: XXX
^C
4 packets captured
4 packets received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig ue1
ue1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE>
ether XXX
inet 1.2.3.4 netmask 0xff000000 broadcast 1.255.255.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
4. USB ASX "UNITEK USB2.0 GigaBit LAN" - also needs to have IP assigned to
tcpdump.
root at 0xCFMX4:~ # usbconfig
(..)
ugen0.11: <ASIX Elec. Corp. AX88178> at usbus0, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=ON (250mA)
root at 0xCFMX4:~ # ifconfig ue1 down delete
ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
root at 0xCFMX4:~ # ifconfig ue1
ue1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80008<VLAN_MTU,LINKSTATE>
ether XXX
media: Ethernet autoselect (10baseT/UTP <half-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
root at 0xCFMX4:~ # tcpdump -ni ue1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig ue1 1.2.3.4 up
root at 0xCFMX4:~ # tcpdump -ni ue1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes
14:08:10.001078 STP 802.1w, Rapid STP, Flags [none], bridge-id 8000.XXX.8008,
length 43
14:08:10.110409 IP XXX > 255.255.255.255.5678: UDP, length 120
14:08:10.110665 CDPv1, ttl: 120s, Device-ID 'XXX', length 87
14:08:10.110669 LLDP, length 105: XXX
^C
4 packets captured
4 packets received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig ue1 down delete
root at 0xCFMX4:~ # ifconfig ue1 up
^[[A^[[Aroot at 0xCFMX4:~ # tcpdump -ni ue1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig ue1 1.2.3.4
root at 0xCFMX4:~ # tcpdump -ni ue1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes
14:09:27.744604 STP 802.1w, Rapid STP, Flags [Learn, Forward], bridge-id
8000.XXX.8008, length 43
^C
1 packet captured
1 packet received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig ue1 down delete
root at 0xCFMX4:~ # tcpdump -ni ue1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig ue1 1.2.3.4
root at 0xCFMX4:~ # tcpdump -ni ue1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ue1, link-type EN10MB (Ethernet), capture size 262144 bytes
14:10:25.127034 IP XXX > 255.255.255.255.5678: UDP, length 120
14:10:25.127276 CDPv1, ttl: 120s, Device-ID 'XXX', length 87
14:10:25.127278 LLDP, length 105: XXX
^C
3 packets captured
3 packets received by filter
0 packets dropped by kernel
root at 0xCFMX4:~ # ifconfig ue1
ue1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80008<VLAN_MTU,LINKSTATE>
ether XXX
inet 1.2.3.4 netmask 0xff000000 broadcast 1.255.255.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-usb
mailing list