01.18.10:55
[PR]
05.20.23:33
DHCPパケットを見てみた
DHCPサーバー:Windows Server 2008 R2(192.168.1.117)
DHCPクライアント:Windows 7
まずは基本的な Discover, Offer, Request, Ack から。
=====================================
0.0.0.0 255.255.255.255 DHCP Discover
192.168.1.117 255.255.255.255 DHCP Offer
0.0.0.0 255.255.255.255 DHCP Request
192.168.1.117 255.255.255.255 DHCP ACK
=====================================
Offer 以降はユニキャストでよさそうな気もするけど、ブロードキャストでやり取りするのね。
パケットの中身の少々見てみる。
■Discover
=====================================
Transaction ID: 0x2c255782
Seconds elapsed: 0
Bootp flags: 0x8000 (Broadcast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 0.0.0.0 (0.0.0.0)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 0.0.0.0 (0.0.0.0)
Client MAC address: Vmware_58:86:07 (00:0c:29:58:86:07)
Client hardware address padding: 00000000000000000000
Server host name not given
Boot file name not given
Magic cookie: DHCP
Option: (t=53,l=1) DHCP Message Type = DHCP Discover
Option: (t=61,l=7) Client identifier
Option: (t=12,l=12) Host Name = "Win7-test01"
Option: (t=60,l=8) Vendor class identifier = "MSFT 5.0"
Option: (t=55,l=12) Parameter Request List
=====================================
当然ですけど、Client IP Address とかはまだ空っぽ。
自分のホスト名を通知したりするんですね。
■Offer
=====================================
Message type: Boot Reply (2)
Hardware type: Ethernet
Hardware address length: 6
Hops: 0
Transaction ID: 0x2c255782
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 192.168.1.200 (192.168.1.200)
Next server IP address: 192.168.1.117 (192.168.1.117)
Relay agent IP address: 0.0.0.0 (0.0.0.0)
Client MAC address: Vmware_58:86:07 (00:0c:29:58:86:07)
Client hardware address padding: 00000000000000000000
Server host name not given
Boot file name not given
Magic cookie: DHCP
Option: (t=53,l=1) DHCP Message Type = DHCP Offer
Option: (t=1,l=4) Subnet Mask = 255.255.255.0
Option: (t=58,l=4) Renewal Time Value = 4 days
Option: (t=59,l=4) Rebinding Time Value = 7 days
Option: (t=51,l=4) IP Address Lease Time = 8 days
Option: (t=54,l=4) DHCP Server Identifier = 192.168.1.117
Option: (t=15,l=12) Domain Name = "syoyu.local"
Option: (t=6,l=4) Domain Name Server = 192.168.1.115
=====================================
Your (client) IP addressの192.168.1.200 を貸してやるけどどうだいー?
とDHCPサーバーが応答。リース期限とかの情報も含まれてますね。
■Request
=====================================
Message type: Boot Request (1)
Hardware type: Ethernet
Hardware address length: 6
Hops: 0
Transaction ID: 0x2c255782
Seconds elapsed: 0
Bootp flags: 0x8000 (Broadcast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 0.0.0.0 (0.0.0.0)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 0.0.0.0 (0.0.0.0)
Client MAC address: Vmware_58:86:07 (00:0c:29:58:86:07)
Client hardware address padding: 00000000000000000000
Server host name not given
Boot file name not given
Magic cookie: DHCP
Option: (t=53,l=1) DHCP Message Type = DHCP Request
Option: (t=61,l=7) Client identifier
Option: (t=50,l=4) Requested IP Address = 192.168.1.200
Option: (t=54,l=4) DHCP Server Identifier = 192.168.1.117
Option: (t=12,l=12) Host Name = "Win7-test01"
Option: (t=81,l=27) Client Fully Qualified Domain Name
Option: (t=60,l=8) Vendor class identifier = "MSFT 5.0"
Option: (t=55,l=12) Parameter Request List
=====================================
クライアントがそれ(Requested IP Address = 192.168.1.200)くださいーとRequest
■Ack
=====================================
Message type: Boot Reply (2)
Hardware type: Ethernet
Hardware address length: 6
Hops: 0
Transaction ID: 0x2c255782
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 192.168.1.200 (192.168.1.200)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 0.0.0.0 (0.0.0.0)
Client MAC address: Vmware_58:86:07 (00:0c:29:58:86:07)
Client hardware address padding: 00000000000000000000
Server host name not given
Boot file name not given
Magic cookie: DHCP
Option: (t=53,l=1) DHCP Message Type = DHCP ACK
Option: (t=58,l=4) Renewal Time Value = 4 days
Option: (t=59,l=4) Rebinding Time Value = 7 days
Option: (t=51,l=4) IP Address Lease Time = 8 days
Option: (t=54,l=4) DHCP Server Identifier = 192.168.1.117
Option: (t=1,l=4) Subnet Mask = 255.255.255.0
Option: (t=81,l=3) Client Fully Qualified Domain Name
Option: (t=15,l=12) Domain Name = "syoyu.local"
Option: (t=6,l=4) Domain Name Server = 192.168.1.115
=====================================
最後にサーバーがOK!とAck
DHCPクライアント:Windows 7
まずは基本的な Discover, Offer, Request, Ack から。
=====================================
0.0.0.0 255.255.255.255 DHCP Discover
192.168.1.117 255.255.255.255 DHCP Offer
0.0.0.0 255.255.255.255 DHCP Request
192.168.1.117 255.255.255.255 DHCP ACK
=====================================
Offer 以降はユニキャストでよさそうな気もするけど、ブロードキャストでやり取りするのね。
パケットの中身の少々見てみる。
■Discover
=====================================
Transaction ID: 0x2c255782
Seconds elapsed: 0
Bootp flags: 0x8000 (Broadcast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 0.0.0.0 (0.0.0.0)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 0.0.0.0 (0.0.0.0)
Client MAC address: Vmware_58:86:07 (00:0c:29:58:86:07)
Client hardware address padding: 00000000000000000000
Server host name not given
Boot file name not given
Magic cookie: DHCP
Option: (t=53,l=1) DHCP Message Type = DHCP Discover
Option: (t=61,l=7) Client identifier
Option: (t=12,l=12) Host Name = "Win7-test01"
Option: (t=60,l=8) Vendor class identifier = "MSFT 5.0"
Option: (t=55,l=12) Parameter Request List
=====================================
当然ですけど、Client IP Address とかはまだ空っぽ。
自分のホスト名を通知したりするんですね。
■Offer
=====================================
Message type: Boot Reply (2)
Hardware type: Ethernet
Hardware address length: 6
Hops: 0
Transaction ID: 0x2c255782
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 192.168.1.200 (192.168.1.200)
Next server IP address: 192.168.1.117 (192.168.1.117)
Relay agent IP address: 0.0.0.0 (0.0.0.0)
Client MAC address: Vmware_58:86:07 (00:0c:29:58:86:07)
Client hardware address padding: 00000000000000000000
Server host name not given
Boot file name not given
Magic cookie: DHCP
Option: (t=53,l=1) DHCP Message Type = DHCP Offer
Option: (t=1,l=4) Subnet Mask = 255.255.255.0
Option: (t=58,l=4) Renewal Time Value = 4 days
Option: (t=59,l=4) Rebinding Time Value = 7 days
Option: (t=51,l=4) IP Address Lease Time = 8 days
Option: (t=54,l=4) DHCP Server Identifier = 192.168.1.117
Option: (t=15,l=12) Domain Name = "syoyu.local"
Option: (t=6,l=4) Domain Name Server = 192.168.1.115
=====================================
Your (client) IP addressの192.168.1.200 を貸してやるけどどうだいー?
とDHCPサーバーが応答。リース期限とかの情報も含まれてますね。
■Request
=====================================
Message type: Boot Request (1)
Hardware type: Ethernet
Hardware address length: 6
Hops: 0
Transaction ID: 0x2c255782
Seconds elapsed: 0
Bootp flags: 0x8000 (Broadcast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 0.0.0.0 (0.0.0.0)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 0.0.0.0 (0.0.0.0)
Client MAC address: Vmware_58:86:07 (00:0c:29:58:86:07)
Client hardware address padding: 00000000000000000000
Server host name not given
Boot file name not given
Magic cookie: DHCP
Option: (t=53,l=1) DHCP Message Type = DHCP Request
Option: (t=61,l=7) Client identifier
Option: (t=50,l=4) Requested IP Address = 192.168.1.200
Option: (t=54,l=4) DHCP Server Identifier = 192.168.1.117
Option: (t=12,l=12) Host Name = "Win7-test01"
Option: (t=81,l=27) Client Fully Qualified Domain Name
Option: (t=60,l=8) Vendor class identifier = "MSFT 5.0"
Option: (t=55,l=12) Parameter Request List
=====================================
クライアントがそれ(Requested IP Address = 192.168.1.200)くださいーとRequest
■Ack
=====================================
Message type: Boot Reply (2)
Hardware type: Ethernet
Hardware address length: 6
Hops: 0
Transaction ID: 0x2c255782
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 192.168.1.200 (192.168.1.200)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 0.0.0.0 (0.0.0.0)
Client MAC address: Vmware_58:86:07 (00:0c:29:58:86:07)
Client hardware address padding: 00000000000000000000
Server host name not given
Boot file name not given
Magic cookie: DHCP
Option: (t=53,l=1) DHCP Message Type = DHCP ACK
Option: (t=58,l=4) Renewal Time Value = 4 days
Option: (t=59,l=4) Rebinding Time Value = 7 days
Option: (t=51,l=4) IP Address Lease Time = 8 days
Option: (t=54,l=4) DHCP Server Identifier = 192.168.1.117
Option: (t=1,l=4) Subnet Mask = 255.255.255.0
Option: (t=81,l=3) Client Fully Qualified Domain Name
Option: (t=15,l=12) Domain Name = "syoyu.local"
Option: (t=6,l=4) Domain Name Server = 192.168.1.115
=====================================
最後にサーバーがOK!とAck
PR
- トラックバックURLはこちら