IP configs/interface parsing

There are many instances in which we need to parse interface configs to fetch useful information. For example, from a list of devices, find all the interfaces that are trunk. Another example could be to find all the interfaces that are admin-shutdown (shutdown on the router), or even fetch the IP address configurations from interfaces.

There might be instances wherein we need to find out whether particular IP addresses or subnets are configured on the router.

A good way to extract any information is using regex. Regex is term that is used to match a particular pattern and either fetch the matched pattern or validate whether a certain pattern is present in the parsed text.

Here are the most basic and important ...

Get Practical Network Automation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.