cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
386
Views
1
Helpful
3
Replies

Configure DNS on switch

Hello and sorry for my english,

just little question, I have 4 DNS servers to set on switchs : 10.4.0.1 10.131.0.1 10.4.0.2 10.131.0.2

 

 

if there is a difference if i put DNS like this : 

 

ip name-server 10.4.0.1 10.131.0.1 10.4.0.2 10.131.0.2

 

and like this : 

ip name-server 10.4.0.1
ip name-server 10.131.0.1
ip name-server 10.4.0.2
ip name-server 10.131.0.2

 

thanks a lot

1 Accepted Solution

Accepted Solutions

Peter Paluch
Hall of Fame Cisco Employee Hall of Fame Cisco Employee
Hall of Fame Cisco Employee

Hello,

No apologies needed - your English is perfectly okay!

There is no difference between the two forms of the command. The second style (one DNS per command) will automatically collapse into the first style (multiple DNS per command):

r1(config)# ip name-server 1.2.3.4 2.3.4.5
r1(config)# ip name-server 3.4.5.6
r1(config)# do show run | i name-server
ip name-server 1.2.3.4 2.3.4.5 3.4.5.6

This was tested on an IOS-XE 16.12.

Best regards,
Peter

View solution in original post

3 Replies 3

balaji.bandi
VIP Guru VIP Guru
VIP Guru

depends on the device, both should work.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Peter Paluch
Hall of Fame Cisco Employee Hall of Fame Cisco Employee
Hall of Fame Cisco Employee

Hello,

No apologies needed - your English is perfectly okay!

There is no difference between the two forms of the command. The second style (one DNS per command) will automatically collapse into the first style (multiple DNS per command):

r1(config)# ip name-server 1.2.3.4 2.3.4.5
r1(config)# ip name-server 3.4.5.6
r1(config)# do show run | i name-server
ip name-server 1.2.3.4 2.3.4.5 3.4.5.6

This was tested on an IOS-XE 16.12.

Best regards,
Peter

Salut,

Avec plaisir ; )

Peter

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers