cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1387
Views
10
Helpful
6
Replies

need 2960-x interface template and macro

tauseef.kazi
Level 1
Level 1

I am planing for interface template based configuration for 2960-X deployment. I have not got my hands on the hardware yet. I want to check details of the commands in default built in template.

May I ask someone with access of 2960-X switches to let me have output of the following show command

 

show template interface source built-in all

show shell functions

 

Thanks in advance.

1 Accepted Solution

Accepted Solutions

Hello,

 

here is the output:

 

2960X# show template interface source built-in all

Building configuration...

Template Name : AP_INTERFACE_TEMPLATE
Modified : No
Template Definition :
switchport mode trunk
switchport nonegotiate
mls qos trust cos
srr-queue bandwidth share 1 30 35 5
priority-queue out
!
Template Name : DMP_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast
spanning-tree bpduguard enable
switchport mode access
switchport block unicast
switchport port-security
mls qos trust dscp
srr-queue bandwidth share 1 30 35 5
priority-queue out
!
Template Name : IP_CAMERA_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast
spanning-tree bpduguard enable
switchport mode access
switchport block unicast
switchport port-security
mls qos trust dscp
srr-queue bandwidth share 1 30 35 5
priority-queue out
!
Template Name : IP_PHONE_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast
spanning-tree bpduguard enable
switchport mode access
switchport block unicast
switchport port-security maximum 3
switchport port-security maximum 2 vlan access
switchport port-security violation restrict
switchport port-security aging time 2
switchport port-security aging type inactivity
switchport port-security
storm-control broadcast level pps 1k
storm-control multicast level pps 2k
storm-control action trap
mls qos trust cos
service-policy input AUTOCONF-SRND4-CISCOPHONE-POLICY
ip dhcp snooping limit rate 15
load-interval 30
srr-queue bandwidth share 1 30 35 5
priority-queue out
!
Template Name : LAP_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast
spanning-tree bpduguard enable
switchport mode access
switchport block unicast
switchport port-security violation protect
switchport port-security aging time 2
switchport port-security aging type inactivity
switchport port-security
storm-control broadcast level pps 1k
storm-control multicast level pps 2k
storm-control action trap
mls qos trust dscp
ip dhcp snooping limit rate 15
load-interval 30
srr-queue bandwidth share 10 10 60 20
priority-queue out
!
Template Name : MSP_CAMERA_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast
spanning-tree bpduguard enable
switchport mode access
switchport block unicast
switchport port-security
!
Template Name : MSP_VC_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast
spanning-tree bpduguard enable
switchport mode access
switchport block unicast
switchport port-security violation restrict
switchport port-security aging time 2
switchport port-security aging type inactivity
switchport port-security
ip dhcp snooping limit rate 15
load-interval 30
!
Template Name : PRINTER_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast
spanning-tree bpduguard enable
switchport mode access
switchport port-security maximum 2
switchport port-security
load-interval 60
!
Template Name : ROUTER_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast trunk
spanning-tree bpduguard enable
switchport mode trunk
mls qos trust dscp
srr-queue bandwidth share 1 30 35 5
priority-queue out
!
Template Name : SWITCH_INTERFACE_TEMPLATE
Modified : No
Template Definition :
switchport mode trunk
mls qos trust cos
srr-queue bandwidth share 1 30 35 5
priority-queue out
!
Template Name : TP_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast
spanning-tree bpduguard enable
switchport mode access
switchport port-security maximum 3
switchport port-security maximum 2 vlan access
switchport port-security violation restrict
switchport port-security aging time 2
switchport port-security aging type inactivity
switchport port-security
storm-control broadcast level pps 1k
storm-control multicast level pps 2k
storm-control action trap
ip dhcp snooping limit rate 15
load-interval 30

 

--------------------

 

2960X# show shell functions
#User defined functions:

#Built-in functions:
function CISCO_AP_AUTO_SMARTPORT () {
if [[ $LINKUP -eq YES ]]; then
conf t
interface $INTERFACE
macro description $TRIGGER
switchport trunk encapsulation dot1q
switchport trunk native vlan $NATIVE_VLAN
switchport trunk allowed vlan ALL
switchport mode trunk
switchport nonegotiate
auto qos voip trust
mls qos trust cos
if [[ $LIMIT -eq 0 ]]; then
default srr-queue bandwidth limit
else
srr-queue bandwidth limit $LIMIT
fi
if [[ $SW_POE -eq YES ]]; then
if [[ $AP125X -eq AP125X ]]; then
macro description AP125X
macro auto port sticky
power inline port maximum 20000
fi
fi
exit
end
fi
if [[ $LINKUP -eq NO ]]; then
conf t
interface $INTERFACE
no macro description
no switchport nonegotiate
no switchport trunk native vlan $NATIVE_VLAN
no switchport trunk allowed vlan ALL
no auto qos voip trust
no mls qos trust cos
default srr-queue bandwidth limit
if [[ $AUTH_ENABLED -eq NO ]]; then
no switchport mode
no switchport trunk encapsulation
fi
if [[ $STICKY -eq YES ]]; then
if [[ $SW_POE -eq YES ]]; then
if [[ $AP125X -eq AP125X ]]; then
no macro auto port sticky
no power inline port maximum
fi
fi
fi
exit
end
fi
}

View solution in original post

6 Replies 6

Hello,

 

here is the output:

 

2960X# show template interface source built-in all

Building configuration...

Template Name : AP_INTERFACE_TEMPLATE
Modified : No
Template Definition :
switchport mode trunk
switchport nonegotiate
mls qos trust cos
srr-queue bandwidth share 1 30 35 5
priority-queue out
!
Template Name : DMP_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast
spanning-tree bpduguard enable
switchport mode access
switchport block unicast
switchport port-security
mls qos trust dscp
srr-queue bandwidth share 1 30 35 5
priority-queue out
!
Template Name : IP_CAMERA_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast
spanning-tree bpduguard enable
switchport mode access
switchport block unicast
switchport port-security
mls qos trust dscp
srr-queue bandwidth share 1 30 35 5
priority-queue out
!
Template Name : IP_PHONE_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast
spanning-tree bpduguard enable
switchport mode access
switchport block unicast
switchport port-security maximum 3
switchport port-security maximum 2 vlan access
switchport port-security violation restrict
switchport port-security aging time 2
switchport port-security aging type inactivity
switchport port-security
storm-control broadcast level pps 1k
storm-control multicast level pps 2k
storm-control action trap
mls qos trust cos
service-policy input AUTOCONF-SRND4-CISCOPHONE-POLICY
ip dhcp snooping limit rate 15
load-interval 30
srr-queue bandwidth share 1 30 35 5
priority-queue out
!
Template Name : LAP_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast
spanning-tree bpduguard enable
switchport mode access
switchport block unicast
switchport port-security violation protect
switchport port-security aging time 2
switchport port-security aging type inactivity
switchport port-security
storm-control broadcast level pps 1k
storm-control multicast level pps 2k
storm-control action trap
mls qos trust dscp
ip dhcp snooping limit rate 15
load-interval 30
srr-queue bandwidth share 10 10 60 20
priority-queue out
!
Template Name : MSP_CAMERA_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast
spanning-tree bpduguard enable
switchport mode access
switchport block unicast
switchport port-security
!
Template Name : MSP_VC_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast
spanning-tree bpduguard enable
switchport mode access
switchport block unicast
switchport port-security violation restrict
switchport port-security aging time 2
switchport port-security aging type inactivity
switchport port-security
ip dhcp snooping limit rate 15
load-interval 30
!
Template Name : PRINTER_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast
spanning-tree bpduguard enable
switchport mode access
switchport port-security maximum 2
switchport port-security
load-interval 60
!
Template Name : ROUTER_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast trunk
spanning-tree bpduguard enable
switchport mode trunk
mls qos trust dscp
srr-queue bandwidth share 1 30 35 5
priority-queue out
!
Template Name : SWITCH_INTERFACE_TEMPLATE
Modified : No
Template Definition :
switchport mode trunk
mls qos trust cos
srr-queue bandwidth share 1 30 35 5
priority-queue out
!
Template Name : TP_INTERFACE_TEMPLATE
Modified : No
Template Definition :
spanning-tree portfast
spanning-tree bpduguard enable
switchport mode access
switchport port-security maximum 3
switchport port-security maximum 2 vlan access
switchport port-security violation restrict
switchport port-security aging time 2
switchport port-security aging type inactivity
switchport port-security
storm-control broadcast level pps 1k
storm-control multicast level pps 2k
storm-control action trap
ip dhcp snooping limit rate 15
load-interval 30

 

--------------------

 

2960X# show shell functions
#User defined functions:

#Built-in functions:
function CISCO_AP_AUTO_SMARTPORT () {
if [[ $LINKUP -eq YES ]]; then
conf t
interface $INTERFACE
macro description $TRIGGER
switchport trunk encapsulation dot1q
switchport trunk native vlan $NATIVE_VLAN
switchport trunk allowed vlan ALL
switchport mode trunk
switchport nonegotiate
auto qos voip trust
mls qos trust cos
if [[ $LIMIT -eq 0 ]]; then
default srr-queue bandwidth limit
else
srr-queue bandwidth limit $LIMIT
fi
if [[ $SW_POE -eq YES ]]; then
if [[ $AP125X -eq AP125X ]]; then
macro description AP125X
macro auto port sticky
power inline port maximum 20000
fi
fi
exit
end
fi
if [[ $LINKUP -eq NO ]]; then
conf t
interface $INTERFACE
no macro description
no switchport nonegotiate
no switchport trunk native vlan $NATIVE_VLAN
no switchport trunk allowed vlan ALL
no auto qos voip trust
no mls qos trust cos
default srr-queue bandwidth limit
if [[ $AUTH_ENABLED -eq NO ]]; then
no switchport mode
no switchport trunk encapsulation
fi
if [[ $STICKY -eq YES ]]; then
if [[ $SW_POE -eq YES ]]; then
if [[ $AP125X -eq AP125X ]]; then
no macro auto port sticky
no power inline port maximum
fi
fi
fi
exit
end
fi
}

I am having trouble with the template binding. It keeps binding every 5 sec in a loop. Off curiosity on the 2960x what is your IOS version?

What image are you running the recommended is c2960x-universalk9-mz.152-4.E7.bin

I tried few of them. It seems to work only with the shipped ios c2960x-universalk9-mz.152-2.E7.bin

 

I tried the latest as well as the recommended one. On the 152-4.E7 the template binds but I keep getting below message every 5 seconds


Jan 17 12:38:41.406: Gi1/0/24: Binding template APAutoConfig 

sounds like a bug if its working on 1 version and not another without any conf changes , is there a reason you cant stick with shipped image ?

You could run the image through the cli analyzer or check the release notes for a matching bug but if you cant find any you could open it with TAC if under support and they may have a bug ID that will show you which images you can use to avoid this problem.

Will do that and let you know. Thanks for your reply.
Review Cisco Networking for a $25 gift card