Computers |
|
| | #1 (permalink) |
| Junior Techie Join Date: Oct 2004
Posts: 73
| If you have not read them, please see the previous installments of networking tutorials. Networking 101 Networking 102 The following is a crash course on the OSI model, how it relates to networking hardware, and the construction of a TCP/IP packet. TCP and UDP will also be touched on. OSI Model The Open System Interconnection (OSI) Model is used as a framework for developers when developing different protocols. As mentioned in Networking 101, a protocol is like a language. Two computers using different protocols cannot communicate, just like a person speaking French and a person speaking Russian cannot communicate. The OSI Model is split into seven layers. They are listed below in order from top (layer 7) to bottom (layer1). Application Layer Layer 7 Presentation Layer Layer 6 Session Layer Layer 5 For our purposes, these three layers can be thought of as one. Essentially, these three layers combine together to create the actual data that is being sent. It could be an e-mail, IM, authentication information...basically anything. Transport Layer Layer 4 This layer is the TCP portion of TCP/IP. It provides the guarentee of information delivery as well as error checking. It also divides the data into pieces called packets. Network Layer Layer 3 This layer is responsible for translating logical addresses (such as IP addresses) into MAC addresses. Anything dealing with IP addresses occurs at this layer. Data Link Layer Layer 2 This layer is resonsible for translating the assembled packet into 1s and 0s. Anything only dealing with MAC addresses occurs at this layer. Physical Layer Layer 1 This layer is represented by the physical connection to the network (or wireless connection). It is responsible for transmitting the data. Networking Hardware Network devices operate at different layers. This can sometimes be important when describing networking hardware. A hub, for instance, operates at layer 1. It doesn't even look at the packet to see where its going; it just forwards the packet to anything connected to it. A switch however, knows what devices are attached to it. It will only send packets out the correct port because it knows the destination device's MAC address by looking at the packet. Therefore a switch is a layer 2 device. A router will look at the destination IP address of the packet and determine which network to send the packet to. Therefore a router is a layer 3 device. TCP/IP Packet Construction First off, a TCP/IP packet has something called preamble. Essentially, when this static pattern of bits is received, the NIC knows a packet is coming. Right after the preamble is the source and destination MAC address, followed by the source and destination IP address. After that comes the actual data from layers 7, 6, and 5. At the end of the packet is a checksum. This lets the computer know whether or not the packet arrived intact or whether some of the information is missing. If some IS missing, the source computer will resend that packet and the process will repeat itself. TCP vs. UDP Essentially, TCP guarentees delivery, UDP does not. When a packet is being constructed, it is either sent via TCP or UDP. This decision is made by the application being used. Using TCP, if a packet does not arrive at its destination, the source computer will resend it. However with UDP, the source computer will just continually send packets whether or not the destination received it. Some uses for UDP include VoIP (Voice Over IP (Using the internet as your phone line)) and webcams. That's it for Networking 103! Stay tuned for the next installment! Comments/criticism is welcome! |
| | |
| | #2 (permalink) |
| Memberbot | Layer 4 splits upper layer data into segments. Layer 3 takes the segment, puts a header on it and makes it into a packet. Layer 2 takes the packet, puts a header and a footer on it and makes it into a frame. Layer 1 takes the frame and turns it into 1s and 0s. |
| | |