show ip dns
Syntax
show ip dns [vrf ] [vsx-peer]
Description
Shows all DNS client configuration settings or the settings for a specific VRF.
Command context
Manager (#)
Parameters
-
vrf
- Specifies the VRF for which to show information. If no VRF is defined, the default VRF is used.
-
[vsx-peer]
-
Shows the output from the VSX peer switch. If the switches do not have the VSX configuration or the ISL is down, the output from the VSX peer switch is not displayed. This parameter is available on switches that support VSX.
Authority
Operators or Administrators or local user group members with execution rights for this command. Operators can execute this command from the operator context (>) only.
Examples
These examples define DNS settings and then show how they are displayed with the
show ip dns
command.switch(config)#ip dns域名domain.comswitch(config)#ip dns domain-list domain5.comswitch(config)#ip dns domain-list domain8.comswitch(config)#ip dns server-address 4.4.4.4switch(config)#ip dns server-address 6.6.6.6switch(config)#ip dns主机host3 5。5.5.5switch(config)#ip dns host host2 2.2.2.2switch(config)#ip dns host host3 c::12switch(config)#ip dns domain-name reddomain.com vrf redswitch(config)#ip dns domain-list reddomain5.com vrf redswitch(config)#ip dns domain-list reddomain8.com vrf redswitch(config)#ip dns server-address 4.4.4.5 vrf redswitch(config)#ip dns server-address 6.6.6.7 vrf redswitch(config)#ip dns主机host3 5。5.5.6 vrf redswitch(config)#ip dns host host2 2.2.2.3 vrf redswitch(config)#ip dns host host3 c::13 vrf redswitch#show ip dnsVRF Name : default Domain Name : domain.com DNS Domain list : domain5.com, domain8.com Name Server(s) : 4.4.4.4, 6.6.6.6 Host Name Address ------------------------------- host2 2.2.2.2 host3 5.5.5.5 host3 c::12 VRF Name : red Domain Name : reddomain.com DNS Domain list : reddomain5.com, reddomain8.com Name Server(s) : 4.4.4.5, 6.6.6.7 Host Name Address ------------------------------- host2 2.2.2.3 host3 5.5.5.6 host3 c::13
switch(config)#ip dns域名domain.comvrf redswitch(config)#ip dns domain-list domain5.com vrf redswitch(config)#ip dns domain-list domain8.com vrf redswitch(config)#ip dns server-address 4.4.4.4 vrf redswitch(config)#ip dns server-address 6.6.6.6 vrf redswitch(config)#ip dns主机host3 5。5.5.5 vrf redswitch(config)#no ip dns host host2 2.2.2.2 vrf redswitch(config)#ip dns host host3 c::12 vrf redswitch#show ip dns vrf redVRF Name : red Domain Name : domain.com DNS Domain list : domain5.com, domain8.com Name Server(s) : 4.4.4.4, 6.6.6.6 Host Name Address ------------------------------- host3 5.5.5.5 host3 c::12