| 类型 | SRV(TYPE 33) |
|---|---|
| 格式 | _service._proto.name → 优先级 权重 端口 目标 |
| 规范 | RFC 2782 |
| 选路 | 先比优先级(低优先),同优先级按权重随机 |
查询与配置示例
查询与配置示例
dig +short _sip._tcp.example.com SRV
# 10 60 5060 sip1.example.com.
# 10 40 5060 sip2.example.com.
_ldap._tcp.example.com. 3600 IN SRV 0 100 389 ldap.example.com.目标为「.」表示服务不接受(明确拒绝);SRV 的目标不应指向 CNAME。K8s 的 headless Service 也用 SRV 做成员发现。