Lab Assignments for Chapter 4
Although the Internet uses several protocols at the network layer, we have included
only two lab assignments for this chapter. We have also included two lab report sheets,
which means that each lab should be reported in a separate sheet.
The first assignment, Lab4-1, is about the IP protocol. The second, Lab4-2, is
about the ICMP protocol. We have included no lab assignments for routing protocols,
such as RIP, OSPF, or BGP, because these protocols handle communication between
routers. To be able to capture packets transmitted by these protocols, we need to have
access to the routers between two hosts, which is not the intension of these lab assignments.
Lab4-1: IP
The Internet Protocol (IP), the main protocol in the Internet layer of the TCP/IP protocol
suite, is used to route datagrams from source to destination based on the logical (IP)
addresses. In this lab we capture and study packets belonging to the current IP version
(IPv4). We do not deal with IPv6 because part of the Internet do not support IPv6 yet.
Like UDP, IP is a connectionless protocol. This means that we cannot find any
frame with the source or sink at the network layer. An IP header can be captured only
when an upper-layer protocol uses IP.
Assignment
■ Start your web browser and clear the browser's cache memory, but do not access
any site yet.
■ Open Wireshark and start capturing.
■ Go back to your web browser and retrieve any file from a site. Wireshark starts
capturing packets.
■ After enough packets have been captured, stop Wireshark and save the captured
file.
■ In the packet list pane, select any packet. In the packet detail pane, select the Internet
Protocol. The hexdump of the IP header will be highlighted in the packet byte
lane.
a. IP version:
b. Header length Number of bytes in the header:
c. Service type:
d. Total length:
e. Identification:
f. Flags:
g. Fragmentation offset
h. TTL:
i. Upper layer protocol:
j. Checksum:
k. Source IP address:
l. Destination IP address
Are answers to question 1 verified by the information in the packet detail pane?
If the checksum in the packet detail pane is marked correct, can we conclude that the IP payload is not corrupted?
Explain.
Is the datagram fragmented?
Explain.
Does source or destination address belong to one of the special addresses?
If yes which one?
Number of bytes of data in the IP payload:
Lab4-2: ICMP
The Internet Control Message Protocol (ICMP) is an auxiliary protocol at the network
layer. It is designed for two purposes. It reports errors (unexpected conditions) about IP,
UDP, and TCP. It can also be used to check the liveliness of the hosts or routers or finds
the route followed by an IP datagram. Although we can see two versions of this protocol,
ICMPv4 and ICMPv6, in use today, we discuss only ICMPv4 which is more common.
ICMPv4 uses two categories of packets, error-reporting and query. Figure 4.54 in
the textbook gives the general format for each category. We also recommend to check
the extra materials for Chapter 4 at the book website if you need to find the exact format
for each type of packet.
In this assignment, our goal is to capture and analyze ICMPv4 packets (both errorreporting
and query types). We can easily create ICMPv4 query messages using a pro3
gram called ping as shown in Example 4.13 on Page 297 of the textbook. Creating
error-reporting packets is more tricky. These packets are created automatically when
there is an error in the path. We cannot wait for an error to occur in the path, but we can
artificially force a condition to make IP create an error-reporting ICMP packet. This
can be done using a program called traceroute (in Unix-like environment) or a tracert
(in Windows environment) as shown in Example 4.14 on Page 298 of the textbook. We
use the ping and tracert in this document to capture ICMP packets.
Using The ping Utility
In this section of the assignment, we use the ping utility to capture ICMPv4 query
packets: echo request and echo reply (See the extra materials for Chapter 4 at the book
website for more information). The ping utility is, in fact, a client-server program. The
client program, which needs to be invoked at the command prompt, triggers an echo
request packets; the server program, which is running at the background all the time,
waits for a signal from an echo request message, and triggers an echo reply message.
The ping program, however, does not insert a message in the ICMPv4 packets, it just
simply triggers its creation and provides the values for identification and the sequence
1.Destination IP address:
2. Number ping messages sent:
3. Number of bytes of data sends with each ping message:
4. The round-trip time for each packet:
5. Minimum round-trip:
Average round-trip:
Maximum round-trip:
แลบสำหรับบทที่ 4
แม้ว่าอินเทอร์เน็ตใช้โปรโตคอลหลายเลเยอร์เครือข่ายเราได้รวม
เพียงสองแลบสำหรับบทนี้ นอกจากนี้เรายังได้รวมสองแผ่นรายงานการทดลอง,
ซึ่งหมายความว่าแต่ละห้องปฏิบัติการควรมีการรายงานในแผ่นแยกต่างหาก.
ได้รับมอบหมายแรก Lab4-1 เป็นเรื่องเกี่ยวกับโปรโตคอล IP ที่สอง Lab4-2 เป็น
เกี่ยวกับโปรโตคอล ICMP เราได้รวมไม่แลบสำหรับโปรโตคอลเส้นทาง
เช่น RIP, OSPF, BGP หรือเพราะโปรโตคอลเหล่านี้จัดการการสื่อสารระหว่าง
เราเตอร์ เพื่อให้สามารถจับแพ็กเก็ตที่ส่งมาจากโปรโตคอลเหล่านี้เราจะต้องมี
การเข้าถึงเราเตอร์ระหว่างสองครอบครัวซึ่งไม่ได้เป็นความตั้งใจของการทดลองเหล่านี้.
Lab4-1: IP
ที่อยู่ Internet Protocol (IP) โปรโตคอลหลักใน ชั้นอินเทอร์เน็ตโปรโตคอล TCP / IP
ชุดจะถูกใช้เพื่อ datagrams เส้นทางจากต้นทางไปยังปลายทางที่อยู่บนพื้นฐานของตรรกะ (IP)
ที่อยู่ ในห้องปฏิบัติการนี้เราจับภาพและการศึกษาที่อยู่ในแพ็คเก็ตรุ่น IP ปัจจุบัน
(IPv4) เราไม่ได้จัดการกับ IPv6 เพราะส่วนหนึ่งของอินเทอร์เน็ตไม่สนับสนุน IPv6 ยัง.
เช่นเดียวกับ UDP, IP เป็นโปรโตคอล connectionless ซึ่งหมายความว่าเราไม่สามารถหาใด ๆ
กรอบกับแหล่งที่มาหรืออ่างที่ชั้นเครือข่าย ส่วนหัว IP สามารถบันทึกเฉพาะ
เมื่อโปรโตคอลชั้นบนใช้ IP.
การกำหนด
■เปิดเว็บเบราว์เซอร์ของคุณและล้างหน่วยความจำแคชเบราว์เซอร์ แต่ไม่สามารถเข้าถึง
เว็บไซต์ใด ๆ .
■เปิด Wireshark และเริ่มจับ.
■กลับไปที่เว็บของคุณ เบราว์เซอร์และดึงไฟล์ใด ๆ จากเว็บไซต์ Wireshark เริ่ม
แพ็คเก็ตจับ.
■หลังจากแพ็คเก็ตพอที่ได้รับการบันทึกให้หยุดและบันทึก Wireshark จับ
ไฟล์.
■ในบานหน้าต่างรายการแพ็คเก็ตให้เลือกแพ็คเก็ตใด ๆ ในบานหน้าต่างรายละเอียดแพ็คเก็ตให้เลือกอินเทอร์เน็ต
โพรโทคอ hexdump ของส่วนหัว IP นั้นจะเน้นในแพ็คเก็ตไบต์
เลน.
รุ่น IP:
B ส่วนหัวยาวจำนวนไบต์ในส่วนหัว:
C ประเภทบริการ:
D รวมความยาว:
E บัตรประจำตัว:
F ธง:
G การกระจายตัวของการชดเชย
H TTL:
ฉัน โปรโตคอลชั้นบน:
J การตรวจสอบ:
k แหล่งที่อยู่ IP:
L ปลายทางที่อยู่ IP
เป็นคำตอบของคำถามที่ 1 การตรวจสอบจากข้อมูลในบานหน้าต่างรายละเอียดแพ็คเก็ตหรือไม่
หากการตรวจสอบในบานหน้าต่างรายละเอียดแพ็คเก็ตที่มีการทำเครื่องหมายถูกต้องเราสามารถสรุปได้ว่าน้ำหนักบรรทุก IP ไม่เสียหาย?
อธิบาย.
คือการแยกส่วนดาต้า?
อธิบาย
แหล่งที่มาหรือที่อยู่ปลายทางไม่เป็นหนึ่งในผู้ที่อยู่พิเศษหรือไม่?
ถ้าใช่ที่หนึ่ง?
จำนวนไบต์ของข้อมูลในส่วนของข้อมูล IP:
Lab4-2: ICMP
อินเทอร์เน็ต Control Message Protocol (ICMP) เป็นโปรโตคอลที่ช่วยเครือข่าย
ชั้น มันถูกออกแบบมาสำหรับสองวัตถุประสงค์ จะรายงานข้อผิดพลาด (เงื่อนไขที่ไม่คาดคิด) เกี่ยวกับ IP,
UDP และ TCP นอกจากนี้ยังสามารถนำมาใช้ในการตรวจสอบความมีชีวิตชีวาของครอบครัวหรือเราเตอร์หรือพบ
เส้นทางตามดาต้า IP ถึงแม้ว่าเราจะเห็นสองรุ่นของพิธีสารนี้
ICMPv4 และ ICMPv6 ในการใช้งานในวันนี้เราจะหารือเพียง ICMPv4 ซึ่งเป็นเรื่องธรรมดามากขึ้น.
ICMPv4 ใช้สองประเภทของแพ็กเก็ต, รายงานข้อผิดพลาดและแบบสอบถาม รูปที่ 4.54 ใน
ตำราเรียนจะช่วยให้รูปแบบทั่วไปสำหรับแต่ละประเภท นอกจากนี้เรายังแนะนำให้ตรวจสอบ
วัสดุพิเศษสำหรับบทที่ 4 ได้ที่เว็บไซต์ของหนังสือเล่มนี้ถ้าคุณต้องการที่จะหารูปแบบที่แน่นอน
สำหรับแต่ละประเภทของแพ็กเก็ต.
ในงานนี้เป้าหมายของเราคือการจับและวิเคราะห์แพ็กเก็ต ICMPv4 (ทั้ง ErrorReporting
และชนิดของแบบสอบถาม) เราสามารถสร้างข้อความแบบสอบถาม ICMPv4 ใช้ PRO3
กรัมเรียกว่าปิงที่แสดงในตัวอย่าง 4.13 ในหน้า 297 ของตำราเรียน สร้าง
แพ็กเก็ตรายงานข้อผิดพลาดเป็นเรื่องยุ่งยากมากขึ้น แพ็คเก็ตเหล่านี้จะถูกสร้างขึ้นโดยอัตโนมัติเมื่อ
มีข้อผิดพลาดในเส้นทาง เราไม่สามารถรอให้เกิดข้อผิดพลาดที่จะเกิดขึ้นในเส้นทาง แต่เราสามารถ
เทียมบังคับเงื่อนไขที่จะทำให้ IP สร้างรายงานข้อผิดพลาด ICMP แพ็คเก็ต นี้
สามารถทำได้โดยใช้โปรแกรมที่เรียกว่า traceroute (ในสภาพแวดล้อมระบบปฏิบัติการยูนิกซ์เหมือน) หรือ tracert
(ในสภาพแวดล้อม Windows) ที่แสดงในตัวอย่าง 4.14 ในหน้า 298 ของตำราเรียน เรา
ใช้ ping และ tracert ในเอกสารนี้เพื่อจับแพ็กเก็ต ICMP.
ใช้ปิงยูทิลิตี้
ในส่วนของงานนี้เราจะใช้ยูทิลิตี้ปิงในการจับภาพ ICMPv4 แบบสอบถาม
แพ็คเก็ต: ก้องขอและการตอบ Echo (ดูวัสดุพิเศษสำหรับบทที่ 4 ที่ หนังสือ
เว็บไซต์สำหรับข้อมูลเพิ่มเติม) ยูทิลิตี้ปิงในความเป็นจริงซึ่งเป็นโปรแกรมไคลเอนต์เซิร์ฟเวอร์
โปรแกรมไคลเอนต์ซึ่งจะต้องมีการเรียกที่พร้อมรับคำสั่งเรียกเสียงสะท้อน
ขอเก็ต; โปรแกรมเซิร์ฟเวอร์ที่กำลังทำงานอยู่ที่พื้นหลังตลอดเวลา
รอสัญญาณจากข้อความ echo ขอและเรียกข้อความตอบกลับ Echo.
โปรแกรมปิง แต่ไม่ได้ใส่ข้อความในแพ็คเก็ต ICMPv4 ก็แค่
เพียง ทำให้เกิดการสร้างและให้ค่าสำหรับประชาชนและลำดับ
ที่อยู่ 1.Destination IP:
2 ข้อความจำนวนปิงส่ง:
3 จำนวนไบต์ของข้อมูลส่งด้วยข้อความปิงแต่ละ:
4 ตลอดเวลาการเดินทางสำหรับแต่ละแพ็กเก็ต:
5 ขั้นต่ำรอบการเดินทาง:
เฉลี่ยตลอดการเดินทาง:
สูงสุดรอบการเดินทาง:
การแปล กรุณารอสักครู่..
