# Lab 9
## Lab 9-1
**What is the 48-bit Ethernet address of your computer?**
:::info
90:9a:4a:c4:42:2a

:::
## Lab 9-2
**What is the 48-bit destination address in the Ethernet frame? Is this the Ethernet address of gaia.cs.umass.edu? What device has this as its Ethernet address?**
Ans: dst address is f8:4d:89:8e:eb:b4. No, it is the address of my home router, which is the link used to gett off the subnet

## Lab 9-3
**Give the hexadecimal value for the two-byte Frame type field. What upper layer protocol does this correspond to?**
Ans:
- Hex value is 0x0800
- Upper layer protocol is IP

## Lab 9-4
**How many bytes from the very start of the Ethernet frame does the ASCII “G” in “GET” appear in the Ethernet frame?**
:::info
54bytes
- 14 bytes Ethernet frame
- 20 bytes IP header
- 20 bytes TCP header

:::
## Lab 9-5
**What is the value of the Ethernet source address? Is this the address of your computer, or of gaia.cs.umass.edu?**
:::info
- f8:4d:89:8e:eb:b4
- No, it's neither gaia.cs.umass.edu nor my computer's MAC address is home router's MAC address.

:::
## Lab 9-6
**What is the destination address in the Ethernet frame? Is this the Ethernet address of your computer?**
:::info
- 90:9a:4a:c4:42:2a
- My own address
:::
## Lab 9-7
**Give the hexadecimal value for the two-byte Frame type field. What upper layer protocol does this correspond to?**
:::info
- Hex value is 0x0800
- Upper layer protocol is IP

:::
## Lab 9-8
**How many bytes from the very start of the Ethernet frame does the ASCII “O” in “OK” (i.e., the HTTP response code) appear in the Ethernet frame?**
Ans: Total 67 bytes(54+13)

## Lab 9-9
**Write down the contents of your computer’s ARP cache. What is the meaning of each column value?**
:::info
The Internet Address column contains the IP address, the Physical Address column contains the MAC address, and the type indicates the protocol type.
:::
## Lab 9-10
**What are the hexadecimal values for the source and destination addresses in the Ethernet frame containing the ARP request message?**
:::info
- src address: 90:9a:4a:c4:42:2a
- dst address: ff:ff:ff:ff:ff:ff

:::
## Lab 9-11
**Give the hexadecimal value for the two-byte Ethernet Frame type field. What upper layer protocol does this correspond to?**
Ans:0x0806

## Lab 9-12
**Download the ARP specification from ftp://ftp.rfc-editor.org/in-notes/std/std37.txt. A readable, detailed discussion of ARP is also at http://www.erg.abdn.ac.uk/users/gorry/course/inet-pages/arp.html**.
### 9-12a
**How many bytes from the very beginning of the Ethernet frame does the ARP opcode field begin?**
Ans:
The ARP opcode field begins 20 byte from the very beginning of the Ethernet frame
- Ethernet 14 bytes
- Hardware type 2 bytes
- protocol type 2 bytes
- hardware size 1 byte
- protocol size 1 bute
### 9-12b
**What is the value of the opcode field within the ARP-payload part of the Ethernet frame in which an ARP request is made?**
Ans:0x0001, for request

### 9-12c
**Does the ARP message contain the IP address of the sender?**
Ans: 有,ARP message containing the IP address 192.168.1.126 for the sender

### 9-12d
**Where in the ARP request does the “question” appear – the Ethernet address of the machine whose corresponding IP address is being queried?**
Ans: The field "tarhet MAC address" is set to 00:00:00:00:00:00 to question the machine whose corresponding IP address (192.168.1.1) is being queried.
