[ Pobierz całość w formacie PDF ]
.Dynamic Host Configuration Protocol (DHCP)The DHCP client and server are Windows Sockets applications that are used toprovide automatic configuration of various TCP/IP protocol components [15 DHCPis described in more detail in RFC1541, and RFC1542, and in a separate WhitePaper from Microsoft (Part No.098-56544).The Microsoft client and serverimplementations were tested with preliminary clients and servers from manyother vendors at DHCP “Bakeoff” events and should interoperate successfullywith any other compliant implementations.].The server is configured with“scopes” that are ranges of IP addresses to hand out, along with additionalconfiguration parameters that go along with those addresses.For instance, ascope might be set up for a range of IP addresses, and might include a defaultgateway, DNS server, NetBIOS Name Server (WINS), options, etc.Obtaining Configuration Parameters Using DHCPWhen a DHCP-enabled client boots for the very first time, it broadcasts a DHCPDiscover request onto the local subnet.Any DHCP server that receives therequest may respond with a DHCP Offer that contains proposed configurationparameters.The client can evaluate the offer, and respond with a DHCP Requestto accept it.The server finalizes the transaction with a DHCP Acknowledgment.A sample of this sequence is explained below.First, the DHCP Discover is sent as the stack initializes:*********************************************************************Time Source IP Dest IP Prot Description0.000 0.0 255.255.255.255 DHCP Discover (xid=68256CA8)+ FRAME: Base frame propertiesETHERNET: ETYPE = 0x0800 : Protocol = IP: DOD Internet Protocol+ ETHERNET: Destination address : FFFFFFFFFFFF+ ETHERNET: Source address : 00DD01075715ETHERNET: Frame Length : 342 (0x0156)ETHERNET: Ethernet Type : 0x0800 (IP: DOD Internet Protocol)ETHERNET: Ethernet Data: Number of data bytes remaining = 328(0x0148)IP: ID = 0x0; Proto = UDP; Len: 328IP: Version = 4 (0x4)IP: Header Length = 20 (0x14)+ IP: Service Type = 0 (0x0)IP: Total Length = 328 (0x148)IP: Identification = 0 (0x0)+ IP: Flags Summary = 0 (0x0)IP: Fragment Offset = 0 (0x0) bytesIP: Time to Live = 32 (0x20)IP: Protocol = UDP - User DatagramIP: CheckSum = 0x99A6IP: Source Address = 0.0IP: Destination Address = 255.255.255.255IP: Data: Number of data bytes remaining = 308 (0x0134)UDP: IP Multicast: Src Port: BOOTP Client, (68); Dst Port: BOOTPServer (67); Length = 308 (0x134)UDP: Source Port = BOOTP ClientUDP: Destination Port = BOOTP ServerUDP: Total length = 308 (0x134) bytesUDP: CheckSum = 0x4A0EUDP: Data: Number of data bytes remaining = 300 (0x012C)DHCP: Discover (xid=68256CA8)DHCP: Op Code (op) = 1 (0x1)DHCP: Hardware Type (htype) = 1 (0x1) 10Mb EthernetDHCP: Hardware Address Length (hlen) = 6 (0x6)DHCP: Hops (hops) = 0 (0x0)DHCP: Transaction ID (xid) = 1747283112 (0x68256CA8)DHCP: Seconds (secs) = 0 (0x0)DHCP: Flags (flags) = 0 (0x0)DHCP: 0.= No BroadcastDHCP: Client IP Address (ciaddr) = 0.0DHCP: Your IP Address (yiaddr) = 0.0DHCP: Server IP Address (siaddr) = 0.0DHCP: Relay IP Address (giaddr) = 0.0DHCP: Client Ethernet Address (chaddr) = 00DD01075715DHCP: Server Host Name (sname) =DHCP: Boot File Name (file) =DHCP: Magic Cookie = [OK]DHCP: Option Field (options)DHCP: DHCP Message Type = DHCP DiscoverDHCP: Client-identifier = (Type: 1) 00 dd 01 07 57 15DHCP: Host Name = DAVEMAC4DHCP: End of this option fieldThere are several interesting points to note in the DHCP discover packet.First, it is sent as a broadcast at both the link layer and the IP layer.Second, the DHCP broadcast flag is set to 0, indicating that the client iscapable of receiving a response that is directed to its MAC address (indicatedby chaddr).This means that the DHCP server is not required to broadcast theresponse [16 Setting this flag to 0 is new in Windows NT 3.51; version 3.5systems required a broadcast response.The Windows NT 3.5x DHCP server alwaysresponds using broadcasts, however in version 4.0 a new registry parameter(IgnoreBroadcastFlag) was added to allow server behavior to be specified.Thedefault is still to broadcast.].Finally, note that there is a transaction ID(XID) used to track each configuration sequence.Any response to this discoverpacket should reference the same XID.A DHCP offer follows:***********************************************************************Time Source IP Dest IP Prot Description0.165 199.199.41.254 199.199.40.13 DHCP Offer (xid=68256CA8)+ FRAME: Base frame propertiesETHERNET: ETYPE = 0x0800 : Protocol = IP: DOD Internet Protocol+ ETHERNET: Destination address : 00DD01075715+ ETHERNET: Source address : 00000C1AEBC5ETHERNET: Frame Length : 590 (0x024E)ETHERNET: Ethernet Type : 0x0800 (IP: DOD Internet Protocol)ETHERNET: Ethernet Data: Number of data bytes remaining = 576(0x0240)IP: ID = 0x906; Proto = UDP; Len: 576IP: Version = 4 (0x4)IP: Header Length = 20 (0x14)+ IP: Service Type = 0 (0x0)IP: Total Length = 576 (0x240)IP: Identification = 2310 (0x906)+ IP: Flags Summary = 0 (0x0)IP: Fragment Offset = 0 (0x0) bytesIP: Time to Live = 31 (0x1F)IP: Protocol = UDP - User DatagramIP: CheckSum = 0xAF0DIP: Source Address = 199.199.41.254IP: Destination Address = 199.199.40.13IP: Data: Number of data bytes remaining = 556 (0x022C)UDP: Src Port: BOOTP Server, (67); Dst Port: BOOTP Client (68); Length= 556 (0x22C)DHCP: Offer (xid=68256CA8)DHCP: Op Code (op) = 2 (0x2)DHCP: Hardware Type (htype) = 1 (0x1) 10Mb EthernetDHCP: Hardware Address Length (hlen) = 6 (0x6)DHCP: Hops (hops) = 0 (0x0)DHCP: Transaction ID (xid) = 1747283112 (0x68256CA8)DHCP: Seconds (secs) = 0 (0x0)DHCP: Flags (flags) = 0 (0x0)DHCP: 0.= No BroadcastDHCP: Client IP Address (ciaddr) = 0.0DHCP: Your IP Address (yiaddr) = 199.199.40.13DHCP: Server IP Address (siaddr) = 0.0DHCP: Relay IP Address (giaddr) = 199.199.40.1DHCP: Client Ethernet Address (chaddr) = 00DD01075715DHCP: Server Host Name (sname) =DHCP: Boot File Name (file) =DHCP: Magic Cookie = [OK]DHCP: Option Field (options)DHCP: DHCP Message Type = DHCP OfferDHCP: Subnet Mask = 255.255.255.0DHCP: Renewal Time Value (T1) = 1 Days, 12:00:00DHCP: Rebinding Time Value (T2) = 2 Days, 15:00:00DHCP: IP Address Lease Time = 3 Days, 0:00:00DHCP: Server Identifier = 199.199.41.254DHCP: End of this option fieldThe DHCP offer is also interesting [ Pobierz caÅ‚ość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • luska.pev.pl
  •