Subject: Re: NAT + ALTQ + Samba problem
To: Dawid Busse <darthbula@o2.pl>
From: Jonathan A. Kollasch <jakllsch@kollasch.net>
List: netbsd-help
Date: 07/27/2006 17:57:22
--OaZoDhBhXzo6bW1J
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jul 27, 2006 at 05:10:50PM +0200, Dawid Busse wrote:
> Hi All,
>=20
> I'm using NetBSD as  NAT/Gateway and Samba server.
> It has 2 NIC's:
> fxp0 - connected to ADSL modem
> wm0 - connected to LAN, IP 192.168.1.1/24=20
>=20
> I use ALTQ/PRIQ on wm0 to divide incoming Internet traffic - it works fin=
e if wm0 bandwidth=20
> is set to DSL speed, but this results in poor Samba performance. Tried to=
 add another NIC=20
> rtk0 192.168.1.254/24 only for samba. In smb.conf:
>=20
> interfaces =3D lo0 rtk0
> bind interfaces only =3D yes,
> hosts allow =3D 192.168.1. =20
>=20
> Performance also was poor, does anybody have some tips how to solve this?=
=20

Putting two interfaces onto the same subnet is asking for weirdness.

Perhaps PRIQ is a poor choice for this situation.  PRIQ only really
works well if the connection is flooded.

A properly crafted HFSC configuration may be capable of doing
what you need.

Perhaps something like this:

interface wm0 bandwidth 1G hfsc
class hfsc wm0 wan_class root pshare 0 grate $DSL_DOWNSTREAM_RATE default
<sub-classes of wan_class and filters for Internet traffic>
class hfsc wm0 lan_class root pshare 100 grate 999M=20
<filters matching lan-to-lan traffic push stuff into lan_class>

	Jonathan Kollasch

--OaZoDhBhXzo6bW1J
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (NetBSD)

iD8DBQFEyUTSOjx1ye3hmokRAmnaAJ0eigIs9Gx7nUq9bW/23HPFbnK5lwCcCfsx
cKWFQt56xWUENZy0q/x2MeQ=
=tZcg
-----END PGP SIGNATURE-----

--OaZoDhBhXzo6bW1J--