Bài giảng Computer Networks 1 (Mạng máy tính 1) - Lecture 8: Transport Layer and Socket Programming with Java - Phạm Trần Vũ

Computer Networks 1  
(Mạng Máy Tính 1)  
Lectured by: Dr. Phạm Trần Vũ  
1
Lecture 8: Transport Layer and  
Socket Programming with Java  
Reference:  
Chapter 6 - “Computer Networks”,  
Andrew S. Tanenbaum, 4th Edition, Prentice Hall, 2003.  
2
The Transport Service  
• Services Provided to the Upper Layers  
• Transport Service Primitives  
• Berkeley Sockets  
• An Example of Socket Programming:  
ꢀ An Internet File Server  
3
Services Provided to the Upper  
Layers  
The network, transport, and application layers.  
4
Transport Service Primitives  
The primitives for a simple transport service.  
5
Transport Service Primitives (2)  
The nesting of TPDUs, packets, and frames.  
6
Transport Service Primitives (3)  
A state diagram for a simple connection management scheme.  
Transitions labeled in italics are caused by packet arrivals. The  
solid lines show the client's state sequence. The dashed lines show  
7
the server's state sequence.  
Berkeley Sockets  
The socket primitives for TCP.  
8
Elements of Transport Protocols  
• Addressing  
• Connection Establishment  
• Connec
• Flow Control and Buffering  
• Multiplexing  
• Crash Re
9
Addressing  
• Application addresses on a host: Ports  
TSAPs, NSAPs and transport connections.  
10  
Connection Establishment  
Three protocol scenarios for establishing a connection using a  
three-way handshake. CR denotes CONNECTION REQUEST.  
(a) Normal operation,  
(b) Old CONNECTION REQUEST appearing out of nowhere.  
(c) Duplicate CONNECTION REQUEST and duplicate ACK.  
11  
Connection Release  
Abrupt disconnection with loss of data.  
12  
Connection Release (2)  
The two-army problem.  
13  
Connection Release (3)  
Four protocol scenarios for releasing a connection. (a) Normal  
case of a three-way handshake. (b) final ACK lost.  
14  
The Internet Transport Protocols  
ꢁ UDP – User Datagram Protocol  
•
Connection-less service  
•
Useful in client-server situations: Remote  
Procedure Call, real-time AV streaming  
ꢁ TCP – Transmission Control Protocol  
•
Connection oriented service  
•
Reliable byte stream services over unreliable  
network  
•
Most widely used in Internet  
15  
UDP Header  
16  
TCP Service Model  
ꢁ Sender and receiver need to create  
connection end-points first, called sockets  
ꢁ Each socket is addressed by the host IP  
address and a port number  
ꢁ Port numbers < 1024 are reserved  
ꢁ TCP connections are full-duplex  
17  
Typical TCP Applications and Ports  
Port  
21  
Protocol  
FTP  
Use  
File transfer  
23  
25  
69  
Remote login  
E-mail  
Telnet  
SMTP  
TFTP  
Finger  
Trivial File Transfer Protocol  
Lookup info about a user  
World Wide Web  
Remote e-mail access  
USENET news  
79  
80  
HTTP  
POP-3  
110  
119  
NNTP  
18  
The TCP Segment Header  
19  
TCP Connection Establishment  
(a) TCP connection establishment in the normal case.  
(b) Call collision.  
20  
Tải về để xem bản đầy đủ
pdf 33 trang yennguyen 23940 Free
Bạn đang xem 20 trang mẫu của tài liệu "Bài giảng Computer Networks 1 (Mạng máy tính 1) - Lecture 8: Transport Layer and Socket Programming with Java - Phạm Trần Vũ", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

File đính kèm:

  • pdfbai_giang_computer_networks_1_mang_may_tinh_1_lecture_8_tran.pdf