cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Join Customer Connection to register!
272
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

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 Master

depends on the device, both should work.

BB

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

How to Ask The Community for Help

Peter Paluch
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

Salut,

Avec plaisir ; )

Peter