ios_config missing from TCL on XR 7.7.21?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2025 10:07 PM
I'm running XR 7.7.21 and am scripting some repetitive processes, specifically trying to execute a config mode command ("load config.txt") via a TCL script. I know of "ios_config" in previous OS versions, but that throws an "invalid command name" error in 7.7.21. Is "ios_config" gone from 7.7.21? If so, is there another way to accomplish this? I'm still learning TCL on XE and XR seems to be an entirely different beast. Thanks in advance.
- Labels:
-
Network Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2025 11:03 PM
Hello @serkit
In Cisco IOS XR 7.7.21, the ios_config
command is indeed not available. This command was used in older versions of IOS and IOS XE for executing configuration commands within a TCL script, but it is not supported in IOS XR. IOS XR has a different architecture and scripting environment compared to IOS and IOS XE, so some commands and methods differ.
To execute configuration commands in IOS XR using TCL, you can use the cfsys::exec
command to run CLI commands, including configuration commands. However, you need to be cautious when using this approach, as it may not provide the same level of error handling or feedback as ios_config
in IOS or IOS XE.
Hope This Helps!!!
AshSe
Community Etiquette:
- Insert photos/images inline - don't attach.
- Always mark helpful and correct answers, it helps others find what they need.
- For a prompt reply, kindly tag @name. An email will be automatically sent to the member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2025 06:42 AM - edited 03-07-2025 06:44 AM
Thanks for that! Can you please elaborate on this command, and maybe include an example?
Edit: I attempted this command from the tcl shell and received an "invalid command name" error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 12:29 AM
Hello @serkit
Why not using python ? For IOS-XR I think it is a better option...since it seems to have limitation about TCL on IOS-XR.
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.
