bonjour protocol
DESCRIPTION
This presentation describes the concept of zero configuration by explaining the bonjour protocol.TRANSCRIPT
BONJOUR
Prepared for
Prof. Kaewon Choi
By
Salah Amean Ahmmed
INTRODUCTION
IP like electricity or water Just plug and it work Bonjour is truly revolutionary, it is one of the things that is going to have
the largest impact on application designing over the next couple of years.
BACKGROUND Bonjour is Apple’s implementation of a suite of
zero-configuration networking protocols. Bonjour is designed to make network
configuration easier for users. For example, Bonjour lets you connect a printer to your
network without the need to assign it a specific IP address or manually enter that address into each computer
With zero-configuration networking, Nearby computers can discover its (printers)
existence and automatically determine the printer’s IP address
They can automatically discover the new address in the future even when changes happen
BACKGROUND
Apps can also leverage Bonjour to automatically detect other instances of the app (or other services) on the network.
For example, two users running an iOS photo sharing app could share photos over Bluetooth personal area network without the
need to manually configure IP addresses on either device
WHY BONJOUR?
The transition from platform-specific protocols(AppleTalk) to IP happened over the past two decades
Currently computers and other network devices all use TCP/IP for communication.
In that transition, however, one piece of functionality was lost
the ability to add devices to a local network and then connect to those devices from computers and other devices on the network, all with little or no configuration.
CONCEPT For IP to work, devices need to be assigned
addresses either manually or dynamically(DHCP). A dynamically assigned address can change, Without Bonjour,
Printers and other devices had to be manually configured with a static address so that computers on the network could reach them.
DNS server has to be configured so that computer users didn’t have to connect to the printer by IP address.
Thus, a seemingly minor task required significant configuration.
Sometimes it isn’t practical to have complicated configuration for minor tasks such as printing a paper
CAPABILITY OF BONJOUR Without wasting people time to get configuration
done, people should be to be able to plug in the printer, plug two laptops together, or look for a file server or game server on the local network
To support this, people need a simple and reliable way to configure and browse for services over IP networks.
User want to discover available services and Choose one from a list, instead of having to know
each service’s name or IP address in advance. It is in everyone’s interest for IP to have this
capability
ZERO CONFIGURATION: AN EXAMPLE In step 1, you open up your laptop in your
neighbor’s house, and the laptop either Obtains an address from DHCP server in the
router or, In the absence of a DHCP server, assigns itself
an available local address In step 2, the network is queried for
available printers so that when you open the Print dialog, your neighbor’s
printer is listed In step 3, you turn on music sharing on your
computer, and your neighbor’s computer sees it and connects.
ZERO CONFIGURATION: AN EXAMPLE
ZERO CONFIGURATION: AN EXAMPLE
WHAT IS ZEROCONF NETWORK?
No external supporting infrastructure No manual configuration No (conventional)DHCP Server No conventional DNS server
Limited Network Scope Not too many users Not too many hosts;
Simply by connecting two laptops using Ethernet cable
THREE LEGS OF BONJOUR
Addressing : address is need to identify host on the network
Naming: using names instead of the IP address
Browsing: we need to discover what is in the network.
ADDRESSING
Self-Assigned Link-Local Addressing Pick random address in 169.254/16 Claim this address by ARP ARP to see if anyone else is using it if someone else is using it, try again ongoing conflict checking
Http://www.zeroconf.org/ One of the important issues regarding this sort of
addressing is that they are meant for local usage only typically a small LAN or a single LAN segment
For example when we print a document from host A to a host B on the local network, then this addressing scheme is sufficient
IPV4 LINK-LOCAL AVAILABILITY Self-Assigned IPv4 Link-local Addressing first appeared in
Mac OS8.5,1998 Windows 98, 1998 Mac OS X 10.0
IPv6 already has link-local addressing This is not to compete with it but to encourage
apps to support IPv6 But low cost devices that has no support for IPv6 Major operating systems supports local link
addressing Hardware manufacturers should implement link-
local addressing on their devices to obtain the full benefit of Bonjour.
ADDRESSING WITH ZEROCONF
Device that supports link-local addressing benefits from this feature automatically.
When your host computer encounters a local network, it finds an unused local address and adopts it.
No action on your part is required.
NAMING
Multicast DNS is the proposed solution to the translation of name-to-address on local networks
Because these DNS queries are sent to a multicast address, no single DNS server with global knowledge is
required to answer the queries. Each service or device can provide its own
DNS capability when it sees a query for its own name,
it provides a DNS response with its own address.
NAMING AND RESPONDER
Responder handles mDNS queries for any network service on the device
This daemon takes charge of interpreting mDNS queries and multicast messages
Automatically advertises the availability of your service
so that any queries for your name are directed to the correct IP address and port number automatically.
NAMING
Uniqueness of names is essential for name-to-address to work properly
Names in bonjour have local significance only Pick desired name in ".local."subdomain Issue Query to see if anyone else is using it if someone is else already using it, pick
another ongoing conflict checking
NAMING EXAMPLE
A printer with the default name XYZ-LaserPrinter.local to Local network.
XYZ-LaserPrinter.local, then XYZ-LaserPrinter-2.local,
XYZ-LaserPrinter-3.local is unused,thus becomes the name
Bonjour renames automatically
BROWSING
“what we want to do?” is to just browse what is inside the network rather just type is in the browser some numbers or names
Long list of attempts allows automatic detection of devices/services on networks
RLP (resource location protocol) SDP (Service discovery protocol) SSDP (Simple service discovery protocol) SDS Service discovery services
DEVICE-CENTRIC VS. SERVICE CENTRIC
In device centric A client queries to the server, and checks
what is available on the server Server responds with list of running
service( HTTP, ftp, etc.) Digging inside the server for some relevant
information Decides what services to use The Response:
May not be exactly what the user needs Cause a lot of unneeded network traffic
DEVICE-CENTRIC VS. SERVICE CENTRIC
In service centric: It makes more sense to query for “What print
services are available?” than “what services are you running” then go
though list of available services In this scheme, a single query produce only
relevant replies Services are not tied to specific IP addresses
or even host names (e.g., load-balancing situation)
Queries are made according to the type of service needed, not the hosts providing them
SERVICE DISCOVERY
Service discovery in Bonjour is accomplished by “browsing.”
An mDNS query is sent out for a given service, type and domain
Any matching services reply with their names
The result is a list of available services to choose from.
BONJOUR SERVICE DISCOVERY
Bonjour takes the service-oriented approach. Queries are made according to the type of service needed, not the hosts providing them.
Applications store service instance names, not addresses, so if the IP address, port number, or even host name has changed, the application can still connect.
User’s browsing experience is made more useful and trouble-free.
SERVICE DISCOVERY ADVANTAGES
Allows applications to find all available instances of a particular type of service and
To maintain a list of named services and port numbers So with changes, effect won’t hurt
SERVICE DISCOVERY EXAMPLE
PUBLISHING A SERVICE
PUBLISHING A SERVICE-CONT’
ADVERTISING SERVICES
Applications provide a service name and port follows same DNS specific to general model ServiceName._ServiceType._TransportProtocol
Name.Domain ServiceName is human readable descriptive
name Maximum of 63byte All characters are allowed
HP officeJet8500._ipp._tcp.local. service name is HP officeJet8500 services type(internet printing protocol) is ipp Transport Protocol is tcp Domain is .local
CHALLENGES
SOLUTION
Caching mDNSresponder takes charge of caching, Some requests are kept to the time of need
Suppression of duplicate responses Back-off
CHALLENGES
BONJOUR BONJOUR GATEWAY DEMO
http://www.youtube.com/watch?v=i8vNlqV67uA
DEMO LAB310
REFERENCES https://developer.apple.com/library/mac/documentation/
cocoa/conceptual/NetServices/Articles/NetServicesArchitecture.html
http://www.zeroconf.org/QDIPv4LL.html http://www.youtube.com/watch?v=pdbTyxYmF84 http://www.ietf.org/rfc/rfc3927.txt http://www.aerohive.com/solutions/technology-behind-
solution/bonjour-gateway http://blogs.enterasys.com/apple-bonjour-devices-in-the-
enterprise-part-1/ http://en.wikipedia.org/wiki/Zero-configuration_networking