我想在 Cisco 路由器上使用配置,允许客户端在不使用 mDNS 的情况下解析其他客户端的名称。我有以下配置:
roTST01#show running-config | section dhcp
ip dhcp pool DSL
network 10.0.220.0 255.255.255.0
update dns both
default-router 10.0.220.1
dns-server 10.0.220.1
roTST01#show running-config interface gigabitEthernet 0/0
interface GigabitEthernet1
ip address 10.0.220.1 255.255.255.0
end
我有两个使用来自 DHCP 服务器的 IP 的客户端:
roTST01#show ip dhcp binding
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type State Interface
Hardware address/
User name
10.0.220.4 0152.5400.19f6.49 Jun 09 2021 01:38 PM Automatic Active GigabitEthernet1
10.0.220.6 0152.5400.0cdb.74 Jun 09 2021 01:54 PM Automatic Active GigabitEthernet1
但是设备(Client01 和 Client02)的主机名不会添加到 DNS 区域以便客户端解析它们。
Client02#ping client01
Translating "client01"...domain server (10.0.220.1)
% Unrecognized host or address, or protocol not running
我添加了一个手动输入,只是为了测试一般分辨率是否有效,它确实:
roTST01#show hosts
Default domain is testnet.local
Name servers are 10.0.220.1
NAME TTL CLASS TYPE DATA/ADDRESS
-----------------------------------------
91.222.16.172.in-addr.arpa 10 IN PTR proxy
proxy 10 IN A 172.16.222.91
因此,据我了解,一旦客户端获得 DHCP 租约,此列表中应该会有一个新条目,如下所示:
roTST01#show hosts
Default domain is testnet.local
Name servers are 10.0.220.1
NAME TTL CLASS TYPE DATA/ADDRESS
-----------------------------------------
4.220.0.10.in-addr.arpa 10 IN PTR Client01
Client01 10 IN A 10.0.220.4
我错过了什么?编辑:Ron Maupin 的特别公告,这里是设备的 DNS 配置:
roTST01#show running-config | section dns
ip dns server