---
# System prepended metadata

title: Lab 10

---

# Lab 10
## Lab 10-1
**Are DHCP messages sent over UDP or TCP?**

Ans: UDP
![](https://i.imgur.com/Y9W7sJq.png)

## Lab 10-2
**Draw a timing datagram illustrating the sequence of the first four-packet Discover/Offer/Request/ACK DHCP exchange between the client and server. For each packet, indicated the source and destination port numbers. Are the port numbers the same as in the example given in this lab assignment?**

Ans:
![](https://i.imgur.com/tGKLIAX.png)

## Lab 10-3
**What is the link-layer (e.g., Ethernet) address of your host?**

Ans: 00:00:00:00:13:24
![](https://i.imgur.com/8bhjlnp.png)

## Lab 10-4
**What values in the DHCP discover message differentiate this message from the DHCP request message?**

Ans:The value which differentiate the discover message from th request message are in "Option 53:DHCP Message Type"

- discover
![](https://i.imgur.com/o0cHG32.png)
- request
![](https://i.imgur.com/Ik7hNXj.png)

## Lab 10-5
**What is the value of the Transaction-ID in each of the first four (Discover/Offer/Request/ACK) DHCP messages?**

:::info
0x115d3b76

![](https://i.imgur.com/J0PnpMK.png)
:::

**What are the values of the Transaction-ID in the second set (Request/ACK) set of DHCP messages?**

:::info
0x48bd73ba
![](https://i.imgur.com/xhgDCVy.png)
:::

**What is the purpose of the Transaction-ID field?**

:::info
Transaction ID, a random number chosen by the client, used by the client and server to associate messages and responses between a client and a server.
:::

## Lab 10-6
**A host uses DHCP to obtain an IP address, among other things. But a host’s IP address is not confirmed until the end of the four-message exchange! If the IP address is not set until the end of the four-message exchange, then what values are used in the IP datagrams in the four-message exchange?** 

**For each of the four DHCP messages (Discover/Offer/Request/ACK DHCP), indicate the source and destination IP addresses that are carried in the encapsulating IP datagram.**

:::info
Both DHCP clients and servers use 255.255.255.255 as the destination address. The client uses the source IP address 0.0.0.0, and the server uses its actual IP address as the source.
![](https://i.imgur.com/3QzxoYt.png)
:::


## Lab 10-7
**What is the IP address of your DHCP server?**

Ans:192.168.1.101
![](https://i.imgur.com/UQWnTiH.png)

## Lab 10-8
**What IP address is the DHCP server offering to your host in the DHCP Offer message? Indicate which DHCP message contains the offered DHCP address.**

Ans: The DHCP server offered the IP address 192.168.1.101 to my client machine. The DHCP message with "DHCP Message Type = DHCP Offer" contained the oddered IP

![](https://i.imgur.com/sPFw7rk.png)


## Lab 10-9
**What values in the trace indicate the absence of a relay agent? Is there a relay agent in your experiment? If so what is the IP address of the agent?**


Ans: "Relay agent IP address" is 0.0.0.0, which means no DHCP relay is used. No relay agent was used in my experiments.
![](https://i.imgur.com/P1lJxyR.png)

## Lab 10-10
**Explain the purpose of the router and subnet mask lines in the DHCP offer message**

:::info
The router line indicates which default gateway the client should use. The subnetmask line tells the client which subnetmask it should use.
![](https://i.imgur.com/qbAt1BS.png)
:::

## Lab 10-11
**In the DHCP trace file noted in footnote 2, the DHCP server offers a specific IP address to the client (see also question 8. above). In the client’s response to the first server OFFER message, does the client accept this IP address? Where in the client’s RESPONSE is the client’s requested address?**

:::info
In my experiment, the host requests the offered IP address in the DHCP Request message. In the screenshots of the following two chapters, the respective highlights
![](https://i.imgur.com/zJnNALh.png)
![](https://i.imgur.com/Qw86uJJ.png)
:::



## Lab 10-12
**Explain the purpose of the lease time. How long is the lease time in your experiment?**

:::info
The lease time refers to the expiration time of the intranet IP, which is 1 day in the experiment
![](https://i.imgur.com/b3tKklZ.png)
:::


## Lab 10-13
**What is the purpose of the DHCP release message? Does the DHCP server issue an acknowledgment of receipt of the client’s DHCP request? What would happen if the client’s DHCP release message is lost?**

:::info
The client sends a DHCP release message to the DHCP server to cancel the IP address previously provided by the DHCP server. The DHCP server will not send an acknowledgment message to the client. If a client's DHCP release message is lost, the DHCP server must wait for the lease on that IP address to expire before it can be reused for another client.
![](https://i.imgur.com/LGoAU9s.png)
:::

## Lab 10-14
**Clear the bootp filter from your Wireshark window. Were any ARP packets sent or received during the DHCP packet-exchange period? If so, explain the purpose of those ARP packets.**

:::info
Yes, the DHCP server will issue ARP requests. Before offering an IP address to a client, the DHCP server issues an ARP request to ensure that the offered IP address is not taken by another workstation.
:::


