Default ephemeral port range
Dustin Wenz
dustinwenz at ebureau.com
Tue Nov 13 21:48:21 UTC 2012
Thanks for the information;
It would seem that when I invoke the connect() system call, it picks a client port in the portrange.first-last range and not necessarily in portrange.hifirst-hilast. Is this expected behavior, or a bug in connect()?
- .Dustin
On Nov 12, 2012, at 12:49 PM, Colin O'Keeffe <cokeeffe at gmail.com> wrote:
> 8.1 through 9.1RC will use net.inet.ip.portrange.hifirst (49152) to .hilast (65535) for ephemeral ports as far as I'm aware. net.inet.ip.portrange.first to .last are just a reference to available port numbers as per RFC6056
>
> Correct me if I'm wrong but netinet/in_pcb.c:490 indicates this is the case.
>
> -Colin
>
> On 12 Nov 2012, at 17:57, Dustin Wenz wrote:
>
>> I'm trying to determine why the default ephemeral port range appears to be 10000 through 65535 in at least 8.1 through 9.1RC. Documentation regarding the lower bound on the range seems inconsistent. The FreeBSD website (http://wiki.freebsd.org/SystemTuning) suggests that net.inet.ip.portrange.first defaults to 49152, which I don't believe is accurate.
>>
>> The IANA recommends the range be 49152 through 65535 (http://tools.ietf.org/html/rfc6056). Is there any particular reason why net.inet.ip.portrange.first defaults to 10000?
>>
>> - .Dustin
>>
>> _______________________________________________
>> freebsd-net at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-net
>> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
>
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
More information about the freebsd-net
mailing list