6. Let $x, y, z$ satisfy $x+y+2z=6, 2xy+yz+zx=4$. Then the maximum value of $z$ is ( ).
(A) 2
(B) $\frac{7}{3}$
(C) 3
(D) $\frac{8}{3}$
6.B.
$$
\begin{array}{l}
\text { From } x+y=6-2 z \text {, we get } \\
2 x y=4-z(x+y) \\
=4-z(6-2 z)=2 z^{2}-6 z+4,
\end{array}
$$

which means $x y=z^{2}-3 z+2$.
Therefore, $x, y$ are the two roots of the quadratic equation
$$
t^{2}+(2 z-6) t+z^{2}-3 z+2=0
$$

Thus,
$$
\Delta=(2 z-6)^{2}-4\left(z^{2}-3 z+2\right)=-12 z+28 \geqslant 0 \text {. }
$$

Solving this, we get $z \leqslant \frac{7}{3}$.
Hence, the maximum value of $z$ is $\frac{7}{3}$.