Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Topic 2 – Lesson 2 Understanding TCP/IP via an Analogy SRA 221.

Similar presentations


Presentation on theme: "1 Topic 2 – Lesson 2 Understanding TCP/IP via an Analogy SRA 221."— Presentation transcript:

1 1 Topic 2 – Lesson 2 Understanding TCP/IP via an Analogy SRA 221

2 2 Basic Questions What is the Internet? How does the Internet work? How do two computers use TCP ports and IP addresses to talk to (or communicate with) each other?

3 3 What is the Internet? Purpose of the Internet: enable any two computers to talk to each other Computer 1 and Computer 2 chat online Computer 1 sends an IM to Computer 2 The Simplest Internet = Computer 1 (sender) + (a bunch of routers) + Computer 2 (receiver) A bunch of routers Computer 1 Computer 2

4 4 How does the Internet work? The routers relay the message from the sender to the receiver The message is contained in a packet, which could be viewed as an envelope The packet could get lost or corrupted during transmission For reliability, the receiver will typically send an acknowledgement note back There may exist multiple routes (or paths) from the sender to the receiver

5 5 How to use TCP ports and IP addresses (1) 101102 404 Hilton Hotel 234 Moonrise Ave Boston, MA 02116 101102 404 Sheraton Hotel 678 Sunrise Ave Los Angelos, CA 203 Alice Bob Room 404 Sheraton Hotel 678 Sunrise Ave Los Angelos, CA xxxxx Envelope When Alice sends a letter to Bob, what to put on the envelope?

6 6 How to use TCP ports and IP addresses (2) Envelope When Alice sends a letter to Bob, what to put on the envelope? Bob Room 203 Sheraton Hotel 678 Sunrise Ave Los Angelos, CA TCP Port IP address

7 7 How to use TCP ports and IP addresses (3) 101102 404 Hilton Hotel 234 Moonrise Ave Boston, MA 02116 101102 404 Sheraton Hotel 678 Sunrise Ave Los Angelos, CA 203 Alice Bob TCP Ports IP addresses

8 8 How to use TCP ports and IP addresses (4) 101102 404 Hilton Hotel 234 Moonrise Ave Boston, MA 02116 101102 404 Sheraton Hotel 678 Sunrise Ave Los Angelos, CA (310) 642-1111 203 Alice Bob When Alice calls Bob, what number to dial? (310) 642-1111Ext. 203 TCP port numberIP address

9 9 How to use TCP ports and IP addresses (5) 10123 Receiver PC IP address: 130.126.2.45 80 What does a TCP port mean in computer world? -- Multiple programs are running on a single computer -- We assign a port number to each program -- Two types of programs: -- Service-providing programs -- Service-requesting programs -- The first 1,024 ports are reserved for services Web server program 1025 IE browser program 1 1124 IE program 2 Telnet server program

10 10 How to use TCP ports and IP addresses (6) 101102 Sender computer IP address: 162.11.200.5 101102 404 Receiver computer IP address: 130.126.2.45 80 When browser X sends a message to the Web server: TCP port numberIP address 130.126.2.4580 Web server program Message content 1025 Browser Program X The simplest packet

11 11 (7) The simplest packet has a drawback! Sender computer IP address: 162.11.200.5 When browser X sends a message to the Web server: TCP port numberIP address 130.126.2.4580Message content 1025 Browser Program X The simplest packet 101102 Receiver computer IP address: 130.126.2.45 80 Web server program Drawback: there is NO return address!!! When the receiver sends back the acknowledgement, the receiver will cry – because …

12 12 (8) How to establish a TCP connection between two ports? A TCP connection Step 1: establish the connection Step 2: send the messages back and forth Step 3: terminate the connection A phone call session Step 1: Dial the phone number Step 2: do talking Step 3: hang up


Download ppt "1 Topic 2 – Lesson 2 Understanding TCP/IP via an Analogy SRA 221."

Similar presentations


Ads by Google