6. In $\triangle A B C$, it is known that $\frac{1}{\tan \frac{A}{2}}+\frac{1}{\tan \frac{C}{2}}=\frac{4}{\tan \frac{B}{2}}$, and $b=4$. Then $a+c=(\quad)$.
(A) 5
(B) 6
(C) 7
(D) 8
6. B.

In Figure 3, let the incircle of $\triangle ABC$ be $\odot I$, with radius $r$. $\odot I$ is tangent to sides $BC$, $CA$, and $AB$ at points $D$, $E$, and $F$, respectively. Connect $IA$, $IB$, $IC$, $ID$, $IE$, and $IF$.
By the tangent segment theorem, we have
$$
AF = p - a, \quad BD = p - b, \quad CE = p - c,
$$

where $p = \frac{1}{2}(a + b + c)$.
In the right triangle $\triangle AIF$, $\tan \angle IAF = \frac{IF}{AF}$, i.e., $\tan \frac{A}{2} = \frac{r}{p - a}$.
Similarly, $\tan \frac{B}{2} = \frac{r}{p - b}$, $\tan \frac{C}{2} = \frac{r}{p - c}$.
Substituting into the given equation, we get
$$
\frac{p - a}{r} + \frac{p - c}{r} = \frac{4(p - b)}{r}.
$$

Thus, $a + c = \frac{3}{2} b = \frac{3}{2} \times 4 = 6$.