# Packet occasionally hung when using sniffer type af\_packet

**URL:** <https://discuss.elastic.co/t/packet-occasionally-hung-when-using-sniffer-type-af-packet/88649>\
**Category:** Beats\
**Tags:** packetbeat\
**Created:** [June 8, 2017, 4:39am UTC](https://discuss.elastic.co/t/packet-occasionally-hung-when-using-sniffer-type-af-packet/88649 "2017-06-08T04:39:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![billzy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/billzy/32/9967_2.png) [@billzy](https://discuss.elastic.co/u/billzy)\
**Post date:** [June 8, 2017, 4:39am UTC](https://discuss.elastic.co/t/packet-occasionally-hung-when-using-sniffer-type-af-packet/88649/1 "2017-06-08T04:39:55Z")

</div>

I ran into a weird case that packetbeat not working when i specify using af\_packet, after starting seems noting is runing, no cpu consumption, no logs generated, just hung in there, and cannot be stopped using CtrlC

but everything worked fine if i just change sniffer type to pcap

i'm monitoring on a pretty busy interface which is 10g bandwidth, thoughtput 1g data per second

---

<div class="post-metadata">

**Author:** ![billzy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/billzy/32/9967_2.png) [@billzy](https://discuss.elastic.co/u/billzy)\
**Post date:** [June 8, 2017, 9:41am UTC](https://discuss.elastic.co/t/packet-occasionally-hung-when-using-sniffer-type-af-packet/88649/2 "2017-06-08T09:41:31Z")

</div>

turned out turning on promisc for the interface solved the problem, no idea why

the command i used is  
ifconfig eth0 promisc

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [June 8, 2017, 10:35am UTC](https://discuss.elastic.co/t/packet-occasionally-hung-when-using-sniffer-type-af-packet/88649/3 "2017-06-08T10:35:49Z")

</div>

The sniffer is not setting [promisc mode](https://en.wikipedia.org/wiki/Promiscuous_mode) for you. Without promisc mode, the NIC (in hardware) will filter out packets intended for other MAC addresses.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 10:36am UTC](https://discuss.elastic.co/t/packet-occasionally-hung-when-using-sniffer-type-af-packet/88649/4 "2017-07-06T10:36:19Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
