6. Let the function $f(x)=\frac{x}{x^{2}+3 x+2}$, point $A_{0}$ represents the origin, point $A_{n}$ has coordinates $(n, f(n))(n \in \mathbf{N}^{*})$, $k_{n}$ represents the slope of the line $A_{0} A_{n}$, and let $S_{n}=k_{1}+k_{2}+\cdots+k_{n}$, then $S_{n}=$ $\qquad$.