dhcp for multi-hop wireless ad-hoc networks presented by william list
TRANSCRIPT
DHCP for Multi-hop Wireless Ad-Hoc Networks
Presented by William List
Problem StatementDHCP is designed to work on the wired internet with bridges, switches and routersDHCP messages sent from a client are broadcast, not unicastNodes in an ad hoc network need to know what address to use!
DHCP Basics (RFC 2131)When a client boots, it attempts to obtain a usable IP address
A DHCPDISCOVER message is broadcast to locate available DHCP serversServer responds with a DHCPOFFER message containing the new addressDHCPREQUEST and DHCPACK confirm the assignment
DHCP RelaysA DHCP relay will forward DHCP messages back and forth between a client and serverThe relay knows the address of the DHCP serverDHCP packets allow for only one relay (gateway)
DHCP Packet Format0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| op (1) | htype (1) | hlen (1) | hops (1) |+---------------+---------------+---------------+---------------+ | xid (4) |+-------------------------------+-------------------------------+| secs (2) | flags (2) | +-------------------------------+-------------------------------+ | ciaddr (4) |+---------------------------------------------------------------+| yiaddr (4) |+---------------------------------------------------------------+| siaddr (4) |+---------------------------------------------------------------+ | giaddr (4) | +---------------------------------------------------------------+ | | | chaddr (16) | | | | |+---------------------------------------------------------------+
DHCP Packet Fieldsciaddr : The client’s previous IP addressyiaddr : The address offered by the servergiaddr : Relay addresschaddr : Client’s hardware address
DHCP Message ExchangeDHCPDISCOVER
Hello!? I’d like an IP address please!
DHCPOFFERHow about 192.168.0.1?
DHCPREQUESTSounds good.
DHCPACKGlad to hear it. Have fun!
Client Server
Discover
Offer
Request
ACK
Using a RelayClient
Server
giaddr: 192.168.0.2
0.0.0.0
Relay
192.168.0.1
The relay can be another host or a router
SolutionMake every node in the network run the DHCP relay once configuredInclude the DHCP server IP address in AP beaconsUnicast messages towards DHCP server rather than broadcasting
AssumptionsEvery node in the network can reach the Access Point
Either directly or through multiple hops
DCHP server(s) assigns IP addressesAllows for network monitoring and accounting
Should be able to run over any ad-hoc routing protocol
Network Model
DHCP Server
192.168.0.128
192.168.0.1
192.168.0.129
192.168.0.130
0.0.0.0
Client NodeWaits for a beacon from an APOnce the IP address of the DHCP server is obtained:
Add an entry in routing table specifying same next-hop as for the associated APGenerate a DHCPREQUEST messageUnicast towards DHCP server
Neighboring NodesNext hop towards DHCP server receives the DHCP request from sourceThe giaddr field is filled in with the node’s IP addressPacket is forwarded to DHCP server
Intermediate NodesNodes between the designated relay node and the DHCP server
Are unaware of the DHCP messages and simply forwards packets back and forth
DHCP ServerAccess Point must know the IP address of the DHCP server (for beacons)DHCP server uses giaddr as the destination for responsesSource address must remain 0.0.0.0
IP masquerading and NAT complicatedBest if ad-hoc nodes are on the same subnet as the DHCP server
Alternate ModelClient broadcasts DHCP messages
Do not need to wait for a beacon
Multiple neighbors serve as relaysClient might receive multiple responses from the same serverClient will select best offerRelays unicast to the DHCP server
Other AlternativesThe Access Point knows the location of the DHCP server
Client could unicast DHCP messages to AP
IssuesDHCP server probes for used addresses
ICMP ping packets will be forwarded by nodes in the ad hoc networkWhat if the packet is dropped somewhere?
Broadcasting DHCP messages introduces added network traffic
Address assignment is only done once, unless the node is highly mobile
ConclusionDHCP fundamentally works as-is in a multi-hop environmentFuture Work
Run more scenariosAP could broadcast ping packets several times for the DHCP server, rather than just onceIntegration with a Internet gateway