Raj Jain The Ohio State University 32-1 Chapter 32 Chapter 32 Chapter 32 Initialization Initialization Initialization (BOOTP and DHCP) (BOOTP and DHCP) (BOOTP and DHCP) Raj Jain The Ohio State University Columbus, OH 43210 [email protected]http://www.cis.ohio-state.edu/~jain/
23
Embed
Chapter 32 Initialization (BOOTP and DHCP)jain/cis678-97/ftp/f32_dhc.pdf · The Ohio State University Raj Jain 32-1 Chapter 32 Initialization (BOOTP and DHCP) Raj Jain The Ohio State
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
q Computer loads a simple boot program. The bootprogram loads operating system.
q On diskless machine, the computer needs to know thenetwork address of the o/s file
q It needs to know its own IP address.
q It only knows its h/w address.
Raj JainThe Ohio State University
32-4
ConfigurationConfigurationConfiguration
q Protocols are software routines.
q All nodes have the same software.
q Different nodes have different parameters: Addresses,packet size, etc.
q Configuration = Setting the parameters
q IP Address
q Default router address
q Subnet mask
q DNS server addresses
Raj JainThe Ohio State University
32-5
Method 1: Long PastMethod 1: Long PastMethod 1: Long Past
q Reverse ARP: "What is the IP address of h/w addressxx:xx:...?"
q But RARP uses IP ⇒ Needs IP address.
q Solution: Use 00.00.00.00 as source address.
q ICMP: What is my subnet mask?
q ICMP: What is my default router?
q Problem: What is the boot file name for IP addressnn.nn.nn...?
Raj JainThe Ohio State University
32-6
Method 2: PastMethod 2: PastMethod 2: Past
q Broadcast BOOTP (Bootstrap Protocol) request.
q Reply: IP Address, Boot Server IP address, DefaultRouter, Boot file name, subnet mask
q Get boot image using a simple FTP program⇒ Trivial File Transfer Protocol (TFTP)
q Problem: Why waste an address when it is not beingused.
Raj JainThe Ohio State University
32-7
Method 3: CurrentMethod 3: CurrentMethod 3: Current
q Dynamic Host Configuration Protocol (DHCP)= BOOTP + Dynamic allocation of IP addresses⇒ Addresses are leased for a period. Reallocated tothe same or other nodes after lease expiry.
q Nonmobile computers get a permanent address.
Raj JainThe Ohio State University
32-8
BOOTP Message FormatBOOTP Message FormatBOOTP Message FormatOperation H/W Type
Transaction IdentifierH/W Length Hops
Seconds elapsed UnusedClient IP AddressYour IP Address
Server IP AddressRouter IP AddressClient H/W addressServer Host Name
q Boot File name: Generic name like "unix" in therequest. Full name in response.
q Vendor specific area: Misnomer. Also used forgeneral purpose info.
q Magic cookie: First four octets = 99.130.83.99
q Type-length-valueItem Code LengthPadding 0 -Subnet mask 1 4Time of Day 2 4End 255 -
Raj JainThe Ohio State University
32-12
Contents of Vendor-Specific AreaContents of Vendor-Specific AreaContents of Vendor-Specific AreaItem Code LengthRouters 3 4nTime Server 4 4nIEN116 Server 5 4nDomain server 6 4nLog server 7 4nQuote server 8 4nLPR servers 9 4nImpress servers 10 4nRLP Server 11 4nHost name 12 4nBoot size 13 2Reserved 128-254 -
Raj JainThe Ohio State University
32-13
BOOTP OperationBOOTP OperationBOOTP Operation
q BOOTP request is broadcast
q BOOTP requires only a single packet exchange
q BOOTP uses UDP ⇒ Bootstrapping can occur acrossa router
q BOOTP UDP to use checksum
q BOOTP replies are also broadcast (since no oneknows the requesters IP address, ARP will fail).
q BOOTP requests and replies are sent with "nofragment bit" set
Raj JainThe Ohio State University
32-14
q Multiple replies ⇒ process the first one
q Clients uses timeout and retransmission
q The timeout interval is random to avoidsynchronization after a power failure
Raj JainThe Ohio State University
32-15
DHCP Message FormatDHCP Message FormatDHCP Message FormatOperation H/W Type
Transaction IdentifierH/W Length Hops
Seconds elapsed FlagsClient IP AddressYour IP Address
Server IP AddressRouter IP AddressClient H/W addressServer Host Name
Bootfile NameOptions (Variable)
0 31b
16 B64 B128 B
Raj JainThe Ohio State University
32-16
DHCP Message FormatDHCP Message FormatDHCP Message Format
q Slightly modified version of BOOTP message ⇒ ADHCP server can be programmed to answer BOOTPrequests
q BOOTP's Unused field renamed to Flags
q Only one bit of 16-bit Flags has been defined
q Left-most flag bit =1 ⇒ Servers, please reply using IPbroadcast address
q Servers always send hardware unicast response
q Vendor specific field renamed to options
q Option type 53 specifies the "type of the message"
Raj JainThe Ohio State University
32-17
q "Option overload" option ⇒ Server Host name andboot file name fields contain options