Tôi nghe nói bộ định tuyến một mình làm phân mảnh. Khi một máy chủ được kết nối với mạng bằng cáp ethernet, làm thế nào để giữ kích thước MTU là 1500? Liệu máy chủ có tự phân mảnh và chỉ gửi tải trọng 1500 byte trong cáp ethernet không?
Tôi nghe nói bộ định tuyến một mình làm phân mảnh. Khi một máy chủ được kết nối với mạng bằng cáp ethernet, làm thế nào để giữ kích thước MTU là 1500? Liệu máy chủ có tự phân mảnh và chỉ gửi tải trọng 1500 byte trong cáp ethernet không?
Câu trả lời:
Chỉ các máy chủ IPv6 mới có thể phân đoạn (ref RFC 2460 - Thông số kỹ thuật IPv6, Phần 4.5 ):
4.5 Fragment Header
The Fragment header is used by an IPv6 source to send a packet larger
than would fit in the path MTU to its destination. (Note: unlike
IPv4, fragmentation in IPv6 is performed only by source nodes, not by
routers along a packet's delivery path -- see section 5.
Các máy chủ IPv4 tùy ý có thể phân mảnh (ref RFC 1122 - Yêu cầu máy chủ Internet, Mục 3.3.3 ) và bộ định tuyến IPv4 phải thực hiện phân mảnh.
Trích dẫn RFC 1122 - Yêu cầu máy chủ Internet, Mục 3.3.3 :
3.3.3 Fragmentation
Optionally, the IP layer MAY implement a mechanism to fragment
outgoing datagrams intentionally.
Trích dẫn RFC 1812 - Yêu cầu Bộ định tuyến IP, Mục 4.2.2.7
4.2.2.7 Fragmentation: RFC 791 Section 3.2
Fragmentation, as described in [INTERNET:1], MUST be supported by a
router.
Ví dụ :
Thật dễ dàng để minh họa cách máy chủ phân đoạn ... ví dụ ping máy chủ internet có kích thước ping rất lớn (> 1500 byte) ...
Trong thiết bị đầu cuối 1:
[mpenning@Bucksnort ~]$ ping -c 1 -s 65507 4.2.2.2
Trong thiết bị đầu cuối 2:
[mpenning@Bucksnort ~]$ sudo tshark -n -i eth0 icmp
1 0.000000 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=0)
2 0.000058 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=1480)
3 0.000071 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=2960)
4 0.000081 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=4440)
5 0.000094 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=5920)
6 0.000105 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=7400)
7 0.000116 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=8880)
8 0.000124 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=10360)
9 0.000133 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=11840)
10 0.000143 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=13320)
11 0.000152 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=14800)
12 0.000162 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=16280)
13 0.000172 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=17760)
14 0.000181 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=19240)
15 0.000191 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=20720)
16 0.000201 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=22200)
17 0.000211 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=23680)
18 0.000221 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=25160)
19 0.000230 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=26640)
20 0.000240 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=28120)
21 0.000250 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=29600)
22 0.000259 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=31080)
23 0.000269 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=32560)
24 0.000278 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=34040)
25 0.000288 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=35520)
26 0.000298 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=37000)
27 0.000308 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=38480)
28 0.000318 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=39960)
29 0.000327 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=41440)
30 0.000337 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=42920)
31 0.000352 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=44400)
32 0.000361 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=45880)
33 0.000372 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=47360)
34 0.000384 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=48840)
35 0.000394 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=50320)
36 0.000403 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=51800)
37 0.000411 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=53280)
38 0.000419 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=54760)
39 0.000428 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=56240)
40 0.000437 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=57720)
41 0.000446 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=59200)
42 0.000455 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=60680)
43 0.000466 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=62160)
44 0.000477 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=63640)
45 0.000486 192.0.2.3 -> 4.2.2.2 ICMP Echo (ping) request
46 0.044402 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=0)
47 0.044439 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=1480)
48 0.044899 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=2960)
49 0.044910 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=4440)
50 0.044916 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=5920)
51 0.045149 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=7400)
52 0.045399 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=8880)
53 0.045409 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=10360)
54 0.045415 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=11840)
55 0.045649 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=13320)
56 0.045899 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=14800)
57 0.045908 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=16280)
58 0.045915 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=17760)
59 0.046148 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=19240)
60 0.046163 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=20720)
61 0.046402 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=22200)
62 0.046421 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=23680)
63 0.046650 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=25160)
64 0.046668 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=26640)
65 0.046901 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=28120)
66 0.046918 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=29600)
67 0.047151 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=31080)
68 0.047171 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=32560)
69 0.047399 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=34040)
70 0.047418 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=35520)
71 0.047424 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=37000)
72 0.047650 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=38480)
73 0.047900 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=39960)
74 0.048149 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=41440)
75 0.048165 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=42920)
76 0.048172 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=44400)
77 0.048178 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=45880)
78 0.048398 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=47360)
79 0.048650 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=48840)
80 0.048667 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=50320)
81 0.048674 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=51800)
82 0.048900 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=53280)
83 0.048922 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=54760)
84 0.049150 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=56240)
85 0.049174 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=57720)
86 0.049398 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=59200)
87 0.049649 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=60680)
88 0.049671 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=62160)
89 0.049677 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=63640)
90 0.049683 4.2.2.2 -> 192.0.2.3 ICMP Echo (ping) reply