Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

LAB UDP + IP

Phần UDP :
1, What is the packet number of this segment in the trace file?
Trả lời: Packet number : 14
What type of application-layer payload or protocol message is being carried in this
UDP segment?
Trả lời: DNS
How many fields there are in the UDP header , What are the names of these fields?
Trả lời: Có 4 fields : Source Port, Destination, Length, Checksum.

2. By consulting the displayed information in Wireshark’s packet content field for


this packet (or by consulting the textbook), what is the length (in bytes) of each of
the UDP header fields?
Trả lời: độ dài của mỗi trường UDP
- Source port (2bytes)
- Destination port (2bytes)
- Length (2bytes)
- Checksum (2bytes)
3. The value in the Length field is the length of what? (You can consult the text for
this answer). Verify your claim with your captured UDP packet.
Trả lời: Length = 1234 byte = Payload + UDP Header = 1226 + 8

4. What is the maximum number of bytes that can be included in a UDP payload?
(Hint: the answer to this question can be determined by your answer to 2. above)
Số byte tối đa có thể có trong tải trọng là (2^16-1) - 8 bytes trường tiêu đề =
65535-8= 65527 byte.
5. What is the largest possible source port number? (Hint: see the hint in 4.)
Số cổng nguồn tối đa là : 2^16-1 = 65535.
6. What is the protocol number for UDP. Give your answer in decimal notation. To
answer this question, you’ll need to look into the Protocol field of the IP datagram
containing this UDP segment (see Figure 4.13 in the text, and the discussion of IP
header fields).
Trả lời: số giao thức UDP là 17.
7. Examine the pair of UDP packets in which your host sends the first UDP packet
and the second UDP packet is a reply to this first UDP packet. (Hint: for a second
packet to be sent in response to a first packet, the sender of the first packet should
be the destination of the second packet). What is the packet number of the first of
these two UDP segments in the trace file? What is the value in the source port
field in this UDP segment? What is the value in the destination port field in this
UDP segment? What is the packet number of the second of these two UDP
segments in the trace file? What is the value in the source port field in this second
UDP segment? What is the value in the destination port field in this second UDP
segment? Describe the relationship between the port numbers in the two packets.

Packet number: 14 , Src Port 63142 , Dst Port 443


Packet number: 26 , Src Port 443 , Dst Port 63142
Mối quan hệ: số cổng nguồn của gói tin đầu tiên sẽ trở thành số cổng đích của gói
tin thứ hai, và ngược lại.
PHẦN IP:
1. Select the first ICMP Echo Request message sent by your computer, and expand
the Internet Protocol part of the packet in the packet details window.
What is the IP address of your computer?
Trả lời: 192.168.1.12
2. Within the IP packet header, what is the value in the upper layer protocol field?
Value : ICMP (1)

3. How many bytes are in the IP header? How many bytes are in the payload of the
IP datagram? Explain how you determined the number of payload bytes.
Trả lời: IP header = 20 bytes

Payload = Total length – Header = 56 -20 = 36 bytes


4. Has this IP datagram been fragmented? Explain how you determined whether or
not the datagram has been fragmented.
Trả lời: gói dữ liệu không bị phân mảnh.
Fragment offset = 0

5. Which fields in the IP datagram always change from one datagram to the next
within this series of ICMP messages sent by your computer?
Trả lời: Time to Live , Identification, Header checksum

6. Which fields stay constant? Which of the fields must stay constant? Which
fields must change? Why?
- fields stay constant: Version(IPv4) , Length of header , Source IP(sending from
same place) , Destination IP(contacting same site) ,Upper layer protocol(always
using ICMP).
- the fields must stay constant: Same as above
- fields must change: The header checksum (header changes) ,Identification(to
verify packets), Time to live.
7. Describe the pattern you see in the values in the Identification field of the IP
datagram
Các IP header Identification tăng với mỗi ICMP Echo (ping) request.
8. What is the value in the Identification field and the TTL field?
Trả lời: Identification = 18809 ; Time to live = 64

9. Do these values remain unchanged for all of the ICMP TTL-exceeded replies
sent to your computer by the nearest (first hop) router? Why?
- The TLL field does not change because the time to live to the first hop routeris
always the same.
- The Identification field changes from all of the replies because this field has
tohave a unique value. If they(2 or more replies) have the same value then
thereplies must be fragments of a bigger packet.
10. Find the first ICMP Echo Request message that was sent by your computer
after you changed the Packet Size in pingplotter to be 2000. Has that message been
fragmented across more than one IP datagram?
Trả lời: Message đã bị phân thành nhiều mảnh dữ liệu
11. Print out the first fragment of the fragmented IP datagram. What information in
the IP header indicates that the datagram been fragmented?
Trả lời: Thông tin cho thấy đã bị phân mảnh: More fragment : Set
What information in the IP header indicates whether this is the first fragment
versus a latter fragment?
Trả lời: Fragment Offset =0 cho thấy đây là phân mảnh đầu tiên.
How long is this IP datagram?
Trả lời: 1500 bytes bao gồm 20 bytes header

12. Print out the second fragment of the fragmented IP datagram. What
information in the IP header indicates that this is not the first datagram fragment?
Are the more fragments? How can you tell?
Trả lời: More fragment = Not set
Fragment offset = 1480
13. What fields change in the IP header between the first and second fragment?
Trả lời: Total length , More Fragments , Fragment Offset, Flags , Header
Checksum.
14. How many fragments were created from the original datagram?
Trả lời: 3 fragments

15. What fields change in the IP header among the fragments?


Các trường thay đổi:
Total length : 1500 , 1500 , 480
Flags: 0x1, 0x1, 0x0 ; More Fragments: SET , SET , NO SET
Fragment Offset: 0 , 1480 , 2960 ; Data: 1480 , 1480 , 520

You might also like