Pages

Tuesday, August 5, 2014

DHCP(Dynamic Host Configuration Protocol) Notes

DHCP
=====
Extension to BOOTP for automatic host configuration
-provides IP addressing, netmask, default gw, bootfile, etc

Broadcasts UDP packets
-source port BOOTPC 68
-Destination port BOOTPS 67

Server should be in the same broadcast domain. When dhcp server and client are not in the same broadcast domain, relays are used.
-dhcp relays must be used otherwise.

IOS supports the following
-DHCP server
-DHCP client
-DHCP proxy (used in PPP interfaces)
. translate IPCP request into DHCP
-DHCP relaying (is configured with ip-helper address)

Server configured using DHCP pools
-each pool has an IP subnet for allocation
-host pools are supported

DHCP Pool Selection
===============
Server may have multiple address pools
Pool is selected based on :
-DHCP client ID (could be any string. )
 . Supplied by windows clients but not Linux
-DHCP hardware address if ID is missing
-Relaying gateway IP address
-Receiving interface IP subnet if no matching pool found and no relay IP address present.

DHCP relaying:
==========
Broadcast can be relayed to unicast destination
-ip helper-address interface commands

In case of DHCP, relaying router inserts interface IP address
-known as “giaddr” or gateway address
-other options could be inserted, eg. Information Option

DHCP server matches pool based on giaddr

DNS
====
IOS has DNS client enabled by default
-configure servers with ip name-server
-broadcast if no server configured
-no ip domain-lookup to disable

IOS can be configured as DNS server
-ip dns server to enable
-ip host for local DNS entries
-ip name-server to relay request

what is alternative of DHCP
An alternative to DHCP (Dynamic Host Configuration Protocol) is the Stateless Address Autoconfiguration (SLAAC) protocol, commonly used with IPv6 networks. While SLAAC and DHCP serve similar purposes of assigning IP addresses to devices on a network, they operate differently. Here's an overview of SLAAC as an alternative to DHCP:

1. **Stateless Address Autoconfiguration (SLAAC)**:
   - SLAAC is a protocol used to automatically configure IPv6 addresses on devices within a network without the need for a central server.
   - In SLAAC, devices generate their own IPv6 addresses based on network prefixes advertised by routers. Routers periodically send Router Advertisement (RA) messages containing network prefix information.
   - Devices use the network prefix information from RA messages to form their IPv6 addresses by combining the prefix with an interface identifier. The interface identifier can be derived from the device's MAC address or generated using other methods.
   - SLAAC does not involve a central server assigning IP addresses or maintaining state information about address leases, making it a stateless protocol.

Advantages of SLAAC compared to DHCP include:

- **Simplicity**: SLAAC eliminates the need for a central DHCP server, simplifying network configuration and management.
- **Efficiency**: SLAAC requires fewer network messages and reduces network traffic compared to DHCP, as there is no need for address assignment or lease renewal negotiations.
- **Scalability**: SLAAC is highly scalable and suitable for large networks with many devices, as address assignment is distributed across routers rather than relying on a central server.

While SLAAC is suitable for automatically configuring IPv6 addresses in many network environments, it does not provide some of the features offered by DHCP, such as assigning additional configuration parameters (e.g., DNS server addresses, domain names, and network settings). In some cases, a combination of SLAAC and DHCPv6 may be used to provide both address assignment and additional configuration options in IPv6 networks.

No comments:

Post a Comment