Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

PI 2.1 CLI template - interface range command not working as should

hi there,

i have a quick question about the interface range command within a CLI template. 

when using the command 

interface range gigabitEthernet 1/0/1 - 4
switchport access vlan 900
switchport mode access
no snmp trap link-status
no logging event link-status

it seems to only apply the options to the first interface and not the entire range. 

just wondering if someone could help

 

the target ios device is 2960x with IOS 15.x 

 

thanks for any help

 

 

8 REPLIES
Cisco Employee

Ideally it should work. Did

Ideally it should work. Did you tried using the range command without spaces?

You have "gi 1/0/1 - 4", please try without space "gi 1/0/1-4" and see how the template goes.

-Thanks

Vinod

-Thanks Vinod **Rating Encourages contributors, and its really free. **
New Member

Yes, I've tried many

Yes, I've tried many variations, but to no avail.

 

any help would be appreciated  

 

regards

New Member

 I just tried creating a CLI

 

I just tried creating a CLI template with the following config and pushing it to one of our 2960X switches and it worked:

in ra g1/0/5 - 10
  description TestWorked
  end

 

Here was the result:

#sho inter status

Port      Name               Status       Vlan       Duplex  Speed Type
Gi1/0/1                      notconnect   2            auto   auto 10/100/1000BaseTX
Gi1/0/2                      notconnect   2            auto   auto 10/100/1000BaseTX
Gi1/0/3                      notconnect   2            auto   auto 10/100/1000BaseTX
Gi1/0/4                      notconnect   2            auto   auto 10/100/1000BaseTX
Gi1/0/5   TestWorked         notconnect   2            auto   auto 10/100/1000BaseTX
Gi1/0/6   TestWorked         notconnect   2            auto   auto 10/100/1000BaseTX
Gi1/0/7   TestWorked         notconnect   2            auto   auto 10/100/1000BaseTX
Gi1/0/8   TestWorked         connected    2          a-full   a-10 10/100/1000BaseTX
Gi1/0/9   TestWorked         notconnect   2            auto   auto 10/100/1000BaseTX
Gi1/0/10  TestWorked         connected    2          a-full   a-10 10/100/1000BaseTX

 

 

New Member

 I've made a little progress.

 

I've made a little progress. it seems when deploying the template via configuration tasks the command works as it should. However, i'm trying to deploy my CLI template via PnP profile (auto install), its during this method that the configuration only applies to the first interface of the range. is there are a known bug for this or a work around?

 

regards 

Roy

Cisco Employee

I have also tested this and

I have also tested this and seems it worked. With your issue specific to PnP during which Interface Range is not working, this doesn't seems anything known.

It may be a new Bug possibly. I would advise you to open a TAC case to work on this further to identify this issue.

-Thanks

Vinod

-Thanks Vinod **Rating Encourages contributors, and its really free. **
Bronze

Hi Roy,were you ever able to

Hi Roy,

were you ever able to resolve? im having the same issue using it via PnP.

Thanks in advance for the responses

New Member

I was never able to solve the

I was never able to solve the issue using the interface range command. if you happen to find a solution please message me

 

thanks

 

Roy

Bronze

Yeah well i did a little bit

Yeah well i did a little bit of a workaround but may not be acceptable. Im using autosmart ports. Works for now but i know CDP isnt supposed to be on post configs. I may just edit the macro once the phones are plugged in and leave the configs there.

 

Im also having an auto configure issue for the trunks so i may hardcode as well.

142
Views
0
Helpful
8
Replies
CreatePlease to create content