Servicios de Red, Dhcp, DNS

download Servicios de Red, Dhcp, DNS

of 23

Transcript of Servicios de Red, Dhcp, DNS

  • El Protocolo DHCP (Dynamic Host Configuration Protocol)

    M.Sc. Ing. Reynaldo Castao Umaa

  • Bibliografa recomendadaResources for DHCP: http://www.dhcp.org/ RFC 2131 . Descripcin de la operacin del protocoloRFC 2132 . Describe las opciones de configuracinDHCP . HOWTORalph Droms, Ted Lemon, THE DHCP HANDBOOK, Bucknell University Macmillan Technical Publishing, Indianapolis, IN

  • SumarioQu es DHCP?Como funciona DHCP

  • Qu es DHCP?El protocolo DHCP (Dynamic Host Configuration Protocol) es un mecanismo que permite ofrecer parmetros de configuracin a estaciones TCP/IP

    Consiste de dos componentes:Un protocolo para entregar parmetros de configuracin desde un Servidor DHCP hacia una estacin Un mecanismo para la asignacin de direcciones IP a las estaciones

    Se basa en un modelo Cliente-Servidor en el que un Servidor DHCP designado asigna direcciones IP y entrega parmetros de configuracin para configurar estaciones dinmicamente. Una estacin no se convierte en servidor DHCP a menos que se configure explcitamente para serlo

  • Qu es DHCP? RFC 2131Mecanismo de asignacin de DireccionesDinmicoAutomticoManual

  • Parmetros de configuracin (RFC 2132)Ms de 70 opciones de configuracin para clientes DHCP, adems de la direccin IP, y se contina expandiendo (Capacidad en el protocolo para hasta 256 opciones, de las cuales se reservan de la 128 a 254Esta RFC hace obsoleta a la RFC 1533 y supersede a RFC 1497Ejemplos ms comunes de opciones son:1Mscara de Subred3 RouterLista de routers en la subred del cliente6 Servidores DNS Lista de Servidores de DNS disponibles15 Nombre de DominioNombre del dominio DNS .44 WINS/NBNS serversLista de Servidores NetBIOS46 WINS/NBT node typeTipo de Nodo NetBIOS

  • Formato del Paquete DHCP

  • Funcionamiento de DHCPProtocolo de Transporte: UDPPuertos : Servidor 67; Cliente 68

  • No hay servidores DHCP OnlineEl cliente espera 1 segundo por una ofertaAl no recibirse oferta intentar de nuevo las solicitudes tres veces (a los 9, 13 y 16 segundos mas un tiempo aleatorio entre 0 y 1000 milisegundos)Reintento cada 5 minutos

  • IP Lease Request y Offer

  • IP Lease Selection y Acknowledgment

  • IP Lease Renewal

  • IP RebindingDHCP ServerDHCP ClientDHCPREQUESTSource IP Address = 131.107.8.13Dest. IP Address = 255.255.255.255Rebinding IP Address = 131.107.8.13Server Identifier = 131.107.3.24Hardware Address = 08004....

    IP Router

  • Domain Name System (DNS)M.Sc. Ing. Reynaldo Castao Umaa

  • Nombres DNS y bsqueda de informacin

  • Qu no hace DNS?

    DNS no controla el enrutamientoDNS no afecta la conectividad IP

    Sin embargo

    Cuando los nombres no pueden ser traducidos a IPs, debido a fallos en el servicio o configuracin DNS, en ocasiones el usuario final supone que hay problemas de conectividad en la red.

  • Host namesFully Qualified Domain Names (FQDN)host.subdomain.domainftp.cisco.comns.ti.comns1.curso.edu.niEclipse.cablenet.com.ni

  • Funcionamiento de DNSEl Sistema DNS funciona mediante un modelo Cliente Servidor

  • Bsqueda Invertida (Reverse Lookup)Se emplea para descubrir hostnames a partir de direcciones IP

    Se emplea un dominio de segundo nivel especial denominado in-addr.arpa

    El dominio in-addr.arpa tiene la misma estructura jerrquica que el espacio de nombres DNS.

    Las direcciones IP se invierten para mantener la especificacin ms general a la derecha

    Las compaas administran su dominio in-addr.arpa basados en su IP y mscaraIP: 169.254.16.0/24Dominio: 16.254.169.in-addr.arpaIP: 169.254.16.200hostname: ns1.curso.edu.ni

  • Roles de Servidores (servidores raz)

    Servidor de Nombre Raz (root name server):

    Servidor de Nombres Primario (primary)Autorizativo de una zona.Mantiene los datos DNSServidor de Nombres Secundario (secondary)Autorizativo de una zonaNo mantiene los datos. Se descargan del PrimarioSe emplea como respaldo y balance de cargaServidor de Nombres de slo cach (caching-only)

    Fordwarder

    Esclavo (slave)

  • Cuando no ofrecer Servicio DNSSe obtiene acceso a internet a travs de un proveedor de Internet que ofrece la administracin de DNS como servicio.

    No se necesitan ofrecer nombres locales NETBIOS. La mayora de los ISP ejecutan DNS sobre Unix que no soportan enlaces a WINS

    Su red es tan pequea que no justifica entrenar a dos administradores, ocupndole parte de su tiempo y manteniendo 2 computadores con la capacidad para ofrecer el servicio DNS.

    Su red es estable y no desea introducir cambios.

  • Cuando ofrecer Servicio DNSDesea emplear WINS para ofrecer nombres de sus computadores ejecutando Windows.

    Desea control local de la parte del rbol DNS de su organizacin.

    La red cambia con frecuencia.

    La organizacin puede justificar el gasto asociado con la labor administrativa y el hardware de los servidores.

    Su enlace con el ISP es de poco ancho de banda y prefiere reducir el trfico a travs de l.

  • What Is DHCP?DHCP simplifies the administrative management of IP address configuration by automating address configuration for network clients. The DHCP standard provides for the use of DHCP servers, which are defined as any computer running the DHCP service. The DHCP server automatically allocates IP addresses and related TCP/IP configuration settings to DHCP-enabled clients on the network.Every device on a TCP/IP-based network must have a unique IP address in order to access the network and its resources. Without DHCP, IP configuration must be done manually for new computers, computers moving from one subnet to another, and computers removed from the network.By deploying DHCP in a network, this entire process is automated and centrally managed. The DHCP server maintains a pool of IP addresses and leases an address to any DHCP-enabled client when it logs on to the network. Because the IP addresses are dynamic (leased) rather than static (permanently assigned), addresses no longer in use are automatically returned to the pool for reallocation.The DHCP service for Microsoft Windows 2000 Server is based on Internet Engineering Task Force (IETF) standards. DHCP specifications are defined in Requests for Comments (RFCs) published by the IETF and other working groups. RFCs are an evolving series of reports, proposals for protocols, and protocol standards used by the Internet community. The following RFCs specify the core DHCP standards that Microsoft supports with its DHCP service:RFC 2131: Dynamic Host Configuration Protocol (obsoletes RFC 1541)RFC 2132: DHCP Options and BOOTP Vendor ExtensionsBenefits of DHCPDeploying DHCP on your enterprise network provides the following benefits:Safe and reliable configuration. DHCP minimizes configuration errors caused by manual IP address configuration, such as typographical errors, as well as address conflicts caused by a currently assigned IP address accidentally being reissued to another computer.Reduced network administration.TCP/IP configuration is centralized and automated.Network administrators can centrally define global and subnet-specific TCP/IP configurations.Clients can be automatically assigned a full range of additional TCP/IP configuration values by using DHCP options.Address changes for client configurations that must be updated frequently, such as remote access clients that move around constantly, can be made efficiently and automatically when the client restarts in its new location.Most routers can forward DHCP configuration requests, eliminating the requirement of setting up a DHCP server on every subnet, unless there is another reason to do so.

    1. The client broadcasts a DHCPDISCOVER message on its local physical subnet. The DHCPDISCOVER message MAY include options that suggest values for the network address and lease duration. BOOTP relay agents may pass the message on to DHCP servers not on the same physical subnet.

    2. Each server may respond with a DHCPOFFER message that includes an available network address in the 'yiaddr' field (and other configuration parameters in DHCP options). Servers need not reserve the offered network address, although the protocol will work more efficiently if the server avoids allocating the offered network address to another client. When allocating a new address, servers SHOULD check that the offered network address is not already in use; e.g., the server may probe the offered address with an ICMP Echo Request. Servers SHOULD be implemented so that network administrators MAY choose to disable probes of newly allocated addresses. The server transmits the DHCPOFFER message to the client, using the BOOTP relay agent if necessary. 3. The client receives one or more DHCPOFFER messages from one or more servers. The client may choose to wait for multiple responses. The client chooses one server from which to request configuration parameters, based on the configuration parameters offered in the DHCPOFFER messages. The client broadcasts a DHCPREQUEST message that MUST include the 'server identifier' option to indicate which server it has selected, and that MAY include other options specifying desired configuration values. The 'requested IP address' option MUST be set to the value of 'yiaddr' in the DHCPOFFER message from the server. This DHCPREQUEST message is broadcast and relayed through DHCP/BOOTP relay agents. To help ensure that any BOOTP relay agents forward the DHCPREQUEST message to the same set of DHCP servers that received the original DHCPDISCOVER message, the DHCPREQUEST message MUST use the same value in the DHCP message header's 'secs' field and be sent to the same IP broadcast address as the original DHCPDISCOVER message. The client times out and retransmits the DHCPDISCOVER message if the client receives no DHCPOFFER messages.

    4. The servers receive the DHCPREQUEST broadcast from the client. Those servers not selected by the DHCPREQUEST message use the message as notification that the client has declined that server's offer. The server selected in the DHCPREQUEST message commits the binding for the client to persistent storage and responds with a DHCPACK message containing the configuration parameters for the requesting client. The combination of 'client identifier' or 'chaddr' and assigned network address constitute a unique identifier for the client's lease and are used by both the client and server to identify a lease referred to in any DHCP messages. Any configuration parameters in the DHCPACK message SHOULD NOT conflict with those in the earlier DHCPOFFER message to which the client is responding. The server SHOULD NOT check the offered network address at this point. The 'yiaddr' field in the DHCPACK messages is filled in with the selected network address.

    If the selected server is unable to satisfy the DHCPREQUEST message (e.g., the requested network address has been allocated), the server SHOULD respond with a DHCPNAK message.

    A server MAY choose to mark addresses offered to clients in DHCPOFFER messages as unavailable. The server SHOULD mark an address offered to a client in a DHCPOFFER message as available if the server receives no DHCPREQUEST message from that client.

    5. The client receives the DHCPACK message with configuration parameters. The client SHOULD perform a final check on the parameters (e.g., ARP for allocated network address), and notes the duration of the lease specified in the DHCPACK message. At this point, the client is configured. If the client detects that the address is already in use (e.g., through the use of ARP), the client MUST send a DHCPDECLINE message to the server and restarts the configuration process. The client SHOULD wait a minimum of ten seconds before restarting the configuration process to avoid excessive network traffic in case of looping.Both BOOTP and DHCP servers use UDP port 67 to listen for and receive client request messages. BOOTP and DHCP clients typically reserve UDP port 68 for accepting message replies from either a BOOTP server or DHCP server. If the DHCP client is unable to communicate with the DHCP server from which it obtained its lease, and 87.5 percent of its lease time has expired, it will attempt to contact any available DHCP server by broadcasting DHCPRequest messages. Any DHCP server can respond with a DHCPAck message, renewing the lease, or a DHCPNak message, forcing the DHCP client to initialize and restart the lease process. If the lease expires or a DHCPNak message is received, the DHCP client must immediately discontinue using its current IP address. If this occurs, communication over TCP/IP stops until a new IP address is obtained by the client.