cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1211
Views
0
Helpful
4
Replies

Using netmiko to edit public IOS XR Always-On Sandbox router?

yoshi--power
Level 1
Level 1

Hello everyone,

I'm following different labs about network automation.

 

I went through the NETCONF/YAML lab with the Always-On Sandbox router, worked like a charm.
I also used netmiko to do basic operations like get running config and it worked well.

However, I can't seem to edit configuration with send_config_set on this router.
Code example :

from netmiko import Netmiko
from getpass import getpass

net_connect = Netmiko(
    "sbx-iosxr-mgmt.cisco.com",
    username="admin",
    port="8181",
    password=getpass(),
    device_type="cisco_ios",
)

print(net_connect.find_prompt())
commands = ["logging history size 500"]
net_connect.send_config_set(commands)
net_connect.disconnect()

But I get a socket timeout exception. Is this router configured to block these kind of calls?

Am I doing something wrong?

Thankfully

1 Accepted Solution

Accepted Solutions

omz
VIP Alumni
VIP Alumni

Hi

device_type="cisco_xr"
commands = ["logging history size 500", 'commit']

and it should work 

sbx-logging.gif

View solution in original post

4 Replies 4

omz
VIP Alumni
VIP Alumni

Hi

device_type="cisco_xr"
commands = ["logging history size 500", 'commit']

and it should work 

sbx-logging.gif

Simple as that, maybe I should've read the documentation more. Thanks!

On a sub-question is this Sandbox router virtualized or is it the same for anyone?
Say for instance 100 users access it at the same time and create the same Loopback interfaces, will it create conflicts?

Pretty sure its virtualised .. everyone accesses the same box.

More than one user configuring at the same time .. 

sbx-multi.gif

Correct, it's an XRv9000.
Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io