Step 1: Define the variables.
Let the length of the rectangle be \(l\) and the breadth be \(b\).
Given that the perimeter of the rectangle is
\[
2(l+b)=24
\]
\[
l+b=12
\]
\[
b=12-l
\]
When the rectangle is revolved about one of its sides, it generates a cylinder.
In this cylinder:
\[
\text{Radius} = b
\]
\[
\text{Height} = l
\]
Step 2: Write the formula for volume of the cylinder.
The volume of a cylinder is
\[
V=\pi r^2 h
\]
Substituting \(r=b\) and \(h=l\):
\[
V=\pi b^2 l
\]
Using \(b=12-l\):
\[
V=\pi (12-l)^2 l
\]
Step 3: Express the volume as a function of \(l\).
\[
V(l)=\pi l(12-l)^2
\]
Expand the expression:
\[
(12-l)^2=144-24l+l^2
\]
Thus
\[
V=\pi(144l-24l^2+l^3)
\]
Step 4: Differentiate to find maximum volume.
\[
\frac{dV}{dl}=\pi(144-48l+3l^2)
\]
For maximum volume
\[
\frac{dV}{dl}=0
\]
\[
144-48l+3l^2=0
\]
Divide by \(3\):
\[
48-16l+l^2=0
\]
\[
l^2-16l+48=0
\]
\[
(l-4)(l-12)=0
\]
Thus
\[
l=4 \quad \text{or} \quad l=12
\]
But if \(l=12\), then \(b=0\), which is not possible.
Hence
\[
l=4
\]
Step 5: Find the breadth.
\[
b=12-l
\]
\[
b=12-4
\]
\[
b=8
\]
Step 6: Verify maximum condition.
The second derivative
\[
\frac{d^2V}{dl^2}=\pi(-48+6l)
\]
Substitute \(l=4\):
\[
\pi(-48+24)=-24\pi<0
\]
Hence the volume is maximum.
Step 7: Final dimensions.
Thus the rectangle must have sides \(4\) cm and \(8\) cm to produce the cylinder of maximum volume.
Final Answer:
\[
\boxed{l=4\text{ cm},\quad b=8\text{ cm}}
\]