DHCP (Dynamic Host Configuration Protocol) Oct 2006 Technical Support Div. Tel : 031-739-6800 Mail : support@corecess.com
DHCP Motivations Automatic network configuration for clients No administrator intervention Effective allocation of limited addresses Support for transient/roaming systems
Why BOOTP? 1. What s my IP address? 2. What s my subnet mask? 3. Who s my router? 4. Who s my DNS server? DNS Server File Server 192.168.10.2 192.168.10.3 00:90:a3:01:01:01 00:90:a3:01:01:02 00:90:a3:01:01:03 00:90:a3:01:01:04 Diskless Workstation Router 192.168.10.1 Internet Boot Server 192.168.10.4
BOOTP: Bootstrap Protocol RFC 951 Designed for diskless workstations Supplies static configuration: - IP address - Subnet mask - Router IP address - Name server IP address - Boot image
BOOTP Operation BOOTP Request BOOTP Client(A) BOOTP Server(B) BOOTP Request 67 68 B A BOOTP Reply 가입자 A DHCP Server B A 67 68 BOOTP Reply BOOTP UDP IP
BOOTP PDU Format 0 15 16 31 Opcode (1=Request, 2=Reply) Number of seconds Hardware Type Hardware Length Hop Count XID (Transaction ID) CIADDR (Client IP address) YIADDR (Your IP address) SIADDR (Server IP address) GIADDR (Gateway IP address) Unused CHADDR (Client hardware address) (16 bytes) 300 bytes Server name (64 bytes) Boot file name (128 bytes) Options (up to 64 bytes) 4 bytes
BOOTP Problem DNS Server File Server 192.168.10.2 192.168.10.3 00:90:a3:01:01:01 00:90:a3:01:01:02 00:90:a3:01:01:03 00:90:a3:01:01:04 What is my network configuration? Router 192.168.10.1 I don t know, I ve never seen you here before. New Roaming Client Internet Boot Server 192.168.10.4
BOOTP Limitations Static configuration Does not dynamically allocate IP addresses Manual administrator intervention to add/remove clients
DHCP Evolution DHCP is an extension of Bootstrap Protocol Uses same basic PDU format for backwards compatibility Introduces pool of IP addresses for dynamic assignment Concept of temporary leased addresses
DHCP PDU Format Operation Code Hardware Type Hardware Length Hop Count Number of seconds Transaction ID Client IP address Your IP address Server IP address Gateway IP address Client hardware address (16 bytes) Server name (64 bytes) Boot file name (128 bytes) Options (up to 312 bytes) Flag (1 bit) (15 unused bits) 4 bytes
DHCP PDU Format Broadcast bit is to inform server if client can receive unicast IP PDUs before initializing IP software with real address; otherwise local network broadcast address must be used DHCP PDU has 312 bytes for options versus 64 bytes in BOOTP PDU DHCP messages carried in options portion of the PDU
DHCP Optional Parameters RFC 2132 defines the available DHCP options
DHCP Optional Parameters
DHCP Optional Parameters
DHCP Optional Parameters
DHCP Optional Parameters
DHCP Optional Parameters
DHCP Optional Parameters
DHCP Optional Parameters
DHCP Option 53 : Message Type Number Message Type Description 0x01 DHCP Discover DHCP Client 는부팅이시작되는동안에는 IP Address 를가지고 있지않음. 부팅이되고네트워크가시작되면먼저 IP Address 를 셋팅하여 TCP/IP 를초기화하려는시도를함. 그방법으로써 DHCP Server 를찾는요청을만들어서 Packet 을 Broadcast 함. 이때발생하는 Packet 이 Discover Packet 임. 0x02 DHCP Offer Discover Packet 을받은 DHCP Server 는사용가능한 IP Address 하나를담은 DHCP Offer Packet 을만들고, 역시네트워크 Broadcast 하여전송함. 이때발생하는 Packet 이 DHCP Offer Packet 임. 0x03 DHCP Request DHCP Server 로부터 IP Address 를받은 DHCP Client 가그즉시이 IP Address 를사용할수있는것은아님. DHCP Client 는 Server 로부터할당받은 IP Address 와이 IP Address 를 임대해준 Server 의. IP 를담은 Packet 을만들어서네트워크에다시 Broadcast 를날림.DHCP Server 가여러대있어서 Server 마다 Client 에 게각기다른 IP Address 를발송할수있는상황이있기에이러한작업이 진행되는것임. 이때발생하는 Packet 이 DHCP Request 임. 0x04 DHCP Decline Client에서 DHCP offer를받을경우, 그 IP에대한확인을 arp request을통해네트워크에서해당 IP가사용되고있는지확인함. 만약다른 User가해당 IP를사용중이라 arp request에응답이있다면, DHCP Server에게 DHCP decline이라는메시지를보내다시 IP Address를할당해달라고요청함. 이때발생하는 Packet이 DHCP Decline Packet임.
DHCP Option 53 : Message Type Number Message Type Description 0x05 DHCP ACK DHCP Client 의 Request Broadcast 를받은 DHCP Server 는둘중의 한가지작업을할수있음. 자신이보낸 IP Address 가채택되지않았다면 DHCP Server 는다시 DHCP Lease Table 을유지하고, 자신이보낸 IP 가채택되었다면 IP 임대기간, DNS, Default Gateway, WINS 등의 DHCP 옵션값을담은 " 확인 (Acknowledgment)" Packet 을만들어서최종적으로 Unicast 함. 0x06 DHCP NAK Client가 Request 한 Packet에서 DHCP Server의 Lease Table에있는 IP 를요청할경우 DHCP Server는해당 IP를 Client에게할당할수없기때문에 Client에게 DHCP Nak(Negative acknowledgement) Packet을전달함. 이때발생하는 Packet이 DHCP Nak Packet임. 0x07 DHCP Release Client에서할당받은 IP를 Lease Time이지났거나새로 Lease 할경우가필요할때 DHCP Server에게기존사용 IP를다시 Lease해줄것을요청하는 Packet임. 이경우 IP할당요청과정을처음부터다시시작해야함. 0x08 DHCP Inform OS Windows 2000, XP 등을사용하는 Client에서 DHCP Server에게 Subnet Mask, DNS 등의정보를확인하기위해서보내는 Packet임.
DHCP Client State Diagram
Allocating New Address
Address Renewing Scenario
DHCP Infrastructure Prohibitive/costly to have DHCP server on each physical LAN segment Use relay agents to forward DHCP messages between physical networks
DHCP Security Considerations Hostile environments with open physical access to network Rouge DHCP server on network Denial of service by exhausting address pool Authentication introduced in RFC 3118 but not implemented
DHCP Option 53 : Message Example IP Address 가필요한데 DHCP Server 가누구야? DHCP Discover a. DHCP Discover is broadcast DHCP Server 응! 내가 DHCP Sever 야! 나한테요청해 DHCP Offer b. DHCP Offer is broadcast DHCP Server
DHCP Option 53 : Message Example 알았어! IP Address 좀할당해줘 ~~~ DHCP Request c. DHCP Request is broadcast DHCP Server 그래너는 10.1.1.1 IP Address 를사용해 DHCP Ack d. DHCP Ack is unicast DHCP Server
DHCP Option 53 : Message Example 내가사용하는 Subnet Mask, DNS 가뭐야? 누가좀알려줘 ~~ DHCP Inform a. DHCP Inform is broadcast DHCP Server 네가사용하는 DNS 는 168.126.63.1 이야알았지 DHCP Ack b. DHCP Ack is unicast DHCP Server
DHCP Option 53 : Message Example UDP Src=0.0.0.0 sport=68 Dest=255.255.255.255 dport=67 Opcode Hardware Type Hardware Length HOPS XID (Transaction ID Number) SECS (Seconds Since Boot) FLAGS CIADDR (Client internet Address) YIADDR (Your Internet Address) SIADDR (Server Internet Address) GIADDR (Gateway Internet Address) CHADDR (Client Hardware Address(16bytes) 192 octets of 0's. BOOTP legacy DHCP option 53: DHCP Discover DHCP option 50: 10.1.1.2 requested DHCP Discover a. DHCP Discover is broadcast DHCP Server
DHCP Option 53 : Message Example UDP Src=10.1.1.254 sport=67 Dest=255.255.255.255 dport=68 Opcode Hardware Type Hardware Length HOPS XID (Transaction ID Number) SECS (Seconds Since Boot) FLAGS CIADDR (Client internet Address) YIADDR (Your Internet Address) SIADDR (Server Internet Address) GIADDR (Gateway Internet Address) CHADDR (Client Hardware Address(16bytes) 192 octets of 0's. BOOTP legacy DHCP option 53: DHCP Offer DHCP option 1: 255.255.255.0 subnet mask DHCP option 3: 10.1.1.254 router DHCP option 51: 1 day IP lease time DHCP option 54: 10.1.1.254 DHCP server DHCP Offer b. DHCP Offer is broadcast DHCP Server
DHCP Option 53 : Message Example UDP Src=0.0.0.0 sport=68 Dest=255.255.255.255 dport=67 Opcode Hardware Type Hardware Length HOPS XID (Transaction ID Number) SECS (Seconds Since Boot) FLAGS CIADDR (Client internet Address) YIADDR (Your Internet Address) SIADDR (Server Internet Address) GIADDR (Gateway Internet Address) CHADDR (Client Hardware Address(16bytes) 192 octets of 0's. BOOTP legacy DHCP option 53: DHCP Request DHCP option 50: 10.1.1.2 requested DHCP option 54: 10.1.1.254 DHCP server DHCP Request c. DHCP Request is broadcast DHCP Server
DHCP Option 53 : Message Example UDP Src=10.1.1.254 sport=67 Dest=255.255.255.255 dport=68 Opcode Hardware Type Hardware Length HOPS XID (Transaction ID Number) SECS (Seconds Since Boot) FLAGS CIADDR (Client internet Address) YIADDR (Your Internet Address) SIADDR (Server Internet Address) GIADDR (Gateway Internet Address) CHADDR (Client Hardware Address(16bytes) 192 octets of 0's. BOOTP legacy DHCP option 53: DHCP Ack DHCP option 1: 255.255.255.0 subnet mask DHCP option 3: 10.1.1.254 router DHCP option 51: 1 day IP lease time DHCP option 54: 10.1.1.254 DHCP server DHCP Ack d. DHCP Ack is unicast DHCP Server
Thank You! Your success is corecess www.corecess.com