CPE 426 Computer Networks Week 7 Chapter 25

  • Slides: 51
Download presentation
CPE 426 Computer Networks Week 7: Chapter 25: UDP Chapter 26: TCP

CPE 426 Computer Networks Week 7: Chapter 25: UDP Chapter 26: TCP

TOPICS n Chapter 25: UDP (User Datagram Protocol) n n Connectionless and Protocol Communication

TOPICS n Chapter 25: UDP (User Datagram Protocol) n n Connectionless and Protocol Communication Semantics and Port Numbers UDP Format and Encapsulation Chapter 26: TCP (Transmission Control Protocol) n n n n Transport Services Transport Protocol Techniques Congestion Control/Avoidance Techniques Packet Loss and Adaptive Retransmission Buffers, Flow Control and Windows TCP Three-Way Handshake TCP Congestion Control TCP Segment Format

Ch. 25: 25. 2 Transport Protocol and End-to-end Communication n IP ไมม Mechanism ในการแยกแยะระหวางหลายๆ

Ch. 25: 25. 2 Transport Protocol and End-to-end Communication n IP ไมม Mechanism ในการแยกแยะระหวางหลายๆ Application ทสงในระดบ End-to-end n n n Field ใน IP Header กำหนดแค IP Address คอหมายเลขของ Host เทานน Host คอ End Point ในมมมองของ IP เราตองการ Transport Layer Protocol n n End Point ของ Transport Protocol คอ Application ดงนน End-to-End Protocol ทแทจรงใน TCP/IP จะอยใน Transport Protocol แยกตางจาก IP เปน Layer 4

Ch. 25: 25. 3 The User Datagram Protocol n TCP/IP จะมสอง Transport Protocol n

Ch. 25: 25. 3 The User Datagram Protocol n TCP/IP จะมสอง Transport Protocol n User Datagram Protocol(UDP) (Protocol 17; 0 x 11) n n ไมมความสลบซบซอน และงาย แตจะไมม Service อะไรมากนกใหกบผใช Transport Control Protocol(TCP) UDP จดวาเปน n n n End-to-end สามารถแยกแตละ Application ได Connectionless เชอมตอโดยไมตองทำ Connection Message-Oriented แตละขอมลท Application สงจะถอวาเปนหนง Message ไมมการทำ Segmentation Best-Effort ใช IP ในการสงโดยไมม Mechanism เพมเตม Arbitrary Interaction แตละ Application สามารถสงใหกบหลาย และรบไดจากหลาย Application OS Independent

Ch. 25: 25. 7 Mode of Interaction and Broadcast Delivery n UDP จะยอมใหมการสงขอมลได แบบ

Ch. 25: 25. 7 Mode of Interaction and Broadcast Delivery n UDP จะยอมใหมการสงขอมลได แบบ n n 1 -to-1 1 -to-Many n n n หนง Application สามารถสง Message ใหหลาย Application UDP ยอมให Application สง Message ผาน Multicast หรอ Broadcast Many-to-1 n n 4 หนง Application สามารถรบ Message จากหลายผสง Many-to-Many n กลมของ Application สามารถแลกเปลยนขอมลกบกลมของ Application

Ch. 25: 25. 8 End Point Identification with Protocol Port n n UDP Port

Ch. 25: 25. 8 End Point Identification with Protocol Port n n UDP Port 16 Bit จาก 0 – 65535 กำหนดการใชงานโดย IANA(ปจจบนเปน Department ของ ICANN, Internet Corporation for Assigned Names and Numbers) n n n Internet Assigned Numbers Authority Port 0 Reserved แตใชไดสำหรบเปน Port สงและไมตองการรบ Port 0 – 1023 สำหรบ Common, Well-Known Service Port 1024 – 49151 เปน Registered Port สำหรบ Application ทขนทะเบยนไวกบ IANA Port 49152 – 65535 เปน Dynamic Port ทสามารถนำไปใชได

Ch. 25: 25. 9 UDP Datagram Format n แตละ UDP Message เรยกวา User Datagram

Ch. 25: 25. 9 UDP Datagram Format n แตละ UDP Message เรยกวา User Datagram ซงจะถกแบงเปนสองสวนคอ Header ขนาดสนๆ (8 Octet) และ Payload n UDP Message Length จะกำหนดขนาดของ Message รวม Header เปน Byte

Pseudo Header สำหรบ n IPv 6 Next Header = UDP(0 x 11, 17) Pseudo

Pseudo Header สำหรบ n IPv 6 Next Header = UDP(0 x 11, 17) Pseudo Header

Ch. 25: 25. 11 UDP Encapsulation n UDP บรรจใน IP โดยใช Protocol เบอร 17

Ch. 25: 25. 11 UDP Encapsulation n UDP บรรจใน IP โดยใช Protocol เบอร 17 (0 x 11)

Chapter 26 n n n TCP Transport Control Protocol Reliable Protocol for the Internet

Chapter 26 n n n TCP Transport Control Protocol Reliable Protocol for the Internet

Chapter 26 TCP: 26. 4 End-to-End Service and Virtual Connection n TCP จดวาเปน เหมอน

Chapter 26 TCP: 26. 4 End-to-End Service and Virtual Connection n TCP จดวาเปน เหมอน UDP n n เนองจากมนใหบรการการสอสารระหวาง Application ของสอง Computer แตมนเปน n End-to-End Protocol Connection-Oriented เนองจากตองมการทำ Connection กอนสงขอมล และตองมการทำ Disconnection Connection ของ TCP จดวาเปน Connection n Virtual เนองจากกระทำผาน Software เพราะตว Network (IP) นนเปน Connectionless(Datagram)

Replay (Selective Reject) 0 1 2 3 4 5 6 7 8 2 0

Replay (Selective Reject) 0 1 2 3 4 5 6 7 8 2 0 1 2 X 3

Chapter 26 TCP: 26. 5. 3 Techniques to Avoid Replay n Replay ยงสามารถเกดกบ Packet

Chapter 26 TCP: 26. 5. 3 Techniques to Avoid Replay n Replay ยงสามารถเกดกบ Packet ไดเชนกน n Control เชน Connection Closing Packet ถก Delay และไปถงหลงจากมการทำ Connection ใหมครงทสอง

Chapter 26 TCP: 26. 5. 4 Flow Control to Prevent Data Overrun

Chapter 26 TCP: 26. 5. 4 Flow Control to Prevent Data Overrun

Chapter 26 TCP: 26. 6 Techniques To Avoid Congestion n Congestion เกดเมอมขอมลทจะสงมากเกนก วาท Network

Chapter 26 TCP: 26. 6 Techniques To Avoid Congestion n Congestion เกดเมอมขอมลทจะสงมากเกนก วาท Network จะรบได n n n อธบายไดโดยใช Queuing Theory Packet จะถก Delay ไปมาก ในลกษณะ Exponential ถา Queue ลน Packet จะสญหาย 1 Gbps

Chapter 26 TCP: 26. 8 Techniques Used In TCP To Handle Packet Loss

Chapter 26 TCP: 26. 8 Techniques Used In TCP To Handle Packet Loss

Chapter 26 TCP: 26. 10 Comparison of Retransmission Timer n พจารณาจากการเกด Packet Loss ของสอง

Chapter 26 TCP: 26. 10 Comparison of Retransmission Timer n พจารณาจากการเกด Packet Loss ของสอง Network ทม Delay ตางกน n ถา Delay มคาสง ทสงตาม TCP จะตงคา Timer

Chapter 26 TCP: 26. 11 Buffers, Flow Control and Windows(3)

Chapter 26 TCP: 26. 11 Buffers, Flow Control and Windows(3)

Chapter 26 TCP: 26. 12 TCP Three. Way Handshake(Open Connection)

Chapter 26 TCP: 26. 12 TCP Three. Way Handshake(Open Connection)

Chapter 26 TCP: 26. 12 TCP Three. Way Handshake(Close Connection)

Chapter 26 TCP: 26. 12 TCP Three. Way Handshake(Close Connection)

Chapter 26 TCP: 26. 14 TCP Segment Format n ม Format เดยว ใชกบ Message,

Chapter 26 TCP: 26. 14 TCP Segment Format n ม Format เดยว ใชกบ Message, Acknowledge, SYN, FIN n n แตละ Message ของ TCP เรยก Segment แตละ Segment สามารถสง Data, Acknowledge ของ Data ทไดรบ , Window Advertisement n n Acknowledgement Number และ Window Field หมายถง Data ทไดรบ คอ Sequence Number เรมตนของ Data ถดไปทตองการ และ Buffer ทเหลอ ถา Data ทไดไมเปน Order มนจะสง Ack Number ของ Data ทคาดหวงซำๆจนกวาจะไดรบ Sequence Number หมายถง Sequence Number ของ Byte แรกของ Data ทสง Checksum จะเปน Checksum ของ Header และ Data Code Bit บงบอกวาเปน Segment ชนดใหน (Data, SYN, FIN)

Chapter 26 TCP: 26. 14 TCP Segment Format

Chapter 26 TCP: 26. 14 TCP Segment Format

End of Week 7 n Next Week, Week 10 หลง Midterm n Routing Part

End of Week 7 n Next Week, Week 10 หลง Midterm n Routing Part I: Routing Mechanism n Prepare for MT n MT Exam 35% n n n M 9 March 2015; 13. 30 – 16. 00, 2 -1/2 hr. ไมมการ Makeup Exam 6 ขอ ขอละ 10 คะแนน รวม 60 คะแนน เกบ 35% หามใชเครองคดเลข