Showing posts with label switching. Show all posts
Showing posts with label switching. Show all posts

Friday, January 2, 2015

VSS and vPC

There are several good documents and blogs about the VSS and vPC. Here are a few:

Here are sample configuration:

6500_S1 & 6500_S2


! CONFIGURE THE FIRST SWITCH: 65K1
!create virtual domain
65K1(config)#switch virtual domain 1
65K1(config-vs-domain))#switch 1
65K1(config-vs-domain))#switch 1 priority 110

!configure virtual switch link (VSL)
65K1(config)#interface port-channel 1
65K1(config-if)#switchport
65K1(config-if)#switch virtual link 1
65K1(config-if)#no shut

65K1(config-if)#interface range te1/1 – 2
65K1(config-if-range)#switchport
65K1(config-if-range)#switchport mode trunk
65K1(config-if-range)#switchport nonegotiate
65K1(config-if-range)#channel-group 1 mode on
65K1(config-if-range)#no shut
65K1(config-if-range)#end

!enable dual active detection – use fast-hello in this case
65K1(config)#interface te1/ 3
65K1(config-if)#no switchport
65K1(config-if)#no shut
65K1(config-if)#dual-active fast-hello

!turn on vss

65K1#switch convert mode virtual


! CONFIGURE THE FIRST SWITCH: 65K2
!create virtual domain
65K2(config)#switch virtual domain 1
65K2(config-vs-domain))#switch 1
65K2(config-vs-domain))#switch 1 priority 110

!configure virtual switch link (VSL)
65K2(config)#interface port-channel 2
65K2(config-if)#switchport
65K2(config-if)#switch virtual link 2
65K2(config-if)#no shut

65K2(config-if)#interface range te1/1 – 2
65K2(config-if-range)#switchport
65K2(config-if-range)#switchport mode trunk
65K2(config-if-range)#switchport nonegotiate
65K2(config-if-range)#channel-group 1 mode on
65K2(config-if-range)#no shut
65K2(config-if-range)#end

!enable dual active detection – use fast-hello in this case
65K2(config)#interface te1/ 3
65K2(config-if)#no switchport
65K2(config-if)#no shut
65K2(config-if)#dual-active fast-hello

!turn on vss
65K2#switch convert mode virtual


!verifying the VSS
65K1#show etherc sum
65K1#show switch virtual
65K1#show switch virtual role
65K1#show switch virtual link




N7K1 & N7K2

! CONFIGURE THE FIRST SWITCH: N7K1
!enable vpc feature and create vpc domain
N7K1(config)# feature vpc
N7K1(config)# vpc domain 1

! first, create a vrf
N7K1(config)#vrf context Keepalive

! create peer keep alive link (layer 3)
N7K1(config)#interface Ethernet 1/1
N7K1(config-if)#no switchport
N7K1(config-if)#ip address 10.1.1.11 255.255.255.0
N7K1(config-if)#vrf member Keepalive
N7K1(config-if)#no shut
N7K1(config-if)#vpc domain 1
N7K1(config-vpc-domain)# peer-keepalive destination 10.1.1.12 source 10.1.1.11 vrf Keepalive
N7K1(config-vpc-domain)#role priority 1

! configure vpc peer link
N7K1(config)#int Ethernet 1/ 2 – 3
N7K1(config-if-range)#switchport
N7K1(config-if-range)#switchport mode trunk
N7K1(config-if-range)#switch trunk allowed vlan all
N7K1(config-if-range)#switchport trunk native vlan 5
N7K1(config-if-range)#spanning-tree port type network
N7K1(config-if-range)#channel-group 1
N7K1(config-if-range)# interface port-channel 1
N7K1(config-if)# vpc peer-link

! config the vpc for a server with dual nic
N7K1(config)#int interface Ethernet 1/ 4
N7K1(config-if)# description SQL_Server1_Nic_1
N7K1(config-if)#switchport
N7K1(config-if)#switchport access vlan 5
N7K1(config-if)#spanning-tree port type edge
N7K1(config-if)#channel-group 51 mode active
N7K1(config-if)#no shut
N7K1(config-if)#interface port-channel 51
N7K1(config-if)#vpc 51


! CONFIGURE THE SECOND SWITCH: N7K2
! enable vpc feature and create vpc domain
N7K2(config)# feature vpc
N7K2(config)# vpc domain 1

! first, create a vrf
N7K2(config)#vrf context Keepalive

! create peer keep alive link (layer 3)
N7K2(config)#interface Ethernet 1/1
N7K2(config-if)#no switchport
N7K2(config-if)#ip address 10.1.1.12 255.255.255.0
N7K2(config-if)#vrf member Keepalive
N7K2(config-if)#no shut
N7K2(config-if)#vpc domain 1
N7K2(config-vpc-domain)# peer-keepalive destination 10.1.1.11 source 10.1.1.12 vrf Keepalive
N7K2(config-vpc-domain)#role priority 2

! configure vpc peer link
N7K2(config)#int Ethernet 1/ 2 – 3
N7K2(config-if-range)#switchport
N7K2(config-if-range)#switchport mode trunk
N7K2(config-if-range)#switch trunk allowed vlan all
N7K2(config-if-range)#switchport trunk native vlan 5
N7K2(config-if-range)#spanning-tree port type network
N7K2(config-if-range)#channel-group 1
N7K2(config-if-range)# interface port-channel 1
N7K2(config-if)# vpc peer-link

! config the vpc for a server with dual nic
N7K2(config)#int interface Ethernet 1/ 4
N7K2(config-if)# description SQL_Server1_Nic_2
N7K2(config-if)#switchport
N7K2(config-if)#switchport access vlan 5
N7K2(config-if)#spanning-tree port type edge
N7K2(config-if)#channel-group 51 mode active
N7K2(config-if)#no shut
N7K2(config-if)#interface port-channel 51
N7K2(config-if)#vpc 51

! verifying the vpcs
N7K1# show vpc brief
N7K1# show vpc consistency-parameters vpc 51
N7K1# show vpc consistency-parameters global

Wednesday, September 26, 2012

EEM Applet

Our network monitoring program detected  ICMP latency from a few WS-C3560CG-8PC-S switches recently. The "show process cpu sort" shows normal output. However, the "show process cpu history" indicates CPU utilization was always 60% and spike over 90% from time to time. To capture which process is the culprit, Cisco recommended to use following EEM (Embedded Event Manager) applet:


event manager applet high-cpu
!
event snmp oid 1.3.6.1.4.1.9.9.109.1.1.1.1.3 get-type next entry-op gt entry-val 80 poll-interval 5 exit-time 500 maxrun 600
!
action 0.1 cli command "enable"
action 0.2 syslog msg "TAC - Capturing high cpu information to flash:"
action 0.3 cli command "term length 0"
action 1.1 cli command "show process cpu sorted | redirect flash:eem-cpu1.txt"
action 1.2 cli command "show interface | redirect flash:eem-interface1.txt"
action 1.3 cli command "show interface stats | redirect flash:eem-stat1.txt"
action 1.4 cli command "show ip traffic | redirect flash:eem-traffic1.txt"
action 2.1 cli command "show process cpu sorted | redirect flash:eem-cpu2.txt"
action 2.2 cli command "show interface | redirect flash:eem-interface2.txt"
action 2.3 cli command "show interface stats | redirect flash:eem-stat2.txt"
action 2.4 cli command "show ip traffic | redirect flash:eem-traffic2.txt"

What this applet will do is when CPU process is over 80%, it will write those show output to text files in flash. This applet did capture the "virtual exec" was running over 90% of CPU process. 

Just felt this is a cool utility to share. You can find more EEM samples here: http://www.cisco.com/en/US/docs/switches/datacenter/sw/5_x/nx-os/system_management/configuration/guide/sm_eem_events_and_examples.html

BTW, the root cause of the high CPU utilization is a bug in the IOS. Upgraded to c3560c405ex-universalk9-mz.122-55.EX3.bin seems bring down the utilization to 20%.