Title: UDP ????????????????
1UDP ????????????????
2introduction
- UDP(User Datagram Protocol)
- ?????????????
- ?????????
- ?????? ??????????????
- IP???????????
- ???? RFC768
3UDP??????
IP??????
UDP??????
IP??? 20bytes
UDP??? 8bytes
UDP???
4?????
- ???????????????
- IP????????????????????????????????
15
16
31
0
16???????????
16??????????
8bytes
16???UDP????
16???UDP??????
???
5UDP?????????
- UDP????UDP???????????????
- ???8byte
- (0byte?????UDP???????????OK)
- (???????????)?(IP????)UDP????
16???????????
16??????????
8bytes
16???UDP????
16???UDP??????
???
6UDP??????
- UDP???????????
- IP???????????IP?????
- UDP????????????
- ?????????????
- ???????????????????
16???????????
16??????????
8bytes
16???UDP????
16???UDP??????
???
7UDP???????????????
(12byte)
?????2? ?????????
??????? ?????
???????(0)
8UDP???????????
- 16????????????
- (IP???????????????)
- ?????????????
- 8?????
- ?????????????
- ???????
- UDP?????
- 20????IP???
- ??IP???????
- IP?????????UDP???????
9tcpdump???
Checksum? ???
UDP??????? ???????
1 0.0 sun.1900 gt
gemini.echoudp 9(UDP cksum6e90) 2 0.303755
(0.30389) gemini.echo gt sun.1900udp 9(UDP
cksum0) 3 17.392480(17.0887) sun.1904
gtaix.echoudp 9(UDP cksum6e3b) 4
17.614371(0.2219) aix.echo gtsun.1904udp 9(UDP
cksum6e3b) 5 32.092454(14.4781) sun.1907 gt
solaris.echoudp 9(UDP cksum6e74) 6.32.314378(0.2
219) solaris.echo gt sun.1907udp 9(UDP
cksum6e74)
16bit????????????????
10??????????????
- ?????NFS????40???
- ?????????????????????????
- ARP?Ethernet?????????????Ethernet?????IP??????????
????? - ICMP?IP???????????IP???????TCPorUDP?????????
- TCP???UDP??????????
- ????UDP????????????????????
- TCP?????????????????????????
- UDP?TCP?????????????????????
- ???????????????
11UDP?????????
- ????????????????????????????
- ?????????????
- ???????
- ??????????????????
- ?????????????????????????
- ?????????
- ?????10245000
12IP Fragmentation
- Physical network??????????????????
- ??????????MTU(Maximum Transmit Unit)????
- ??????????
- ?????????????
- ????????????????????
- ?????????????????????????????
- ?????????????????????IP??????
- ???IP???????????
13(??)IP???
- IP????????????
- ???????????????????????
4??? ?????
16?????(???)
8???TOS
4??? ????
16??????
13??????????????
??? ???
20???
8????????
16????????????
8???????(TTL)
32??????IP????
- ????????????????????
- ????????????
????????????????
32?????IP????
?????(??)
???
14???????????
- ??????? ?????????
- ????IP???????????
- ????????????
- ??????????
- ????????????????????????
- IP????????????????????
- TCP???????????TCP??????????
- UDP??????
15???????????tcpdump
- 1 0.0 bsdi.1112 gt svr4.discard udp 1471
- 2 21.008303(21.0083) bsdi.1114 gt srv4.discard
udp 1472 - 3 50.449704(29.4414) bsdi.1116gt svr4.discard
udp1473 - (frag 26304 1480_at_0)
- 4 50.450040(0.0003)bsdi gt svr4(frag263041_at_1480)
- 5 75.328650(24.8786) bsdi.1118gtsvr4.discard udp
1474 - (frag 263131480_at_0)
- 6 75.328982(0.0003) bsdi gt svr4 (frag
263132_at_1480)
16????????????
- ethernet????????????1500???
- ?????????????1472???
IP??????
IP??? 20bytes
UDP??? 8bytes
UDP???(1473bytes)
IP??? 20bytes
UDP??? 8bytes
UDP???(1473bytes)
IP??? 20bytes
1byte
???? 1
???? 2
17ICMP Unreachable Error(Fragmentation Required)
- ????????????????
- ????????????????????????????
- ???????????????????
- ICMP??????
- ?????????MTU??????
- ??MTU???????????
18ICMP Unreachable Error
????????MTU????(???????0)
???(3)
??????
???(3)
8???
???(0)
????????MTU
IP???(????????) ?????IP??????????8???
19Traceroute???MTU????????!
- ????????????MTU?????????????????????
- ??traceroute???
- ???????????????????????
- ??????????????MTU?
- ICMP Unreachable Error???????
- ??????????????
20Traceroute?????MTU??
- traceroute.pmtu slip
- Traceroute to slip(140.252.13.65),30 hops max
- Outgoing MTU1500
- 1 bsdi(140.252.13.35) 53ms 6ms 6ms
- 2 bsdi (140.252.13.35) 6ms
- Fragmentation required DF set, next hop MTU 296
- 2 slip (140.252.13.65) 377ms 378ms 377ms
21UDP?????MTU??????
- ???????????????????????????????????????
- MTU?????????????????????????
- DF???(?????????)?????
- ?????????????????
- ???ICMP??????MTU????????????????????????
- 30???????DF??????????
- MTU????????
22UDP?????MTU??????
???tcpdump???
MTU1500
MTU1500
MTU1500
MTU1500
bsdi
netb
slip
sun
solaris
SLIP
SLIP
MTU296
MTU296
MTU1500
MTU552
DF?????????650byte?UDP??????
ICMP Cant fragment error
23??MTU?????? tcpdump
- 1. 0.0 solaris.38196gt slip.discardudp 650(DF)
- 2. 0.04199(0.0042)bsdigtsolarisicmp
- slip unreachable need to frag mtu 296(DF)
- 3. 4.950193(4.9460) solaris.38196gtslip.discardudp
650(DF) - 4. 4.954325(0.0041) bsdigtsolarisicmp
- slip unreachable need to frag mtu 296(DF)
- 5. 9.779855(4.8255) solaris.37974gtslip.discardudp
650(frag 35278272_at_0) - 6. 9.930018(0.1502)solarisgtslip (frag
35278272_at_272) - 7. 9.990170(0.0602) solarisgtslip (frag
35278114_at_544)
24Interaction Between UDP and ARP
- ARP??????????UDP?????????
- ?????????????????ARP request?ARP reply????????
- ????????????????ARP request???
- ARP????1????1 request???????????
- ??????????????????????
- ??????????????
25Interaction Between UDP and ARP
- ???ARP reply??5???
- ICMPtime exceeded during reassemblyerror
- ????????..????????
- ????????????????????????
- Timeout?????????????
- ??????????????????????
- ?????0?????????????????
- ???????????????????????????
26UDP?????????????
- ?????65535????IP??????????
- IP???????(16???)??
- UDP?65535 20(IP header) 8(UDP header)
65507??? - ?????????????
- ????????????????????????????(8192?????)
- TCP/IP???????????
- IP???????576????????
- ??????????????
- ????????
27ICMP Source Quench Error
28ICMP Source Quench Error
- ????????
- ????????
- ??UDP????????????????????
- TCP?????????????
- ????????????
- ?????????????????????
- UDP???????
- End-to-End??????????
29UDP??????
- ????IP?????????????????
- ???????????????
- ?????????????????????????????
- destination IP address??????UDP??????????
- ????????????????????????
- ?????????????????????
- ???????queing?????????
- ICMP Source Quench Error ??????????????
- FIFO(??????)
30UDP??????
- ????IP???????
- ????????
- ?????????????????????IP?????1??????????????IP????
????????????? - ??????????IP???????
- ???IP????UDP??????1??????
- ??????????
31???
- UDP?????????
- IP?????????????????????????
- IP??????????
- ICMP???????
- UDP?ARP?????
- ICMP????????