1 / 24

DHCP

DHCP. 2000 년 2 학기 이철 (200050649). 목 차. 1. Reconfiguration of IP 2. RARP 3. BOOTP 4. DHCP 개요 5. DHCP PACKET 6. DHCP 동작 원리 7. DHCP And Domain Names. Reconfiguration of IP. Reconfiguration of IP address 필요성 Client PC 가 다른 segment 로 이동 Network 의 구성이 변동 사용자의 임의 변경 종류

afric
Download Presentation

DHCP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DHCP 2000년 2학기 이철(200050649) chlee@cs.chonbuk.ac.kr

  2. 목 차 • 1. Reconfiguration of IP • 2. RARP • 3. BOOTP • 4. DHCP 개요 • 5. DHCP PACKET • 6. DHCP 동작 원리 • 7. DHCP And Domain Names chlee@cs.chonbuk.ac.kr

  3. Reconfiguration of IP • Reconfiguration of IP address • 필요성 • Client PC가 다른 segment로 이동 • Network의 구성이 변동 • 사용자의 임의 변경 • 종류 • Manual configuration • Automated configuration chlee@cs.chonbuk.ac.kr

  4. Reconfiguration of IP(cont..) • Drawbacks of manual configuration • A lot of work • Very error-prone • Every host gets the correct network number • No tow hosts receive the same IP address chlee@cs.chonbuk.ac.kr

  5. Reconfiguration of IP(cont..) • Types of automated configuration • RARP • BOOTP • DHCP chlee@cs.chonbuk.ac.kr

  6. RARP • RARP(Reverse Address Resolution protocol) • Physical network address – identifying inforamtion • Diskless host • Broadcast(local) • And obtain its IP address from a server • Server reply back directly • Adapted from the ARP protocol & use same message format • Network must contain at least one RARP server chlee@cs.chonbuk.ac.kr

  7. ethernet DA 6 hardware type 2 protocol type 2 hard size 1 ethernet SA 6 protocol size 1 operation 2 frame type 2 sender ethernet addr. 6 sender IP addr. 4 target ethernet addr. 6 target IP addr. 4 ethernet header 28 bytes ARP request/reply chlee@cs.chonbuk.ac.kr

  8. RARP(cont..) • The need for an alternative to RARP • Three drawbacks of RARP • It requires Direct access to the network H/W •  application programmer cannot build a server • Small piece of information • 4-octet IP address • Use a H/W address • Cannot be used on network that dynamically assign H/W addresses chlee@cs.chonbuk.ac.kr

  9. BOOTP • BOOTP(BOOTstrap Protocol) • diskless system이 boot시 IP를 포함한 system configuration을 설정하는 방법 • UDP와 TFTP를 이용 • 최초 client가 server로 request시 • link layer broadcast • IP header내의 source IP address = 0.0.0.0, destination IP address = 255.255.255.255로 set • BOOTP port number (in UDP) • client port : 67 • server port : 68 • client에 필요한 subnet mask, default router, DNS 등은 server port 69번으로 TFTP를 통해 client로 download chlee@cs.chonbuk.ac.kr

  10. IP header 20 bytes 300 bytes Opcode 1 byte UDP header 8 bytes harware type 1byte hardware address length 1 byte BOOTP request/reply 300 bytes hop count 1 byte transaction ID 4 bytes UDP datagram IP datagram number of seconds 2 bytes unused 2 bytes client IP address 4 bytes your IP address 4 bytes server IP address 4 bytes gateway IP address 4 bytes client hardware address 16 bytes server hostname 64 bytes boot filename 128 bytes vendor specific information 64 bytes chlee@cs.chonbuk.ac.kr

  11. - Opcode: 1=request, 2=reply - hardware type: 1=ethernet - hardware address length: 6=ethernet - hop count: client에서 0으로 set(최초 = 0) - transaction ID: random unique number. client set, server return. Client는request=response확인 - number of second: client가 bootstrap을 시도한 시간을 set(최초=0) - client IP address: client가 자기자신의 IP address 를 알면 set, 모르면0.0.0.0로 set - your IP address: client IP address가 0이면 server가 IP address를 채운다. - server IP address: server에 의해 채워진다. - gateway IP address: proxy server를 사용할 경우 proxy server의 router IP address를 지정 - client hardware address: client는 반드시 set. ethernet header의 MAC address와 동일 - boot filename: client는 일반적인 boot filename 기술. server는 reply시 boot file의 실제경로 제공 - vendor specific information: 추가적인 information chlee@cs.chonbuk.ac.kr

  12. DHCP 개요 • The need for dynamic configuration • RARP, BOOTP • Designed for static environment • Configuration continues unchanged for weeks. • DHCP(Dynamic Host Configuration Protocol) extends BOOTP in two ways • Allows a computer to acquire all the configuration information it needs in a single message • Allows a computer to obtain an IP address quickly and dynamically chlee@cs.chonbuk.ac.kr

  13. DHCP 개요(cont..) • Three types of address assignment • Manual configuration(in BOOTP) • Automatic configuration(in BOOTP) • Server can assign a permanent address • Dynamic configuration • Server loans an address to a computer for a limited time chlee@cs.chonbuk.ac.kr

  14. chlee@cs.chonbuk.ac.kr

  15. DHCP Packet • BOOTP 와 호환이 가능 • DHCP 서버는 BOOTP 요청에 응답이 가능 • Flag • 서버가 요청에 응답할 경우 Broadcast인지 Unicast인지를 결정 chlee@cs.chonbuk.ac.kr

  16. Type Field Corresponding DHCP Message Type 1 DHCPDISCOVER 2 DHCPOFFER 3 DHCPREQUEST 4 DHCPDECLINE 5 DHCPACK 6 DHCPNACK 7 DHCPRELEASE DHCP Packet(cont..) • Option • DHCP 메시지 타입인 경우 chlee@cs.chonbuk.ac.kr

  17. DHCP Packet(cont..) • Option(cont..) • 추가적인 Option • Class identifier : 정확한 parameter를 선택하기 위해 client가 server로 전송 • Client identifier : Client의 lease와 bind정보를 하드웨어 Type이나 하드웨어 주소로 확인하지 않고 이 클라이언트 identifier로 확인 chlee@cs.chonbuk.ac.kr

  18. DHCP 동작원리 • 4단계 프로세스 • 1. IP lease 탐색(Discover) • TCP/IP초기화  Broadcast : Discover • 67/UDP사용, DHCPDISCOVER • 2. IP lease 제공(Offer) • 모든 서버가 제공 • IP, subnet mask, server IP를 기본 gateway값으로 전송 • 68/UDP사용, DHCPOFFER chlee@cs.chonbuk.ac.kr

  19. chlee@cs.chonbuk.ac.kr

  20. DHCP 동작원리(cont..) • 4단계 프로세스(Cont..) • 3. IP lease의 선택(Selection) • IP 선택 후 lease해 줄 것을 요청(Request) – Broadcast • 선택 시 서버가 DNS 설정이 되어 있다면 서버에게 DNS를 요구 • DHCPREQUEST • 4. IP lease의 긍정 응답(Acknowledge) • IP를 제공한 서버는 Broadcast로 긍정 응답 • 이외의 서버는 제공을 철회 • DHCPACK chlee@cs.chonbuk.ac.kr

  21. chlee@cs.chonbuk.ac.kr

  22. DHCP 동작원리(cont..) • IP lease의 갱신(Reacquisition) • 3가지 타입 • Renewing(50%), Rebinding(87.5%), Expiration • Bound 될 때 타이머가 가동 • Renewing • Client : 해당 서버에 DHCPREQUEST를 직접 전송 • Server : DHCPACK, 새로운 lease 기간 & TCP/IP 구성 parameter를 전송 • Rebinding • Client : DHCPREQUEST – Broadcast • Server : DHCPACK/DHCPNACK chlee@cs.chonbuk.ac.kr

  23. chlee@cs.chonbuk.ac.kr

  24. DHCP And Domain Names • A host get name at three possibilities • 1. The host does not receive a name • 2. The host is automatically assigned a name along with an IP address • 3. The host can be assigned a permanent name that remains unchanged • Coordination between DHCP and DNS • REF> IETF RFC2026, “Interaction between DHCP and DNS” chlee@cs.chonbuk.ac.kr

More Related