Internet????????? - PowerPoint PPT Presentation

1 / 57
About This Presentation
Title:

Internet?????????

Description:

Title: Part I: Introduction Author: Don Towsley Last modified by: vaio Created Date: 10/8/1999 7:08:27 PM Document presentation format: – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 58
Provided by: DonT332
Category:
Tags: internet | reno

less

Transcript and Presenter's Notes

Title: Internet?????????


1
?8?(?) ???
  • ????
  • ??????????
  • ??/??
  • ??????
  • ????
  • ????
  • Internet?????????
  • ?????
  • ?8?
  • ????
  • ??????
  • ??/??
  • ?????? UDP
  • ????????
  • ??????? TCP
  • ????
  • ????
  • ????
  • TCP????

2
???????
  • ??????????????????
  • ????????????
  • ?? vs. ?????
  • ??? ?????????
  • ??? ????????
  • ???, ???, ??????

3
?????
  • Internet ????
  • ??, ??????? (TCP)
  • ????
  • ????
  • ????
  • ???? (????), ??????????? UDP
  • ???????
  • ???
  • ????
  • ???????

4
??/??(multiplexing/Demultiplexing)
  • ?? segment (?)- ?????????????
  • TPDU ???????

?? ?????????????????
receiver
P3
P4
application-layer data
segment header
P1
P2
segment
H
t
M
segment
5
??/??
???????????, ???(???????)????
32 bits
???
???
??????
  • ??/??
  • ?????, ???????, IP ??
  • ?, ???? s ???????
  • ?? ????????????(well-known port number)

????? (??)
TCP/UDP ???
6
??/?? ??
Web??? ?? C
??? B
?? A
????? ??? telnet ??
Web ??? B
Web??? ?? A
????? Web ???
7
UDP ??????? RFC 768
  • ???? Internet ????
  • ????? ??, UDP ?????
  • ??
  • ?????????
  • ???
  • ?UDP??????, ??????
  • ?? UDP ???????????
  • ????? UDP?
  • ?????? (?????)
  • ?? ?????????????
  • ????
  • ????? UDP ????????

8
UDP (?)
  • ??????????
  • ??????
  • ???????
  • ?? UDP?? (why?)
  • DNS
  • SNMP
  • ????? UDP?????????????????
  • ??????-?????????!

32 bits
???
???
??, UDP ?????, ????
checksum
length
????? (??)
UDP ?????
9
UDP ???(checksum)
?? ????????? (e.g., ??)
  • ???
  • ???????????????
  • ?????????????????
  • NO ????
  • YES ?????. ???????????
  • ???
  • ?????????16???
  • checksum ???????(???)
  • ????????? UDP checksum ??

10
????????
  • ???????????????
  • ???????top-10 ????!
  • ???????????????????(rdt)????

11
?????? ????
???
???
12
?????? ????
  • ????
  • ????????????????? (rdt)
  • ??????????
  • ??????????!
  • ??????? (FSM) ??????, ???

?? ??????????, ??????????????
?????????
???????????
13
Rdt1.0 ???????????????
  • ??????????
  • ??????
  • ??????
  • ???????????? FSMs
  • ??????????????
  • ??????????????

14
Rdt2.0 ?????????????
  • ???????????????????
  • ?? UDP checksum ?????
  • ?? ????????
  • ???? (ACKs) ????????????????
  • ???? (NAKs)????????????????,??????
  • ??????NAK???????
  • ??????????? ACKs, NAKs?
  • rdt2.0???? (? rdt1.0????)
  • ????
  • ?????? ???? (ACK,NAK) rcvr-gtsender

15
rdt2.0 ???????
????FSM
???FSM
16
rdt2.0 ???? (?????)
??? FSM
??? FSM
17
rdt2.0???? (????)
??? FSM
???FSM
18
rdt2.0 ????????!
  • ?ACK/NAK ?????
  • ????????????????!
  • ?????? ????????
  • ????
  • ?? ACK/NAK ??????? ACK/NAK? ???????? ACK/NAK ???
  • ??, ???????????????!
  • ???????
  • ??????????sequence number (??)
  • ??ACK/NAK??,???????????
  • ?????????? (?????)

?????????,??????????
19
rdt2.1 ???, ????? ACK/NAK
20
rdt2.1 ???, ????? ACK/NAK
21
rdt2.1 ??
  • ???
  • ????seq
  • ?? s (0,1) ??,????
  • ????ACK/NAK
  • ?????
  • ?? ?? ??,?? ??????? 0 ? 1 seq.
  • ???
  • ?????????? ????
  • ??????0 ? 1 ????? seq
  • ?? ??????????ACK/NAK ??????????

22
rdt2.2 ? NAK???
??? FSM
  • ????? rdt2.1, ???? ACK
  • ??? NAK, ???????????????? ACK
  • ?????????ACK ??? seq
  • ???????ACK?? NAK????? ???????

!
23
rdt3.0 ????????????
  • ???? ??????????? (??? ACK)
  • checksum, seq. , ACK, ????????,??????
  • Q ?????????
  • ???????,??????ACK ???, ????
  • ??? ???
  • ?? ?????ACK?? ??? ??
  • ?????????????????
  • ????(? ACK)?????? (????)
  • ???????, ???seq. s ????
  • ???????? ACK??? seq
  • ???????

24
rdt3.0 ???
25
rdt3.0 ???
26
rdt3.0 ???
27
rdt3.0???
  • rdt3.0 ??, ??????
  • ?? 1 Gb/s ??, 15 ms ??????, 1KB ??
  • 1KB ??? 30 ms -gt 33kB/sec ? 1 Gb/s ???????
  • ??????????????!

28
?????
  • ???? ????????????????
  • ??????????
  • ???????????
  • ?????????? ?N?????(go-Back-N), ????

29
??N?????(Go-Back-N)
  • ???
  • ???????k? seq
  • ?????N?????, ?????????????
  • ACK(n) ACK??n???,??n??????-- ???ACK
  • ???????ACK (????)
  • ??????(in-flight)????????(timer)
  • ?????timeout(n) ??n??n????????

30
GBN ?????? FSM
????
????
ACK???
31
GBN ?????? FSM
  • ?????
  • ACK-only ??????????????( in-order )??? seq
    ??ACK
  • ???????ACKs
  • ?????? expectedseqnum(?????)
  • ????
  • ?? (???) -gt ???????!
  • ???????????? seq ??ACK

32
GBN ???
33
????(SR)
  • ???????????????????
  • ????,?????(??)??????, ?????????????
  • ?????????????????
  • ??????unACKed ???????
  • ??????
  • N ???? seq s
  • ???????seq s, unACKed??????

34
???? ???, ??????
35
????
  • ??n??rcvbase, rcvbaseN-1
  • ?? ACK(n)
  • ?? ??
  • ?? ????? (??????????????), ????????????????
  • ??n?? rcvbase-N,rcvbase-1
  • ?????????,?????ACK(n)
  • ???? ????
  • ??????
  • ?????????????,????
  • timeout(n)?n??????
  • ????n, ?????
  • ACK(n) ??sendbase,sendbaseN
  • ???? n ????
  • ?n?unACKed???????, ???????????unACKed seq

36
???????
37
TCP ?? RFCs 793, 1122, 1323, 2018, 2581
  • ???????
  • ??????????
  • MSS maximum segment size(??????-1500,536,512)
  • ????
  • ???? (??????) ????????????????,????
  • ????
  • ????????????????????
  • ???
  • ?????, ?????
  • ??, ??????
  • ? ????,???????
  • ?????
  • TCP????????,??????
  • ?? ????

38
TCP ???
URG urgent data (????)
?????????? (?????!)
ACK ACK valid
PSH push data now (????)
bytes ????????
RST, SYN, FIN connection estab (setup,
teardown commands)
Internet checksum (as in UDP)
39
TCP seq. s ? ACKs
  • Seq. s
  • ??????????(????)???? ??
  • ACKs
  • seq ?????????????????
  • ??? ACK
  • Q ?????????????
  • A TCP ????, - ????????

Host B
Host A
User types C
Seq42, ACK79, data C
host ACKs receipt of C, echoes back C
Seq79, ACK43, data C
host ACKs receipt of echoed C
Seq43, ACK80
??? telnet ??
40
TCP ??????
event data received from application above
??????, ??
  • ??????
  • ???, ????

create, send segment
wait for event
event timer timeout for segment with seq y
wait for event
retransmit segment
event ACK received, with ACK y
ACK processing
41
TCP ??????
00 sendbase initial_sequence number 01
nextseqnum initial_sequence number 02 03
loop (forever) 04 switch(event) 05
event data received from application above 06
create TCP segment with sequence
number nextseqnum 07 start timer for
segment nextseqnum 08 pass segment
to IP 09 nextseqnum nextseqnum
length(data) 10 event timer timeout for
segment with sequence number y 11
retransmit segment with sequence number y 12
compue new timeout interval for segment y
13 restart timer for sequence number
y 14 event ACK received, with ACK field
value of y 15 if (y gt sendbase) /
cumulative ACK of all data up to y / 16
cancel all timers for segments with
sequence numbers lt y 17
sendbase y 18 19
else / a duplicate ACK for already ACKed
segment / 20 increment number
of duplicate ACKs received for y 21
if (number of duplicate ACKS received for y
3) 22 / TCP fast
retransmit / 23 resend
segment with sequence number y 24
restart timer for segment y 25
26 / end of loop forever /
??? TCP ???
42
TCP ACK ?? RFC 1122, RFC 2581
TCP ?????? ?? ACK. ?? 500ms ??????????.
????, ??ACK ?????? ??? ACK ????? ACK, ?? seq.
????????? ?? ACK,???????????????
?? ???????, ??????, ????????? ACKed ???????,
??????, ????? ACK ?? ??????? seq.
????? ???? ??????????????????
43
TCP ????
Host A
Host B
Seq92, 8 bytes data
Seq100, 20 bytes data
Seq92 timeout
ACK100
ACK120
Seq100 timeout
Seq92, 8 bytes data
ACK120
????, ?? ACKs
44
TCP ????
  • ??? ??????? (??????) ??????
  • RcvWindow TCP ??????
  • ??? ????????, unACKed ??????????RcvWindow

??????????????????????????
RcvBuffer ???? TCP ???? RcvWindow ????????
?????
45
TCP ???????(RTT)???
  • Q ???? RTT?
  • SampleRTT ?????????ACK ?????????
  • ????, ?? ACKed ???
  • SampleRTT ?????, ?????? RTT ???
  • ???????????, ?????????? SampleRTT
  • Q ???? TCP ?????
  • ??RTT???
  • ?? RTT ???!
  • ??? ??????
  • ????????
  • ??? ????????????

46
TCP RTT ??? (p246)
EstimatedRTT (1-x)EstimatedRTT xSampleRTT
  • ????????(EWMA)
  • ????????????????
  • X????? 0.125?1/8
  • ????
  • EstimtedRTT ?? ????(safety margin)
  • ?? EstimatedRTT???? -gt ??????

Timeout EstimatedRTT 4Deviation
Deviation(??) (1-x)Deviation
xSampleRTT-EstimatedRTT
47
TCP ????
  • ?? TCP ???????????????????
  • ??? TCP??
  • seq. s
  • ??, ?????? (e.g. RcvWindow)
  • ??? ??????
  • Socket clientSocket new Socket("hostname","p
    ort number") -JAVA
  • ??? ????????
  • Socket connectionSocket welcomeSocket.accept()
  • (????)????
  • Step 1 ????end system?????? TCP SYN ?????
  • ?????? seq
  • Step 2 ????end system?? SYN, ?SYNACK???????
  • ACKs ???? SYN
  • ????
  • ?? server-gt receiver ??? seq.
  • Step 3????end system??????ACK
  • ACKs ????????
  • ????

48
TCP???????????
??SYN??(SEQx)
??SYN??(SEQx)
??SYN?? (SEQy, ACKx1)
??SYN?? (SEQy, ACKx1)
????(ACKy1)
????(ACKy1)??????
49
TCP ???? (?)
  • ????
  • ??????? clientSocket.close()
  • Step 1 ??? end system ?? TCP FIN ???????
  • Step 2 ??? ?? FIN, ? ACK??. ????, ?? FIN.

50
TCP ???? (?)
  • Step 3 ??? ?? FIN, ? ACK????.
  • ???????FIN??ACK-???? timed wait(????)
  • Step 4 ???, ?? ACK. ????.
  • ?? ????,???????????FINs.

client
server
closing
FIN
ACK
closing
FIN
ACK
timed wait
closed
closed
51
TCP???????????
????????
???????
?????????
??FIN??(SEQx)
??FIN??(SEQx)
TCP????(ACKx1)?
??ACK??(ACKx1) A?B?????(???) ?A??????
??FIN??? (SEQy, ACKx1)
??FIN??(SEQy)
TCP????(ACKy1)
????(ACKy1) B?A?????
52
??????
  • ??
  • ?????? ???????????????????????????
  • ???????!
  • ??
  • ?????? (???????)
  • ?????? (??????????)
  • ??????????a top-10 problem!

53
TCP ????
  • ?????? (??????)
  • ??????????????????????Congwin??

Congwin
  • w?????, ???? MSS??,??? RTT?????

54
TCP ????
  • ?? ??
  • slow start(???)
  • congestion avoidance(????)
  • ????
  • Congwin
  • threshold ?????????,??????????
  • ?? ????
  • ???? ???? (Congwin ????) ??????
  • ?? Congwin ???????? (??)
  • ???? ?? Congwin, ??????????(??Congwin)

55
TCP Slowstart(???)
Host A
Host B
one segment
RTT
initialize Congwin 1 for (each segment ACKed)
Congwin until (loss event OR
CongWin gt threshold)
two segments
four segments
  • ????????? (?? RTT) (????!)
  • ???? ??(Tahoe TCP) ?/????? ACKs (Reno TCP)

56
TCP ????
????
/ slowstart is over / / Congwin gt
threshold / Until (loss event) every w
segments ACKed Congwin threshold
Congwin/2 Congwin 1 perform slowstart
1
1 ????????ACK?,TCP Reno ??? slowstart (????
) ????,Congwin???????,????,?????
57
??? ??
  • ???????
  • ??/??
  • ??????
  • ????
  • ????
  • ????????????
  • UDP
  • TCP
  • ???
  • ??????? (??/ ???)
  • ????? ??
Write a Comment
User Comments (0)
About PowerShow.com