robertdavidgraham / masscan

TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes.
GNU Affero General Public License v3.0
23.79k stars 3.08k forks source link

slow packet rate behind linksys ac1200 #254

Open whitewhidow opened 8 years ago

whitewhidow commented 8 years ago

Hi.

Any clue why when i am behind a certain router (in this case a linksys ac1200) my packet transfer speeds can hardly get upto 2000-3000pps.

I know the NIC is fine (also tested --offline), since i can get high masscan speeds on a different networks, but the weird thing is, i have high (regular traffic) speeds on this network aswell. so i reach about 40 mbps here, yet masscan can only get to 2000-3000 packets. i only have this issues on this network (so far)

any clues ?

Thx

berney commented 7 years ago

It's probably related to the router doing NAT. Creating lots of short lived sessions is probably canning the router. Masscan effectively does stateless scanning, which allows it to scale very efficiently, but putting it behind a router doing NAT, will lead to scaling problems like you are seeing.