Title: TCP '
1????? ???????? ?? ???????? TCP ?? ???????.
???? ????? ????. ???????? ?? ??? ????
??????.
2????
- ??????? ????? ????? (????
Unix,Ms-Windows) ????? ???????? TCP/IP
??? ???????? ???????? ????? ?? ????
???? ???? ???? ? Timeout .
3???? (????)
- ??????? ??????? ???? ????? ????? ???? ??????
???????? ?"? ??? ??? ??????. ????? ???? ?????
???????? ?????? ???? ?????? ?? ?? ???????
?????? ??? ???? ????? ????? ?? ???? ??????
????????? ?? ????? ???? ?????? ???? ???? ?????
???? , ?? ????? ???? ??????/????? ????? ?????
????? ????/???? ????? ????? ??????? ???? ????.
4????(????)
- ???? ???????? ???? ????? ????? ??????
????????? ???? ???? ???? ???? ???????
???????? ????? ????? ????? ???????. ?"?
??? ????? ???????? ?????? ?? ??? ? TCP/IP
?????? ????? ????? ?????? ???? ???? ???? ????
???? ??? ??? ??????? ????.
??????? ??????? ?? ???? ????? ????? ???? ?? ?????
??? ??? ?????? ???? ???? ?????? ????? ????
????.
5???? (????)
- ???? ?????? ???? ????? ?? ???????? ?????? ?? ????
- ?????? , ??????? ?"? ??? ????? ?? ??????
(?????? ??? ?????) - ???? ?? ????? ?????? ?????? ???? ???????.
6????? ????
?????? ????? ???? ?????? ????? ? Linux
. - ????? ????? ???? ???? ???? ???? ?????
??????. - ????? ???? ? Unix.
7???? ?????? ???? ??????
BSD Socket
Inet Socket
TCP
UDP
IP
SLI
Ethernet
PLIP
SLIP
Ethernet card
Parallel port
Serial port
8???? ?????? ???? ?????
????? data ????? len
write(socket,date,len) --- user level
sock_write() --- BSD level
????? ????? ?'
inet_sendmsg() --- Inet level
tcp_sendmsg() --- TCP level
tcp_send_skb() and ip_queue_xmit() --- sending to
IP level
???? ??? ?????? ??????? ????? ?'
9???? ?????? ???? ????? (????)
tcp_rcvmsg() --- TCP level
????? ????? ?'
inet_rcvmsg() --- Inet level
sock_read() --- BSD level
read(socket,data,len) --- User level
10TimeOut - ???????
- ?"? Jacobson (1988)
- RTT RTT_Olda (1-a)M. (a usually 7/8).
- RTT- round trip time.
- M - New round Trip time sampled.
- Timeout ßRTT. (Jacobson proposed ß 2).
- ????? ?? ???? ??????
- D aD (1- a) RTT M D sampled
variance. - Timeout RTT 4D.
-
-
11TimeOut - ??????? (????)
- ???? Karn ??????? ???????? ???? ?? Timeout
- Timeout ?Timeout (typically ?2)
12???????? ???????
- ????? Timeout ???? ????????
- ?"? ????? tcp_timeout_flag ???? ?? ???????
?????? - ??? ???? (????? ???? Const)
- ???? ????? ????? ?????. ( ????? ???? Scalar).
- ??? ? Timeout ?????? tcp_timeout_value.
13???????? ??????? (????)
- ??? ????? ??? ????? ???????
- ?"? ?????? tcp_cost_flag ???? ??? ????? ????
- ???? ?????? ???? ?? ?????? ???. (??? Byte ??
Packet). - ??? ?????? ???????
- tcp_byte_cost,tcp_packet_cost,tcp_time_cost
- ?"? ??? ????? ???? ???? ??????.
14???????? ??????? (????)
????? ?????? ??? ??? ???"? ????? ?????? ?? ?????
????? ?? ????? ????? ??"? ?? ????? ?? ?????
?????????. - ???? /etc/tcp.conf -
?????? /root/tcpchg/get_tcpchg.
15???????? ??????? (????)
????? ?????? ?????? ???? ?? ????????? (????
??????). - ???? /var/log/tcp.log -
?????? /root/tcpchg/tcp_log_me.
16???????? ???? ????
???????? ???? ???? ?????? - ????? ??????
????"? ??? ????????? ?????? ?????. -
????? ???????? ?"? ????? ?????. - ????? ???
?????. ??? ???? ?? ???????? ???? ?? ?????
Linux . . .
17????? ???????? ???? ?????
???? ??? ????? ????? ???? . ???? ????? telnet
????? ?????? ???? ???? ?? ?????? ???? ??????
????? ????? ????? ?????? ???? ???? Timeout
?????. (?????? ???? ???? ???? ????? ?????? ???
????? ????? ????????).
18????? ???????? ???? ????? )????)
the cost parameters - 0.002 per second ( 0.2
cent ) 0.001 per byte ( 0.1
cent) default timeout - Jun 21 121953 TCP_LOG
Session 134325 , Time 62 Jun 21 121953
TCP_LOG Packets sent 136 , Bytes sent
660 Jun 21 121953 TCP_LOG Connection Cost
0.784 Jun 21 121953 TCP_LOG End of Session
134325 default 0.7 - Jun 21 122610
TCP_LOG Session 171111 , Time 71 Jun 21
122610 TCP_LOG Packets sent 136 , Bytes sent
691 Jun 21 122610 TCP_LOG Connection Cost
0.833 Jun 21 122610 TCP_LOG End of Session
171111 default 0.3 - Jun 21 122924
TCP_LOG Session 190497 , Time 72 Jun 21
122924 TCP_LOG Packets sent 166 , Bytes sent
863 Jun 21 122924 TCP_LOG Connection Cost
1.007 Jun 21 122924 TCP_LOG End of Session
190497 default 0.1 - Jun 21 123308
TCP_LOG Session 213314 , Time 67 Jun 21
123308 TCP_LOG Packets sent 281 , Bytes sent
1724 Jun 21 123308 TCP_LOG Connection Cost
1.858 Jun 21 123308 TCP_LOG End of Session
213314
19????? ???????? ???? ????? (????)
deault 1.3 - Jun 21 124210 TCP_LOG Session
267278 , Time 70 Jun 21 124210 TCP_LOG
Packets sent 140 , Bytes sent 640 Jun 21
124210 TCP_LOG Connection Cost 0.780 Jun
21 124210 TCP_LOG End of Session
267278 default 1.7 - Jun 21 124612 TCP_LOG
Session 290676 , Time 78 Jun 21 124612
TCP_LOG Packets sent 130 , Bytes sent
610 Jun 21 124612 TCP_LOG Connection Cost
0.766 Jun 21 124612 TCP_LOG End of Session
290676 default 2 - Jun 21 124834 TCP_LOG
Session 305780 , Time 69 Jun 21 124834
TCP_LOG Packets sent 128 , Bytes sent
610 Jun 21 124834 TCP_LOG Connection Cost
0.748 Jun 21 124834 TCP_LOG End of Session
305780
20???? ???????? ???????? ??? ????? ???? . . .
21?????? . . .
????? ???