310 likes | 422 Views
Behind the Plug. 0100: A Plethora of Packets. The Shape of Data. Okay, so we’re really confused by IP addresses now… But at least we get the idea that every computer on the Internet has an address, like every house has an address But I still have questions!
E N D
Behind the Plug 0100: A Plethora of Packets
The Shape of Data • Okay, so we’re really confused by IP addresses now… • But at least we get the idea that every computer on the Internet has an address, like every house has an address • But I still have questions! • How does all that data fit on that little skinny wire, anyway?
The Shape of Data • How does all that data fit into a skinny wire? • Put the data on a diet? • Or, if you want to put it the other way around… • What does a data file look like, anyway? • Let’s start with something you’re probably more familiar with… • A book!
The Shape of Data • A book seems like a simple concept… • But it’s really not • What do we know about any given book we might check out from the Church Library? • It’s written in English • You start reading with the spine on your left • You read the left page first, then the right • You read from left to right • There is a table of contents • Each of these things are components of a protocol (introducing the book)
The Shape of Data • A telephone call is a protocol… • There is a rough set of standard greetings • There is a rough set of standard endings • A text message is a protocol… • BRB, LOL, AFAIK, W2G, culater, etc… • English itself is essentially a protocol • When you see the word “red,” you think of something of that color • The word “transmits” an idea
The Shape of Data • A protocol is essentially just a way of formatting information in a way that others can understand it • A few rules of protocols… • Protocols only have meaning within a specific context • Protocols can be loosely or strictly defined • Protocols can be layered on top of one another
The Shape of Data • How can protocols be layered? • English is a protocol • The text of the book itself is written using a protocol (sentences/paragraphs/chapters) • A book is a protocol • In other words, you can build one protocol on another one • Each “layer” introduces a new abstraction that hides complexity
The Shape of Data • So data is carried using a protocol • A complete set of data, carried in a protocol, is called a unit • A sentence is a unit of data • A paragraph is a set of sentences • A chapter is a set of paragraphs • A book is a set of chapters • Each unit of data encapsulates a smaller unit
The Shape of Data • A computer network is no different • The computer only knows 0’s and 1’s • 011100101001000100110001011100111010 • Okay, great, what does that mean? • Is it an instruction? A pixel location on the screen? Maybe a color to put in a specific pixel? • How can the computer tell? • The protocol provides the context so the computer knows what a specific set of 0’s and 1’s is supposed to represent
A Plethora of Packets • But the protocol is just how the data is organized • English, for instance • There also needs to be a unit to the data • Such as a book, or a magazine, or something like that • The unit of storage in a computer network is the packet (peter packet intro)
A Plethora of Packets • There are essentially three levels of units on a network • A packet • A flow • A stream • Each of these things have somewhat fixed meanings
A Plethora of Packets • A packet is a single unit of data no larger than the maximum transmission unit for the physical media • Whoa! Hold on pard’ner! You’re talkin’ in riddles! • To understand why a packet is a packet, we need to dive into the physical layer –so hold on to your hats
The Physical Layer • This is the “rock bottom” of the network • Unless you count electrons and protons and such • Essentially, this is just an electrical connection of some type
The Physical Layer • Types of connections • Copper wire • Wireless • This is really just a radio connection • Fiber optics • Like flashing signals with your flashlight to a friend • Yes, this means you are physically connected to every location “on” the Internet in some way
The Physical Layer • Any given link has a specific speed at which it can carry information • This is normally expressed in bits/second, and called bandwidth • But the tricky thing is all the computers attached to this link must share the available bandwidth • How do they know how to share? • You guessed it, a protocol
The Physical Layer • Let’s return to a “real world” example for a moment • Suppose you wanted to carry on a conversation with someone sitting next to you using a piece of paper • Antiquated!
The Physical Layer • There is only so much room on the paper… • So you might set up a protocol • You write one sentence, and I’ll write one back • That way we won’t run out of paper so fast • You are “sharing the bandwidth”
The Physical Layer • How did you share the bandwidth available on the piece of paper? • By limiting the length of what you can write at once • Computer networks are no different • The “maximum transmission unit” is the largest amount of data any computer can send on the link at once • The MTU • This forces the computers attached to the link to share the bandwidth
A Plethora of Packets • So packets exist because of the physical layer • A packet can be no larger than the largest amount of data I can send on a link at one time • All so I can share the link with other computers
A Plethora of Packets • A flow and a stream are both made up of packets • A flow represents a set of data with a fixed end • A book represents a flow • A stream represents a set of data with an unknown end • A television channel represents a stream • These two terms are confusing, and often confused
A Plethora of Packets Electrical or light signals are interpreted as 0’s and 1’s These 0’s and 1’s are broken up into packets These packets make up flows and streams The computer converts these 0’s and 1’s into meaningful data
A Plethora of Protocols • Like the real world, protocols are layered in a network • The underlying protocol for all of the Internet is the Internet Protocol (IP) • IP primarily provides • An interface between the physical and logical layers of the network • An addressing system that allows us to find computers on a network (remember IP addresses?) • Encryption and other services we might need
A Plethora of Protocols • What doesn’t IP give us? • The ability to control the flow of the data between two computers • The ability to recognize when data has been lost • The ability to retransmit data that has been lost • The information we need to interpret the data we’re receiving • There are two protocols that ride “on top of” IP
A Plethora of Protocols • The User Datagram Protocol (UDP) essentially only adds one thing to IP • It provides the information we need to understand how to interpret the data we’re receiving • This is called a socket or port • We’ll deal with these in just a few slides
A Plethora of Protocols • The Transmission Control Protocol (TCP) provides: • The ability to control the flow of the data between two computers • The ability to recognize when data has been lost • The ability to retransmit data that has been lost • The information we need to interpret the data we’re receiving • Essentially, everything IP doesn’t provide
A Plethora of Protocols • So if you could open up the Internet and look at a packet, you might see… Physical Packet Data IP Packet TCP or UDP Packet
A Plethora of Protocols • But this isn’t the end… • Oh, no, we must have more protocols! • HTTP carries HTML, which is what web pages are made up of • DNS is a protocol as well as a system • DNS runs on top of either TCP or UDP • SMTP is the protocol that carries email around on the Internet • It’s easy to become lost on the sea of protocols
Finding the Right Application HTML Markup (Web Page) Java Applet Flash SWF Web Browser Operating System Processor Memory Monitor Printer … Network Card
Finding the Right Application • Remember this old chart? • So the network card receives a packet • Now what? How does it know what application on the computer to send it to? • There are so many to choose from…
Finding the Right Application • This is what sockets and ports are for • A real world example • When you hear a sound, you use your ears to process the information • When you see something, you use your eyes to process the information • Your ears and eyes are essentially sockets • A port is the interface from the network side • A socket is the interface from the computer side
A Plethora of Packets • Whew! • We now have some idea about how the data is actually carried across wires • Protocols • Packets • Sockets • But how do these packets know how to get where they need to go? • It’s like finding your way to the Church… • Where do you turn right, and where do you turn left? (peter packet mission end)