Re: Controlling ports used by natd
From: Mike Silbersack (silby_at_silby.com)
Date: 12/23/03
- Previous message: Brett Glass: "Re: Controlling ports used by natd"
- In reply to: Barney Wolff: "Re: Controlling ports used by natd"
- Next in thread: Charles Swiger: "Re: Controlling ports used by natd"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 23 Dec 2003 03:19:03 -0600 (CST) To: Barney Wolff <barney@databus.com>
On Tue, 23 Dec 2003, Barney Wolff wrote:
> It is odd that libalias picks a port number, and then, if the "use sockets"
> option is set, tries to open a socket on that port. Perhaps if the above
> option is set, it should bind port 0 and use the port the kernel assigns.
>
> If folks think that's a good idea, I could produce a patch to alias_db.c
> for evaluation.
>
> --
> Barney Wolff http://www.databus.com/bwresume.pdf
I haven't looked at libalias, but there may be some method to the madness.
If you just ask the kernel for a source port, it can only hand out the
portrange of ports. However, if you know your source / destination tuple
beforehand, you may be able to get around the portrange limitation for
your concurrent connection count.
Now, whether or not libalias is smart enough and whether or not the kernel
is playing along is another question entirely. I looked into ephemeral
port allocation a few months ago, and it's an absolute nightmare to
determine what combination of socket / bind / connect calls are necessary
to get the best possible behavior. Hence why I gave up and enhanced
time_wait recycling instead. :)
Mike "Silby" Silbersack
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
- Previous message: Brett Glass: "Re: Controlling ports used by natd"
- In reply to: Barney Wolff: "Re: Controlling ports used by natd"
- Next in thread: Charles Swiger: "Re: Controlling ports used by natd"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|