Scripting on 7210?
Posted: 29 Jan 2026 16:12
Greetings-
I have a number of SAS-M/Mxp nodes running 20.3 firmware. I'm having MTU issues when trying to bring them into NSP/NFMP for management. Turns out that the System interface MTU is ignored and the device assumes the MTU of the upstream port. Since that's inband management on the same upstream port that has the customer service(s) on it, I can't set the MTU down to 1500 on the upstream port without affecting the service(s). Thusly, I find myself needing to move the link IPv4 address from a router Base interface to a service IES interface so I can set the IP-MTU there and treat the inband management traffic as a service.
I've tested this many times in the lab and everything works as expected. I'm ready to start rolling this out, but I want to minimize the possibility that a script failure will cause loss of management to the device. My script basically shuts the router interface, then creates the IES and IES interface with the same IP as the original interface, and using the upstream port/vlan as a SAP.
What I'm trying to figure out is the following:
1. Can I parse the output of commands like '/show router Base interface' to determine if the existence of an interface named 'mgmt' ?
2. If such exists, can I parse the output of '/show router Base interface "mgmt" detail' to obtain the IPv4 address and mask? $ipv4Address/$ipv4Mask
3. Can I also parse that output to get the port and vlan used for the uplink? $port:$vlan
4. Can I parse the output of a command like '/show router Base route-table' to find the default gateway address? $defaultGateway
## at this point, insert script/code to move the $ipv4Address/$ipv4Mask and $port:$vlan to the new IES.
5. Can I parse the output of a command like 'ping $defaultGateway' to determine if the gateway is reachable?
6. Can I create a conditional statement based on the result of the previous ping command that will either exit the script (Script ran ok, no issues), or continue with script/code to roll back the config to the configuration prior to the change?
7. Test the gateway ping again then exit with messages to indicate the script failed and rolled back successfully (ping works), or the script failed and rollback failed (ping still fails)?
8 end script
TiMOS/SROS 20.3 on the 7210 SAS-M/Mxp doesn't appear to have the python functions. I opened a ticket with support, who gave me a little bit of info then pointed me at the System Management Guide for 24.9. The only thing I saw in there with regards to scripting is the stuff about setting up scripts with script-control and script-policy config.
I have otherwise been unable to find any documentation or examples, that might help me figure out the answers to my questions.
The aim here is to get all of the affected devices into NSP/NFMP so that I can then upgrade them to 24.9.
Thanks-
J
I have a number of SAS-M/Mxp nodes running 20.3 firmware. I'm having MTU issues when trying to bring them into NSP/NFMP for management. Turns out that the System interface MTU is ignored and the device assumes the MTU of the upstream port. Since that's inband management on the same upstream port that has the customer service(s) on it, I can't set the MTU down to 1500 on the upstream port without affecting the service(s). Thusly, I find myself needing to move the link IPv4 address from a router Base interface to a service IES interface so I can set the IP-MTU there and treat the inband management traffic as a service.
I've tested this many times in the lab and everything works as expected. I'm ready to start rolling this out, but I want to minimize the possibility that a script failure will cause loss of management to the device. My script basically shuts the router interface, then creates the IES and IES interface with the same IP as the original interface, and using the upstream port/vlan as a SAP.
What I'm trying to figure out is the following:
1. Can I parse the output of commands like '/show router Base interface' to determine if the existence of an interface named 'mgmt' ?
2. If such exists, can I parse the output of '/show router Base interface "mgmt" detail' to obtain the IPv4 address and mask? $ipv4Address/$ipv4Mask
3. Can I also parse that output to get the port and vlan used for the uplink? $port:$vlan
4. Can I parse the output of a command like '/show router Base route-table' to find the default gateway address? $defaultGateway
## at this point, insert script/code to move the $ipv4Address/$ipv4Mask and $port:$vlan to the new IES.
5. Can I parse the output of a command like 'ping $defaultGateway' to determine if the gateway is reachable?
6. Can I create a conditional statement based on the result of the previous ping command that will either exit the script (Script ran ok, no issues), or continue with script/code to roll back the config to the configuration prior to the change?
7. Test the gateway ping again then exit with messages to indicate the script failed and rolled back successfully (ping works), or the script failed and rollback failed (ping still fails)?
8 end script
TiMOS/SROS 20.3 on the 7210 SAS-M/Mxp doesn't appear to have the python functions. I opened a ticket with support, who gave me a little bit of info then pointed me at the System Management Guide for 24.9. The only thing I saw in there with regards to scripting is the stuff about setting up scripts with script-control and script-policy config.
I have otherwise been unable to find any documentation or examples, that might help me figure out the answers to my questions.
The aim here is to get all of the affected devices into NSP/NFMP so that I can then upgrade them to 24.9.
Thanks-
J