1© David Morgan 2003DHCP – the protocolDavid Morgan© David Morgan 2003DHCP as a language spoken between pairs of programs– a dhcp client program, e.g., dhclient or winipcfg– an dhcp server program, e.g., dhcpd– they’re written specially to speak it discussing server giving info it has, or gets, to client broadcast-response behavior2© David Morgan 2003DHCP message formatop hlenseconds elapsed flagshtype hopstransaction identifierclient IP addressyour IP addressserver IP addressrouter IP addressclient hardware address (16 bytes…server host name (64 bytes…boot file name (128 bytes…options (variable…© David Morgan 2003DHCP Dynamic Host Configuration Protocol– Allows "self-configuration" of computers– DHCP server assigns IP address mask etc RFC 951 and 1048 (BOOTP) RFC 2131 and 2132 DHCP3© David Morgan 2003DHCP TransactionClient - needs IP config Server supplies config© David Morgan 2003BOOTP Packet Primary fields of interest– Client IP - If the client knows its IP it puts it here– Your IP - The IP address the server is offering the client– Server IP - The IP address of the server that generated this reply– Gateway - IP of gateway for trans-router DHCP– Client HW - MAC Address of client4© David Morgan 2003Step 1 DHCP DiscoverClient - sends DiscoverAll IP Fields 0.0.0.0Client HW = MAC of client© David Morgan 2003DHCP DiscoverAll IPs are 0.0.0.0…....broadcast destination MAC5© David Morgan 2003Step 2 DHCP OfferServer - replies with OfferSAME TRANSACTION #Client IP 0.0.0.0Your IP = Offered IPServer IP = Server IPClient HW = MAC of clientClient - may get more than one offer© David Morgan 2003DHCP OfferClient IP = 10.100.13.200Server IP = 10.100.13.1016© David Morgan 2003Step 3 DHCP RequestClient selects an offer and responds with RequestSAME TRANSACTION #All IPs 0.0.0.0Parameters in Request List© David Morgan 2003DHCP Request7© David Morgan 2003Step 4 DHCP ACKServer confirms request© David Morgan 2003DHCP ACK8© David Morgan 2003DHCPD DHCP Server process is dhcpd Set configuration in /etc/dhcpd.conf Leases list in /var/lib/dhcp/dhcpd.leases Set autorun with ntsysv© David Morgan 2003minimal dhcpd.confMany, many, more optionsoption routers <ip address>....would be used to specify a gateway9© David Morgan 2003dhcpd.leases© David Morgan 2003Biblio RFC 2131 – “Dynamic Host Configuration Protocol” RFC 1534 – “Interoperation Between DHCP and BOOTP “ RFC 951 – “Bootstrap Protocol
View Full Document