Device Discovery with mdns and DNS-SD. Ashley Butterworth Matthew Xavier Mora Apple Inc.

Similar documents
New DNS Technologies in the LAN

Using Bonjour Across Subnets

Contents. Introduction to Bonjour Overview 5. About Bonjour 6. Domain Naming Conventions 14. Bonjour Operations 18

Printing. Jason Healy, Director of Networks and Systems

Internet Control Protocols Reading: Chapter 3

Introduction to Network Operating Systems

Contents. About Bonjour 5. Bonjour Concepts 8. Domain Naming Conventions 17. Bonjour API Architecture 21

Automatic Configuration and Service Discovery for Networked Smart Devices

Use Domain Name System and IP Version 6

Bonjour. Connect computers and electronic devices automatically, without any configuration. Features. Instant Networking and Dynamic Service Discovery

Detecting rogue systems

Motivation. Domain Name System (DNS) Flat Namespace. Hierarchical Namespace

Wireless LAN Apple Bonjour Deployment Guide

DNS-SD for publishing AVDECC Entities

Internet Engineering Task Force. Intended status: Experimental Expires: September 6, 2012 March 5, 2012

How To Plan Out Your Own Version Of Hpl (Dhcp) On A Network With A Network (Dns) On Your Network (Dhpl) On An Ipad Or Ipad On A Pc Or Ipa On A Server On A

HOST AUTO CONFIGURATION (BOOTP, DHCP)

1 Introduction: Network Applications

Project 4: IP over DNS Due: 11:59 PM, Dec 14, 2015

DNS Resolving using nslookup

IP Routing Features. Contents

ACHILLES CERTIFICATION. SIS Module SLS 1508

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

Layer Four Traceroute (and related tools) A modern, flexible path-discovery solution with advanced features for network (reverse) engineers

Procedure: You can find the problem sheet on Drive D: of the lab PCs. 1. IP address for this host computer 2. Subnet mask 3. Default gateway address

Technical Support Information Belkin internal use only

Cape Girardeau Career Center CISCO Networking Academy Bill Link, Instructor. 2.,,,, and are key services that ISPs can provide to all customers.

DNS Conformance Test Specification For Client

Application Protocols for TCP/IP Administration

Network Protocol Configuration

1 SIP Carriers. 1.1 Tele Warnings Vendor Contact Versions Verified SIP Carrier status as of Jan 1,

IPv6.marceln.org.

Chapter 8 Advanced Configuration

Networking Overview. (as usual, thanks to Dave Wagner and Vern Paxson)

Table of Contents DNS. How to package DNS messages. Wire? DNS on the wire. Some advanced topics. Encoding of domain names.

DHCP and DNS Protocols

Teldat Router. DNS Client

Introduction to Network Address Translation

Using IPM to Measure Network Performance

Section 1 Overview Section 2 Home... 5

MS Windows DHCP Server Configuration

IP - The Internet Protocol

Final for ECE374 05/06/13 Solution!!

Guide to TCP/IP, Third Edition. Chapter 3: Data Link and Network Layer TCP/IP Protocols

Computer Networks. Introduc)on to Naming, Addressing, and Rou)ng. Week 09. College of Information Science and Engineering Ritsumeikan University

TECHNICAL NOTE. GoFree WIFI-1 web interface settings. Revision Comment Author Date 0.0a First release James Zhang 10/09/2012


SERVICE DISCOVERY AND MOBILITY MANAGEMENT

TCP/IP Security Problems. History that still teaches

Chapter 5 Customizing Your Network Settings

IP Addressing Introductory material.

Lab 2. CS-335a. Fall 2012 Computer Science Department. Manolis Surligas

Chapter 12 Supporting Network Address Translation (NAT)

How to Add Domains and DNS Records

Date 07/05/ :20:22. CENTREL Solutions. Author. Version Product XIA Configuration Server [ ]

19 Domain Name System (DNS)

A DHCP Primer. Dario Laverde, 2002 Dario Laverde

Domain Name System (DNS)

WIZnet S2E (Serial-to-Ethernet) Device s Configuration Tool Programming Guide

Ethernet. Ethernet. Network Devices

VOIP-211RS/210RS/220RS/440S. SIP VoIP Router. User s Guide

TCP/IP works on 3 types of services (cont.): TCP/IP protocols are divided into three categories:

About Firewall Protection

Chapter 3: Review of Important Networking Concepts. Magda El Zarki Dept. of CS UC Irvine

Configuring Switch Ports and VLAN Interfaces for the Cisco ASA 5505 Adaptive Security Appliance

Networking Test 4 Study Guide

What communication protocols are used to discover Tesira servers on a network?

Modern snoop lab lite version

IPsec Details 1 / 43. IPsec Details

: Interconnecting Cisco Networking Devices Part 1 v2.0 (ICND1)

BASIC ANALYSIS OF TCP/IP NETWORKS

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

Forouzan: Chapter 17. Domain Name System (DNS)

Slide 1 Introduction cnds@napier 1 Lecture 6 (Network Layer)

Minimal network traffic is the result of SiteAudit s design. The information below explains why network traffic is minimized.

Network Discovery Protocol LLDP and LLDP- MED

Active Directory Group Policy. Administrator Reference

Topic 7 DHCP and NAT. Networking BAsics.

The Application Layer. CS158a Chris Pollett May 9, 2007.

Configuration of the DHCP server

Enabling Apple AirPrint with Your Xerox Device Built on ConnectKey Technology. A White Paper

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

Managing Users and Identity Stores

Internet Working 5 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2004

Bria iphone Edition User Guide

KAREL UCAP DNS AND DHCP CONCEPTS MANUAL MADE BY: KAREL ELEKTRONIK SANAYI ve TICARET A.S. Organize Sanayi Gazneliler Caddesi 10

Introduction to IP v6

Network Security TCP/IP Refresher

Dynamic Host Configuration Protocol (DHCP) 02 NAT and DHCP Tópicos Avançados de Redes

Configuring Health Monitoring

Chapter 13 Internet Protocol (IP)

Request for Comments: 1788 Category: Experimental April 1995

The following sections describe the Gateway configuration pages in the SBG1000 Setup Program.

Chapter 25 DHCP Snooping

ICS 351: Today's plan. IP addresses Network Address Translation Dynamic Host Configuration Protocol Small Office / Home Office configuration

Protecting the Home Network (Firewall)

ni6 v1.3 manual pages

Introduction to Computer Networks

RWC4YD3S723QRVHHHIZWJXPTQMO6GKEQR

Chapter 6 Using Network Monitoring Tools

Transcription:

apple Device Discovery with mdns and DNS-SD Ashley Butterworth Matthew Xavier Mora Apple Inc. 1

Multicast DNS (mdns) DNS like operations on local link networks Sent via multicast UDP (224.0.0.251 or FF02::FB port 5353) Defines special top level domain (TLD).local. which is always link local Some responses are unicast Multicast requests and responses are cached and pruned to reduce network traffic 2

DNS Service Discovery (DNS-SD) Used DNS PTR, SRV and DNS TXT records Works on both multicast and unicast DNS Does not specify any new messages, op codes or types. Defines how existing should be used. SRV tells discoverer host and port TXT is optional for providing additional info 3

Pointer Records (DNS-PTR) Pointer Records - PTR records enable service discovery by mapping the type of the service to a list of names of specific instances of that type of service. This record adds yet another layer of indirection so services can be found just by looking up PTR records labeled with the service type. - The record contains just one piece of information, the name of the service (which is the same as the name of the SRV record). PTR records are accordingly named just like SRV records but without the instance name: - <Service Type>.<Domain> Here is an example of a PTR record for a print spooler named PrintsAlot: _printer._tcp.local. 28800 PTR PrintsAlot._printer._tcp.local. 4

Service Records (DNS SRV) (RFC 2782) Service Types Short name of protocol, fourteen characters maximum, conforming to normal DNS host name rules: Only lowercase letters, digits, and hyphens; must begin and end with lower-case letter or digit Longer, descriptive name of protocol. Name and email address of responsible person. URL giving description of protocol. (Or statement that the protocol is proprietary.) Primary Transport Protocol. ("_udp" or "_tcp", only needed for historical reasons, to determine correct SRV service type) List of defined TXT record keys (see draft-cheshire-dnsext-dns-sd.txt, Section 6) for this service or URL reference to document describing defined keys. Apple Examples: - apple-ausend Apple Audio Units - apple-midi Apple MIDI - appletv Apple TV - appletv-itunes Apple TV discovery of itunes - appletv-pair Apple TV Pairing 5

TXT Records Text based string recommended to be under 1300 bytes to fit in single ethernet frame Each key value pair can be no longer than 255 bytes - can store booleans using presence or absence of key Key Value pairs stored as string with no null terminator - length byte followed by key = and value - Value can be binary data 6

DNS-SD (Rendezvous) TXT record format General format rules for DNS TXT records - A DNS TXT record can be up to 65535 (0xFFFF) bytes long. The total length is indicated by the length given in the resource record header in the DNS message. There is no way to tell directly from the data alone how long it is (e.g. there is no length count at the start, or terminating NULL byte at the end). - The format of the data within a DNS TXT record is zero or more strings, packed together in memory without any intervening gaps or padding bytes for word alignment. - The format of each constituent string within the DNS TXT record is a single length byte, followed by 0-255 bytes of text data. - These format rules are defined in Section 3.3.14 of RFC 1035, and are not specific to DNS-SD. DNS-SD simply specifies a usage convention for what data should be stored in those constituent strings. 7

DNS-SD (Rendezvous) TXT record format DNS TXT record format rules for use in DNS-SD (Rendezvous) - DNS-SD uses DNS TXT records to store arbitrary name/value pairs conveying additional information about the named service. Each name/value pair is encoded as it's own constituent string within the DNS TXT record, in the form "name=value". Everything up to the first '=' character is the name. Everything after the first '=' character to the end of the string (including subsequent '=' characters, if any) is the value. Specific rules governing names and values are given below. Each author defining a DNS-SD (Rendezvous) profile for discovering instances of a particular type of service should define the base set of name/value attributes that are valid for that type of service. Using this standardized name/value syntax within the TXT record makes it easier for these base definitions to be expanded later by defining additional named attributes. If an implementation sees unknown attribute names in a service TXT record, it SHOULD silently ignore them. - The TCP (or UDP) port number of the service, and target host name, are given in the SRV record. This information target host name and port number MUST NOT be duplicated using name/value attributes in the TXT record. - The intention of DNS-SD TXT records is convey a small amount of useful additional information about a service. Ideally it SHOULD NOT be necessary for a client to retrieve this additional information before it an usefully establish a connection to the service. For a well-designed TCP-based application protocol, it should be possible, knowing only the host name and port number, to open a connection to that listening process, and then perform version- or feature-negotiation to determine the capabilities of the service instance. There are legacy protocols which provide no feature negotiation capability, and in these cases it may be useful to convey necessary information in the TXT record. 8

DNS-SD (Rendezvous) TXT record format DNS-SD TXT record size - The total size of a typical DNS-SD TXT record is intended to be small 100 bytes or less. - In cases where more data is justified (e.g. LPR printing), keeping the total size under 400 bytes should allow it to fit in a single standard 512-byte DNS message. (This standard DNS message size is defined in RFC 1035.) - In extreme cases where even this is not enough, keeping size of the TXT record under 1300 bytes should allow it to fit in a single 1500-byte Ethernet packet. - Using TXT records larger than 1300 bytes is NOT RECOMMENDED at this time. ------------------------------------------------------------------- 0x0A name=value 0x08 paper=a4 0x12 Rendezvous Is Cool ------------------------------------------------------------------- 9

Device Discovery - Device Device publishes SRV and TXT records for service - mdns/dns-sd send gratuitous announcement after probing mdns/dns-sd responds to queries per protocol Device removes SRV and TXT records for service when done - mdns/dns-sd send gratuitous announcement as goodbye message (TTL of 0) 10

Device Discovery - Controller Establishes mdns/dns-sd query for services Device discovered when mdns/dns-sd - receives gratuitous announce for established query - receives response to query request Device removed when mdns/dns-sd - receives goodbye message - time to live expires without receiving update (timeout) 11

Device Discovery - Controller (cont) DNS Long-Lived Queries - Describes a protocol for setting up long-lived DNS queries with change notification, as a more efficient alternative to rapidly polling the server. (no polling) Dynamic DNS Update Leases - Describes a protocol for performing DNS Dynamic Updates with an attached lease time, that are automatically deleted unless renewed before the lease expires, much like a DHCP address lease 12

Device Discovery (cont) DNS Long-Lived Queries Dynamic DNS Update Leases 13

Bonjour Apple s implementation of mdns and DNS- SD Available as open source under Apache 2.0 license Runs on Mac OS X, Window, Linux and VxWorks 14

Resources mdns http://www.multicastdns.org/ DNS-SD http://www.dns-sd.org/ Bonjour http://developer.apple.com/ networking/bonjour/index.html Bonjour dev mailing list http:// www.lists.apple.com/mailman/listinfo/bonjourdev 15

Other files DNS Long-Lived Queries (draft-sekar-dns-llq.txt) describes a protocol for setting up long-lived DNS queries with change notification, as a more efficient alternative to rapidly polling the server. Dynamic DNS Update Leases (draft-sekar-dns-ul.txt) describes a protocol for performing DNS Dynamic Updates with an attached lease time, that are automatically deleted unless renewed before the lease expires, much like a DHCP address lease. NAT Port Mapping Protocol (NAT-PMP) (draft-cheshire-nat-pmp.txt) describes a protocol for asking a home NAT gateway for its "public" address, so that a host behind a NAT gateway can create a DNS Dynamic Update using that public address, rather than its less useful private address, and similarly for asking a home NAT gateway to assign a public port number and an inbound port maping, so that a host behind a NAT gateway can create DNS SRV records using that public port number rather than its less useful private internal port number. 16