dhcp dynamic host configuration protocol. introduction client administration: ip address...

16
DHCP Dynamic Host Configuration Protocol

Upload: silvester-gordon

Post on 26-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network

DHCP

Dynamic Host Configuration Protocol

Page 2: DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network

Introduction Client administration:

IP address management: They need to ease the process of joining the network and they

do not want users to do any special configuration (DHCP) They want to network boot their workstations

i.e. Diskless workstations or remote OS installation (acquiring the network setting during boot process)

Solution: Deploy a DHCP server Machine names management:

They need to be able to name machines and access them by names instead of IP addresses

Solution: Deploy A DNS server So we discuss on DHCP and DNS in this session

Page 3: DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network

DHCP

Provides configuration parameters specific to the DHCP client host requesting, information required by the client host to participate on an IP network

Method of IP allocation Manual

Only requesting clients with a MAC address listed in the table (MAC-IP pairs) get the IP address according to the table

Automatic DHCP server permanently assigns to a requesting client a free IP-

address from a range given by the administrator Dynamic

The only method which provides dynamic re-use of IP addresses The request-and-grant process uses a lease concept with a

controllable time period.

Page 4: DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network

DHCP cont.

DHCP server can provide optional configuration e.g. Subnet Mask, Router, Name Server, … RFC 2132 defines DHCP options Usage

DHCP relay agent (mostly in network routers/high-end switches) Relays DHCP Discover broadcasts from a LAN without DHCP to

a network which has one Usage

US Cable Internet providers use DHCP DSL providers prefer PPPoE

UK Many broadband ISP networks use DHCP XDSL providers use infinite lease Semi-static IPs

Office networks, public internet access Places where there are mobile nodes that want to access the net

Page 5: DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network

DHCP Implementations

Microsoft introduced DHCP on their NT server with Windows NT 3.5 in late 1994 DHCP did not originate from Microsoft

Internet Software Consortium published DHCP for Unix variants Version 1.0.0 released on December 6, 1997 Version 2.0 on June, 1999 – A more RFC-compliant one

Novell included a DHCP server in NetWare OS since v. 5, 1999 It integrates with Novell eDirectory

Weird solutions introducing a variety of multiplatform DHCP implementations since 1997

Cisco since Cisco IOS 12.0 in February 1999 Sun added DHCP support in Solaris 8, July 2001

Page 6: DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network

DHCP Packet

Page 7: DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network

DHCP Message

FieldDescription

Operation Code

Specifies the type of the Dynamic Host Configuration Protocol (DHCP) message. Set to 1 in messages sent by a client (requests) and 2 in messages sent by a server (response).

Hardware TypeSpecifies the network LAN architecture. For example, the ethernet type is specified when htype is set to 1.

Hardware Address Length

Link-layer address length (in bytes); defines the length of hardware address in the chaddr field. For Ethernet, this value is 6.

Hops Number of relay agents that have forwarded this message.

Transaction identifier

Used by clients to match responses from servers with previously transmitted requests.

secondsElapsed time (in seconds) since the client began theDynamic Host Configuration Protocol (DHCP) process.

FlagsFlags field is called the broadcast bit, can be set to 1 to indicate that messages to the client must be broadcast

ciaddrClient’s IP address; set by the client when the client has confirmed that its IP address is valid.

Page 8: DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network

DHCP Message

FieldDescription

yiaddrClient’s IP address; set by the server to inform the client of the client’s IP address.

siaddrIP address of the next server for the client to use in the configuration process (for example, the server to contact for TFTP download of an operating system kernel).

giaddrRelay agent (gateway) IP address; filled in by the relay agent with the address of the interface through which Dynamic Host Configuration Protocol (DHCP) message was received.

chaddr Client’s hardware address. (Layer 2 address)

sname Name of the next server for client to use in the configuration process.

fileName of the file for the client to request from the next server (for example the name of the file that contains the operating system for this client).

Page 9: DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network

Pros and Cons

Pros Simplifies the task of assigning IP numbers to each

machine in the network makes easy to add, remove or move a host can assign defaults: default gateway, domain name, DNS server, WINS server (if any) . ability to have fewer IP# than hosts

Cons if DHCP server is down, all hosts are down hard to keep

information on free and used IP #. DHCP is an unauthenticated protocol.

Page 10: DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network

DHCP Message ExchangeDiscover: client tries to findout what servers are outthere.

Offer: those servers thatcan provide this servicerespond

Request: client selects oneoffer and makes a request

ACK: server acks the request

When 50% of the leaseperiod is expired, client asksfor a renewal.

If ACK received, reset timer.If NAK, go back to initializingstate.

Page 11: DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network

DHCP Anatomy

Uses the same IANA assigned ports as BOOTP 67/udp for the server, 68/udp for the client

DHCP Messages Discover

Client broadcasts on the local physical subnet to find servers UDP packet (broadcast dest. 255.255.255.255)

Also request last-known IP address (optional parameter) Offer

Server determines the configuration based on the client’s MAC addr. Server specifies the IP address and put optional parameters

Request Client selects a configuration out the DHCP Offer packet and

broadcasts it again Acknowledge

Server acknowledges the request and sends the ack to the client

Page 12: DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network

DHCP Anatomy cont.

Inform Client requests more information than the server sent with the

DHCPACK, or to repeat data for a particular application (e.g. to obtain web proxy settings by a browser)

Release Client requests the server to release the DHCP and the client

unconfigures its IP address Sending this message is not mandatory (unplug or …)

Page 13: DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network

BOOTP

BOOTstrap Protocol (RFC 951) UDP Used to obtain IP address automatically

Usually in booting process of computers or OSs Diskless workstations

Historically used for UNIX-like diskless workstations Also obtains the locations of the boot image

Also can be used for installing a pre-configured OS Protocol became embedded in the BIOS of some NICs

Allowing direct network booting without need for a floppy

Page 14: DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network

BOOTP cont.

Recently used for booting a Windows OS in diskless standalone media center PCs

DHCP is a more advanced protocol base on BOOTP Far more complex to implement than BOOTP Most DHCP servers also offer BOOTP support Duration based leases is the fundamental addition in DHCP

Dynamic in DHCP is for this

Page 15: DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network

BOOTP cont.

BOOTP places its packet inside a UDP packet (note that BOOTP is an application layer program).

The BOOTP server issues a passive open command on UDP port number 67 and waits for a client.

A booted client issues an active open command on port number 68. The message is encapsulated in a UDP user datagram and then in an IP packet. In the IP packet the source address is all 0s and the destination address is all 1s.

Page 16: DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network

BOOTP When client and server are on different networks, we

need a relay agent, because client does not know IP address of server, and a limited broadcast address gets dumped by the local router. Relay agent knows the IP address of the server