Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm configuring a Cisco IOS (version 15) router, and I need to use the same values in multiple places; in this case, I need to configure the router's name servers (ip name-server <address>) and also reference them in an ACL, as per this question (permit udp <address> [...]). However, now I have the same IP address in two different places, and this could lead to confusion later, should f.e. the DNS servers change.

Is there any way to use some sort of variable for this? Does IOS even allow the use of variables?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Unfortunately, no, IOS does not support anything like this. The closest feature would be object-groups for ACLs, which were added in 12.4(20)T. They allow you to define an object-group containing the IP address(es) (or TCP/UDP ports or other things) you want to filter on. You would then reference the object-group instead of a static address in your configuration. However, at present they're only useful in ACLs, and there are restrictions where they can be used (e.g. they won't work in IPsec crypto map ACLs).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.