10
CS 101 – Nov. 23 Communication, continued • LANs – Bus (ethernet) communication – Token ring communication • How the Internet works: TCP/IP

CS 101 – Nov. 23 Communication, continued LANs –Bus (ethernet) communication –Token ring communication How the Internet works: TCP/IP

Embed Size (px)

Citation preview

Page 1: CS 101 – Nov. 23 Communication, continued LANs –Bus (ethernet) communication –Token ring communication How the Internet works: TCP/IP

CS 101 – Nov. 23

Communication, continued

• LANs– Bus (ethernet) communication– Token ring communication

• How the Internet works: TCP/IP

Page 2: CS 101 – Nov. 23 Communication, continued LANs –Bus (ethernet) communication –Token ring communication How the Internet works: TCP/IP

Bus topology

• All machines share the same channel

• All continuously listening

• “Ethernet” protocol (dinner table)– don’t talk when someone else is talking– collisions

• Amplify signal with repeaters

Page 3: CS 101 – Nov. 23 Communication, continued LANs –Bus (ethernet) communication –Token ring communication How the Internet works: TCP/IP

Token ring

• Fast messaging over larger distances

• Logically arranged in loop

• Messaging: Token passed around the ring.– Am I busy?– From– To– message

Page 4: CS 101 – Nov. 23 Communication, continued LANs –Bus (ethernet) communication –Token ring communication How the Internet works: TCP/IP

Token action

• When you receive token:

• Is the message for me?– If so, read and change to ack.– If not, just pass token.

• Do I need token?– Wait until it comes back as not “busy”

Page 5: CS 101 – Nov. 23 Communication, continued LANs –Bus (ethernet) communication –Token ring communication How the Internet works: TCP/IP

Example

• 4 machines: A, B, C, D.

• A has message for C.– When A gets token, writes message for C.– B passes token.– C receives msg, sends ack message to A.– D passes token.– A receives ack, clears token. …

Page 6: CS 101 – Nov. 23 Communication, continued LANs –Bus (ethernet) communication –Token ring communication How the Internet works: TCP/IP

Example #2

• We have 4 machines A, B, C, D.• What happens when…

– Token starts at D.– A has a message for C.– C has a message for A.– B has a message for D.

…………………………………………

Page 7: CS 101 – Nov. 23 Communication, continued LANs –Bus (ethernet) communication –Token ring communication How the Internet works: TCP/IP

TCP

Transfer Control Protocol

• Break up message into packets

• Sequence number on each packet

• Receiver detects lost packets

• How big should a packet be?

Page 8: CS 101 – Nov. 23 Communication, continued LANs –Bus (ethernet) communication –Token ring communication How the Internet works: TCP/IP

IP

Internet Protocol • Every machine has IP address

– 156.143.128.20

• Packets are individually addressed• Routers• Not all packets go the same way!

– Just like 2 people driving to Seattle might not take the exact path.

Page 9: CS 101 – Nov. 23 Communication, continued LANs –Bus (ethernet) communication –Token ring communication How the Internet works: TCP/IP

Behind the scenes

• “ping” program– Send empty packets, check for ack– 75 ms to San Diego… 840 ms to Pretoria

• “traceroute” program– Lists all routers between here and another

machine

Page 10: CS 101 – Nov. 23 Communication, continued LANs –Bus (ethernet) communication –Token ring communication How the Internet works: TCP/IP

Snooping

The “dark side” of TCP/IP

• Web site can track you by IP address– Localized marketing– Privacy concerns

• Anonymous IP servers– Ex. “Anonymouse”