cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1061
Views
0
Helpful
8
Replies

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

RoyBurnison
Level 1
Level 1

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 8

Vinod Arya
Cisco Employee
Cisco Employee

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. **

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

 

any help would be appreciated  

 

regards

dominik78
Level 4
Level 4

 

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

 

 

 

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

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. **

a.gooding
Level 5
Level 5

Hi Roy,

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

Thanks in advance for the responses

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

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.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: