• IOS-XE Versions 16.6 and above come with Guest Shell.
  • Guest Shell is a virtualized CentOS environment.
  • Ultimately a container managed through Cisco’s IOx.
  • Enabling and Working with Guest Shell
Enabling IOx environment
Confirms services are running

Once IOx is enabled, we need to configure network interface settings for the guest shell. We will first create a Virtual Port Group that will act as the gateway for guest shell. The port group will need to NAT traffic outbound for the virtual environment to reach the outside world (or just to reach IOS-XE).

Default Gateway for Guest Shell
Access List and NAT statement

Once NAT and gateway configuration has been completed, the vNIC settings will be configured under the app-hosting appid guestshell.

vNIC Configuration

And last but not least, the command to enable Guest Shell:

guestshell enable

Once the enable command has succeeded, the command ‘guestshell’ is all it takes to reach the linux prompt.

The Guest Shell will out of the box have Python2.7 installed. In Python you can create scripts with vim, specifically with the ‘cli’ module, to interact with the command line. Below is a basic script that will display a show ip int brief.

Once exited out of the Guest Shell and on our typical IOS-XE CLI prompt, you can run this script with the following:

Once it’s confirmed the command ‘guestshell run python’ will work from IOS-XE, it’s very simple to use EEM for a python script to run after specific events happen.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s