cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1772
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
Cisco Employee
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
Hall of Fame
Hall of Fame

depends on the device, both should work.

BB

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

How to Ask The Cisco Community for Help

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

Review Cisco Networking products for a $25 gift card