# 单机单网卡最大 tcp 长连接数是 65535 吗

Kernel也会帮你选定一个端口。这样就会出现只能使用～65k的连接。

IP_BIND_ADDRESS_NO_PORT (since Linux 4.2)              Inform the kernel to not reserve an ephemeral port when usingbind(2) with a port number of 0.  The port will later be auto‐ matically chosen at connect(2) time, in a way that allows              sharing a source port as long as the 4-tuple is unique.

/dev/net/tun