View
221
Download
0
Category
Preview:
Citation preview
chlee@cs.chonbuk.ac.kr 1
DHCPDHCP
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 IPReconfiguration of IP Reconfiguration of IP address
필요성 Client PC 가 다른 segment 로 이동 Network 의 구성이 변동 사용자의 임의 변경
종류 Manual configuration Automated configuration
chlee@cs.chonbuk.ac.kr 4
Reconfiguration of IP(cont..)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..)Reconfiguration of IP(cont..) Types of automated configuration
RARP BOOTP DHCP
chlee@cs.chonbuk.ac.kr 6
RARPRARP 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 DA6
ethernet SA6
frame type2
ethernet headerhardwar
etype
2
protocol
type 2
hardsize
1
protocol
size 1
operation 2
senderethernet addr.
6
senderIP addr.
4
targetethernet
addr.6
target IPaddr.
4
28 bytes ARP request/reply
chlee@cs.chonbuk.ac.kr 8
RARP(cont..)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
BOOTPBOOTP 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 I
P 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
UDP header 8 bytes
BOOTP request/reply 300 bytes
UDP datagram
IP datagram
300 bytes
Opcode 1 byte
harware type 1byte
hardware address length 1 byte
hop count 1 byte
transaction ID 4 bytes
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 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 DHCP 개요개요 (cont..)(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 PacketDHCP Packet BOOTP 와 호환이 가능
DHCP 서버는 BOOTP 요청에 응답이 가능 Flag
서버가 요청에 응답할 경우 Broadcast 인지 Unicast 인지를 결정
chlee@cs.chonbuk.ac.kr 16
DHCP Packet(cont..)DHCP Packet(cont..) Option
DHCP 메시지 타입인 경우
Type Field Corresponding DHCP Message Type
1 DHCPDISCOVER
2 DHCPOFFER
3 DHCPREQUEST
4 DHCPDECLINE
5 DHCPACK
6 DHCPNACK
7 DHCPRELEASE
chlee@cs.chonbuk.ac.kr 17
DHCP Packet(cont..)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 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 DHCP 동작원리동작원리 (cont..)(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 DHCP 동작원리동작원리 (cont..)(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 NamesDHCP 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”
Recommended