7. An ant starts from vertex $A$ of the rectangular prism $A B C D-A_{1} B_{1} C_{1} D_{1}$, and travels along the surface to reach vertex $C_{1}$. The shortest distance is 6. Then the maximum volume of the rectangular prism is $\qquad$ .
7. 12 $\sqrt{3}$.

Let the lengths of the three edges starting from the same vertex of a rectangular prism be $a, b, c (a \leqslant b \leqslant c)$. Then the shortest distance from point $A$ to vertex $C_{1}$ along the surface of the rectangular prism is
$$
\begin{array}{l}
\sqrt{(a+b)^{2}+c^{2}}=6 \\
\Rightarrow(a+b)^{2}+c^{2}=36 .
\end{array}
$$

Notice that,
$$
\begin{array}{l}
(a+b)^{2}+c^{2}=a^{2}+b^{2}+2 a b+c^{2} \\
\geqslant 2 a b+2 a b+c^{2} \geqslant 3 \sqrt[3]{4 a^{2} b^{2} c^{2}} .
\end{array}
$$

Thus, $4 a^{2} b^{2} c^{2} \leqslant 12^{3}$.
Therefore, the volume of the rectangular prism is
$$
V=a b c \leqslant 12 \sqrt{3} \text {. }
$$

When $a=b, 2 a b=c^{2}$, i.e., $a=b=\sqrt{6}, c=2 \sqrt{3}$, the equality holds.