Reply

Verifying IP helper-address is correct

Adviser
Posts: 407
1503     0

Here's a piece of sample code from a customer request we had recently.

The customer wanted a way to check every interface that have ip helper-address to verify that it’s correct.

#######################
#  START CODE BLOCK
#######################
 
# If the IP helper-address statements exist, they must match
Optional Block:
Interface .+
Ip helper-address 10\.10\.10\.1
Ip helper-address 10\.10\.10\.2
Ip helper-address 10\.10\.10\.3
 
# Otherwise, no IP helper-address statements should exist
Optional Block:
                Interface .+
                                (?!Ip helper-address)
 
# For any interface that doesn’t match either rule above, it should be caught here and flagged 
Invalid Block:
Interface .+
 
#######################
#  END CODE BLOCK
#######################
Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh
Showing results for 
Search instead for 
Do you mean 

Recommended for You