maximum number of outgoing connections

Igor Sysoev is at rambler-co.ru
Mon Aug 20 08:11:48 PDT 2007


It seems that FreeBSD can not make more than

net.inet.ip.portrange.last - net.inet.ip.portrange.first

simultaneous outgoing connections, i.e., no more than about 64k.

If I made ~64000 connections 127.0.0.1:XXXX > 127.0.0.1:80, then
connect() to an external address returns EADDRNOTAVAIL.

net.inet.ip.portrange.randomized is 0.

sockets, etc. are enough:

ITEM        SIZE     LIMIT      USED      FREE  REQUESTS  FAILURES
socket:      356,   204809,    13915,   146443, 148189452,        0
inpcb:       180,   204820,    20375,   137277, 147631805,        0
tcpcb:       464,   204800,    13882,   142102, 147631805,        0
tcptw:        48,    41028,     6493,    11213, 29804665,        0

I saw it on 6.2-STABLE.


-- 
Igor Sysoev
http://sysoev.ru/en/


More information about the freebsd-net mailing list