How to configur a port range on Cisco switch

Hello
I have a Cisco 2960 –x Switch that I am trying to configure. I am trying to have my ports resemble a the ports of an older switch I am replacing. The old switch port s is configured like so:

interface FastEthernet0/7
 description TN-C2-WAP-01
 switchport mode trunk
 spanning-tree portfast
 spanning-tree bpdufilter enable
 spanning-tree bpduguard enable
!
interface FastEthernet0/8
 switchport mode access
 spanning-tree portfast
 spanning-tree bpdufilter enable
 spanning-tree bpduguard enable
!
On the new interface my interfaces are config like this:
 interface GigabitEthernet1/0/7
!
interface GigabitEthernet1/0/8

I was trying to configure a port range but I am not able to this is the CMD I was trying to use
TN-C2-SW02(config)#interface range gigabitethernet1/1-21 but no luck. Is this possible?

Thanks
ahmad1467Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jody LemoineNetwork ArchitectCommented:
Try "interface range gi1/0/1-21" instead.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ahmad1467Author Commented:
Thank you that worked
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Switches / Hubs

From novice to tech pro — start learning today.