Boot Service Discovery Protocol
Encyclopedia
Boot Service Discovery Protocol (BSDP) is an Apple-developed, standards-conforming extension of DHCP
Dynamic Host Configuration Protocol
The Dynamic Host Configuration Protocol is a network configuration protocol for hosts on Internet Protocol networks. Computers that are connected to IP networks must be configured before they can communicate with other hosts. The most essential information needed is an IP address, and a default...

. It allows Macintosh
Macintosh
The Macintosh , or Mac, is a series of several lines of personal computers designed, developed, and marketed by Apple Inc. The first Macintosh was introduced by Apple's then-chairman Steve Jobs on January 24, 1984; it was the first commercially successful personal computer to feature a mouse and a...

 computers to boot
Booting
In computing, booting is a process that begins when a user turns on a computer system and prepares the computer to perform its normal operations. On modern computers, this typically involves loading and starting an operating system. The boot sequence is the initial set of operations that the...

 from bootable images on a network
Computer network
A computer network, often simply referred to as a network, is a collection of hardware components and computers interconnected by communication channels that allow sharing of resources and information....

 instead of local storage media such as CD
Compact Disc
The Compact Disc is an optical disc used to store digital data. It was originally developed to store and playback sound recordings exclusively, but later expanded to encompass data storage , write-once audio and data storage , rewritable media , Video Compact Discs , Super Video Compact Discs ,...

, DVD
DVD
A DVD is an optical disc storage media format, invented and developed by Philips, Sony, Toshiba, and Panasonic in 1995. DVDs offer higher storage capacity than Compact Discs while having the same dimensions....

, or hard disk. The DHCP options used are the "vendor-specific information" option (number 43) and the "vendor class identifier" option (number 60).
There are three versions of BSDP, though usually version 1.0 is used. All versions enable a client
Client (computing)
A client is an application or system that accesses a service made available by a server. The server is often on another computer system, in which case the client accesses the service by way of a network....

 to choose from several bootable images offered by a server
Server (computing)
In the context of client-server architecture, a server is a computer program running to serve the requests of other programs, the "clients". Thus, the "server" performs some computational task on behalf of "clients"...

.
The reference implementation of BSDP is Darwin
Darwin (operating system)
Darwin is an open source POSIX-compliant computer operating system released by Apple Inc. in 2000. It is composed of code developed by Apple, as well as code derived from NeXTSTEP, BSD, and other free software projects....

's BOOTP server, which is part of Mac OS
Mac OS
Mac OS is a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems. The Macintosh user experience is credited with popularizing the graphical user interface...

's NetBoot
NetBoot
NetBoot is a technology from Apple which enables Macs with capable firmware to boot from a network, rather than a local hard disk or optical disc drive. NetBoot is a derived work from the Bootstrap Protocol , and is similar in concept to the Preboot Execution Environment...

 feature.

Contents of DHCP Vendor Class Identifier

The DHCP server and client send a vendor class option that contains an ASCII
ASCII
The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

-encoded string with three parts delimited by a / character. The first part is AAPLBSDPC, which advertises BSDP capability. The second part is the client's architecture ("ppc
PowerPC
PowerPC is a RISC architecture created by the 1991 Apple–IBM–Motorola alliance, known as AIM...

" or "i386"). The third part is a system identifier. For example, an Intel-based iMac
IMac
The iMac is a range of all-in-one Macintosh desktop computers built by Apple. It has been the primary part of Apple's consumer desktop offerings since its introduction in 1998, and has evolved through five distinct forms....

 sends
AAPLBSDPC/i386/iMac4,1
as its vendor class.

Contents of DHCP Vendor Specific Information Options

According to RFC 2132 the DHCP Option carrying the number 43 is reserved for vendor specific information. This information is stored in the following format:
Code Len Vendor-specific information
+-----+-----+-----+-----+---
| 43 | n | i1 | i2 | ...
+-----+-----+-----+-----+---
If the vendor wants to convey multiple options within this option field, this is done with encapsulated vendor-specific extensions. Vendor encapsulated extensions contain one or more concatenated fields. Each field consists of:
Byte Position Content
0 Type of field
1 Length n of field
2 to n-2 Data


The following table describes the possible field types. All numeric fields are interpreted as unsigned and Big Endian integers
Integer (computer science)
In computer science, an integer is a datum of integral data type, a data type which represents some finite subset of the mathematical integers. Integral data types may be of different sizes and may or may not be allowed to contain negative values....

.
Type Meaning Data type
1 Message Type 8 Bit
Bit
A bit is the basic unit of information in computing and telecommunications; it is the amount of information stored by a digital device or other physical system that exists in one of two possible distinct states...

 int
  • 0x00
    Hexadecimal
    In mathematics and computer science, hexadecimal is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F to represent values ten to fifteen...

    : none
  • 0x01: LIST
  • 0x02: SELECT
  • 0x03: error
2 BSDP Version used 16 Bit int
  • 0x0000: Version 0.0
  • 0x0100: Version 1.0
  • 0x0101: Version 1.1
  • 3 Server Identifier IP address
    IP address
    An Internet Protocol address is a numerical label assigned to each device participating in a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or network interface identification and location addressing...

     of the server, one byte per component: c0 a8 64 01 represents 192.168.100.1
    4 Server Priority 16 Bit int
    5 Port for Response 16 Bit int
    6 "boot image list path" String
    String (computer science)
    In formal languages, which are used in mathematical logic and theoretical computer science, a string is a finite sequence of symbols that are chosen from a set or alphabet....

    7 ID of Standard Boot Image 32 Bit int

    (According to Apple's documentation, the boot image ID can range up to 65535. This comprises 16 bits; however, 32 bits are reserved. In all observed IDs, the most significant 16 bits are always 1000 0001 0000 0000 (0x8100), which probably indicates the type and version of the operating system to be booted.)
    8 ID of Selected Boot Image 32 Bit int
    9 List of Boot Images ?
    10 "netboot 1.0 firmware" ?
    11 Error List for Image Attribute ?
    128 "shadow mount path" String (URL
    Uniform Resource Locator
    In computing, a uniform resource locator or universal resource locator is a specific character string that constitutes a reference to an Internet resource....

    )

    Here is possible to specify a network-accessible mount where data will be written after a successful boot. If this field is not specified and no storage medium is available locally on the client, then the boot process for Mac OS X is aborted. Officially, Mac OS X only supports AFP
    Apple Filing Protocol
    The Apple Filing Protocol is a network protocol that offers file services for Mac OS X and original Mac OS. In Mac OS X, AFP is one of several file services supported including Server Message Block , Network File System , File Transfer Protocol , and WebDAV...

     shadow mount paths. However, NFS may be used after a modifying of the startup files of the system.
    129 "shadow file path" String (URL)
    130 "machine name" (Name of system to boot?) String

    Example

    The following example illustrates the construction of the Vendor Encapsulated Option:
    0000 01 01 02 08 04 81 00 07 e5 82 0a 4e 65 74 42 6f 6f ........ ..NetBoo
    0010 74 30 30 31 t001
    The first field here, 01 01 02, means that the packet is a BSDP "SELECT" message. The 01 declares that field specifies the BSDP Message Type. The next 01 indicates that the field contents are one byte long — 02 is the code for "SELECT".

    The following 08 04 81 00 07 e5 means that the boot image with the ID 2164262885 is selected.

    Finally, 82 0a 4e 65 74 42 6f 6f 74 30 30 31 means that a string
    String (computer science)
    In formal languages, which are used in mathematical logic and theoretical computer science, a string is a finite sequence of symbols that are chosen from a set or alphabet....

     with 0x
    Hexadecimal
    In mathematics and computer science, hexadecimal is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F to represent values ten to fifteen...

    0a = 10 characters, namely "NetBoot001", is the name of the system to boot.

    Sources

    • BSDP documentation from Apple's bootpd
    • several conversations captured with Wireshark
      Wireshark
      Wireshark is a free and open-source packet analyzer. It is used for network troubleshooting, analysis, software and communications protocol development, and education...

    • network captures from https://www.math.ohio-state.edu/wiki/administration/macosx/netboot/intel
    • Source code
      Source code
      In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

       of Darwin
      Darwin (operating system)
      Darwin is an open source POSIX-compliant computer operating system released by Apple Inc. in 2000. It is composed of code developed by Apple, as well as code derived from NeXTSTEP, BSD, and other free software projects....

      's BOOTP server, http://www.opensource.apple.com/darwinsource/tarballs/apsl/bootp-133.8.tar.gz
    The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
     
    x
    OK