Note that the below example I am using the infamous Titanium image, but it works on real production NX-OS as well for sure.
1. Eth2/1 has an IP address 192.168.1.1/24 that we will change to 192.168.200.1/24.
That was kind of fun, but what if we want to remove ALL ip address on ALL interfaces in one shot? We can also use the *Nix sed to modify the text stream:
1. Back to the 192.168.200.1/24 IP:
2. We can use sed to change string, note that it does not change the original string:
3. Now we can use the Cisco include command to include the string we want, then use sed to substitute the string. In this example I just include '192.168.200.1' but you can use 'include 'ip addresses' for example:
4. Now you see the interface:
5. Run the script:
6. Now you dont:
How cool is that? This is an absolute time saver in large scale environment. I wish Cisco includs *Nix tools in all of their platforms.