![]() |
| |
![]() |
||
|
![]() |
||||||||||||||||||||||||||||||||
|
The Seven Layer Burrito: Part Three For the last couple of months we have been going through an overview of the OSI model upon which all networking today is based on. It's a model that software/hardware developers use when creating their products to work with a network. Here is a quick review of the seven layers: Layer 7: Application Please read over the October and November columns for the first two sections of this subject. This month we are going to take a closer look at the bottom three layers.
Layer 3: Network The network layer is where the rubber starts to meet the road, that is to say, where things start to become a bit more familiar to us end users. This is where addressing is done. There are three major flavors of network addressing schemes; IPX/SPX, TCP/IP, and good old AppleTalk. IPX/SPX is typically used in environments where Novell servers are in use. TCP/IP is the standard for the Internet and is fast becoming (if not already) the standard in intranets (in house large scale networks). AppleTalk is of course Apple's proprietary networking scheme which is perhaps the easiest to use and setup of them all (but can be slow when compared to TCP/IP). Network addresses can be broken up into two parts: the network and the host. The network address is similar to your zip code and street number. It narrows down what part of town and which street you are on. Your house number would be like the host part of the address. It is unique to you on that street in that zip code. IPX/SPX addresses are 80 bit addresses. The first 32 bits are the network, the last 48 are the host. TCP/IP addresses are 32 bits long. The network and host lengths vary depending on what class of address you are referring to. Entire tomes have been written on how TCP/IP addresses work so any kind of depth on this would be impractical. However, if you are interested in a deeper discussion on this topic in this column, please send in some feedback to that extent and we will see what we can do. AppleTalk addresses are 24 bits long. The network is 16 bits and the host is 8 bits. The most beautiful thing to me about AppleTalk is that it is totally self-configuring. You can take 8 Macs, plug them into a hub or a switch, turn on AppleTalk, set up File Sharing, and you are all on ready to swap files. Very cool. Last month we talked about the process of encapsulation. This is when each layer takes the data given to it from the layer above is and wraps it in its own header and footer and sends it to the layer below it. Routers look at the Layer 3 header and route the information based on where it is coming from and where it is going. A router builds a routing table in memory to that it can quickly reference where to send the information. This can be very intense work. Sometimes routers can go down which can break the link between places on the Internet. The Internet was designed with some redundancy in mind, but even that doesn't always work. While the information is at the L3 layer, it is referred to as a packet. (Last month I left out that at Layer 5 (Session) it is referred to as data and at Layer 4 (Transport) it is referred to as segments.)
Layer 2: Data Link Think of this layer as sort of a mini assembly line with two parts. The first part is the Logical Link Control (LLC). The packets come down the conveyer belt and the LLC prepares it, organizes it for shipping. The next part is Media Access Control (MAC) or the shipping department for our illustration. It takes the prepared packets and boxes them up into frames (what the packets are encapsulated into with an L2 header/footer) ready to be shipped out onto the network. A MAC address is a unique hardware address for your network interface card. If you want to see what your's is, open up the TCP/IP control panel, go to the File menu and select Get Info and you will see a hardware address. That's it. This frame has that MAC address on it as the source. A label called a Cyclic Redundancy Check (CRC) is attached (the CRC is typically the footer of the frame). This is basically a math problem and the correct answer to that problem that is attached to the frame. Your computer does the math problem, looks at the answer it got as compared to the answer you sent to see if they match. If they don't match you have a CRC error. This frame could be discarded or not depending on the protocol in use. The frames are now ready to be sent out to the network. but which way does it go? A switch is similar to a hub. A hub has many ethernet ports on it to plug in your various devices. A hub links them all together as though they all shared the same wire. Before hubs the common way to network computers together was using one wire that went to each machine. It was like a water pipe that had a T connection for lines to go off to each house. If the wire broke in one spot the network would go down. With a hub everything was wired into one spot. If a wire broke it only affected the computer at the other end of that wire while everyone else was just fine. The bad thing is that there is no distinction. If a computer wanted to send a signal to another that signal went to all of the computers. This would generate a lot of traffic on the network and make things run much slower. A switch takes care of that. Like a router, a switch makes a table of which MAC addresses are at the other end of each port. When information is sent out from one computer to another it isn't sent to all computers like a hub does, it is sent out the port to which that computer is plugged into. This significantly increases the room for traffic on a network.
Layer 1: Physical This layer is just what it implies, the physical part of the network. This is where the electrons hit the copper. This is where the photons hit the plastic. This is where the... you get the idea. Ethernet typically uses Category 5 (cat 5) copper wire. It's 8 wires paired off into four groups of two. These pairs are twisted together. The "twisted" is where the T in 10/100BaseT comes from. This wire is also referred to as unshielded twisted pair (UTP). The other more common type of media (though much more expensive) is fiber optic cable. The physical layer determines all the physical/mechanical means by which bits of information are put onto and taken off of the media. That's basically it. However, if something isn't plugged it right, if a wire gets cut, none of this will work. When I was working tech support for an ISP I was helping someone who had DSL service. Their cat was taken to chewing on wires. Their DSL wasn't working so they called and got me. Everything looked like it should be working. I could see traffic going from my workstation all the way to their external DSL router but not to their computer. I had them plug and unplug the wires on both ends, still nothing. I asked them to run their fingers along the length of the wire. Guess what? They found little kitty tooth marks in the wire. They happened to have an extra cable so we tried it, and it worked great! So, here we are on the network. How does information get from one end to the other? Well, we saw how the OSI model prepares the data to be sent out by encapsulating it. The information is sent out the wire to the device on the other end. Lets say that this device is a switch. The switch will look at the L2 header (since it is a L2 device) and see if it has a destination that matches where the frame needs to go. If it has a match, it sends it out that port only. If not, a broadcast is sent out all ports asking where this should go. If there is no destination match, the frames are sent to a router on the network. A router will look at the L3 header for the source and destination addresses and forward the frames out the best port based on the destination and whatever router table entries it may have. Once this whole process is done and the destination is reached, the computer on the other end reveres the encapsulation process. Each layer of the OSI model on the receiving end looks at the corresponding header/footer, processes it, and sends the rest on up the ladder. That's basically it. Isn't it amazing how much behind the scenes stuff is going on to simply do something like send email, look at a web page, or print to a networked printer? So the next time your DSL or cable modem goes down or you keep losing your dial-up connection and you call tech support to chew them out, understand that there is a whole lot of stuff going on to make all of this work. The reality is that most of the people you speak to have never even heard of the OSI model. I didn't know anything about it when I was doing working in support. But you do! Use this knowledge wisely my friends. May your frames always flow freely. If this series has been helpful to you please send in some feedback to that effect. If there is a specific area you would like to see discussed in further detail please let me know. I have already had a request to look at the OSI model from the perspective of DSL and how it all goes from your computer to the Internet. I just might do that.
|
|||||||||||||||||||||||||||||||||
|