SlideShare a Scribd company logo
JmDNS : Service
   Discovery for the
     21st Century
         B r i a n S l e t t e n
B o s a t s u C o n s u l t i n g , I n c
     b r i a n @ b o s a t s u . n e t

     N o F l u f f J u s t S t u f f
                2 0 0 6
Speaker
   Qualifications
12 years of software development
experience

Have own software consulting company for
design, mentoring, training and
development

Work with Semantic Web, Aspect-Oriented
Programming, Grid Computing
Agenda

Where We Have Been

ZeroConf

Bonjour

JmDNS

Brainstorming
Where have we
   been?
finding things in the
        past
 Configuration Files (ick!)

 DNS (requires central authority, hostname
 only -- no ports)

 Directory Services

 AppleTalk (chatty “has been”)

 JINI (Java-only, central services)

 JXTA (steep learning curve)
ad hoc networking
     too hard
Law Offices, Schools, etc. do not always
have sufficient IT personnel

Home networking is even worse!

 Could your grandma set up a DNS
 server?

 LDAP at home?

What is so hard about two devices talking?
Protocol Design
      Goals

Internet Protocol (IP) was designed to be
interoperable, extensible and scalable

Propietary protocols (AppleTalk,
NetBIOS/SMB, IPX) were designed
around local network features and
decentralized discovery
AppleTalk

Ahead of its time -- focused on services, not
devices

Too chatty for large networks

Not based on IP

Support persists but waned with Apple’s
pre-OS X fortunes
DHCP
Solves some of the problem

 Dynamic address allocation

 Great for clients

   Client-Server sessions are easy to
   regenerate

 Not-so-great for servers
DHCP (Cont)

However, still focuses on hardware, not
services (i.e. capabilities)

  Users care about ‘printing’ and ‘sharing
  files’ and listening to ‘music’

  How to publish? find? bind?
JINI
Showed a lot of early promise for finding
devices and services on a network

Problems:

 Required Java (harder to embed on
 devices, at least historically)

 Required Central Services

 Tried to proscribe service hierarchies
JXTA

Bill Joy Brain-Sibling to JINI

Multi-language/Multi-Platform

Huge Learning Curve

Although it has languished, good things
might still come from the JXTA world
Publish/Find/Bind

Hmmm... sounds familiar

WebServices are hoping to solve some of
these problems

 UDDI/WSDL/SOAP

 We’ll get back to you once WS-Whatever
 Draft is completed
ZeroConf
Zeroconf History

Began out of discussions on a mailing list in
1997

Interested people got together at IETF BOFs

ZeroConf WG was formed in 1999
Zeroconf Goals

Allocate addresses without a DHCP Server

Translate names and IP addresses without a
DNS Server

Find services without a directory server

Reuse existing technologies, infrastructure
and expertise
Zeroconf
    Technologies

IPv4 Link-Local Addressing

Multicast DNS

DNS Service Discovery
IPv4 link-local
     Addressing
Uses 169.254/16 prefix for “local links”

  Between 169.254.1.0-169.254.254.255

  Reserved by IANA for this purpose

Links are local when

  Host A sends a packet that arrives
  unmodified (i.e. no TTL decrements)
IPv4 link-local
Addressing (cont)

Hosts should not use “link-local” and
routable addresses at the same time

  Will use an IP address from DHCP if one
  is available
IPv4 Link-Local
     Process
Generate an address using a PRNG
(preferably seeded w/ MAC address or
something uniqueish)

ARP Probe for conflict

Claim address on success

Defend address on future conflict (ARP)

 Must relinquish if conflict persists
multicast dns

Designed to allow naming lookups without
central server

Introduces .local domain

 DNS is IETF technology so they are
 responsible, not ICANN
Multicast DNS
      (Cont)
Queries are sent to 224.0.0.251 on port 5353

Uses multicast broadcasts but is well-
designed to minimize chattiness

  Hosts listen to changes and can cache
  results

   To avoid pig-piling new queries, mDNS
  responders delay responses by random
  value to see if someone else will respond
Query Types
One Shot

 “Just give me something”

One Shot - Accumulate Results

 “Stick around for multiple results”

Continuous Query

 “Keep on keepin’ on”
Avoiding Chattiness

 Known Answer Suppression

 Passive Caching/Listening

 Exponential Decay Rates

 TTL Expirations

 New peers announce themselves
Claiming the Name

Pick a name (user-specified?)

Put together a DNS A Record

Perform T_ANY query to find any other
records with same name

Upon success (no conflicts), announce to
the world who you are
Clients and Services

 Users care about relevant services not all
 that are available

   Printer around the corner

   My wife’s Excellent iTunes Music
   Collection

   SSH into development server
dns service
discovery (DNS-SD)

No changes to DNS structures

Use DNS PTR queries to find SRV records
that match service instance pattern
 <instance>._protoname._transport.<domain>

Use TXT records for parameters
DNS-SD Goals

Service Instance Enumeration

Service Name Resolution

Somewhat persistent

 Here today, here tomorrow

Simple to implement
DNS-SD Service
    Instance

Browsing Service Instances

 “Leaves in a tree”

   <domain>.<service>.<instance>

 Name compression in responses
DNS-SD Txt Records


 Up to 65535 bytes

 Packed representation of zero or more
 strings
DNS-SD TXT Records
      (Cont)
 Name=Value Pairs

  Not present

  No value (“Debug”)

  Empty value (“Debug=”)

  Non-Empty value (“Debug=verbose”)
DNS-SD Query
     Example
_ftp._tcp.example.org

_http._tcp.example.org

_ipp._tcp.example.org

_daap._tcp.Carini.local

_tivo_servemedia._tcp.Carini.local
DNS-SD Meta-Query


_services._dns-sd._udp.<domain>

  Returns a list of PTR records matching
  service type
Registered DNS-SD
          Services
        http://www.dns-sd.org/ServiceTypes.html


        MYOB                            Adobe                Axis Video Cameras

Bootstrap Protocol Server   Oracle Cluster Topology Server      CodeWarrior

    Elgato EyeHome            ebXML Messaging/Registry            FAXstf

                            H.323 A/V Communication Setup
 Roxio ToastAnywhere                                            SubEthaEdit
                                       Protocol

Kerberos Administration                 LDAP                       NFS

 Network Time Protocol           PostgreSQL Server             JINI Servicees

    PowerEasy POS             Session Initiation Protocol          Skype

SliMP3 Server Interfaces           Sun Grid Engine             Sybase Server
Bonjour
(aka Rendezvous)
 (aka Opentalk)
Bonjour

History

Open Source

Apple’s Use of Bonjour

Products

Tools
History

AppleTalk released initially in mid-80’s

Very popular on smallish networks

Part of what made Macs ‘just work’

Apple wanted to replace functionality with
protocol that fits in modern networks (i.e.
IP-based)
Open Source

Apple wants to encourage the use of
Bonjour so it open sourced it

Includes support for OS X, Windows,
Windows CE, Linux, VxWorks

http://developer.apple.com/networking/bonjour
Apple’s use of
                           Bonjour
            Name                      Service                     Name                        Service

AppleTalk Filing Protocol (AFP)    _afpovertcp._tcp   Line Printer Daemon (LPD/LPR)         _printer._tcp

  Network File System (NFS)           _nfs._tcp       Internet Printing Protocol (IPP)        _ipp._tcp

WebDAV File System (WEBDAV)         _webdav._tcp       PDL Data Stream (Port 9100)       _pdl-datastream._tcp

  File Transfer Protocol (FTP)        _ftp._tcp       Remote I/O USB Printer Protocol     _riousbprint._tcp

                                                       Digital Audio Access Protocol
       Secure Shell (SSH)             _ssh._tcp                                              _daap._tcp
                                                                 (DAAP)
                                                       Digital Photo Access Protocol
      Remote AppleEvents             _eppc._tcp                                              _dpap._tcp
                                                                 (DPAP)
  Hypertext Transfer Protocol
                                      _http._tcp      iChat Instant Messaging Protocol      _presence._tcp
           (HTTP)
  Trivial File Transfer Protocol
                                      _tftp._udp            Airport Base Station            _airport._tcp
              (TFTP)

   Remote Login (TELNET)             _telnet._tcp              Xserver RAID                _xserveraid._tcp

 Remote Audio Output Protocol
                                     _raop._tcp        Apple Remote Desktop (ARD)         _net-assistant._tcp
          (RAOP)
products
TiVo, Asterisk VOIP PBX

Printers (HP, Brother, Epson, Xerox,
Lexmark, Canon)

SubEthaEdit, Growl

Axis Network Cameras

Oracle, Roxio Toast Anywhere
Bonjour
Browser Demo
JmDNS
JmDNS

Open Source project started by Arthur van
Hoff while at Strangeberry

Renamed from JRendezvous for legal
reasons, moved to SourceForge and taken
over by Rick Blair and Werner
Randelshofer

Pure-Java implementation of ZeroConf
JmDNS (cont)

Progress has slowed but it is relatively
stable and useful

Passes Apple’s Rendezvous (Bonjour)
Conformance tests

Supports service registration and discovery
JmDNS Class
   Main entry point to the JmDNS subsystem

import javax.jmdns.JmDNS;
.
.
.
JmDNS jmdns = new JmDNS();
System.out.println(”Host: “ + jmdns.getHostName() );
System.out.println(”Interface: “ + jmdns.getInterface() );

ServiceInfo si[] = jmdns.list(”_http._tcp.local.”);

jmdns.addServiceTypeListener( new MyServiceTypeListener() );
ServiceInfo Class
   Encapsulates info about a JmDNS Service

import javax.jmdns.ServiceInfo;
.
.
.
ServiceInfo
System.out.println(”Host: “ + jmdns.getHostName() );
System.out.println(”Interface: “ + jmdns.getInterface() );

ServiceInfo si[] = jmdns.list(”_http._tcp.local.”);

System.out.println(”Service 0 : “ + si[ 0 ].getServer() + “--”
	

 + si[ 0 ].getPort() + “--” + si[ 0 ].getNiceTextString() );
Listener Interfaces

ServiceListener

 Additions, Removals

ServiceTypeListener

 New service type discovery

Both listen for ServiceEvents
Basic JmDNS
 Examples
Using a Service
   w/ JmDNS
   Example
Registering a
  Service w/
JmDNS Example
FOAFfinger
 Example
What’s a FOAF?
“The Friend of a Friend (FOAF) project is
about creating a Web of machine-readable
homepages describing people, the links
between them and the things they create
and do.”
FOAF
Based on RDF and is used to express things
like:

 “My name is...”

 “I work for...”

 “I am interested in...”

 “Here’s my goofy picture...”
FOAF and WebPages


FOAF can help capture relationships, links,
etc. for finding resources of interest, like-
minded individuals, etc.

Think Orkut + Craig’s List
FOAFFinger

Damian Steer put together a JmDNS-
based app to find people on local links

Uses a custom application protocol:
_foafcon._tcp.local.

Reuses HTTP for transport -- good idea!
Brainstorming
References
Cheshire, Steinberg, “Zero Configuration Networking: The
Definitive Guide”, O’Reilly and Associates, 2005.

http://www.zeroconf.org
http://www.multicastdns.org
http://www.dns-sd.org
http://jmdns.sourceforge.net
http://developer.apple.com/networking/bonjour
http://www.foaf-project.org/
http://rdfweb.org/people/damian/foaffinger
http://tivohme.sourceforge.net/
http://avahi.org
Examples

Examples:

  http://www.bosatsu.net/talks/JmDNS-Examples.zip


Questions/Feedback:

  brian@bosatsu.net
Please write your
     reviews




  Feedback/Questions:
   brian@bosatsu.net

More Related Content

What's hot

IPv6 How To Set Up a Linux IPv6 Lan
IPv6 How To Set Up  a Linux IPv6 LanIPv6 How To Set Up  a Linux IPv6 Lan
IPv6 How To Set Up a Linux IPv6 Lan
Jumping Bean
 
Yeti DNS Project
Yeti DNS ProjectYeti DNS Project
Yeti DNS Project
APNIC
 
IPv6
IPv6IPv6
[Dec./2017] My Personal/Professional Journey after Graduate Univ.
[Dec./2017] My Personal/Professional Journey after Graduate Univ.[Dec./2017] My Personal/Professional Journey after Graduate Univ.
[Dec./2017] My Personal/Professional Journey after Graduate Univ.
Hayoung Yoon
 
Raspberry pi glossary of terms dictionary extended
Raspberry pi glossary of terms dictionary extendedRaspberry pi glossary of terms dictionary extended
Raspberry pi glossary of terms dictionary extended
WiseNaeem
 
Autoconfig
AutoconfigAutoconfig
Autoconfig
Fred Bovy
 
Cisco presentation2
Cisco presentation2Cisco presentation2
Cisco presentation2ehsan nazer
 
IPv6 theoryfinalx
IPv6 theoryfinalxIPv6 theoryfinalx
IPv6 theoryfinalx
Pawan Sharma
 
InternetWorking With TCP\IP
InternetWorking With TCP\IPInternetWorking With TCP\IP
InternetWorking With TCP\IPhunghanamhus
 
IPv6 Best Practice
IPv6 Best PracticeIPv6 Best Practice
IPv6 Best Practice
flyingpotato
 
Interactive Content Authoring for A153 ATSC Mobile Digital Television Employi...
Interactive Content Authoring for A153 ATSC Mobile Digital Television Employi...Interactive Content Authoring for A153 ATSC Mobile Digital Television Employi...
Interactive Content Authoring for A153 ATSC Mobile Digital Television Employi...
Brad Fortner
 
02 asterisk - the future of telecommunications
02   asterisk - the future of telecommunications02   asterisk - the future of telecommunications
02 asterisk - the future of telecommunications
Tran Thanh
 
Telephony Services for Freely Licensed Operating Systems
Telephony Services for Freely Licensed Operating SystemsTelephony Services for Freely Licensed Operating Systems
Telephony Services for Freely Licensed Operating Systems
David Sugar
 
NBN:URN Generator and Resolver
NBN:URN Generator and ResolverNBN:URN Generator and Resolver
NBN:URN Generator and Resolver
horvadam
 

What's hot (17)

IPv6 How To Set Up a Linux IPv6 Lan
IPv6 How To Set Up  a Linux IPv6 LanIPv6 How To Set Up  a Linux IPv6 Lan
IPv6 How To Set Up a Linux IPv6 Lan
 
Networking 101
Networking 101Networking 101
Networking 101
 
Yeti DNS Project
Yeti DNS ProjectYeti DNS Project
Yeti DNS Project
 
IPv6
IPv6IPv6
IPv6
 
[Dec./2017] My Personal/Professional Journey after Graduate Univ.
[Dec./2017] My Personal/Professional Journey after Graduate Univ.[Dec./2017] My Personal/Professional Journey after Graduate Univ.
[Dec./2017] My Personal/Professional Journey after Graduate Univ.
 
Raspberry pi glossary of terms dictionary extended
Raspberry pi glossary of terms dictionary extendedRaspberry pi glossary of terms dictionary extended
Raspberry pi glossary of terms dictionary extended
 
Autoconfig
AutoconfigAutoconfig
Autoconfig
 
Cisco presentation2
Cisco presentation2Cisco presentation2
Cisco presentation2
 
IPv6 theoryfinalx
IPv6 theoryfinalxIPv6 theoryfinalx
IPv6 theoryfinalx
 
InternetWorking With TCP\IP
InternetWorking With TCP\IPInternetWorking With TCP\IP
InternetWorking With TCP\IP
 
IPv6 Best Practice
IPv6 Best PracticeIPv6 Best Practice
IPv6 Best Practice
 
Interactive Content Authoring for A153 ATSC Mobile Digital Television Employi...
Interactive Content Authoring for A153 ATSC Mobile Digital Television Employi...Interactive Content Authoring for A153 ATSC Mobile Digital Television Employi...
Interactive Content Authoring for A153 ATSC Mobile Digital Television Employi...
 
02 asterisk - the future of telecommunications
02   asterisk - the future of telecommunications02   asterisk - the future of telecommunications
02 asterisk - the future of telecommunications
 
IPv6_Quick_Start_Guide
IPv6_Quick_Start_GuideIPv6_Quick_Start_Guide
IPv6_Quick_Start_Guide
 
Telephony Services for Freely Licensed Operating Systems
Telephony Services for Freely Licensed Operating SystemsTelephony Services for Freely Licensed Operating Systems
Telephony Services for Freely Licensed Operating Systems
 
NAT_Final
NAT_FinalNAT_Final
NAT_Final
 
NBN:URN Generator and Resolver
NBN:URN Generator and ResolverNBN:URN Generator and Resolver
NBN:URN Generator and Resolver
 

Viewers also liked

Inspired Play 1 - 2 Years
Inspired Play 1 - 2 YearsInspired Play 1 - 2 Years
Inspired Play 1 - 2 Years
Inspired Play
 
Social Media
Social MediaSocial Media
Social Mediaset2121
 
Crampton GGISA
Crampton GGISACrampton GGISA
Crampton GGISA
Jeremy Crampton
 
Brief Prosperity Profile of Windsor, Ontario
Brief Prosperity Profile of  Windsor, OntarioBrief Prosperity Profile of  Windsor, Ontario
Brief Prosperity Profile of Windsor, OntarioMartinProsperityInstitute
 
TNM staging in lung cancer dr.berna kömürcüoğlu
TNM staging in lung cancer dr.berna kömürcüoğluTNM staging in lung cancer dr.berna kömürcüoğlu
TNM staging in lung cancer dr.berna kömürcüoğlu
Berna Kömürcüoğlu
 
Q Bear Pp
Q Bear PpQ Bear Pp
Q Bear Ppvickib
 
FAU Student Government Judicial Branch Overview
FAU Student Government Judicial Branch OverviewFAU Student Government Judicial Branch Overview
FAU Student Government Judicial Branch Overview
Nicholas Scalice
 

Viewers also liked (8)

Inspired Play 1 - 2 Years
Inspired Play 1 - 2 YearsInspired Play 1 - 2 Years
Inspired Play 1 - 2 Years
 
Social Media
Social MediaSocial Media
Social Media
 
Crampton GGISA
Crampton GGISACrampton GGISA
Crampton GGISA
 
Brief Prosperity Profile of Windsor, Ontario
Brief Prosperity Profile of  Windsor, OntarioBrief Prosperity Profile of  Windsor, Ontario
Brief Prosperity Profile of Windsor, Ontario
 
TNM staging in lung cancer dr.berna kömürcüoğlu
TNM staging in lung cancer dr.berna kömürcüoğluTNM staging in lung cancer dr.berna kömürcüoğlu
TNM staging in lung cancer dr.berna kömürcüoğlu
 
Prosperity Scorecard for Windsor, Ontario
Prosperity Scorecard for Windsor, OntarioProsperity Scorecard for Windsor, Ontario
Prosperity Scorecard for Windsor, Ontario
 
Q Bear Pp
Q Bear PpQ Bear Pp
Q Bear Pp
 
FAU Student Government Judicial Branch Overview
FAU Student Government Judicial Branch OverviewFAU Student Government Judicial Branch Overview
FAU Student Government Judicial Branch Overview
 

Similar to JmDNS : Service Discovery for the 21st Century

Wireshark
WiresharkWireshark
Wiresharkbtohara
 
RackN Physical Layer Automation Innovation
RackN Physical Layer Automation InnovationRackN Physical Layer Automation Innovation
RackN Physical Layer Automation Innovation
rhirschfeld
 
BonAHA framework - Lab presentation
BonAHA framework - Lab presentationBonAHA framework - Lab presentation
BonAHA framework - Lab presentation
Suman Srinivasan
 
Peer-to-peer Internet telephony
Peer-to-peer Internet telephonyPeer-to-peer Internet telephony
Peer-to-peer Internet telephony
Kundan Singh
 
What is Digital Rebar Provision (and how RackN extends)?
What is Digital Rebar Provision (and how RackN extends)?What is Digital Rebar Provision (and how RackN extends)?
What is Digital Rebar Provision (and how RackN extends)?
rhirschfeld
 
The advantages of Arista/OVH configurations, and the technologies behind buil...
The advantages of Arista/OVH configurations, and the technologies behind buil...The advantages of Arista/OVH configurations, and the technologies behind buil...
The advantages of Arista/OVH configurations, and the technologies behind buil...
OVHcloud
 
Network Situational Awareness with d00gle
Network Situational Awareness with d00gleNetwork Situational Awareness with d00gle
Network Situational Awareness with d00gle
Dug Song
 
Production high-performance networking with Snabb and LuaJIT (Linux.conf.au 2...
Production high-performance networking with Snabb and LuaJIT (Linux.conf.au 2...Production high-performance networking with Snabb and LuaJIT (Linux.conf.au 2...
Production high-performance networking with Snabb and LuaJIT (Linux.conf.au 2...
Igalia
 
Foreman @ Rubyslava
Foreman @ RubyslavaForeman @ Rubyslava
Foreman @ RubyslavaIvan Nečas
 
TCP/IP Basics
TCP/IP BasicsTCP/IP Basics
TCP/IP Basics
SMC Networks Europe
 
Installation Of An Iso Image Dvd
Installation Of An Iso Image DvdInstallation Of An Iso Image Dvd
Installation Of An Iso Image Dvd
Susan Cox
 
Simplified Networking and Troubleshooting for K-12 Teachers
Simplified Networking and Troubleshooting for K-12 TeachersSimplified Networking and Troubleshooting for K-12 Teachers
Simplified Networking and Troubleshooting for K-12 Teacherswebhostingguy
 
Osi model slides
Osi model slidesOsi model slides
Osi model slides
Saba Aslam
 
Troubleshooting Dual-Protocol Networks and Systems by Scott Hogg at gogoNET L...
Troubleshooting Dual-Protocol Networks and Systems by Scott Hogg at gogoNET L...Troubleshooting Dual-Protocol Networks and Systems by Scott Hogg at gogoNET L...
Troubleshooting Dual-Protocol Networks and Systems by Scott Hogg at gogoNET L...
gogo6
 
Hacking Robotics(English Version)
Hacking Robotics(English Version)Hacking Robotics(English Version)
Hacking Robotics(English Version)Kensei Demura
 
Zero Configuration Networking
Zero Configuration NetworkingZero Configuration Networking
Zero Configuration Networking
Zafar Shahid, PhD
 
Tcp and introduction to protocol
Tcp and introduction to protocolTcp and introduction to protocol
Tcp and introduction to protocol
Sripati Mahapatra
 

Similar to JmDNS : Service Discovery for the 21st Century (20)

Wireshark
WiresharkWireshark
Wireshark
 
RackN Physical Layer Automation Innovation
RackN Physical Layer Automation InnovationRackN Physical Layer Automation Innovation
RackN Physical Layer Automation Innovation
 
BonAHA framework - Lab presentation
BonAHA framework - Lab presentationBonAHA framework - Lab presentation
BonAHA framework - Lab presentation
 
Peer-to-peer Internet telephony
Peer-to-peer Internet telephonyPeer-to-peer Internet telephony
Peer-to-peer Internet telephony
 
What is Digital Rebar Provision (and how RackN extends)?
What is Digital Rebar Provision (and how RackN extends)?What is Digital Rebar Provision (and how RackN extends)?
What is Digital Rebar Provision (and how RackN extends)?
 
The advantages of Arista/OVH configurations, and the technologies behind buil...
The advantages of Arista/OVH configurations, and the technologies behind buil...The advantages of Arista/OVH configurations, and the technologies behind buil...
The advantages of Arista/OVH configurations, and the technologies behind buil...
 
Networking 101
Networking 101Networking 101
Networking 101
 
Networking 101
Networking 101Networking 101
Networking 101
 
Networking 101
Networking 101Networking 101
Networking 101
 
Network Situational Awareness with d00gle
Network Situational Awareness with d00gleNetwork Situational Awareness with d00gle
Network Situational Awareness with d00gle
 
Production high-performance networking with Snabb and LuaJIT (Linux.conf.au 2...
Production high-performance networking with Snabb and LuaJIT (Linux.conf.au 2...Production high-performance networking with Snabb and LuaJIT (Linux.conf.au 2...
Production high-performance networking with Snabb and LuaJIT (Linux.conf.au 2...
 
Foreman @ Rubyslava
Foreman @ RubyslavaForeman @ Rubyslava
Foreman @ Rubyslava
 
TCP/IP Basics
TCP/IP BasicsTCP/IP Basics
TCP/IP Basics
 
Installation Of An Iso Image Dvd
Installation Of An Iso Image DvdInstallation Of An Iso Image Dvd
Installation Of An Iso Image Dvd
 
Simplified Networking and Troubleshooting for K-12 Teachers
Simplified Networking and Troubleshooting for K-12 TeachersSimplified Networking and Troubleshooting for K-12 Teachers
Simplified Networking and Troubleshooting for K-12 Teachers
 
Osi model slides
Osi model slidesOsi model slides
Osi model slides
 
Troubleshooting Dual-Protocol Networks and Systems by Scott Hogg at gogoNET L...
Troubleshooting Dual-Protocol Networks and Systems by Scott Hogg at gogoNET L...Troubleshooting Dual-Protocol Networks and Systems by Scott Hogg at gogoNET L...
Troubleshooting Dual-Protocol Networks and Systems by Scott Hogg at gogoNET L...
 
Hacking Robotics(English Version)
Hacking Robotics(English Version)Hacking Robotics(English Version)
Hacking Robotics(English Version)
 
Zero Configuration Networking
Zero Configuration NetworkingZero Configuration Networking
Zero Configuration Networking
 
Tcp and introduction to protocol
Tcp and introduction to protocolTcp and introduction to protocol
Tcp and introduction to protocol
 

Recently uploaded

Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 

Recently uploaded (20)

Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 

JmDNS : Service Discovery for the 21st Century

  • 1. JmDNS : Service Discovery for the 21st Century B r i a n S l e t t e n B o s a t s u C o n s u l t i n g , I n c b r i a n @ b o s a t s u . n e t N o F l u f f J u s t S t u f f 2 0 0 6
  • 2. Speaker Qualifications 12 years of software development experience Have own software consulting company for design, mentoring, training and development Work with Semantic Web, Aspect-Oriented Programming, Grid Computing
  • 3. Agenda Where We Have Been ZeroConf Bonjour JmDNS Brainstorming
  • 5. finding things in the past Configuration Files (ick!) DNS (requires central authority, hostname only -- no ports) Directory Services AppleTalk (chatty “has been”) JINI (Java-only, central services) JXTA (steep learning curve)
  • 6. ad hoc networking too hard Law Offices, Schools, etc. do not always have sufficient IT personnel Home networking is even worse! Could your grandma set up a DNS server? LDAP at home? What is so hard about two devices talking?
  • 7. Protocol Design Goals Internet Protocol (IP) was designed to be interoperable, extensible and scalable Propietary protocols (AppleTalk, NetBIOS/SMB, IPX) were designed around local network features and decentralized discovery
  • 8. AppleTalk Ahead of its time -- focused on services, not devices Too chatty for large networks Not based on IP Support persists but waned with Apple’s pre-OS X fortunes
  • 9. DHCP Solves some of the problem Dynamic address allocation Great for clients Client-Server sessions are easy to regenerate Not-so-great for servers
  • 10. DHCP (Cont) However, still focuses on hardware, not services (i.e. capabilities) Users care about ‘printing’ and ‘sharing files’ and listening to ‘music’ How to publish? find? bind?
  • 11. JINI Showed a lot of early promise for finding devices and services on a network Problems: Required Java (harder to embed on devices, at least historically) Required Central Services Tried to proscribe service hierarchies
  • 12. JXTA Bill Joy Brain-Sibling to JINI Multi-language/Multi-Platform Huge Learning Curve Although it has languished, good things might still come from the JXTA world
  • 13. Publish/Find/Bind Hmmm... sounds familiar WebServices are hoping to solve some of these problems UDDI/WSDL/SOAP We’ll get back to you once WS-Whatever Draft is completed
  • 15. Zeroconf History Began out of discussions on a mailing list in 1997 Interested people got together at IETF BOFs ZeroConf WG was formed in 1999
  • 16. Zeroconf Goals Allocate addresses without a DHCP Server Translate names and IP addresses without a DNS Server Find services without a directory server Reuse existing technologies, infrastructure and expertise
  • 17. Zeroconf Technologies IPv4 Link-Local Addressing Multicast DNS DNS Service Discovery
  • 18. IPv4 link-local Addressing Uses 169.254/16 prefix for “local links” Between 169.254.1.0-169.254.254.255 Reserved by IANA for this purpose Links are local when Host A sends a packet that arrives unmodified (i.e. no TTL decrements)
  • 19. IPv4 link-local Addressing (cont) Hosts should not use “link-local” and routable addresses at the same time Will use an IP address from DHCP if one is available
  • 20. IPv4 Link-Local Process Generate an address using a PRNG (preferably seeded w/ MAC address or something uniqueish) ARP Probe for conflict Claim address on success Defend address on future conflict (ARP) Must relinquish if conflict persists
  • 21. multicast dns Designed to allow naming lookups without central server Introduces .local domain DNS is IETF technology so they are responsible, not ICANN
  • 22. Multicast DNS (Cont) Queries are sent to 224.0.0.251 on port 5353 Uses multicast broadcasts but is well- designed to minimize chattiness Hosts listen to changes and can cache results To avoid pig-piling new queries, mDNS responders delay responses by random value to see if someone else will respond
  • 23. Query Types One Shot “Just give me something” One Shot - Accumulate Results “Stick around for multiple results” Continuous Query “Keep on keepin’ on”
  • 24. Avoiding Chattiness Known Answer Suppression Passive Caching/Listening Exponential Decay Rates TTL Expirations New peers announce themselves
  • 25. Claiming the Name Pick a name (user-specified?) Put together a DNS A Record Perform T_ANY query to find any other records with same name Upon success (no conflicts), announce to the world who you are
  • 26. Clients and Services Users care about relevant services not all that are available Printer around the corner My wife’s Excellent iTunes Music Collection SSH into development server
  • 27. dns service discovery (DNS-SD) No changes to DNS structures Use DNS PTR queries to find SRV records that match service instance pattern <instance>._protoname._transport.<domain> Use TXT records for parameters
  • 28. DNS-SD Goals Service Instance Enumeration Service Name Resolution Somewhat persistent Here today, here tomorrow Simple to implement
  • 29. DNS-SD Service Instance Browsing Service Instances “Leaves in a tree” <domain>.<service>.<instance> Name compression in responses
  • 30. DNS-SD Txt Records Up to 65535 bytes Packed representation of zero or more strings
  • 31. DNS-SD TXT Records (Cont) Name=Value Pairs Not present No value (“Debug”) Empty value (“Debug=”) Non-Empty value (“Debug=verbose”)
  • 32. DNS-SD Query Example _ftp._tcp.example.org _http._tcp.example.org _ipp._tcp.example.org _daap._tcp.Carini.local _tivo_servemedia._tcp.Carini.local
  • 33. DNS-SD Meta-Query _services._dns-sd._udp.<domain> Returns a list of PTR records matching service type
  • 34. Registered DNS-SD Services http://www.dns-sd.org/ServiceTypes.html MYOB Adobe Axis Video Cameras Bootstrap Protocol Server Oracle Cluster Topology Server CodeWarrior Elgato EyeHome ebXML Messaging/Registry FAXstf H.323 A/V Communication Setup Roxio ToastAnywhere SubEthaEdit Protocol Kerberos Administration LDAP NFS Network Time Protocol PostgreSQL Server JINI Servicees PowerEasy POS Session Initiation Protocol Skype SliMP3 Server Interfaces Sun Grid Engine Sybase Server
  • 36. Bonjour History Open Source Apple’s Use of Bonjour Products Tools
  • 37. History AppleTalk released initially in mid-80’s Very popular on smallish networks Part of what made Macs ‘just work’ Apple wanted to replace functionality with protocol that fits in modern networks (i.e. IP-based)
  • 38. Open Source Apple wants to encourage the use of Bonjour so it open sourced it Includes support for OS X, Windows, Windows CE, Linux, VxWorks http://developer.apple.com/networking/bonjour
  • 39. Apple’s use of Bonjour Name Service Name Service AppleTalk Filing Protocol (AFP) _afpovertcp._tcp Line Printer Daemon (LPD/LPR) _printer._tcp Network File System (NFS) _nfs._tcp Internet Printing Protocol (IPP) _ipp._tcp WebDAV File System (WEBDAV) _webdav._tcp PDL Data Stream (Port 9100) _pdl-datastream._tcp File Transfer Protocol (FTP) _ftp._tcp Remote I/O USB Printer Protocol _riousbprint._tcp Digital Audio Access Protocol Secure Shell (SSH) _ssh._tcp _daap._tcp (DAAP) Digital Photo Access Protocol Remote AppleEvents _eppc._tcp _dpap._tcp (DPAP) Hypertext Transfer Protocol _http._tcp iChat Instant Messaging Protocol _presence._tcp (HTTP) Trivial File Transfer Protocol _tftp._udp Airport Base Station _airport._tcp (TFTP) Remote Login (TELNET) _telnet._tcp Xserver RAID _xserveraid._tcp Remote Audio Output Protocol _raop._tcp Apple Remote Desktop (ARD) _net-assistant._tcp (RAOP)
  • 40. products TiVo, Asterisk VOIP PBX Printers (HP, Brother, Epson, Xerox, Lexmark, Canon) SubEthaEdit, Growl Axis Network Cameras Oracle, Roxio Toast Anywhere
  • 42. JmDNS
  • 43. JmDNS Open Source project started by Arthur van Hoff while at Strangeberry Renamed from JRendezvous for legal reasons, moved to SourceForge and taken over by Rick Blair and Werner Randelshofer Pure-Java implementation of ZeroConf
  • 44. JmDNS (cont) Progress has slowed but it is relatively stable and useful Passes Apple’s Rendezvous (Bonjour) Conformance tests Supports service registration and discovery
  • 45. JmDNS Class Main entry point to the JmDNS subsystem import javax.jmdns.JmDNS; . . . JmDNS jmdns = new JmDNS(); System.out.println(”Host: “ + jmdns.getHostName() ); System.out.println(”Interface: “ + jmdns.getInterface() ); ServiceInfo si[] = jmdns.list(”_http._tcp.local.”); jmdns.addServiceTypeListener( new MyServiceTypeListener() );
  • 46. ServiceInfo Class Encapsulates info about a JmDNS Service import javax.jmdns.ServiceInfo; . . . ServiceInfo System.out.println(”Host: “ + jmdns.getHostName() ); System.out.println(”Interface: “ + jmdns.getInterface() ); ServiceInfo si[] = jmdns.list(”_http._tcp.local.”); System.out.println(”Service 0 : “ + si[ 0 ].getServer() + “--” + si[ 0 ].getPort() + “--” + si[ 0 ].getNiceTextString() );
  • 47. Listener Interfaces ServiceListener Additions, Removals ServiceTypeListener New service type discovery Both listen for ServiceEvents
  • 49. Using a Service w/ JmDNS Example
  • 50. Registering a Service w/ JmDNS Example
  • 52. What’s a FOAF? “The Friend of a Friend (FOAF) project is about creating a Web of machine-readable homepages describing people, the links between them and the things they create and do.”
  • 53. FOAF Based on RDF and is used to express things like: “My name is...” “I work for...” “I am interested in...” “Here’s my goofy picture...”
  • 54. FOAF and WebPages FOAF can help capture relationships, links, etc. for finding resources of interest, like- minded individuals, etc. Think Orkut + Craig’s List
  • 55. FOAFFinger Damian Steer put together a JmDNS- based app to find people on local links Uses a custom application protocol: _foafcon._tcp.local. Reuses HTTP for transport -- good idea!
  • 57. References Cheshire, Steinberg, “Zero Configuration Networking: The Definitive Guide”, O’Reilly and Associates, 2005. http://www.zeroconf.org http://www.multicastdns.org http://www.dns-sd.org http://jmdns.sourceforge.net http://developer.apple.com/networking/bonjour http://www.foaf-project.org/ http://rdfweb.org/people/damian/foaffinger http://tivohme.sourceforge.net/ http://avahi.org
  • 59. Please write your reviews Feedback/Questions: brian@bosatsu.net