3. Given a cube $A B C D-A_{1} B_{1} C_{1} D_{1}$, it is known that there are skew lines on the diagonals of the square faces. If the distance between two such skew lines is 1, then the volume of the cube is $\qquad$
3. 1 or $3 \sqrt{3}$.

Let the edge length of the cube be $x$.
If the distance between the diagonal lines $A C$ and $B_{1} D_{1}$ is 1, then $x=1$.
Thus, the volume of the cube is 1.
If the distance between the diagonal lines $A C$ and $B C$ is 1, then $\frac{\sqrt{3}}{3} x=1, x=\sqrt{3}$.
Therefore, the volume of the cube is $3 \sqrt{3}$.