2. Let $a=\sqrt{x^{2}+x y+y^{2}}, b=p \sqrt{x y}$, $c=x+y$. If for any positive numbers $x$ and $y$, a triangle exists with sides $a$, $b$, and $c$, then the range of the real number $p$ is $\qquad$
2. $(2-\sqrt{3}, 2+\sqrt{3})$.

Obviously $a<c$, thus,
$a, b, c$ can form a triangle
$$
\Leftrightarrow c-a<b<c+a
$$
$\Leftrightarrow$ for any positive integers $x, y$, it always holds that
$$
\begin{aligned}
& \sqrt{\frac{x}{y}}+\sqrt{\frac{y}{x}}-\sqrt{\frac{x}{y}+1+\frac{y}{x}} \\
< & p \sqrt{\frac{x}{y}}+\sqrt{\frac{y}{x}}+\sqrt{\frac{x}{y}+1+\frac{y}{x}} .
\end{aligned}
$$

Since $\sqrt{\frac{x}{y}}+\sqrt{\frac{y}{x}} \geqslant 2$, we know that
the right side of equation (1)
$$
=\sqrt{\frac{x}{y}}+\sqrt{\frac{y}{x}}+\sqrt{\left(\frac{x}{y}+\frac{y}{x}\right)^{2}-1} \geqslant 2+\sqrt{3} \text {. }
$$

It is easy to see that when $x=y$, the right side of equation (1) takes the minimum value $2+\sqrt{3}$.
The expression on the left side of equation (1) is exactly the reciprocal of the right side expression, thus, its maximum value is $2-\sqrt{3}$.
Therefore, $2-\sqrt{3}<p<2+\sqrt{3}$.