[DNS] SRV Record
๋ณดํต ๋๋ฉ์ธ ์ด๋ฆ์ผ๋ก IP๋ฅผ lookup ํ๋ ์ฉ๋๋ก DNS๋ฅผ ๋ง์ด ์ฌ์ฉํ๋ค. IPv4๋ฅผ lookupํ ๋๋ย A Record ํํ๋ก ์ ์ฅ๋๋ค. IPv6๋ AAAA Record ํํ๋ก ์ ์ฅ๋๋ค.
hostname์ ์กฐ๊ธ ๋ ํ์ฅํด์ ๋์ผํ hostname์ ์๋ ์ฌ๋ฌ ์๋น์ค์ ํ๋ํ๋๋ฅผ lookupํ ์ ์๋ ์ฉ๋๋ก SRV Record๋ฅผ ์ฌ์ฉํ ์ ์๋ค.
_service._proto.name. TTL class SRV priority weight port target.
service: ์๋น์ค ์ด๋ฆ
proto: protocol (TCP, UDP ๋ฑ)
name: ๋๋ฉ์ธ ์ด๋ฆ
TTL: DNS์์ ์ด์ ์์ ๊ธฐ๊ฐ Time to Live
class: DNS class๋ก ํญ์ IN
priority: ์ฐ์ ์์. ์์ ์ซ์๊ฐ ๋ ๋์ ์ฐ์ ์์
weight: ๋์ผํ ์ฐ์ ์์๋ฅผ ๊ฐ์ก์ ๋ ๋น๊ตํ ๊ฐ์ค์น
port: ์๋น์ค port
target: ์๋น์ค์ ํ ๋นํ hostname
A Record์์ _service._proto ๋ถ๋ถ์ด ์ถ๊ฐ๋ก ๋์๋ค๊ณ ์๊ฐํ๋ฉด ์กฐ๊ธ ๊ฐ๋จํ๋ค.
# _service._proto.name. ย TTL ย class SRV priority weight port target. _sip._tcp.example.com. ย 86400 IN ย ย SRV 10 ย ย ย 60 ย ย 5060 bigbox.example.com. _sip._tcp.example.com. ย 86400 IN ย ย SRV 10 ย ย ย 20 ย ย 5060 smallbox1.example.com. _sip._tcp.example.com. ย 86400 IN ย ย SRV 10 ย ย ย 20 ย ย 5060 smallbox2.example.com. _sip._tcp.example.com. ย 86400 IN ย ย SRV 20 ย ย ย 0 ย ย ย 5060 backupbox.example.com.
์๋ ์ปค๋งจ๋๋ค๋ก lookup ํ ์ ์๋ค.
$ dig _sip._tcp.example.com SRV $ host -t SRV _sip._tcp.example.com $ nslookup -querytype=srv _sip._tcp.example.com $ nslookup > set querytype=srv > _sip._tcp.example.com
- ์ฐธ๊ณ https://en.wikipedia.org/wiki/SRV_record https://tools.ietf.org/html/rfc2782 https://en.wikipedia.org/wiki/List_of_DNS_record_types#A















