2008. 9. 4. 18:18

DHCP(Dynamic Host Configuration Protocol) Server

 

 

 

               DHCP(Dynamic Host Configuration Protocol) Server

 

 

 

 

- Private Addr, DHCP

- IPv6

IP 부족 현상에 대한 보상책

ㅁ 사설 IP(Private Addr.)

DHCP

IPv6

 

DHCP

IP 부족 현상으로 효율적인 IP 할당을 위해서 사용되었지만 현재는 IP의 효율적 관리를 위해서 주로 쓰인다.

 

 

1. DHCP Overview

___________________

 

DHCP enables you to provide network-related information to client systems through

a centrally located server system.

 

DHCP evolved from the bootstrap protocol(BOOTP). DHCP provides the following

enhanced functionality:

 

(1). Network Configuration for client        //information for client

- IP Address

- Boot Server IP Adress

- DNS Server, router, NTP Server's IP Address

 

(2). Lease Periods     // 사용 기간

(3). Routers can be configured to act as a BOOTP relay agent.

(4). Support is available for clients that need to boot over a network, effectively

     replacing the need for using the Reverse Address Resolution Protocol (RARP)

     and the bootparams file.

 

 

[참고] DHCP (Dynamic Host Configuration Protocol)

 

DHCP[디에이치씨피] 네트웍 관리자들이 조직 내의 네트웍 상에서 IP 주소를 중앙에서

관리하고 할당해줄 수 있도록 해주는 프로토콜이다. 인터넷의 TCP/IP 프로토콜에서는, 각

컴퓨터들이 고유한 IP 주소를 가져야만 인터넷에 접속할 수 있다. 조직에서 컴퓨터 사용

자들이 인터넷에 접속할 때, IP 주소는 각 컴퓨터에 반드시 할당되어야만 한다. DHCP를

사용하지 않는 경우에는, 각 컴퓨터마다 IP 주소가 수작업으로 입력되어야만 하며, 만약

컴퓨터가 네트웍의 다른 부분에 속한 장소로 이동되면 IP 주소를 새로이 입력해야 한다.

DHCP는 네트웍 관리자가 중앙에서 IP 주소를 관리하고 할당하며, 컴퓨터가 네트웍의 다른

장소에 접속되었을 때 자동으로 새로운 IP 주소를 보내줄 수 있게 해준다.

 

DHCP는 주어진 IP 주소가 일정한 시간동안만 그 컴퓨터에 유효하도록 하는 "임대" 개념을

사용한다. 임대시간은 사용자가 특정한 장소에서 얼마나 오랫동안 인터넷 접속이 필요할

것인지에 따라 달라질 수 있다. DHCP는 사용자들이 자주 바뀌는 학교와 같은 환경에서

특히 유용하다. DHCP는 사용 가능한 IP 주소의 개수보다 더 많은 컴퓨터가 있는 경우에도

IP 주소의 임대시간을 짧게 함으로써 네트웍을 동적으로 재구성할 수 있다.

 

DHCP는 영구적인 IP 주소를 필요로 하는 웹서버에 대해서는 정적인 주소를 제공한다.

 

DHCP는 네트웍 IP 관리 프로토콜인 BOOTP의 대안으로 사용된다. DHCP가 더욱 진보된 프로

토콜이지만, 두 개의 프로토콜 모두 일반적으로 사용된다. 어떤 조직에서는 두 개의 프로

토콜 모두를 사용하지만, 동일한 조직에서 그것을 언제, 어떻게 사용할지를 이해하는 것이

무엇보다 중요하다. 윈도우NT와 같은 몇몇 운영체계에는 DHCP 서버가 딸려 나온다. DHCP

또는 BOOTP 클라이언트는 네트웍이 구성될 수 있도록 각 컴퓨터에 위치하는 프로그램이다.

 

 

[참고] BOOTP (Bootstrap Protocol, 초기 적재 통신 규약)

 

BOOTP는 네트웍 사용자가 자동으로 구성되고(IP 주소를 받게), 사용자의 간여 없이도 부

트되는 운영체계를 가지고 있게 해주는 프로토콜이다. X 터미널 등과 같이 하드디스크를

갖지 않은 장치의 설정 정보를 자동적으로 할당, 관리하기 위해서 개발되었다. 네트웍 관

리자에 의해 관리되는 BOOTP 서버는, 일정 시간동안 IP 주소를 자동으로 할당한다.

 

BOOTP는 좀더 진보된 네트웍 관리 프로토콜인 DHCP의 기반이 된다. BOOTP는 공식적으로는

RFC 951에 설명되어 있다.

 

 

 

 

 

2. DHCP Process Principle

______________________________

 

 

 

(1). DHCP Server & DHCP Client Process

 

---------------------------------------------

    |                             |

DHCP Server                   DHCP Client

 

 

<DHCP Server>             <DHCP Client>

in.dhcpd(67)               dhcpagent(68)

     |       DHCPDISCOVER        |

     | <-----------------------  |

     |                           |

     |     <-ARP request->       |

     |                           |

     |       DHCPOFFER           |

     |  -----------------------> |

     |       DHCPREQUEST         |

     |  <----------------------- |

     |       DHCPACK             |

     |  -----------------------> |

     |                           |

 

[참고] VMWare DHCP Server 동작시 IP 할당

 

DHCP 클라이언트가 부팅할때 DHCP 서버와 연동하는 동작과정을 살펴보면 다음과 같다.

(a). DHCP 클라이언트는 부팅하면서 현재 네트워크 안에 DHCP 서버가 있는지를 찾기 위해

     DHCPDISCOVER 메시지를 같은 서브넷에 있는 모든 시스템으로 브로드캐스트한다.

(b). DHCP 클라이언트로 부터 메시지를 받은 서버에서는 ARP 브로드캐스팅을 통해서 클라

     이언트에 제공할 IP주소를 선택한 후 네트워크 서비스 정보를 담은 DHCPOFFER 메시지

     를 전송한다.

(c). 서버로 부터 DHCPOFFER 메시지를 받은 클라이언트는 메시지에 포함되어 있는 IP 주소

     와 서비스 정보를 이용하여 네트워크 설정을 한 후, DHCP 서버에 사용 의사를 알리는

     DHCPREQUEST 메시지를 보내게 된다.

(d). DHCPREQUEST 메시지를 수신한 서버는 DHCPACK 메시지를 통해 사용 허가를 해주게 되

     고, 클라이언트는 ping 명령어를 이용하여 현재 할당받은 IP 주소를 이미 사용하고

     있는 다른 시스템이 있는지 확인한 후에 네트워크 설정을 마무리하게 된다.

 

 

 

(2). DHCP Server & BOOTP Relay & DHCP Client

 

DHCP Server ------------ Router--------------------

                                  |            |

                             BOOTP Relay  DHCP Client

                             Server

 

 

<DHCP Server>         <BOOTP Relay>          <DHCP Client>

     |                      |     DHCPDISCOVER     |

     |                      | <------------------- |

     |    DHCPDISCOVER      |                      |

     | <------------------- |                      |

     |    DHCPOFFER         |                      |

     | -------------------> | -------------------> |

     |                      |     DHCPREQUEST      |

     | <------------------- | <------------------- |

     |    DHCPACK           |                      |

     | -------------------> | -------------------> |

     |                      |                      |

 

[참고] 일반 가정에서의 DHCP 서버가 존재하지 않은 이유

 

DHCP 서버에 BOOT Relay 서버가 존재하는 경우에 동작 방식도 없는 경우와 흡사하게 동작

한다. 중간에 BOOT Relay 서버가 DHCP 서버의 역할을 중계하게 된다.

 

 

 

 

 

3. DHCP Server/Client Function

__________________________________

 

(1). DHCP Client Function

 

- Sufficient information to properly configure the network interface

        - IP Address

        - Netmask

 

- Parameters needed by system-level and application-level software

        - Boot Server Information

        - Router Address

        - Configuration Server

 

 

(2). dhcpagent process

- Constructs and sends packets

- Listens for responses from servers

- Caches the configuration information received

- Releases or renews leases

- Configures the interfaces with sufficient information to enable

  communications with the network through the interface

 

 

(3). DHCP Server Function

 

- Corresponding Information Sending

- "2. DHCP Process Principle Reference"

 

 

 

 

 

4. DHCP Startup Script

___________________________

 

부팅시에 /etc/rd3.d/S34dhcp 시작스크립트에 의해서 in.dhcpd 데몬이 뜨게 된다. 이 경우

/etc/inet/dhcpsvc.conf 설정파일이 있어야만 in.dhcpd 데몬이 뜨게 된다.

 

- /etc/init.d/dhcp stop/start      (in.dhcpd)

- /etc/init.d/dhcpagent stop/start (dhcpagent)

 

 

 

 

 

5. DHCP Client Configuration

________________________________

 

 

# man ifconfig

.....

     dhcp  This option is an alias for option auto-dhcp

 

     auto-dhcp

           Use DHCP to automatically acquire an address for  this

           interface.  This  option  has  a completely equivalent

           alias called dhcp.

 

           primary

                 Defines the interface as the primary. The inter-

                 face  is  defined  as  the preferred one for the

                 delivery of client-wide configuration data. Only

                 one  interface  can  be the primary at any given

                 time.  If  another  interface  is   subsequently

                 selected  as the primary, it replaces the previ-

                 ous one. Nominating an interface as the  primary

                 one  will  not  have  much significance once the

                 client work station has booted, as many applica-

                 tions will already have started and been config-

                 ured with data read from  the  previous  primary

                 interface.

 

           drop  Remove the specified interface  from  DHCP  con-

                 trol.  Additionally,  set the IP address to zero

                 and mark the interface as "down".

 

           extend

                 Attempt to extend the lease on  the  interface's

                 IPv4 address. This is not required, as the agent

                 will automatically extend the lease well  before

                 it expires

 

           inform

                 Obtain  network  configuration  parameters  from

                 DHCP without obtaining a lease on an IP address.

                 This is useful in situations where an IP address

                 is obtained through mechanisms other than DHCP.

 

           ping  Check whether the interface given is under  DHCP

                 control,  which  means  that  the  interface  is

                 managed by the DHCP agent and is  working  prop-

                 erly.  An  exit  status of 0 means success. This

                 subcommand has no meaning when the named  inter-

                 face represents more than one interface.

 

           release

                 Relinquish the IPv4 address  on  the  interface,

                 and mark the interface as "down."

 

           start Start DHCP on the interface.

 

           status

                 Display the DHCP  configuration  status  of  the

                 interface.

 

DHCP 클라이언트를 설정하는 방법은 (a)ifconfig 명령어를 사용하여 현재 수행하는 방법

과 (b)/etc/dhcp.XXn 파일을 사용하여 부팅시에 적정되도록 할 수 있다. /etc/dhcp.XXn

파일의 내용은 필요가 없다. 파일의 이름만 존재하면 된다.

 

(1). DHCP 클라이언트 현재 설정

Current Setting

# ifconfig hme0 dhcp

 

 

(2). DHCP 클라이언트 부팅시에 적용 설정

Configuration at Boot

# touch /etc/dhcp.hme0 (/etc/hostname.hme0)

# reboot

 

[참고] ifconfig hme0 dhcp CMD

# ifconfig hme0 dhcp start

# ifconfig hme0 dhcp inform

# ifconfig hme0 dhcp extend

# ifconfig hme0 dhcp release (> ipconfig /renew, # ifconfig hme0 dhcp)

# ifconfig hme0 dhcp drop (/etc/dhcp/hme0.dhc)

# ifconfig hme0 dhcp status

 

(ifconfig hme0 dhcp start)

# ifconfig pcn0 dhcp

# ifconfig pcn0 dhcp start

 

(ifconfig hme0 dhcp inform)

Obtain  network  configuration  parameters  from

DHCP without obtaining a lease on an IP address.

This is useful in situations where an IP address

is obtained through mechanisms other than DHCP.

 

(ifconfig hme0 dhcp extend)

Attempt to extend the lease on  the  interface's

IPv4 address. This is not required, as the agent

will automatically extend the lease well  before

it expires

 

<DHCP Server>             <DHCP Client>

in.dhcpd(67)               dhcpagent(68)

     |                           |

     |    IP(Lease Time:5)     |

     | ----------------------->  | ---

     |                           |  A

     |                           |  |

     |         Extend            |  | 5

     | <-----------------------  |  |  ---

     |                           |  V   A

     |                           | ---  |

     |                           |      | 5

     |                           |      |

     |                           |      V

     |                           |     ---

     |                           |

 

(ifconfig hme0 dhcp release)

c:\> ipconfig /renew

# ifconfig pcn0 dhcp release

# ifconfig pcn0 dhcp start

 

(ifconfig hme0 dhcp drop)

# ifconfig pcn0 dhcp drop

   (현재 IP 설정) ------> /etc/dhcp/hme0.dhc (현재 IP 설정)

 

DHCP Client 부팅 -----> DHCP Server IP 정보 받지 않음

                        /etc/dhcp/hme0.dhc 파일의 설정을 통해 설정

 

(ifconfig hme0 dhcp status)

# ifconfig pcn0 dhcp status

 

 

 

 

 

6. DHCP Server

____________________

 

DHCP 서버가 제공해 주는 정보는 크게 2가지로 구분할 수 있다. (a)IP에 관련한 정보나

(b)시스템 레벨이나 프로그램 레벨에서 필요한 부가적인 인자 값들이다.

 

- IP에 관련한 설정 정보 (/var/dhcp/dhcp_network)

- 부가적인 설정 정보    (/var/dhcp/dhcptab)

 

 

(1). DHCP Server Database File

- dhcp_network(Network Number, IP)           // ip와 대역

- dhcptab(Macro, Symbol)                             //부가정보

 

 

 

(2). DHCP Configuration Tools

- dhcpconfig (CLI)

       Solaris 8 버전의 , Solaris 9 버전의 - 설정 방법 다름

- dhcpmgr (GUI)

- pntadm, dhtadm(CLI)

 

[참고] pntadm / dhtadm

pntadm (p:dhcp, nt:network)-> /var/dhcp/dhcp_network

dhtadm (dht:dhcptab       )-> /var/dhcp/dhcptab

 

 

[참고] DHCP Server Unconfiguration

# /etc/init.d/dhcp stop

# dhcpconfig -U -x -h (매뉴얼 페이지 참조, dhcpconfig(1))

 

 

[참고] 현재 설정 확인

# ls -ld /var/dhcp

[ ]  /var/dhcp 디렉토리가 존재하는가?

[ ]  dhcp_network, dhcptab 파일이 존재하는가?

 

 

 

(3). DHCP Server Setting

 

# dhcpmgr &

or

# /usr/sadm/admin/bin/dhcpmgr &

 

- Network Address Admin(pcn0: 172.16.8.1XX)

- Network Address Admin(pcn1: 192.168.10.1XX)

- Network Virtual Interface Add

      /etc/hosts

      /etc/hostname.hme0:1

      /etc/netmasks

 

 

(아이피 할당 )

 

IP 대역 : 172.16.8.XXX ~ 172.16.8.YYY

 

---------

XXX   YYY

---------

100 ~ 104

105 ~ 109

110 ~ 114

115 ~ 119

120 ~ 124

125 ~ 129

130 ~ 134

135 ~ 139

140 ~ 144

145 ~ 149

150 ~ 154

155 ~ 159

160 ~ 164

165 ~ 169

170 ~ 174

175 ~ 179

180 ~ 184

185 ~ 189

190 ~ 195

---------

 

 

DHCP 서버 설정

# dhcpmgr &

--------------------------------------------------------------------------------

서버 설정                                                                    [x] Conigure as DHCP server

 

DHCP Configuration Wizard

        Select data storage format                   [x] Text files

        Configure Data store                                 Path: /var/dhcp(기본값)

        Select hosts nameservice                             /etc/hosts

        Specify lease policy                                 Length of Lease [1] days(기본값)

        Specify DNS domain and servers        DNS Domain: [example.com]

        Specify network address and                  Network Address: [172.16.0.0] (기본값)

               subnetmask                                                   Subnet Mask: [255.255.0.0] (기본값)

        Specify network type and router              Network Type: Local-Area (기본값)

                                                                                   Routing: Use router: 172.16.0.1

        Specify NIS domain and servers        <Next>

        Specify NIS+ domain and servers              <Next>

 

Address Wizard

        Specify the number of IP addresses    Number of IP Addresses: [5]

                                                                                   Commnet: [DHCP Test]

        Specify the server and starting              Managed by Server: [solarisXXX]

               IP address                                                   Starting IP Address: [172.16.8.1XX]

                                                                                   [x] Generate Client Names

                                                                                           Root Name: solarisXXX

        Confirm the IP address list                  <Next>

        Enter client configuration                    <Next>

               information

        Select the lease type                                Lease Type: [x] Dynamic (기본값)

        Review                                                              <Finish>

--------------------------------------------------------------------------------

 

 

 

(4). DHCP Configuration Files

 

Compare to dhcpmgr DB &  /var/dhcp/DB

 

 

 

 

 

7. DHCP Server & Client Practice

___________________________________

 

 

[EX1] DHCP Server / Client Packet Capturing

(1). DHCP Server Configuration

(2). DHCP Client Configuration

 

(DHCP Server)

# /usr/sadm/admin/bin/dhcpmgr &

 

# snoop -d hme0 -o /test/dhcp.pkt

 

(DHCP Client)

# ifconfig hme0 dhcp

# ifconfig -a

 

(DHCP Server)

# snoop -i /tmp/dhcp.pkt | more

# snoop -i /tmp/dhcp.pkt -v > /tmp/dhcp.txt (패킷을 선택한다.)

# vi /tmp/dhcp.txt

 

 

DHCP Server / Client Packet Analyze

------------------------------------------------------------------

ETHER:  ----- Ether Header -----

ETHER:

ETHER:  Packet 133 arrived at 15:56:10.37

ETHER:  Packet size = 342 bytes

ETHER:  Destination = ff:ff:ff:ff:ff:ff, (broadcast)

ETHER:  Source      = 0:c:29:4e:dd:b7,

ETHER:  Ethertype = 0800 (IP)

ETHER:

IP:   ----- IP Header -----

IP:

IP:   Version = 4

IP:   Header length = 20 bytes

IP:   Type of service = 0x00

IP:         xxx. .... = 0 (precedence)

IP:         ...0 .... = normal delay

IP:         .... 0... = normal throughput

IP:         .... .0.. = normal reliability

IP:         .... ..0. = not ECN capable transport

IP:         .... ...0 = no ECN congestion experienced

IP:   Total length = 328 bytes

IP:   Identification = 6

IP:   Flags = 0x4

IP:         .1.. .... = do not fragment

IP:         ..0. .... = last fragment

IP:   Fragment offset = 0 bytes

IP:   Time to live = 255 seconds/hops

IP:   Protocol = 17 (UDP)

IP:   Header checksum = 7a9f

IP:   Source address = 0.0.0.0, OLD-BROADCAST

IP:   Destination address = 255.255.255.255, BROADCAST

IP:   No options

IP:

UDP:  ----- UDP Header -----

UDP:

UDP:  Source port = 68

UDP:  Destination port = 67 (BOOTPS)

UDP:  Length = 308

UDP:  Checksum = 4EE4

UDP:

DHCP: ----- Dynamic Host Configuration Protocol -----

DHCP:

DHCP: Hardware address type (htype) =  1 (Ethernet (10Mb))

DHCP: Hardware address length (hlen) = 6 octets

DHCP: Relay agent hops = 0

DHCP: Transaction ID = 0x3953c664

DHCP: Time since boot = 0 seconds

DHCP: Flags = 0x0000

DHCP: Client address (ciaddr) = 0.0.0.0

DHCP: Your client address (yiaddr) = 0.0.0.0

DHCP: Next server address (siaddr) = 0.0.0.0

DHCP: Relay agent address (giaddr) = 0.0.0.0

DHCP: Client hardware address (chaddr) = 00:0C:29:4E:DD:B7

DHCP:

DHCP: ----- (Options) field options -----

DHCP:

DHCP: Message type = DHCPDISCOVER

DHCP: Maximum DHCP Message Size = 1472 bytes

DHCP: IP Address Lease Time = -1 seconds

DHCP: Client Class Identifier = "SUNW.i86pc"

DHCP: Requested Options:

DHCP:    1 (Subnet Mask)

DHCP:    3 (Router)

DHCP:   12 (Client Hostname)

DHCP:   43 (Vendor Specific Options)

 

ETHER:  ----- Ether Header -----

ETHER:

ETHER:  Packet 148 arrived at 15:56:11.39

ETHER:  Packet size = 371 bytes

ETHER:  Destination = 0:c:29:4e:dd:b7,

ETHER:  Source      = 0:c:29:4a:b2:cd,

ETHER:  Ethertype = 0800 (IP)

ETHER:

IP:   ----- IP Header -----

IP:

IP:   Version = 4

IP:   Header length = 20 bytes

IP:   Type of service = 0x00

IP:         xxx. .... = 0 (precedence)

IP:         ...0 .... = normal delay

IP:         .... 0... = normal throughput

IP:         .... .0.. = normal reliability

IP:         .... ..0. = not ECN capable transport

IP:         .... ...0 = no ECN congestion experienced

IP:   Total length = 357 bytes

IP:   Identification = 18293

IP:   Flags = 0x4

IP:         .1.. .... = do not fragment

IP:         ..0. .... = last fragment

IP:   Fragment offset = 0 bytes

IP:   Time to live = 255 seconds/hops

IP:   Protocol = 17 (UDP)

IP:   Header checksum = 9c5a

IP:   Source address = 192.168.10.250, nic2

IP:   Destination address = 192.168.10.109, solaris254-109

IP:   No options

IP:

UDP:  ----- UDP Header -----

UDP:

UDP:  Source port = 67

UDP:  Destination port = 68 (BOOTPC)

UDP:  Length = 337

UDP:  Checksum = 5EE8

UDP:

DHCP: ----- Dynamic Host Configuration Protocol -----

DHCP:

DHCP: Hardware address type (htype) =  1 (Ethernet (10Mb))

DHCP: Hardware address length (hlen) = 6 octets

DHCP: Relay agent hops = 0

DHCP: Transaction ID = 0x3953c664

DHCP: Time since boot = 0 seconds

DHCP: Flags = 0x0000

DHCP: Client address (ciaddr) = 0.0.0.0

DHCP: Your client address (yiaddr) = 192.168.10.109

DHCP: Next server address (siaddr) = 0.0.0.0

DHCP: Relay agent address (giaddr) = 0.0.0.0

DHCP: Client hardware address (chaddr) = 00:0C:29:4E:DD:B7

DHCP:

DHCP: ----- (Options) field options -----

DHCP:

DHCP: Message type = DHCPOFFER

DHCP: DHCP Server Identifier = 192.168.10.250

DHCP: UTC Time Offset = 32400 seconds

DHCP: RFC868 Time Servers at = 172.16.8.254

DHCP: IP Address Lease Time = 86400 seconds

DHCP: DNS Domain Name = example.com

DHCP: DNS Servers at = 172.16.8.254

DHCP: DNS Servers at = 172.16.8.252

DHCP: DNS Servers at = 168.126.63.1

DHCP: Broadcast Address = 192.168.10.255

DHCP: Router at = 192.168.10.2

DHCP: Subnet Mask = 255.255.255.0

DHCP: Client Hostname = solaris254-109

 

ETHER:  ----- Ether Header -----

ETHER:

ETHER:  Packet 163 arrived at 15:56:13.37

ETHER:  Packet size = 342 bytes

ETHER:  Destination = ff:ff:ff:ff:ff:ff, (broadcast)

ETHER:  Source      = 0:c:29:4e:dd:b7,

ETHER:  Ethertype = 0800 (IP)

ETHER:

IP:   ----- IP Header -----

IP:

IP:   Version = 4

IP:   Header length = 20 bytes

IP:   Type of service = 0x00

IP:         xxx. .... = 0 (precedence)

IP:         ...0 .... = normal delay

IP:         .... 0... = normal throughput

IP:         .... .0.. = normal reliability

IP:         .... ..0. = not ECN capable transport

IP:         .... ...0 = no ECN congestion experienced

IP:   Total length = 328 bytes

IP:   Identification = 7

IP:   Flags = 0x4

IP:         .1.. .... = do not fragment

IP:         ..0. .... = last fragment

IP:   Fragment offset = 0 bytes

IP:   Time to live = 255 seconds/hops

IP:   Protocol = 17 (UDP)

IP:   Header checksum = 7a9e

IP:   Source address = 0.0.0.0, OLD-BROADCAST

IP:   Destination address = 255.255.255.255, BROADCAST

IP:   No options

IP:

UDP:  ----- UDP Header -----

UDP:

UDP:  Source port = 68

UDP:  Destination port = 67 (BOOTPS)

UDP:  Length = 308

UDP:  Checksum = 20EF

UDP:

DHCP: ----- Dynamic Host Configuration Protocol -----

DHCP:

DHCP: Hardware address type (htype) =  1 (Ethernet (10Mb))

DHCP: Hardware address length (hlen) = 6 octets

DHCP: Relay agent hops = 0

DHCP: Transaction ID = 0x9aa14ebb

DHCP: Time since boot = 0 seconds

DHCP: Flags = 0x0000

DHCP: Client address (ciaddr) = 0.0.0.0

DHCP: Your client address (yiaddr) = 0.0.0.0

DHCP: Next server address (siaddr) = 0.0.0.0

DHCP: Relay agent address (giaddr) = 0.0.0.0

DHCP: Client hardware address (chaddr) = 00:0C:29:4E:DD:B7

DHCP:

DHCP: ----- (Options) field options -----

DHCP:

DHCP: Message type = DHCPREQUEST

DHCP: IP Address Lease Time = 86400 seconds

DHCP: Maximum DHCP Message Size = 1472 bytes

DHCP: Requested IP Address = 192.168.10.109

DHCP: DHCP Server Identifier = 192.168.10.250

DHCP: Client Class Identifier = "SUNW.i86pc"

DHCP: Requested Options:

DHCP:    1 (Subnet Mask)

DHCP:    3 (Router)

DHCP:   12 (Client Hostname)

DHCP:   43 (Vendor Specific Options)

 

ETHER:  ----- Ether Header -----

ETHER:

ETHER:  Packet 165 arrived at 15:56:13.38

ETHER:  Packet size = 371 bytes

ETHER:  Destination = 0:c:29:4e:dd:b7,

ETHER:  Source      = 0:c:29:4a:b2:cd,

ETHER:  Ethertype = 0800 (IP)

ETHER:

IP:   ----- IP Header -----

IP:

IP:   Version = 4

IP:   Header length = 20 bytes

IP:   Type of service = 0x00

IP:         xxx. .... = 0 (precedence)

IP:         ...0 .... = normal delay

IP:         .... 0... = normal throughput

IP:         .... .0.. = normal reliability

IP:         .... ..0. = not ECN capable transport

IP:         .... ...0 = no ECN congestion experienced

IP:   Total length = 357 bytes

IP:   Identification = 20283

IP:   Flags = 0x4

IP:         .1.. .... = do not fragment

IP:         ..0. .... = last fragment

IP:   Fragment offset = 0 bytes

IP:   Time to live = 255 seconds/hops

IP:   Protocol = 17 (UDP)

IP:   Header checksum = 9494

IP:   Source address = 192.168.10.250, nic2

IP:   Destination address = 192.168.10.109, solaris254-109

IP:   No options

IP:

UDP:  ----- UDP Header -----

UDP:

UDP:  Source port = 67

UDP:  Destination port = 68 (BOOTPC)

UDP:  Length = 337

UDP:  Checksum = 7243

UDP:

DHCP: ----- Dynamic Host Configuration Protocol -----

DHCP:

DHCP: Hardware address type (htype) =  1 (Ethernet (10Mb))

DHCP: Hardware address length (hlen) = 6 octets

DHCP: Relay agent hops = 0

DHCP: Transaction ID = 0x9aa14ebb

DHCP: Time since boot = 0 seconds

DHCP: Flags = 0x0000

DHCP: Client address (ciaddr) = 0.0.0.0

DHCP: Your client address (yiaddr) = 192.168.10.109

DHCP: Next server address (siaddr) = 0.0.0.0

DHCP: Relay agent address (giaddr) = 0.0.0.0

DHCP: Client hardware address (chaddr) = 00:0C:29:4E:DD:B7

DHCP:

DHCP: ----- (Options) field options -----

DHCP:

DHCP: Message type = DHCPACK

DHCP: DHCP Server Identifier = 192.168.10.250

DHCP: UTC Time Offset = 32400 seconds

DHCP: RFC868 Time Servers at = 172.16.8.254

DHCP: IP Address Lease Time = 86400 seconds

DHCP: DNS Domain Name = example.com

DHCP: DNS Servers at = 172.16.8.254

DHCP: DNS Servers at = 172.16.8.252

DHCP: DNS Servers at = 168.126.63.1

DHCP: Broadcast Address = 192.168.10.255

DHCP: Router at = 192.168.10.2

DHCP: Subnet Mask = 255.255.255.0

DHCP: Client Hostname = solaris254-109

----------------------------------------------------------------   

 

 

 

 

 

 

[EX2] NIC 추가

 

새로운 NIC를 추가하지 않고 가상 NIC를 구성하여 192.168.8.XXX으로 추가하여 작업 하는

것으로 가정한다.(부팅시의 작업에 대해서는 정의하지 않고 현재 작업으로만 설정한다.)

 

(1). Virtual NIC 추가

# ifconfig -a          

lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1

        inet 127.0.0.1 netmask ff000000

pcn0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

        inet 172.16.8.254 netmask ffff0000 broadcast 172.16.255.255

        ether 0:c:29:18:75:5e

 

# ifconfig pcn0:1 plumb up

# ifconfig pcn0:1 192.168.8.254 netmask 255.255.255.0 broadcast +

 

 

(2). DHCP Manager 설정

# /usr/sadm/admin/bin/dhcpmgr &

 

(a). EDIT

(b). Network Wizard

     - Network Address : 192.168.8.0

     - Netmask         : 255.255.255.0

    

     - Network Type    : LAN

     - Routing         : Use router (192.168.8.XXX)

 

     - NIC Domain      : Next(Skip)

     - NIC+ Domain     : Next(Skip)

 

     - Verification    : Finish

(c). Address Wizard

     - Number of IP Addresses : 10

    

     - Starting IP Address    : 192.168.8.100

     - Generate Client Hostnames : Check

     - Next > Next > Next > Finish

 

 

 

 

 

8. pntadm, dhtadm 명령어를 사용한 DHCP 서버 관리

_________________________________________________

 

pntadm (p:dhcp, nt:network)-> /var/dhcp/dhcp_network

dhtadm (dht:dhcptab       )-> /var/dhcp/dhcptab

 

서버의 설정이 있다면 삭제하고 다시 설정 해야 한다.

 

# dhcpconfig -U -x -h