Questions tagged [cisco-ios]
Cisco IOS (Internetwork Operating System) is the name of the operating system that is run by virtually all enterprise-class Cisco switches and routers, as well as in certain other Cisco networking products.
229
questions
0
votes
0
answers
8
views
how do i change the date of birth in Cisco
error:"Due to GDPR requirements, you must be at least 16 years old to participate in Networking Academy."
This error popped up as I mistakenly chose the wrong date of birth, how can I change ...
0
votes
0
answers
31
views
Ansible | snmp host and its version data (cisco) | using lists in ansible
I am using ansible to gather snmp hosts configured on each of the cisco switch and also its version . i'm able to achieve to get the list but some how i'm unable to understand on how to really have ...
1
vote
1
answer
101
views
ansible CSV header options when appending with for loop
i'm trying to gather network devices data using ansible and add to csv file which is working fine for me but then now i would like to have the headers to the match to whats been gathered .
- name: ...
1
vote
1
answer
56
views
Ansible Reload Cisco Devices Hangs
I have a task that reloads a number of Cisco Routers and Cisco Firewalls. For some reason the playbook always hangs at this task after the playbook have already reloaded the first device. The reload ...
-1
votes
1
answer
19
views
IS-IS Protocol Configuration on Router does not seem Possible
On the image below, IS-IS does not appear in "router ?" commands. However, configuration guides on YT videos and other sources would always proceed to "router isis" command, but it ...
1
vote
1
answer
181
views
Syslog receives logs from Cisco Switch but doesn't log them
So, I got the task of transmitting all logs made by one particular Cisco switch to our dedicated Syslog Server. Via Cisco IOS I did the following:
schu-ebd-sw-vt14-11#configure terminal
schu-ebd-sw-...
0
votes
0
answers
72
views
Extract and save Cisco devices output with Python
so I m very new to python
I have a devices.txt file that includes all the IPs and nothing else (ex 10.10.10.1, 10.10.10.2 etc ..)
I managed to get the output I want but I cannot find a way to get the ...
0
votes
1
answer
133
views
Cisco ansible show running-config
As per documentation, this should fetch the running config by running show running-config all
cisco.ios.ios_config:
defaults: yes
It ends up erroring out with
"msg": "show running-...
0
votes
0
answers
60
views
Is my HSRP along with DHCP configuration correct?
I have two routers:
Router A
Router B
Router A is the primary router and B is the one with lowest priority in HSRP.
What I did was to configure 3 subinterfaces with encapsulation dot1 to assign them ...
0
votes
1
answer
56
views
How to compare Cisco software versions in Python
I need to compare software versions for Cisco devices in Python, but unfortunately packaging.version doesn't support this format when 3rd and 4th indexes are joined by letters. Maybe someone knows a ...
0
votes
0
answers
115
views
How to Extract FileSystem from Cisco IOS?
this is my first time analyzing firmware.
Im trying to extract the Filesystem if possible, or at least extract the OS to load in IDA.
Using Binwalk on the ELF binary gives me the output below.
DECIMAL ...
0
votes
2
answers
265
views
Odd error when attempting net_put via Ansible
Looking for assistance with an odd error I am troubleshooting with a playbook.
I have a working SSH session to a switch, but having difficulty with transferring files via SCP on Ansible. I can start a ...
0
votes
0
answers
129
views
How do a I iterate through IP Addresses for a Cisco show command in Python using Netmiko then RegEx the output?
The goal of this script is to iterate through a list of IP addresses and loop the show command for multiple Cisco devices i.e. ASR 9K Routers. I want to RegEx the send_command to show only the total ...
0
votes
1
answer
264
views
libssh vs paramiko - ios_facts are different when running Ansible playbooks
I have a playbook I am writing that automates the install of firmware to our fleet of C2960Xs.
I recently moved the location of the Ansible server I am using from my homelab to a VM in Azure. We have ...
0
votes
1
answer
160
views
How do I get Ansible to pass a variable into Python Script that has an Input Function?
I have tried to run a Python script in Ansible. The script works by itself. When I run it in the playbook it gives me the following error:
line 14, in <module>\n revisionamount = input(\"...
0
votes
1
answer
256
views
Ansible Jinja Template Failing on Cisco.ios.ios_config playbook
I have the following playbook, jinja template and yaml data. I am running this against a Cisco 9300 or 3850 switch. I just get the following error. If I run just the commands without the template the ...
0
votes
0
answers
27
views
Is this a bug with python3 and ciscoconfparse?
I'm wondering if I should report this as a bug. I've used this Python module before (ciscoconfparse) and haven't had a problem. I recently switched to a MacBook and I get an error just trying to open ...
1
vote
0
answers
53
views
Opening Test File on Cisco IOSXE python guestshell
I successfully transferred a text file (zero_conf.txt) to a Cisco IOSXE (Amsterdam) switch flash file system using python on the guestshell.
However when I try to open the text file using the ...
0
votes
0
answers
176
views
Saved 9800 WLC file cuts off configuration
I am having an issue where my script logs into a Cisco WLC 9800, sends the commands "show run" and then saves it to a file, but the file cuts off a big chunk of the config. I verified with ...
0
votes
1
answer
90
views
Error While exiting Configuration mode using Python Script
It's been long since I opened stack websites.
please ignore any mistakes.
I am using telnetlib library to login into my Multilayer switch on GNS3.
I am Successfully able to configure loopback ...
0
votes
2
answers
76
views
Continue not properly in loop (python)
I have the following script that is used to log into Cisco devices and make config changes. The script seems ok except for the very end where the IDE complains that the "continue is not properly ...
0
votes
0
answers
2k
views
Ansible Playbook command timeout when connecting to cisco switch using SSH key
Summary:
im trying to setup a playbook to get a list of IOS devices from netbox and then export the config files
Versions:
ansible-playbook [core 2.13.2]
python version = 3.8.13
switch IOS = 15.0(2)...
0
votes
0
answers
57
views
Cisco MPLS P2P configuration
I got a question for ya. I have a fiber provider that connects one of my border routers to one of my edge routers over an MPLS PtP circuit. I'm having really weird issues like the MikroTik mac-telnet ...
2
votes
1
answer
40
views
Cisco CSR user-data bootstrap to allow multiline in banner
The user data format for the IOS appliance uses the following:
ios-config-0001="hostname test-csr-deployment-001"
ios-config-0002="banner exec |Hostname: test-csr-deployment-001\r\...
0
votes
1
answer
174
views
Failure condition for free space check in Ansible
Working on writing a playbook to update the fleet of Cisco switches we run, but I am having trouble with a specific line I am using to verify there is sufficient free space on the stack.
Cut the ...
1
vote
1
answer
101
views
Cisco IOS Script assistance
I am using the following script to log into various cisco devices and configure them:
from netmiko import ConnectHandler
import time
import json
import yaml
import sys
with open("devices.yml&...
1
vote
1
answer
65
views
Exception Handling in Python Script
I have the following python script that adds configurations to different Cisco IOS devices. The script works great as long as all the devices in the file allow the SSH connection and take the configs. ...
1
vote
2
answers
87
views
Open Dictionary File in Python
I am trying to develop a Python script that will log into hundreds of Cisco IOS devices and configure them. The issue I am running into is that I do not want to define the device dictionary in the ...
1
vote
1
answer
213
views
Error handling for updating IOS via Ansible
beginner to using Ansible. More of a network engineer, less of a scripter / programmer, but trying to learn a new skill.
Attempting to write a playbook to automate updating of our fleet of Cisco ...
1
vote
1
answer
49
views
Issue connecting to cisco ios switch with custom menu enabled
I am trying to connect to a Cisco [Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.4(3)M3] switch via ansible/python. But I am facing issue because we have enabled a menu when we ...
0
votes
2
answers
757
views
Sending Cisco commands from a text file using Netmiko fails. send_config_set works but send_config_from_file doesn't
I have been using this link as guide.
https://pyneng.readthedocs.io/en/latest/book/18_ssh_telnet/netmiko.html#:~:text=Netmiko%20is%20a%20module%20that,pip%20install%20netmiko
XXXXXX:/Test # cat ...
0
votes
1
answer
241
views
Telnet action failed: telnet connection closed
I am unable to connect via telnet (SSH is not an option) using ansible
Steps to mimic
- name: Fetch Show Version
ansible.netcommon.telnet:
user: '{{ username }}'
password: '{{ ...
0
votes
0
answers
23
views
Passing port: 23 in ios_command module where default is (22)
I am building a workflow where I try to SSH a device if that doesn't work I will telnet to the device, If telnet is succesfull, I will continue my workflow,
Now when SSH is working, my play is running ...
0
votes
1
answer
306
views
BGP Protocol configuration between two VPC
I would need to configure a cross connect between two networks via SFP Fiber.
Unfortunately I'm new on BGP configuration and would need confirmation that I'm doing it on the right way...
I have Two ...
0
votes
0
answers
1k
views
Posh-SSH script on Cisco devices
I made a Posh-SSH based script that will let me send commands to Cisco routers. It works great... except for a very specific case.
function Send-SSHCommand {
Param(
[Parameter(...
0
votes
1
answer
1k
views
Python Parallel SSH - Netmiko/Napalm - Cisco SMB switches stuck at sending command
I am trying to determine vendor + version (using python NAPALM and parallel-ssh) of network switches (Huawei VRP5/8, Cisco Catalyst and Cisco SMB (SF/SG):
admin@server:~$ python3
Python 3.8.10 (...
0
votes
0
answers
1k
views
Cisco-module (Filebeat) to Logstash - Configuration issue - Unable to write to existing indices
I was able to send logs to Elasticsearch using Filebeat using the below configuration successfully.
# ============================== Filebeat inputs ===============================
filebeat.inputs:
- ...
1
vote
1
answer
1k
views
Remove first line in 'stdout_lines'
I'm just a beginner and write some small playbook.
For now I get some little error.
- name: Facts
ios_command:
commands: show interface status
register: ios_comm_result
In this playbook, for ...
0
votes
2
answers
379
views
Ansible Cisco Config Terminal
I have a problem with Cisco Routers. I can't open a config terminal because it's saying always invalid input. I done everything what are docs saying.
Inventory file:
all:
vars:
...
1
vote
0
answers
128
views
How to set vrf forwarding for interface in cisco ios via ansible
In my playbook I need to set up a new l3 interface and configure vrf forwarding for it. In cisco.nxos there is the cisco.nxos.nxos_vrf_interface which manages interface specific VRF configuration.
I ...
0
votes
0
answers
39
views
Ansible's 'community.network.pn_stp' fails
I am trying to run a simple playbook that changes some STP parameters, but I cannot understand where the following error comes from:
fatal: [Sw3]: FAILED! => {
"changed": false,
&...
0
votes
1
answer
752
views
Ansible` ios_command `Error reading SSH protocol banner[Errno 104] Connection reset by peer
I have this command which basically is just to get the data from the device.
- name: Get data
tags: get_facts
ios_command:
commands:
- show version
register: ruijie_sh_interfaces
...
0
votes
1
answer
123
views
Sysmgr volatile memory bug
As you may know that there is a bug with Nexus switches called SYSMGR-2-VOLATILE_DB_FULL with versions below System version: 5.0(2)N2(1) that causes a switch to crash reboot once dir /dev/shm gets to ...
0
votes
1
answer
43
views
Unable to run vpnc command
I have installed vpnc with this guide
The installation went fine, but I am unable to run vpnc normally from command line
My content for sbin
The only way to run vpnc is to navigate to /usr/local/sbin ...
0
votes
2
answers
702
views
Connecting to multiple cisco devcies listed in text file using python netmiko
How to connect multiple cisco devices via ssh connecthandle.. will this work. I'm new automation, Please help
Host=open('devcies.txt','r')
devices=Host.readlines()
for ip in devices :
local_login(ip)
...
0
votes
1
answer
234
views
CISCO IOS-XR, Python3.7, Not able to run commands like 'ls' and 'df' on Cisco router
Cisco ios-xr router using CLI:
RP/0/RP0#show version
Thu Nov 25 07:53:59.103 UTC
Cisco IOS XR Software, Version 6.5.32.11I
Copyright (c) 2013-2020 by Cisco Systems, Inc.
RP/0/RP0#run
Thu Nov 25 07:54:...
0
votes
0
answers
88
views
Cisco Config Parser multiple lines
I am working on a parse for verifying configs for wlan controllers and I thought I had something. I usually use show commands but all I have available are the configs in a text format.
I have some ...
2
votes
2
answers
790
views
How can I parse metadata from show version (cisco ios) using ansible
Here is my playbook
The return of output.stdout is a list that's why I call it by index of 0
- name: "GENERATE VERSION REPORT"
hosts: all
gather_facts: false
roles:
- ansible-...
1
vote
1
answer
235
views
How to ensure that the dhcp pool name exist before updating options using ansible
Here is my playbook. When I execute it, the command ip dhcp pool {{ item.name }} don't check if the name exist or not. I use the parameter "match: exact" but it doesn't work. So can I use if ...
0
votes
2
answers
79
views
Is ios_logging_global idempontent?
This is my playbok. I'm trying to add a new logging server to my switches.
---
- name: "Add new logging server"
hosts: all
gather_facts: no
tasks:
- name: Add logging server
...