Devnet 2557
Devnet 2557
Devnet 2557
IOS-XE
• Introduction
• Enabling Guest Shell
• Working with Guest Shell
• Linux Shell Tools
• On-box Python
• Conclusion
Current Application Challenges
Not enough network bandwidth Data Reduction
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 4
Network Application Hosting Spectrum
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 5
Network Application Hosting Spectrum
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 6
What is Cisco IOx?
•
platforms
A compute platform, Linux
+
application framework, and
software development kit +
Cisco IOS
• Manage life cycle aspects of
applications
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 7
What is the Guest Shell?
• 64-bit Linux environment running
on IOS XE and NX-OS platforms
• Install, update, and operate 3rd
party Linux apps (e.g. Puppet, Linux
Chef, Splunk) applications
Network OS
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 8
Cisco Guest Shell Capabilities
Guest Shell 1.0 (Lite) Guest Shell 1.0 Guest Shell 2.1
Platforms CAT 3650, CAT3850 CAT 9000, ISR 4000 Nexus 3000, 9000
Python 2.7 ✓ ✓ ✓
Python 3.0 ✗ ✓ ✓
RPM Install ✗ ✓ ✓
OVA Enable/Upgrade ✗ ✗ ✓
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 9
Enabling the Guest Shell
Task Overview for Enabling the Guest Shell
• Enable IOX
• Configuration the VirtualPort group to provide IP connectivity to Guest Shell
• Create NAT rules to allow outbound access for Guest Shell
• Enable the Guest Shell
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 11
Task 1: Enable IOX
• The command ‘iox’ enables the IOX
process running in IOS-XE
csr1kv#conf t
Enter configuration commands, one per
line. End with CNTL/Z.
csr1kv(config)#iox
csr1kv(config)#end
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 12
Task 2: Validate the IOX Status
csr1kv#show iox-service • This command provides the status
Infrastructure version : 1.7
of the IOX service.
Total virtual services installed : 1
• Guestshell runs in a Linux Container
Total virtual services activated : 0
(LXC) and cannot co-exist with a
KVM container.
Machine types supported : LXC
Machine types disabled : KVM
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 13
Task 3: Configure VirtualPortGroup
• The VirtualPortGroup acts as the
default gateway for the guestshell.
conf t
end
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 14
Task 4: Configure NAT for Out
• Configuration only valid on routing platforms
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 15
Step 5: Enable the Guest Shell
• Virtual-Port Group and IP address only
! Entered from Enable Mode
needed on routing platforms
! Command is entered on a single line
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 18
Task 7: Accessing the CLI from the Guest Shell
• ‘dohost’ command built into Guest Shell
• Send commands directly to the router
• Limited to exec privilege commands. No access to config mode.
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 19
Linux Shell Tools
Task 8: Installing Applications within Guest Shell
• YUM
• Package manager for Linux
systems.
• Install, update and remove
applications
• ’repos’ or file repositories
[guestshell@guestshell ~]$ sudo yum install mtr
Loaded plugins: fastestmirror
=====================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================
Installing:
mtr x86_64 2:0.85-7.e17 base 71 K
Installed:
mtr-0.85-7.el7.x86_64
Complete
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 22
On-Box Python
Extending Application Support Through Python
Application Examples
http://www.python.org/
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 24
Using Python with IOS-XE Devices
Application Examples • IOS-XE “Off-Box” Python
IOS-XE “On-Box” Python
External Python
Python
Execution Environment
Python SSH/NETCONF
IOS-XE Device
IOS
IOS IOS-XE Device
• scripts executed locally on switch or router • scripts executed externally from switch or
• Ideal for: router
• provisioning automation (ZTP) • Ideal for:
• automating Embedded Event Manager • configuration management automation
responses • telemetry / operational data
• application development • controller use cases including APIC-EM /
• IOT Cisco Network PNP
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 25
Task 10: Working with the Interactive Python
Interpreter
• In this task we will use the interactive Python interpreter and Cisco’s cli Python
module to make changes to our switch.
• Our workflow will be
• Start the Python interpreter
• Import the cli module
• Craft (copy) our cli configuration
• View the results with a show command
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 26
Task 11: Using Python with IOS-XE
Use Case Example – “Are you sure nothing has changed on the network?”
• By leveraging a combination of EEM and On-Box Python the router can notify
when the configuration has been modified.
• Python script posts
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 27
Continue Your Education
• Demos in the Cisco campus
• Walk-in Self-Paced Labs
• Lunch & Learn
• Meet the Engineer 1:1 meetings
• Related sessions
DEVNET-2557 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 28
Q&A
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Complete Your Online
Session Evaluation
• Give us your feedback and
receive a Cisco Live 2018 Cap
by completing the overall event
evaluation and 5 session
evaluations.
• All evaluations can be completed
via the Cisco Live Mobile App.
Don’t forget: Cisco Live sessions will be
available for viewing on demand after the
event at www.CiscoLive.com/Global.
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Thank you