Network Automation Masterclass
Network Automation Masterclass
Master Class
Network Automation
[20110324 - Copenhagen]
Bruno Klauser
Consulting Engineer NMS/OSS
European Markets
[email protected]
wwwin-people.cisco.com/bklauser
Schedule
Day 1
8:30-09:00 Welcome & Coffee
9:00-12:30 Theory Block I
0. Introduction
1. Service planning
2. Deployment and activation
13:30-17:00 Hands-on Lab
Day 2
8:30-09:00 Welcome & Coffee
9:00-12:30 Theory Block II
3. Testing and verification
4. Ongoing service assurance
5. Troubleshooting and optimization
13:30-17:00 Hands-on Lab
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 3
Agenda
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 4
Why Network
Automation?
Availability
Excessive OSPF messages
force US Telco to bring down
parts of ATM network:
26 hrs Outage
several Million US$ Impact
undersea cable:
4 hrs Outage
several Million £ Impact
IP Connectivity
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 7
Design Variability & Complexity
Design Variability and Complexity – 2/2
Source: http://networkcomplexity.org/wiki/index.php?title=Definition
Compute
Customize Cloud, XaaS,
Computing
Device Manageability
Instrumentation (DMI)
Transaction Experience SLA
Collaborate
Unified Comms
Configure Security
Basic Instrumentation
GET / SET
Quality of Service SLA
Increase in
Connect
- Autonomicy
Managed Network
- Application awareness
Services
- Real-time management
- Custom requirements
Basic SLA - Programmability
Airplane Router
Embedded
Instruments
Automations
By Infrastructure Span
Device level
Domain wide
Service end-to-end
By Automation Function
Task Execution
Workflow Orchestration
Decision Triggers
Benefits:
Automate - Revenue Enabler
New Task - OPEX
- CAPEX
Benefits: - Quality
Automate - OPEX - Reactive Proactive
Existing Task - CAPEX - Corporate Learning
- Quality Enabler
- Reactive Proactive
Benefits:
- OPEX
- Quality
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 14
Example: Sharing Information 2/2
> 900 d
ownloa
ds from
ciscobe
yo n d
See: http://twitter.com/EASyDMI
Note: it is NOT recommended to use a public site or feed other than for demo purpose
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 15
Network Automation
Example: Integrating CleanAir and Security
Problem: A new rogue WLAN device in sensitive areas should be detected
by Cisco CleanAir and automatically focus/pan/zoom a security camera.
Input Output
Protocol Packet Count Packet Count
Byte Count Byte Count
5 minute bit rate (bps) 5 minute bit rate (bps)
---------- ------------------------ ------------------------
: : :
unknown 205 204
14976 10404
0 0
Total 41304 40944
2649809 2619839
3000 3000
Upon low % of traffic recognized by NBAR, it’s time to check for new PDLMs …
Did
IP SLA
succeed Operation timeout
Is Is
No No
up-syslog down-syslog
set? set?
Yes Yes
done
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 20
Operating Models – 2/2
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 21
Operating Models – 2/2
Is it built to
Specification? How to take
Does it meet out of service?
Requirements?
…
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 23
Device Manageability Instrumentation
DC Headquarters
Pre-Installation Config +
Pre-Installation Exec MyPackage.tar
Environment Variables
Configuration Router# easy-installer tftp://10.1.1.1/mypackage.tar flash:/easy
-----------------------------------------------------------------
Files Configure and Install EASy Package ‘mypackage-1.03'
Post-Requisite Verification -----------------------------------------------------------------
1. Display Package Description
Post-Installation Config 2. Configure Package Parameters
Post-Installation Exec 3. Deploy Package Policies
4. Exit
Uninstall
Enter option: 2
See: http://www.cisco.com/go/easy
See: http://www.cisco.com/en/US/prod/collateral/iosswrel/ps6537/ps6555/ps10777/application_note_c27-574650.html
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 25
For Your
Reference
Embedded Automation Systems
Embedded Automation Systems (EASy)
1. Browse and Download EASy Packages
www.cisco.com/go/easy
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 26
Agenda
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 27
How is my current Use
of Resources ?
Service Planning
Embedded Resource Manager (ERM)
The ERM framework tracks resource depletion and resource
dependencies across processes and within a system
Monitor thresholds for CPU, buffer, and/or memory
For system or line card
ERM can define “group”, i.e.
group of different CPU processes
CISCO-ERM-MIB
Interface into EEM
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 30
Service Planning
Example – Monitoring Multiple Processes
Problem: In order to detect resource consumption caused by brute force login
attempts, we want to keep an eye on CPU utilization by the login processes
Solution: Define an ERM policy to notify upon critical / suspicious levels
resource policy
policy my-login-policy type iosprocess
system
cpu process
critical rising 30 interval 10 falling 20 interval 10
major rising 20 interval 10 falling 10 interval 10
minor rising 10 interval 10 falling 5 interval 10
user group my-login-group type iosprocess
instance "SSH Process"
instance "SSH Event handler“
:
policy my-login-policy
Syslog if Group CPU Usage Count Rises Above 10% at an Interval of 10s
*Aug 25 12:56:26.089: %SYS-4-CPURESRISING: Resource group my-login-group is
seeing local cpu util 16% at process level more than the configured minor limit
10%
*Aug 25 12:56:41.089: %SYS-6-CPURESFALLING: Resource group my-login-group is no
longer seeing local high cpu at process level for the configured minor limit
10%, current value 0%
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 31
Exporting MIB
Statistics?
Service Planning
Quickly export SNMP Statistics?
Problem: Sometimes we need data from one or multiple MIBs, but
- we may not want to (re-)configure an NMS
- don’t want to constantly poll
- need to gather data during temporary loss of connectivity
Solution: Use Bulk File MIB to define the data we need and
periodically transfer it to a convenient location
- group data from multiple MIBs
- single, common polling interval
- buffer data
- transfer using RCP, FTP, TFTP
- format ASCII or Binary
Available from: IOS 12.0(24)S, 12.2(25)S, 12.3(2)T, IOS XE 2.1, IOS XR 3.2
Platforms: ASR1k, x8xx ISR, x900x ISR, 72xx, 73xx, 76xx, 10xxx, ME3400, C4k, C6k, …
See: http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?local=en&translate=Translate&objectInput=1.3.6.1.2.1.2
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 33
Service Planning
Configuration – Example
1. Define Lists of relevant OIDs (Names for IF-MIB, ASN.1 for all others)
Router(config)# snmp mib bulkstat object-list my-if-data
Router(config-bulk-objects)# add ifIndex
Router(config-bulk-objects)# add ifDescr
What Data am I add
Router(config-bulk-objects)# interested in?
ifAdminStatus
Router(config-bulk-objects)# add ifOperStatus
Router(config-bulk-objects)# exit
3 Phases:
MIB Introduction, SNMP Only - 12.0(5)T
However “show command” exists
However “debug command” exists
Introduction of Scriptable Interface
Introduction of CLI Support - 12.4(20)T
See: http://www.cisco.com/en/US/docs/ios/netmgmt/configuration/guide/nm_cfg_snmp_sup.html
Available from: IOS 12.0(5)T (EXPRESSION-MIB), 12.3(7)T (SNMPset in TCL script), 12.4(20)T (CLI)
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 36
Service Planning
Event-MIB
See: http://www.cisco.com/en/US/docs/ios/netmgmt/configuration/guide/nm_cfg_snmp_sup_ps6441_TSD_Products_Configuration_Guide_Chapter.html#wp1125529
Available from: IOS 12.2(4)T (EVENT-MIB), 12.3(7)T (SNMPset in TCL script), 12.4(20)T (CLI)
Platforms: x8xx ISR,x900x ISR, 72xx, 73xx, 76xx
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 37
Service Planning
EXPRESSION-& EVENT-MIB
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 38
Service Planning
EXPRESSION-& EVENT-MIB
Simply capacity planning example: Calculate link
utilization on all the interfaces in the router
Router# show running | beg expression
snmp mib expression owner administrator name exp3
expression ($1*800)/$2
enable
object 1
id ifInOctets
wildcard
object 2
NMS% snmpwalk -c public -v 2c <router> expValueCounter32Val
id ifSpeed
SNMPv2-SMI:: expValueCounter32Val.7.109.97.114.105.115.111.108.4.101.120.112.51.0.0.1 = Counter32:
214800 wildcard
SNMPv2-SMI:: expValueCounter32Val.7.109.97.114.105.115.111.108.4.101.120.112.51.0.0.2 = Counter32:
0
SNMPv2-SMI:: expValueCounter32Val.7.109.97.114.105.115.111.108.4.101.120.112.51.0.0.4 = Counter32:
0
SNMPv2-SMI:: expValueCounter32Val.7.109.97.114.105.115.111.108.4.101.120.112.51.0.0.5 = Counter32:
0
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 39
Service Planning
Adding a Custom MIB Variable
Problem: Collect data via SNMP, even if there is no MIB support
currently available.
Is the
Is a certain value from a No Expression-MIB(1)
"CLI show command" Supported in your EEM 3.1
supported in your device via SNMP? Device?
No
Yes
Yes
Running
Script #1
Yes 12.4(20)T or
higher? EEM policy based on CLI Expression-MIB
No Script #2
Reference: Yes
http://www.cisco.com/go/mibs EEM policy based on the RFC2982-MIB
•SNMP Object Navigator
Support for
•Cisco IOS MIB Locator
RFC2982-MIB?
No Script #3
EEM policy based on the Expression-MIB
See: This is available as an EASy package from CiscoBeyond
http://forums.cisco.com/eforum/servlet/EEM?page=eem&fn=script&scriptId=1961
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 42
What about Traffic
Flows?
What is NetFlow ?
Developed and patented at Cisco®
Systems in 1996
NetFlow is the defacto standard for
acquiring IP operational data
Provides network and security
monitoring, network planning,
traffic analysis, and IP accounting
NetFlow v9 (RFC3954) serves as
the basis for IETF IPFIX Standard
(RFC5101 & RFC5102)
Network World article – NetFlow Adoption on the Rise:
http://www.networkworld.com/newsletters/nsm/2005/0314nsm1.html
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 44
Service Planning
Flexible NetFlow (FNF)
Flexible NetFlow
Metering
Advantages: cache and export content flexibility
Process
User selection of flow keys
User definition of the records
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 45
Flexible NetFlow
Multiple Monitors with Unique Key Fields
Traffic Flow Flow
Monitor Monitor
1 2
Key Fields Packet 1 Non-Key Fields Key Fields Packet 1 Non-Key Fields
Source IP 3.3.3.3 Packets Source IP 3.3.3.3 Packets
Destination IP 2.2.2.2 Bytes Dest IP 2.2.2.2 Timestamps
Source Port 23 Timestamps Input Interface Ethernet 0
Destination Port 22078 Next Hop Address SYN Flag 0
Layer 3 Protocol TCP - 6
TOS Byte 0
Input Interface Ethernet 0
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 46
Flexible NetFlow
Configuration – Example
1. Configure the Exporter
Router(config)# flow exporter my-exporter
Where do I want my data sent?
Router(config-flow-exporter)# destination 1.1.1.1
4. Apply to an Interface
Router(config)# interface s3/0
On which Interface do I want to monitor?
Router(config-if)# ip flow monitor my-monitor input
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 47
Flexible Flow Record: Key Fields
Flow IPv4 IPv6
Sampler ID IP (Source or
Payload Size IP (Source or
Destination) Payload Size
Direction Destination)
Prefix (Source or Packet Section Prefix (Source or Packet Section
Interface Destination) (Header) Destination) (Header)
Input Mask (Source or Packet Section Mask (Source or Packet Section
Destination) (Payload) Destination) (Payload)
Output
Minimum-Mask Minimum-Mask
Layer 2 (Source or TTL (Source or DSCP
Destination) Destination)
Source VLAN
Options
Protocol Protocol Extension Headers
Dest VLAN bitmap
NEW Dot1q VLAN Fragmentation
Version Traffic Class Hop-Limit
Flags
Dot1q priority Fragmentation Flow Label Length
Precedence
Offset
Source MAC Option Header Next-header
address Identification DSCP
Header Length Version
Header Length TOS
Destination
MAC address Total Length Payload Length
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 48
Flexible Flow Record: Key Fields
NEW
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 49
Flexible Flow Record: Non-Key Fields
Packets
Packets Long
Plus any of the potential “key” fields: will be the value from
the first packet in the flow
(*) IPV4_TOTAL_LEN_MIN, IPV4_TOTAL_LEN_MAX
(**)IP_LENGTH_TOTAL_MIN, IP_LENGTH_TOTAL_MAX
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 50
Service Planning
Three Types of FNF NetFlow Caches
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 51
Service Planning
Core Traffic Matrix with Flexible NetFlow
Problem: Network wide capacity planning requires the traffic matrix
Solution: Use Flexible NetFlow with a permanent cache
interface pos3/0
ip flow monitor traffic-matrix-monitor
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 52
Service Planning
Configuration Using EEM + Cron + CLI
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 53
Service Planning
Flexible NetFlow TopTalkers
TCP Servers’
SYN network
attacks 10.10.10.0/24
The top 100 pairs of IP addresses with one or two packet(s) that
are destined for my servers' network
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 56
Flexible NetFlow
Example: Cat4500 Supervisor Engine 7-E
Auto Smart Ports
Embedded Event Manager (EEM) 3.2
Flexible Netflow and NetFlow v9 support for
New IPv4, IPv6, L2
Generic Online Diagnostics (GOLD)
In-Service Software Upgrade (ISSU)
Smart Call Home
• Policy Action:
EEM (Port Shutdown,
ACL, QoS, …)
FNF
• Custom Syslog
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 57
What about Trending
and Graphical Views?
NAM 5.0 Interactive Reports New
Jan 20
11
Analyze Performance/Usage Trends and Patterns
Export Data Descriptive
Statistics
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 59
But my Teleworkers don’t
have a Cisco Router yet!
New
Cisco Visual Networking Index
Problem: Sometimes we need trending and forecasting info beyond
our current reach and/or where there is no IOS-based network yet
Solution: Visual Networking Index
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 62
Service Planning
Embedded Event Manager (EEM)
*Not all available in all releases
IOS.sh TCL
Applets
Policies Policies
3. An EEM Policy is activated that initiates a pre-
defined set of actions
Policy
Event Detector
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 63
Service Planning
Embedded Event Manager (EEM) Versions
Embedded monitoring of different components of the system
via a set of software agents (event detectors)
Event detectors (ED) notify EEM when an event of interest occurs;
based on this, a policy will trigger an action to be taken
Advantages: Local programmable actions, triggered by specific
events – growing set of detectors and actions:
– EEM 1.0 introduced in 12.0(26)S, 12.3(4)T
– EEM 2.0 introduced in 12.2(25)S
– EEM 2.1 introduced in 12.3(14)T
– EEM 2.2 introduced in 12.4(2)T
– EEM 2.3 introduced in 12.4(11)T
Adds multi-event correlation
– EEM 2.4 introduced in 12.4(20)T
Adds programmatic Applets
– EEM 3.0 introduced in 12.4(22)T
– EEM 3.1 introduced in 15.0(1)M
– EEM 3.2 introduced in 12.2(52)SE
– stay tuned ...
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 64
Service Planning
EEM Architecture
email SNMP set SNMP SNMP Reload or Application CLI IOS.sh TCL
Syslog
notification Counter get notification switch-over specific Applets Policies Policies
Actions
EEM Applets
multi-event-correlation
Embedded Event
Manager
Event Detectors
Interface XML CDP
Syslog SNMP Timer none HW Watchdog CLI OIR ERM EOT RF GOLD NetFlow IPSLA Route 802.1x MAC
Counter RPC LLDP
ED EDs EDs ED EDs ED ED ED ED ED ED ED ED ED ED ED ED
ED ED ED
Remote:
• Fan
• Notification • Cron Process Interface
Syslog • Temp
Local: • Count Scheduler Descriptor
Event • Env
• Notification down Database Blocks
• ...
• Get/Set
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 65
Service Planning
EEM Applets and Policies
Part of the Cisco IOS Separate ASCII File Separate ASCII File
Configuration my-policy.sh my-policy.tcl
Based on CLI Based on Cisco IOS Based on Cisco IOS
Commands CLI and Shell CLI and Safe TCL
Commands Commands
Simple Actions Effective shell-like Flexible and powerful
simple scripting scripting capabilities
Programmatic Applet Registered via the Registered via the
Extensions Cisco IOS Config Cisco IOS Config
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 66
Service Planning
Example: Trigger a Config Change – 1/3
Problem: a PKI related config change on a remote device should only
happen once NTP has successfully synched the time
Router(config)# ntp logging
Router(config)# ntp update-calendar
Router(config)# ntp server 172.16.154.40 prefer
Solution I: use EEM Syslog Event Detector and a CLI Applet to trigger the
change
CLI Applet
event manager applet config_upon_ntp
event syslog pattern ".*%NTP-5-PEERSYNC.*"
action 10 syslog msg "Starting ..."
:
... Your Config Changes Here ...
:
action 30 syslog msg "... done"
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 67
Service Planning
Example: Trigger a Config Change – 2/3
Solution II: use EEM Syslog Event Detector and an IOS.sh Policy to trigger
the change
IOS.sh Policy
##::cisco::eem::event_register_syslog pattern .*%NTP-5-PEERSYNC.*
send log "Starting ..."
enable
conf t
hostname $new_hostname
:
... Your Config Changes Here ...
:
end
send log "... done"
# End of IOS.sh Policy demo script
router#
*Dec 22 18:27:09.659: %HA_EM-6-LOG: sl_cfg_ntp.sh: Starting ...
*Dec 22 18:27:09.801: %SYS-5-CONFIG_I: Configured from console by on vty0 (EEM:sl_cfg_ntp.sh)
*Dec 22 18:27:09.927: %HA_EM-6-LOG: sl_cfg_ntp.sh: Set hostname from router to it-worked
*Dec 22 18:27:09.927: %HA_EM-6-LOG: sl_cfg_ntp.sh: ... done
it-worked#
Solution III: use EEM Syslog Event Detector and a TCL Policy to trigger the
change …
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 68
TCL Policy
Policy runtime
Default = 20 seconds
Increase this value if you see
a “Process Forced Exit” message
from the router.
router#
*Dec 10 10:43:29.061: %HA_EM-6-LOG: config_upon_ntp.tcl: Starting ...
*Dec 10 10:43:29.197: %SYS-5-CONFIG_I: Configured from console by on vty0 (EEM:config_upon_ntp.tcl)
*Dec 10 10:43:29.329: %HA_EM-6-LOG: config_upon_ntp.tcl: Set hostname from router to it-worked
*Dec 10 10:43:29.329: %HA_EM-6-LOG: config_upon_ntp.tcl: ... done
it-worked#
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 69
EEM
Getting Started with TCL Policies
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 70
IOS
Event Description EEM Version in IOS IOS XR NX-OS
XE
Detector (ED Triggers, based on ...)
1.0 2.0 2.1 2.2 2.3 2.4 3.0 3.1 3.2 3.6 4.0 2.1 2.2 4.0 4.1
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 73
EEM 2.0: EOT Event Detector
Problem: A Notification is required upon
failure of a specific route
D 1.1.1.1 [90/297372416] via 192.168.1.1, 1w6d, Gig
X
Solution: Track the Route using
Enhanced Object Tracking (EOT) and
Embedded Event Manager (EEM) email EOT/EEM 1.1.1.1/32
172.27.121.177
The applet will trigger when the route 10.1.1.0/24 is learned via OSPF
The applet will try and ping host 10.1.1.1, and when it is successful,
it will take down the backup tunnel interface
Question: how many ping attempts will be made ?
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 78
Service Planning
EEM 3.1: SNMP Notification + Description
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 79
Service Planning
Example: Synchronizing EEM Scripts 1/2
Problem: Synchronize EEM Policy .tcl files from a central Repository
Solution I: Use event manager update commands
1. Configure the default Repositiory:
router(config)# event manager directory user repository tftp://172.16.64.1
*Dec 10 20:12:43.198: %HA_EM-6-FMPD_UPDATE_POLICY_COPY: Policy update has copied 647 bytes from tftp:
*Dec 10 20:12:43.230: %HA_EM-6-FMPD_UPDATE_POLICY_REGISTER: Policy update has successfully re-registe
2bis. Can also synch entire groups, based on regular expression match:
router# event manager update user policy group m.*
*Dec 16 22:09:11.303: %HA_EM-6-FMPD_UPDATE_POLICY_COPY: Policy update has copied 647 bytes from tftp://10
*Dec 12 22:09:11.329: %HA_EM-6-FMPD_UPDATE_POLICY_REGISTER: Policy update has successfully re-registered
1bis. Can also synch entire groups, based on regular expression match:
router# event manager update user policy group m.*
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 81
Service Planning
Using EEM step-by-step
1. Which problem do you want to solve?
2. Which event detector and action do you need?
– Upgrade to the right IOS image
– show
Use event manager detector <detector-type> detailed
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 83
Introduction & Overview
‘Configuration‘ in a Service Life Cycle
scripts and tools network engineer support staff applications
scripts
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 84
Introduction & Overview
Definition of Activities
Focus
hostname pe-south
Configuration
enable password c
!
mpls ip
!
interface Loopbac
ip address 10.10
on it’s role and function in the network
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 85
Introduction & Overview
The Human Factor ...
1
– The Basics
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 87
Command Line Interface (CLI) – Modes
Line Configuration Sub-Mode
router(config-line)#
Global Configuration Mode Routing Configuration Sub-Mode
router(config)# router(config-router)#
encapsulation ...
...
conf t
See: www.cisco.com/en/US/docs/ios/preface/usingios.html
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 88
Command Line Interface (CLI) – Basics 1/2
A Series of usability features are available in IOS:
Exec Commands from within Config Mode (from 12.0(21)S, 12.2(8)T)
2
– More Advanced
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 92
Command Line Interface (CLI)
– More Advanced
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 93
Deployment & Activation
IOS CLI Configuration ‚Safety‘ Features
Contextual configuration diff utility (from 12.3(4)T, 12.2(25)S)
Easily show differences between running and startup configuration
Compare any two configuration files
3
IOS Shell Scripting
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 97
IOS Shell
Problem: Sometimes we need more than what Interface ranges,
Macros, Auto SmartPorts and other CLI features already offer.
But we may not want all the power and complexity of Tcl Scripting or
Embedded Event Manager
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
exit
end
fi
if [[ $LINKUP -eq NO ]]; then
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 99
What if SmartPorts are
almost good enough?
Example: Automated Port Provisioning
Problem: When a new device connects, we want to trigger a
sequence of events and configurations in a customizable way and
based on the type of device
Solution: use Embedded Event Manager (EEM):
802.1x
CDP LLDP
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 102
How about a smarter
deployment procedure?
Smart Install
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 104
Smart Install
Supported Devices and Images
The director in a Smart Install network must be running Cisco IOS release
12.2(52)SE or later.
The director can be a Catalyst 3750E, 3750, 3560E, or 3560 switch. Catalyst
2960 and 2975 switches cannot be Smart Install directors currently.
Assess
Device
Readiness
Provision
ASP macros
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 107
LMS 4.0 Auto Smart Ports Provisioning
1. Select device
2. Associate macros to
events and configure
macros
3. Deploy
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 108
LMS 4.0 Smart Install Work Center
Assess
Device
Readiness
Configure
the Director
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 109
LMS 4.0 Smart Install Configuration
1. Select Director device
2. Specify software and
config
3. Configure DHCP pool
4. Deploy
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 110
How to be triggered by a Config
Change ?
Two Options:
Syslog Event Detector upon any potential config change
CLI Event Detector upon specific CLI command
– Asynchronous:
• Trigger Policy and then execute CLI command
• Trigger Policy and skip CLI command
– Synchronous:
• Trigger Policy and execute/skip based on exit status
_exit_status == 0 skip CLI command (default)
_exit_status == 1 execute CLI command
Caveats: command may be (much) bigger than what you match! Ranges!
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 113
Editing Files on the CLI
6
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 114
Editing Files
Problem: Often ASCII files are being used when using Device
Manageability Instrumentation in IOS:
Tcl scripts and EEM Tcl Policies
EMM Menu Definition Files
Config Templates and other text files
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 115
Editing Files – Using ed.tcl
1. Copy ed.tcl and a simple test file to the flash:
router# show flash
:
8 27091 Nov 19 2008 10:51:26 ed.tcl
9 68 Nov 19 2008 11:00:12 testfile.txt
7
to date
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 117
Deployment & Activation
Example: Archiving Configuration – 1/6
Problem: Device configurations must be archived periodically, collecting
them from the outside should not be the only answer.
Note: from IOS 12.3T onwards, refer to $h and $t variables within archive config path option
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 118
Deployment & Activation
Example: Archiving Configuration – 2/6
Solution 1: Archive the running configuration once every day locally:
archive
path disk0:/config-archive
maximum 7
time-period 1440
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 120
Deployment & Activation
Example: Archiving Configuration – 4/6
Router(config)# archive
Router(config-archive)# path flash:disk0
Router(config-archive)# maximum 14
Register EEM TCL Script
*Dec 10 20:12:43.198: %HA_EM-6-FMPD_UPDATE_POLICY_COPY: Policy update has copied 647 bytes from tftp:
*Dec 10 20:12:43.230: %HA_EM-6-FMPD_UPDATE_POLICY_REGISTER: Policy update has successfully re-registe
2bis. Can also synch entire groups, based on regular expression match:
router# event manager update user policy group m.*
*Dec 16 22:09:11.303: %HA_EM-6-FMPD_UPDATE_POLICY_COPY: Policy update has copied 647 bytes from tftp://10
*Dec 12 22:09:11.329: %HA_EM-6-FMPD_UPDATE_POLICY_REGISTER: Policy update has successfully re-registered
1bis. Can also synch entire groups, based on regular expression match:
router# event manager update user policy group m.*
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 125
Example: Install Embedded Automations
Problem: Embedded Automations based on Tcl Scripting or Embedded
Event Manager may include multiple scripts, policies, configurations,
variables and pre-requisites. How can we install (and un-install) all of
these in a consistent manner?
Solution: Create a package and use the EASy Installer
Router# easy-installer tftp://10.1.1.1/my-package.tar flash:/easy
-----------------------------------------------------------------------
Configure and Install EASy Package ‘my-package'
-----------------------------------------------------------------------
1. Display Package Description
2. Configure Package Parameters
3. Deploy Package Policies
4. Verify Installed Package
5. Exit
Enter option:
See: http://www.cisco.com/go/easy
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 126
How to pre-commission new
Cisco Devices ?
?
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 128
How to deal with new routers – Auto Install
IOS AutoInstall Feature consists of:
Ethernet Interface up
DHCP Client + Option 150
See: http://www.cisco.com/en/US/docs/ios/12_1t/12_1t5/feature/guide/dt_dhcpa.html
Available from: IOS 12.1(5)T, IOS-XE 2.1.0
Platforms: ASR 1000, x8xx ISR, x9xx ISR, 37xx, ME3400, ME4900, Cat4k, Cat6k, 76xx, 10k, UC520
See also: Smart Install
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 129
Deployment & Activation
Example: Automated Pre-Commissioning
Problem: How to automatically pre-commission a new Cisco ISR without
manual intervention on the Console
Solution: Use the AutoInstall Feature combined with an external DHCP
and TFTP server
NE gets network-
What exactly happens in Step 5
config file from TFTP
IP maps to
Default config
Reverse DNS No hostname in No No
file exists on
successful? network-
TFTP?
config file?
Yes
Yes
NE attempts to get Yes
hostname-config or NE gets
AutoInstall
hostname.cfg from TFTP router-config or
Fails
router.cfg from TFTP
File exists on No
TFTP?
AutoInstall
Yes Completes
AutoInstall
AutoInstall Fails
Completes manual config
completion
?
Telnet
Router>
Router> enable
Router# conf t revert time 2
Router(config)#
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 133
Deployment & Activation
Sometimes we need to automate ...
Typical Challenges:
• Large Scale
- more than just a few 12 image updates
- more than a few 100 config or file updates
• Robustness
- unreliable / un-managed access
- interruptions, outages
• Security
- authentication, privacy,
- trust and skills of on-site staff
- unknown hostnames / ip addresses
• Time
- de-coupling of deployment and activation
- many devices within small time window
• Cost
- manual, skilled labour cost vs. automated solution
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 136
Deployment & Activation
Example: Zero-Touch Deployment – 2/3
1. CPE sends DHCP Discover
2. DHCP Server replies with Offer
Warehouse
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 137
Custom Interactive Menus on
the CLI
12
Menu Command and
Embedded Menu Manager
(EMM)
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 138
Interactive Menus on the CLI
Problem: How to make some CLI commands available in a guided way
(for example to 1st Line Support, Local IT, Field Force, etc)
Solution I: Configure a Menu using the old <menu> commands
Solution II: Define a custom Menu in Embedded Menu Manager (EMM)
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 139
Menu Config Command – 1/2
Simple Menu Defined in the Config
Custom ASCII Menus
Part of IOS Config
Simple CLI Actions
Menu name
menu OldMenu title ^C
A simple example of the OLD menu command^C
menu OldMenu prompt ^C Menu Title
Please select a menu item:^C
menu OldMenu text 1 Run a ping test Menu Item Label
menu OldMenu command 1 ping 10.1.1.1
menu OldMenu options 1 pause Menu Item Action
menu OldMenu text 9 Exit
menu OldMenu command 9 exit
menu OldMenu status-line
Caveats:
– Remember to provide an <exit> option
– Simple menus and actions only
– No user input other than menu items
– Part of the running- and startup-config
Available from: IOS 10.0,
EASy Intro – bklauser
12.2(33)S
© 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 140
Menu Config Command – 2/2
router# menu OldMenu
Server “router" Line 0 Terminal-type (unknown)
9 Exit
9 Exit
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 144
Example: Combining ERM, EEM and EMM
Embedded Menu
Manager (EMM)
==========================================================
ERM Diagnostics
Policy Enter ? for help or ?# for item help
----------------------------------------------------------
1. Install Diagnostic Scripts
2. Set Global Variables (email parameters)
Embedded Event
Manager (EEM) 3. Deploy CPU Diagnostic Script
4. Deploy Memory Diagnostic Script
Event Detector 5. Deploy Buffer Diagnostic Script
6. Display Diagnostic Policy Configuration
7. Remove Diagnostic Policies
8. Exit
Embedded Resource
Manager (ERM) Enter selection [8]:
This MDF file and Tcl scripts are available from www.cisco.com/go/ciscobeyond
( See http://forums.cisco.com/eforum/servlet/EEM?page=eem&fn=script&scriptId=1363 )
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 145
Custom Interactions via
HTTP
Extensible HTTP Server in IOS
Problem: Sometimes we may event want to (or need to) provide a web-
based custom interaction with IOS
Solution: Customize the EASy HTTx Package – which provides an
extensible HTTP Server running on IOS
c1812-easy#
c1812-easy# httx-start
c1812-easy#
*Jan 6 11:02:44.649: %HA_EM-6-LOG: no_easy_httx_start.tcl: Accepting connection from 10.55.146.51:3235
*Jan 6 11:02:44.669: %HA_EM-6-LOG: no_easy_httx_start.tcl: "GET flash:/easy/easy-httx_public/html/index
*Jan 6 11:02:44.825: %HA_EM-6-LOG: no_easy_httx_start.tcl: Accepting connection from 10.55.146.51:3236
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 147
EASy HTTx Package – Extensible HTTP
Embedded Automation Systems (EASy)
HTTx EASy Package Provides:
Interactive Installation
Light-weight HTTP Server in Tcl
Ability to trigger Tcl scripts on IOS
Extensible Framework
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 150
Testing, Verification & Assurance
Two Types of Questions
Is it working ? Testing and Verification
Verify planning and design assumptions were valid
Ensure Deployment & Activation Phase was successful
Proactively eliminate well-known potential problems
Periodically verify design assumptions
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 151
Testing, Verification & Assurance
Two Types of Connectivity
Connectivity, Yes/No Testing and Verification
If the user can reach the IP endpoint the service is available
Can be calculated using basic availability equation
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 152
IP Service Level Agreements (IP SLA)
Active probing by injecting synthetic test traffic
Experience and Adoption across markets and technology domains
Vast range of Cisco and 3rd Party NMS tool support
Metrics
Latency Jitter Packet Loss Connectivity
Domains
IP Ethernet MPLS VoIP Services Medianet
Operations ICMP ICMP UDP TCP 802.1ag LSP PWE3 H.323 SIP HTTP DNS
Echo Jitter PathEcho Connect Jitter Trace VCCV GD GD
IPIPSLA
IP SLA
SLA
MIB
MIB Operation
Operation
MIB Operation
Data
Data
Data
See: www.cisco.com/go/ipsla
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 153
Testing, Verification & Assurance
IPSLA – Introduction 2/2
Cisco IOS feature available on most platforms Accessible via CLI and SNMP
(CISCO-RTTMON-MIB)
Measure Delay, Jitter, Loss Probability
IPSLAs responder and ICMP echo probe were available within IP Base in
12.4(6)T and above
IPSLAs functionality is available in IPVoice and above packages
In 12.3T a customer can still obtain the old package types and use
IPSLAs
Since IOS
As of 11.2 the old packages have been removed
12.4T
12.2(15)T2, 12(3)3, 12.2(25)S
time
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved.
12.3(12)T
Cisco Public
12.4(6)T 154
Testing, Verification & Assurance
IPSLA – ICMP and UDP Jitter Examples
RouterA
RouterC
RouterA(config)#
ip sla 1
RouterD
icmp-echo RouterC
timeout 500
frequency 10
ip sla schedule 1 start-time now
ip sla 10
udp-jitter RouterD 16384 num-packets 1000 interval 20
request-data-size 172
tos 20
frequency 60
ip sla schedule 10 start-time now
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 155
Testing, Verification & Assurance
IPSLA – ICMP Echo Operation
Scheduling
- minimize the number of concurrent operations
- minimize resource competition
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 158
Full Mesh
Nodes Operation
2 1
3 3
4 6
5 10
6 15
7 21
8 28
… …
100 4950
• Number of operations is
proportional to the square
of the number of nodes
• Does not scale
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 159
Full Mesh CE-to-CE [Example]
CE CE
PE Core PE
PE
London
Full mesh is not
Amsterdam San Jose always desirable
Select only critical
path, like branch
offices to
headquarters
Raleigh Paris
Dramatically reduces
the number of probes
Brussels
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 161
Composite SLA for Delay [Example]
CE CE
PE Core PE
PE
CE
Flexible: You can split the measurement for Core
Edge, and total
Measurements are less accurate, as each measurement carry
its own error tolerance (typically ± 1 ms per measurement)
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 162
Composite SLA for Packet Drop [1/2]
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 163
Composite SLA for Packet Drop [2/2]
First solution:
0.01+0.02+0.03=0.06 (6%)
Second solution:
1-[(1-0.01).(1-0.02).(1-0.03)]=0.058906 (5.8%)
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 164
Composite SLA for Jitter
2 ms 4 ms 3 ms
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 165
Testing, Verification & Assurance
IPSLA – Recurring Scheduling
Example:
Router(config)# ip sla schedule 5 start-time 12:00:10
life 3600 recurring
*12.3(8)T
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 166
Testing, Verification & Assurance
IPSLA – Multiple Operations Scheduling
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public *12.3(8)T167
Testing, Verification & Assurance
IPSLA – Random Scheduling
Problem: Strictly periodically starting IPSLA operations might be subject
to ‘synchronization effects’ with other processes (ie. routing updates),
leading to inaccurate data.
Solution: Use IPSLA Random Scheduling to randomize start time
This example starts operation 1 to 3 within the next 44 seconds, and each
operation will have a random frequency varying between 10 and 15 seconds:
Router(config)#ip sla group schedule 1 1-3 schedule-period 44 frequency range
10-15 start-time now life forever
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 170
Service Testing, Verification and Assurance
Example: Network Automation with IPSLA – 1/4
Problem
Need to monitor IP SLA
Trigger actions upon violation of SLA
Solutions
IP SLAs Thresholds
Using EEM and the EOT Event Detector
Using EEM 3.x and the IP SLA Event Detector
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 171
Service Testing, Verification and Assurance
Example: Network Automation with IPSLA – 2/4
Solution 1: Using IP SLA reaction triggers:
RouterA(config)#
ip sla 10
icmp-echo 3.3.3.3
frequency 10
ip sla reaction-configuration 10 react timeout threshold-type consecutive 3
action-type trapAndTrigger
ip sla schedule 10 life forever start-time now
ip sla reaction-trigger 10 20
logging on
ip sla logging trap
IP SLA/EOT/EEM
X
Environment Variables
($_* variables to be defined)
EEM Applet
email
event manager applet email_server_unreachable 3.3.3.3
event track 10 state down
action 1.0 syslog msg "Ping has failed, server unreachable!"
action 1.1 cli command "enable"
action 1.2 cli command "del /force flash:server_unreachable"
action 1.3 cli command "show clock | append server_unreachable"
action 1.4 cli command "show ip route | append server_unreachable"
action 1.5 cli command "more flash:server_unreachable"
action 1.6 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "Server Unreachable: ICMP-Echos
Failed" body "$_cli_result"
action 1.7 syslog msg "Server unreachable alert has been sent to email server!"
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 173
Service Testing, Verification and Assurance
Example: Network Automation with IPSLA – 4/4
Solution 3: Using Embedded Event Manager 3.0 IP SLA Event Detector:
Router(config)# ip sla 10
Router(config-ip-sla)# icmp-echo 3.3.3.3
Did
IP SLA
succeed Operation timeout
Is Is
No No
up-syslog down-syslog
set? set?
Yes Yes
done
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 176
Be Prepared – Some Good
Practices
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 177
Be Prepared – Some Good
Practices
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 178
Troubleshooting & Optimization
Good Practice: Reserve Memory for Cons.
Problem: Network or Device Problems may consume a lot of
Memory and/or Memory may become extensively fragmented –
potentially there won’t be enough Memory left for the Console …
Solution: Reserve Memory for the console ahead of time, on
every device
Rule of Thumb: for the number of kilobytes use a value greater than 3
times the NVRAM size
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 179
Where to start with MIBs ?
MIB Locator:
http://www.cisco.com/go/mibs
CISCO-CLASS-BASED-QOS-MIB
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 185
Troubleshooting & Optimization
Reliable Delivery and Filtering of Syslog
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 186
Troubleshooting & Optimization
Example: Filtering of Syslog – 1/2
Production SyslogD
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 189
Troubleshooting & Optimization
ACL Syslog Correlation
Problem: ACL hits can produce a Syslog message – but often in the NOC
or SOC we want to know which specific line of an ACL (ie.: ACE – Access
Control Entry) was kicking-in ...
Solution: Make use of IOS ACL Tags and Syslog Correlation
3. A matching packet will generate a syslog message, which will in turn trigger EEM :
*Apr 13 16:58:06.386: %SEC-6-IPACCESSLOGDP: list 100 denied tcp 10.0.2.2
(56273) 10.0.2.181(9000), 1 packet [ThisIsBlocked]
*Apr 13 16:58:06.394 UTC: %HA_EM-0-LOG: catch-an-ace-tag: Start ...
*Apr 13 16:58:07.025 UTC: %HA_EM-0-LOG: catch-an-ace-tag: ... done
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 191
Good to know: any traffic with
low TTL?
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 192
Troubleshooting & Optimization
Good Practice: Know about low-TTL
TTL is:
An IP Header field used to limit packet life time (upon routing loops)
Each routing hop along a packet’s path decrements this value
Upon TTL==0 the packet is dropped
2. Configure the Netflow Event Detector in EEM to notify upon a new flow record
event manager applet my-ttl-applet
event nf monitor-name "my-ttl-monitor" event-type create event1
entry-value "5" field ipv4 ttl entry-op lt
action 1.0 syslog msg “Low-TTL flow from $_nf_source_address"
3. Syslog message and/or use show flow monitor <my-monitor> cache command
*Dec 2 17:39:31.221: %HA_EM-6-LOG: my-ttl-applet: Low-TTL flow from 192.168.2.248
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 194
What if I need a
Packet Capture – I?
Troubleshooting & Optimization
Embedded Packet Capture (EPC)
Problem: Sometimes a Packet Capture would be useful for
Troubleshooting, Security or Application Analysis, Baselining, etc.
BUT: deploying Packet Sniffers is slow, expensive and requires local skills
and equipment ...
Solution: Make use of IOS Embedded Packet Capture to capture PCAP
format data and/or analyze on the device
1. Defining a capture buffer on the device
Router# monitor capture buffer …
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 198
Troubleshooting & Optimization
EPC – Additional Considerations
Capture stop criteria:
– manual stop
– after a specified time interval
– after given number of packets
Capture point:
– IPv4 or IPv6
– CEF (drop, punt) or process switching
– interface specific or all interface
– Direction: in, out, both, from-us (process-switched specific)
– multicast: only ingress packets are captured, not the replicated egress packets
– MPLS: does not capture MPLS encapsulated frames today
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 201
EPC – EASy Package
Embedded Automation Systems (EASy)
EPC EASy Package Supports:
Interactive Installation
Timed or manual capture start
Linear or circular buffer
Buffer Export
NAM enables:
Packet trace analysis
highlighting observed protocol/
packet level anomalies
One-click targeted packet
captures
Combined application visibility,
traffic analysis and smart
packet capture analysis
NAM benefits:
Improves operational efficiency
with on-demand captures
Smart analysis pinpoints root-
cause much faster than
manually analyzing or
scanning the packet traces
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 204
NAM 5.0: Troubleshooting Workflow New
Jan 20
Isolate Source of Application Performance Degradation 11
1. Analyze application
performance over time
2. Zoom to investigate
specific performance
issues
Time-based Filter
3. Identify the Top N clients 4. Isolate the servers with 5. Drill-down to select
affected by the degradation high response time server to analyze
activity
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 205
NAM 5.0: WAN Optimization Analysis New
Jan 20
Monitor Client Experience and Optimization Improvements 11
Examine number of
Examine Traffic Volume
Concurrent Connections
(Client, WAN) and achieved
(Optimized vs. Passthru)
Compression Ratio
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 206
Preventive Maintenance
– anyone ?
POST (Power-On Self-Test) is a great thing ...
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 208
Troubleshooting & Optimization
Generic OnLine Diagnostics (GOLD)
CLI and scheduling for Functional Runtime Diagnostics
Bootup Diagnostics (upon bootup and OIR)
Good Practice: schedule all
Periodic Health Monitoring (during operation) non-disruptive tests
periodically
OnDemand (from CLI)
Scheduled Testing (from CLI)
Test Types include:
– Packet switching tests
• Are supervisor control plane & forwarding plane
functioning properly?
• Is the standby supervisor ready to take over?
• Are linecards forwarding packets properly?
• Are all ports working?
• Is the backplane connection working?
– Memory Tests
– Error Correlation Tests
Complementary to POST
Available from: CatOS 8.5(1), IOS 12.2(14)SX
Platforms: CBS 3xxx, Cat 3560, 3750, 6500, ME6524, 72xx, 10k, CRS
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 209
Troubleshooting & Optimization
Example: The effect of wear and tear – 1/2
Problem: Repeated insertion and removal of Modules can lead to wear
and tear damage on connectors. This in turn can cause failures … how do
you find out during operation, without power-cycling the box ?
Solution: Use GOLD to verify functionality of a mis-behaving module
1) Let’s see which GOLD tests are available and scheduled for our Module:
Router# show diagnostic content module 3
Module 3:
See: http://www.cisco.com/en/US/docs/switches/lan/catalyst6500/ios/12.2SX/configuration/guide/diagtest.html
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 210
Troubleshooting & Optimization
Example: The effect of wear and tear – 2/2
2) Now let’s run TestL3VlanMet on-demand for Module 3:
Router# diagnostic start module 3 test 18
:
00:09:59: %DIAG-SP-3-MINOR: Module 3: Online Diagnostics detected a
Minor Error. Please use 'show diagnostic result <target>' to see
test results.
show diagnostics result module 3 detail
3) Then check the test results:
Router# show diagnostic result module 3
Module 3: CEF720 48 port 1000mb SFP SerialNo : xxxxxxxx
Port 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
----------------------------------------------------------------------------
U U U U U U U U U U U U U U U U U U U U U U U U
:
:
18) TestL3VlanMet -------------------> F
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 211
Troubleshooting & Optimization
GOLD and Embedded Event Manager
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 212
Troubleshooting & Optimization
GOLD and CiscoWorks LMS
CiscoWorks LMS supports GOLD configuration and monitoring
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 213
Troubleshooting & Optimization
Smart Call Home – CCO Application
Before
Personalized Reports
– Messages, diagnostics and
recommendations
– Inventory and configuration for
all Call Home devices
– Security alerts, Field notices,
and End-of-Life notices
– Configuration Sanity Analysis
– PDF and XLS Export
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 214
Troubleshooting & Optimization
Smart Call Home
Customer
Diagnostics
Rules
Installed Base
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 215
Troubleshooting & Optimization
Smart Call Home with a Partner
Customer Partner
Diagnostics
Rules
Installed Base
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 216
Troubleshooting & Optimization
Smart Call Home – Transport Gateway
Customer Partner
?
Transport
Gateway Diagnostics
mailbox
Rules
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 217
Troubleshooting & Optimization
Smart Call Home
Network EMS, NMS Network Network Support
Device Software Operator Engineer Engineer From
Late Surprises
Multiple Manual
SNMP, Syslog Escalation Steps
UI, email
Early Warnings
Automated Flow
Smart Call Home Message
1
SMTP
2
POP / IMAP
3
HTTPS
Platform Support
– Redhat Linux
– Solaris
– Microsoft Windows
– Across segments
– Platform support
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 220
Agenda
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 221
References
Q&A
References – Instrumentation
Device Manageability Instrumentation (DMI) www.cisco.com/go/instrumentation
Embedded Event Manager (EEM): www.cisco.com/go/eem
Cisco Beyond – EEM Community: www.cisco.com/go/ciscobeyond
Embedded Menu Manager (EMM): http://tinyurl.com/emm-in-124t
Embedded Packet Capture (EPC): www.cisco.com/go/epc
Flexible NetFlow: www.cisco.com/go/netflow and www.cisco.com/go/fnf
GOLD: http://www.cisco.com/en/US/products/ps7081/products_ios_protocol_group_home.html
IPSLA (formerly SAA, formerly RTR): www.cisco.com/go/ipsla
Network Analysis Module: http://www.cisco.com/go/nam
Network Based Application Recognition (NBAR): www.cisco.com/go/nbar
Security Device Manager (SDM): http://www.cisco.com/go/sdm
Smart Call Home: www.cisco.com/go/smartcall
Web Services Management Agents (WSMA): http://tinyurl.com/wsma-in-150M
Cisco Configuration Engine (CCE): www.cisco.com/go/ciscoce
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 223
References
Embedded Automation Systems (EASy)
Embedded Automation Systems (EASy)
1. Browse and Download EASy Packages
www.cisco.com/go/easy
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 224
References
Embedded Automation Systems (EASy)
www.cisco.com/go/easy www.cisco.com/go/ciscobeyond
www.cisco.com/go/instrumentation supportforums.cisco.com
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 225
References
Network Automation @ Turn It On
www.cisco.com/go/turniton
Turn It On Program
includes several small Network Automation Examples around Cisco IOS unique features
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 226
References
TechWise TV Episode 73 (August 2010)
Featuring Cisco
Solutions Experts Robb
Boyd and Jimmy Ray
Recorded at CiscoLive 2010 Purser and Borderless
Targeted at Geeks and TDMs Networks Host Jennifer
Geisler
Small, real, practical, engaging examples
Special Guests:
Joe Clarke
Cult Status of Robb and Jimmy Ray Tracy Jiang
Matt Lambert
Bruno Klauser
David Lin
See: http://www.cisco.com/en/US/solutions/ns340/ns339/ns638/ns914/html_TWTV/twtv_episode_73.html
Localized Events / Broadcasts are possible …
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 227
References
Network Automation @ CiscoLive 2011
1. Navigate to
http://bit.ly/cSMV3N
3. Enjoy !
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 228
Q&A
References – Conferences and Events
Cisco Networkers and CiscoLive
– Life Events in Europe, Emerging Markets and US
– Virtual Events and Recordings
Network Automation
November 8-10th 2011, Paris
NEMA
October 28th 2011, Paris
http://nema.networkembedded.org/
EMANICS
CNSM, AIMS, IM and NOMS
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 229
References
Network Automation Hands-On Lab – PEC
1. Navigate to PEC
http://www.cisco.com/go/pec
2. Click on >Launch
4. Enjoy !
EASy Intro – bklauser © 2009 Cisco Systems, Inc. All rights reserved. Cisco Public 231
Questions?
Wrap-Up & Close
In Summary
Network Automation …
Based on Embedded Automation Systems (EASy)
Device Manageability Instrumentation (DMI)
… is a Paradigm Change
… offers opportunities far beyond
'just' OPEX savings
… extends beyond the traditional
operational life cycle
… is EASy to adopt now