Title: Review TCP/IP
1Review TCP/IP
- Dr. Pipat Sookavatana
- Department of Computer Engineering
- Mahanakorn University of Technology
2Encapsulation Layer
3- http//www.us-cert.gov/cas/techalerts/TA04-111A.ht
ml - ww.cisco.com/warp/public/105/pmtud_ipfrag.html
- http//erg.abdn.ac.uk/users/gorry/course/inet-page
s/ip-cksum.html - http//www.webclasses.net/Courses/Protocols/7.0/De
moBuild/units/unit01/sec06a.html
4TCP/IP Structure
5Host to Network Layer (Physical Data Link )
- ??????????????????????????????????????????????????
?????????????????????????????????????????
???????????????????????????????????????? IP
??????????????????????????????????????????????????
???????????????????????????????
??????????????????????????????????????????????????
??????????
6Internet Layer (Network Layer)
- Packet Switching Network
- ???????????????? Connectionless
??????????????????????????????????????????????????
? Packet ????????????????????????????????????
????????????????????????????????????
??????????????????????????????????????????????????
?????????????????????????????????????????
?????????????????????????????????????????????????
??????? ??????????????????????????????????????????
??????????? - IP Protocol (RFC 791)
7- IP Protocol (RFC 791)
- Internet Protocol
- Addressing
- Routing (Source to Destination)
- Fragmentation for difference (MTU)
8(No Transcript)
9- Version 4 bits
- The Version field indicates the format of the
internet header. - IHL 4 bits
- Internet Header Length is the length of the
internet header in 32 bit words, and thus points
to the beginning of the data. Note that the
minimum value for a correct header is 5 (5 Row at
32 bits each) - TOS 8 bits
- Type of Service ??????????????????????????????????
?????????????????????????????????????????
?????????????????????????????????????? (Usually
for QoS used)
10- Total Length 16 bits
- ????????????????? Datagram ?????? ??????????
Bytes (Octets) - Max 65535 octets (16 bits)
- ?????????????????? ?????????????? (Fragment)
??????????????????? MTU (Maximum Transfer Unit)
?????????????????????? ???????????????????????????
???????????? - Host ??????????????????? MTU ??? 576 Bytes
??????????? Data Block 512 Bytes ??? Header Block
64 Bytes
11- Identification 16 bits
- ??????????????????????????????????????????????????
??????????????????????????????????????
identification ????????????????
12- Flags 3 bits
- Various Control Flags.
- Bit 0 reserved, must be zero
- Bit 1 (DF) 0 May Fragment, 1 Don't Fragment.
- Bit 2 (MF) 0 Last Fragment, 1 More
Fragments.
0
2
1
0
DF
MF
13- Fragment Offset 13 bits
- ???????????????????????????? Datagram
??????????????? ??????????????????????????????????
?????????????? - Time to Live 8 bits
- ????? Hop ??? Datagram ?????????????? ????
Network - ??????????????? CPEN1330 Computer Network
14- Protocol 8 bits
- Protocol ????? Datagram ??? ????????????
- Postel, J., "Assigned Numbers," RFC 790,
USC/Information Sciences Institute, September
1981. - Octate 1 ? ICMP 53,JBP
- Octate 6 ?TCP 34,JBP
- Octate 21 (17 Dec)? User Datagram 42,JBP
- Header Checksum 16 bits
- ???????????????? CheckSumIP (Download at berry)
15- Source IP address ??????? IP ???????????????
- Destination IP address ??????? IP
??????????????? - Data ????????????????????????
16IP Packet ProcessingTransmission of a frame over
Ethernet
17Reception of a frame from Ethernet
18ICMP (Internet Control Message Protocol)
- ICMP ?????????????????????????????????????????????
????????????? (Datagram) ?????????????????????????
????? ???? ???????????????????????????????????????
????? ICMP ???????????????????????????????????????
??????? ??????????? ???????????
???????????????????????? ICMP Message
?????????????????????????????? ???????????????????
??????????????? ICMP Message ???? Error ??????
?????????????????????????? ???????????????????????
??????????????? ????????????????
??????????????????????????????? ??? ICMP Message
??????????????????????????????????? ICMP
??????????????????????????????????????
(unreliable) ????????????????????
?????????????????????? Network Layer
????????????????????????????? ?????????????????
19(No Transcript)
20- Source Port Number ?????????????????????????????
??????? - Destination Port Number ????????????????????????
??????????????????? - UDP Length ??????????????????? ???????? Header
??? data ??????????????? ?????????????????????????
???? 8 ??????????????? Header - Checksum ???????????????????????????? UDP
datagram ?????????????????????? IP Header
???????????
21TCP (Transmission Control Protocol)RFC 793
22Port
Protocol
Use
21
FTP
File transfer
23
Remote login
Telnet
E-mail
25
SMTP
69
Trivial File Transfer Protocol
TFTP
Finger
Lookup info about a user
79
80
World Wide Web
HTTP
POP-3
110
Remote e-mail access
119
USENET news
NNTP
23- Source Port Number
- ????????????????????????????????????
??????????????????????????? "?????????????"
??????????????????????????? ??????????????????????
?????????? (Ephenumeral port) ) - Destination Port Number
- ???????????????????????????????????????????
(Service port) - Sequence Number
- ??????????????????????????????????????????????????
????????? ????????????????????????????????????????
????????????????????????? - Acknowledgment Number
- ????????????????????? Sequence Number
??????????????????? - Header Length
- ????????????????????????? TCP ??????????? 20 ????
??????????????????? ?????????????????? option
?????????????? 60 ???? - Flag
- ??????????????????????????????????? TCP
???????????????????????????????????? TCP ????????
???????????????????????????????????????????? ????
Flag ????????????? 6 ??? ?????????????
24(No Transcript)
25TCP Connection Establishment (3 Ways Handshake)
- ?????????????????? SYN Flag ??????????????????????
?????????????????????????????????????
?????????????? (ISN - Initial Sequence Number) - ?????????????????????????????????????????????????
1 ?????????????????????????? ISN ????????????????
1 ????????????????????????? (ISN) ????????
??????? SYN ??? ACK Flag - ??????????????????????????????????????????????????
2 ????????????????????? ?????????????? ISN
????????????????????? 1 ??????? ACK Flag
????????????????? connection ???? 3 ???????????
??????????????????? ??????????????????????????????
???????????????????? ?????????????????????????????
??????? Established
26Connection Termination
- ???????????????? FIN ACK Flag ????????????????
- ???????????????? ACK Flag ???????? FIN ACK Flag
????????????? - ??????????????????? ???????? ACK Flag
???????????????? - ??????????????? ??????????????????????????????????
?? ???????????????? ??????????????????????????????
???????????????? ?????????????????????????????????
??????????????????????????????????????? ????????
Half-Close
27TCP Connection Management Modeling
- The states used in the TCP connection management
finite state machine.
28TCP Connection Management Modeling (2)
TCP connection management finite state machine.
The heavy solid line is the normal path for a
client. The heavy dashed line is the normal path
for a server. The light lines are unusual
events. Each transition is labeled by the event
causing it and the action resulting from it,
separated by a slash.
29TCP Transmission Policy (2)
30TCP Transmission Policy (2)
- Clarks solution and Nagles algorithm
- ???????? Sender ????????? TCP ??????? 1 byte
(????????? Silly window syndrome)
31TCP Congestion Control
- An example of the Internet congestion algorithm.
32- Max size 1024
- Initial congestion window 64 KB
- ??????? Timeout ???? Threshold ??? Set ???? ½ (32
KB) ??? congestion window 1 KB - congestion window ????????? Exponentially (Slow
Start Algorithm (Jacobson, 1998) - ???? congestion window ??????????? Threshold (32
KB) ??????? congestion window ?????????? Linear
(???? 1 KB)