nameserver
Syntax
nameserver [ ] no nameserver [ ]
描述
分配一个主键或入股事宜ndary IPv4 or IPv6 DNS server to the management interface. IPv4 DNS servers can only be configured if a static IPv4 address was assigned to the management interface. IPv6 DNS servers can only be configured if a static IPv6 address was assigned to the management interface. The default gateway should be on the same network segment.
The没有
form of this command removes the DNS servers from the management interface.
Command context
config-if-mgmt
Parameters
-
-
Specifies the IP address of the primary DNS server. Specify the address in IPv4 format (
x.x.x.x
), wherex
is a decimal number from 0 to 255, or IPv6 format (xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
), wherex
is a hexadecimal number from 0 to F.
-
-
Specifies the IP address of the secondary DNS server. Specify the address in IPv4 format (
x.x.x.x
), wherex
is a decimal number from 0 to 255, or IPv6 format (xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
), wherex
is a hexadecimal number from 0 to F.
权威
Administrators or local user group members with execution rights for this command.
Examples
Setting primary and secondary DNS servers with the IPv4 addresses of198.168.5.1and198.168.5.2:
switch(config)#interface mgmtswitch(config-if-mgmt)#nameserver 198.168.5.1 198.168.5.2
Setting primary and secondary DNS servers with the IPv6 addresses of2001:DB8::1and2001:DB8::2:
switch(config)#interface mgmtswitch(config-if-mgmt)#nameserver 2001:DB8::1 2001:DB8::2