DHCP Dynamic Host Configuration Protocol DHCP koriste hostovi

  • Slides: 20
Download presentation
DHCP Dynamic Host Configuration Protocol • DHCP koriste hostovi u da bi prilikom podizanja

DHCP Dynamic Host Configuration Protocol • DHCP koriste hostovi u da bi prilikom podizanja operativnog sistema automatski konfigurisali parametere kao što su IP addresa, subnet maska, default gateway itd. • Parametre šalje DHCP server po zahtevu hosta • Host je DHCP klijent • Komunikacija se odvija prema “paradigmi” klijentserver

 • DHCP server je obično glavni (centalni ) server u lokalnoj mreži koji

• DHCP server je obično glavni (centalni ) server u lokalnoj mreži koji održava administrator mreže • Pošto su podaci na njemu pod kontrolom administratora, DHCP klijenti uvek dobijaju ažurne parametre koji se kontinualno ažuriraju prema aktuelnim potrebama lokalne mreže • Ako postoji više rutera, ruteri se moraju konfigurisati da prosleđuju zahteve DHCP serveru (DHCP Relay Agent feature). • U jednostavnijim mrežama ruter može biti DHCP server

 • Pošto svaki host treba da ima IP adresu da bi komunicirao preko

• Pošto svaki host treba da ima IP adresu da bi komunicirao preko IP mreže, DHCP smanjuje administratoru posao stalnog statičkog podešavanja parametara svakog pojedinačnog hosta • Na primer ako se host preseli na neku drugu “podmrežu” treba da promeni IP adresu. Sa DHCP-om se konfiguracija obavi automatski, host dobije podatke sa DHCP servera • DHCP je transparentan za dinamičko dodeljivanje adresa, pa samim tim i NAT

Opis protokola • DHCP uses a client-server model where one or more servers (DHCP

Opis protokola • DHCP uses a client-server model where one or more servers (DHCP servers) allocate IP addresses and other optional configuration parameters to clients (hosts) upon client bootup. • These configuration parameters are leased by the server to the client for some specified amount of time. • When a host boots up, the TCP/IP stack in the host transmits a broadcast (DHCPDISCOVER) message in order to gain an IP address and subnet mask, among other configuration parameters. • This initiates an exchange between the DHCP server and the host. During this exchange, the client passes through the several well defined states listed below:

 • • • nitializing Selecting Requesting Bound Renewing Rebinding

• • • nitializing Selecting Requesting Bound Renewing Rebinding

Reference Message Use 0 x 01 DHCPDISCOVER The client is looking for available DHCP

Reference Message Use 0 x 01 DHCPDISCOVER The client is looking for available DHCP servers. 0 x 02 DHCPOFFER The server response to the client DHCPDISCOVER. 0 x 03 DHCPREQUEST The client broadcasts to the server, requesting offered parameters from one server specifically, as defined in the packet. 0 x 04 DHCPDECLINE The client-to-server communication, indicating that the network address is already in use. 0 x 05 DHCPACK The server-to-client communication with configuration parameters, including committed network address. 0 x 06 DHCPNAK The server-to-client communication, refusing the request for configuration parameter. 0 x 07 DHCPRELEASE The client-to-server communication, relinquishing network address and canceling remaining lease. 0 x 08 DHCPINFORM The client-to-server communication, asking for only local configuration parameters that the client already has externally configured as an address.

Role of DHCP/Boot. P Relay Agent • Routers, by default, will not forward broadcast

Role of DHCP/Boot. P Relay Agent • Routers, by default, will not forward broadcast packets. • Since DHCP client messages use the destination IP address of 255 (all Nets Broadcast), DHCP clients will not be able to send requests to a DHCP server on a different subnet unless the DHCP/Boot. P Relay Agent is configured on the router. • The DHCP/Boot. P Relay Agent will forward DHCP requests on behalf of a DHCP client to the DHCP server. • The DHCP/Boot. P Relay Agent will append its own IP address to the source IP address of the DHCP frames going to the DHCP server. • This allows the DHCP server to respond via unicast to the DHCP/Boot. P Relay Agent. • The DHCP/Boot. P Relay Agent will also populate the Gateway IP address field with the IP address of the interface on which the DHCP message is received from the client. • The DHCP server uses the Gateway ip address field to determine the subnet from which the DHCPDISCOVER, DHCPREQUEST, or DHCPINFORM message originates.

 • Otvoriti komandnu liniju rutera (CLI – command line interface). • Ukoliko je

• Otvoriti komandnu liniju rutera (CLI – command line interface). • Ukoliko je ruter u trenutno neaktivnom stanju (komanda linija se završava znakom >, odnosno Router>) potrebno ga je aktivirati komandom enable. Nakon toga komandna linija se završava znakom # odnosno Router#. • Potom je potrebno aktivirati konfiguracioni terminal za podešavanje parametara rutera komandom configuration terminal ili skraćeno conf t nakon čega se početak komandne linije menja u Router(config)#. ip dhcp pool My. Pool net 192. 168. 10. 0 255. 0 ip dhcp exclude 192. 168. 10. 1 192. 168. 10. 5 default 192. 168. 10. 1 dns 20. 0. 0. 2

 • Nakon konfigurisanja DHCP-a potrebno je izaći iz konfiguracionog moda pomoću naredbe exit

• Nakon konfigurisanja DHCP-a potrebno je izaći iz konfiguracionog moda pomoću naredbe exit i aktivirati trenutna podešavanja komandom copy run start. • Ništa ne unositi za ime konfiguracionog fajla (samo pritisnuti Enter). • Trenutna konfiguracija se dobija komandom show run