What if target has address assigned by DHCP?
DHCP
clients dynamically connect to DHCP server every time they join the LAN, to
obtain a temporary private IP address and related configuration parameters. The
technical term is that “clients lease IP addresses from the server.”
Each
subnet has one or more DHCP servers. A network device sends a DHCP discovery
requests, without even knowing DHCP server IP address. When a server responds,
the device will issue a DHCP request and obtain its own IP address, as well as
learn about IP address of the DHCP server.
Sys
admin has to configure DHCP server manually with the proper TCP/IP
configuration information. DHCP server will automatically transfer that
information to clients and thus configure the clients without any manual
intervention.
DHCP
is a client-server protocol, similar to ones we have seen before. Here is a
very good summary of messages and the protocol: http://www.tech-faq.com/dhcp-leasing.html
- Valid configuration parameters for all clients on the network.
- Valid IP addresses maintained in a pool for assignment to clients, plus reserved addresses for manual assignment.
- Duration of a lease offered by the server. The lease defines the length of time for which the assigned IP address can be used.
Basic TCP/IP settings that all hosts must have configured
(and thus DHCP server must store and distribute):
·
IP
address
·
Subnet
mask
·
Default
gateway
DHCP server can also configure other options. Some most
commonly used, according to Microsoft tech library:
·
Routers. A
preferred list of IP addresses for routers on the same subnet as DHCP clients.
The client can then contact these routers as needed to forward IP packets
destined for remote hosts.
·
DNS
servers. IP addresses for DNS name servers that DHCP
clients can contact and use to resolve a domain host name query.
·
DNS
domain. Specifies the domain name that DHCP clients
should use when resolving unqualified names during DNS domain name resolution.
·
WINS
node type and WINS server.
Theoretically, there should be one DHCP server per subnet.
(Because DHCP request is sent on the LAN broadcast address). However, it is
possible to have DHCP server that is not on the same subnet (to save resources
– if subnets are small, it is not necessary to have separate DHCP servers).
For not-so-small subnets, it is normal to have at least two
DHCP servers per subnet, for the purpose of fault tolerance.
So in real life, a host often discovers and contacts several
DHCP servers, and then picks one to work with.
How to configure routers to forward DHCP requests to a DHCP server many hops
away:http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch08_:_Configuring_the_DHCP_Server
This is done by inserting the IP address of the router's interface on the DHCP client's network into the forwarded packet. To the DHCP server, the non-blank router IP address field takes precedence over the broadcast address and it uses this value to provide a DHCP address that is meaningful to the client. The DHCP server replies with a broadcast packet, and the router, which has kept track of the initial forwarded request, forwards it back towards the client. You can configure this feature on Cisco devices by using the ip helper-address command on all the interfaces on which DHCP clients reside. Here is a configuration sample that points to a DHCP server with the IP address 192.168.36.25:
interface
FastEthernet 2/1
ip address 192.168.1.30 255.255.255.0
ip helper-address 192.168.36.25
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home