EC312 Lesson 25: Networks, Protocols, Transmission

Objectives:

(a) Describe the TCP/IP model, the functions performed by each layer, and the process of encapsulation.

(b) Define the function of a protocol.

(c) Define the structure of an Ethernet address.

(d) State the minimum and maximum size of an Ethernet frame.

(e) Calculate the bandwidth available to users in various network configurations.

(f) Distinguish between the capabilities and uses of a hub, a bridge and a switch.

You were introduced to the idea and framework of networking in Cyber1, and we used that framework to talk about wireless networking, but now we will get into the details of the TCP/IP model of networking at the bit level. Because the network is built in virtual layers, this model is the same for wireless or wired networks except at the actual physical layer. We will build labs and discuss wired technologies in this section.

1.  Network Layers

Recall the OSI layer model and its comparison to the TCP/IP model:

·  Each layer performs only a few specific, well-defined functions. This simplifies the design. For example, in an email scenario, the transport layer (TCP layer) only worries about getting the message delivered to the right application (the email application) and that it arrives correctly. The transport layer does not worry about routing (that was left to the network layer, (IP layer)) or what voltage level the bits are, that are transferred over the network (that is left to the physical layer (Network Access layer has a Data Link layer and a Physical layer)).

·  The layers are built, one on top of the next.

·  Each layer performs a service for the layer above it. However, how a layer does its job is not known by the layer above. This permits later modifications. For example, the network layer is tasked with determining the best route from source to destination, but the choice of algorithm used should be of no consequence to the transport layer. If we were to change the network layer routing algorithm from a link-state algorithm to a distance-vector algorithm, the transport layer should not even be aware of this.

If we decided to try to build one big honking software/hardware contraption that does everything at once (i.e., just put the whole kit and kaboodle into one layer), the resulting mess would be extremely difficult to modify later. Splitting functions into layers simplifies the design. Additionally, it allows us to replace a layer with a different implementation that accomplishes the same task using a different mechanism, without disturbing the other layers.

2. Protocols It is important to note that actual communication takes place only between the five layers in the same machine and the physical layers of adjacent machines. In the picture below, the dark black lines signify the only true transfer of data—i.e., the only real communication. Apart from the physical layer, no data are actually directly transferred from layer n on one machine to layer n on the other machine. Instead, each layer passes information/data only to the layer immediately above or below it.

In a real sense, though, it seems as if the email application in the machine on the left in the picture above is communicating directly with the email application in the machine on the right. Similarly, it seems as if the transport layer on the left is communicating directly with the transport layer on the right. In fact, it seems as if each layer is on the left is communicating with its peer layer on the right. This communication is termed virtual communication.

A layer in one machine communicates with the corresponding layer on the other machine using that layer's protocol. For example, the transport layer of the machine on the left communicates with the transport layer of the machine on the right using the transport layer protocol.

A protocol is an agreement or a set of rules governing how a task or process should be carried out. One of the functions of the transport layer is to ensure that data is delivered without errors. The transport layers on both machines might, for example, use the Hamming code to ensure that errors are detected and corrected. In this case, the agreed upon protocol for error detection at the transport layer is the Hamming code. If the transport layer in the machine on the left is using the Hamming code to detect errors, but the machine on the right is using the CRC algorithm to detect errors, communication will not be successful. The peer entities at each layer must agree on the protocol.

As another example, one of the functions of the physical layer is to determine how logical 1 and logical 0 are represented. If the physical layer of the machine on the left is representing logical one by +5 volts and logical zero as -5 volts, but the machine on the right is doing just the opposite—representing logical one as -5 volts and logical zero as +5 volts—communication will not be successful. The peer entities at each layer must agree on the protocol.

To recap, two machines might be connected, but if a protocol is not in place at each layer, there will be no communication. If two people are talking to (at) each other, one who only speaks English and the other who speaks only Chinese, no successful communication will occur because the two speakers are not using the same protocol (in this case, the language). If agreed upon protocols are in place, then the entities on the same layers on different machines (i.e., peer entities) carry on a conversation using the agreed-upon protocol.

Some addition jargon to impress your date:

·  Network Architecture. The set of layers and protocols is termed a network architecture.

·  Protocol Stacks. The protocols used by a system are called the system's protocol stack.

Entities at the same layer must use the same protocol, or communication will not be successful

Think about how layering helps us in this scenario. We can easily replace a layer with a different implementation that accomplishes the same task using a different mechanism, without disturbing the other layers

3. Encapsulation So think again… how does a layer do its job? Here's how!

·  At the sending end, each layer puts a header on the message received from the layer above. The header contains information necessary for the protocol to do its job.

·  At the receiving end, each layer strips off the corresponding header and forwards the rest up to the layer above.

The application layer passes its message to the transport layer. The transport layer attaches some number of bits, shown as T in the picture above and sends this onward to the network layer. The network layer then appends some number of bits, shown as N in the picture above, and so on, down the protocol stack. What actually gets transmitted across the physical layer from the source to the destination is:

Now, this arrives at the destination.

The destination physical layer removes the bits marked P and passes the result up to the data link layer. The data link layer removed the bits marked D and uses these bits to implement the data link protocol. Then the result is passed to the network layer, which removes the bits marked N and uses these bits to implement the network layer protocol, and so forth.

Example

Suppose an application entity sends 1024 bytes of data and appends 96 bytes of sequencing data. This message is then sent to the data link layer where the maximum packet size is 256, 32 bytes of which are its header. How many packets will be used? How many total bytes must be transmitted?

Solution:

4. The TCP/IP Reference Model

The model we used is Section II was not chosen randomly! This model, repeated below, is termed the TCP/IP reference model.

You should memorize this model! Use a mnemonic if it helps. One possibility is the West Point motto: Please Do Not Trash Army.

1. A Five Layer Model. The model we will use is the TCP/IP reference model, which consists of five layers. We list the layer, then describe some of the functions usually assigned to the layer.

The application layer is concerned with general purpose facilities that involve communications:

·  SMTP for email

·  HTTP for accessing the web

·  FTP for file transfer

·  SSH and TELNET for remote log in

·  DNS for directory assistance

·  SNMP for network management

Several other functions are also conceptually placed at the application layer:

·  Encoding. For example: Are we using EBCDIC or ASCII? Are we using Big Endian or Little Endian?

·  Encryption

·  Compression

Blocks of data at the application layer are termed messages.

The application layer uses end-to-end protocols that do not recognize the existence of an underlying network. The notion of a networking protocol being end-to-end can be somewhat confusing, so it may be helpful to recast the notion in terms of a different network you are familiar with: the telephone network.

Suppose you (in Annapolis) are having a phone conversation with your friend (in Florida) over the plain-old-telephone system. Suppose you use some acronyms in your conversation. Instead of saying, United States Naval Academy you say USNA. Instead of saying Midshipmen Regulations Manual you say MIDREGS. Instead of saying Brigade Medical Unit, you say BMU. Instead of saying Greatest Bestest Course Ehvur you say Cyber-2. Using acronyms is a form of data compression. You are conveying the exact same information to your friend, but you are doing this with fewer syllables.

Now, ask yourself: Does the Phone Company—the wires, the switching stations, the fiber optic cables—care if you are using acronyms to compress your data? The answer is, of course: No. The phone company does not care, and is not even aware, of the use of compression in your voice conversation. It only matters to the end users who are actually speaking on the telephone.

Now, let's switch back to computer networks. We mentioned that the application layer can implement compression. As with phones, so with computers: only the end points will care, or even be aware of the fact that data is being compressed. The underlying computer network is oblivious to this.

Consider another example: Encoding. Encoding is done at the application layer, and an encoding protocol is end-to-end: the network is not aware of the encoding scheme. In a telephone conversation, the encoding scheme might be the language that you and your friend converse in. The phone company's network does not care if your conversation is in English or Spanish; this is a concern only to the end users.

So, again, the application layer protocols are end-to-end.

Ideally, the transport layer is responsible for the end-to-end transfer of data from a process in the source to a process at the destination, independent of the network. Put another way, ideally the transport layer uses end-to-end protocols that do not recognize the existence of an underlying network.

Blocks of data at the transport layer are termed segments.

Some tasks of the transport layer:

·  End-to-end flow control

·  End-to-end error control

·  End-to-end congestion control [1]

·  Multiplexing- sending several transport layer connections over a single network layer connection.

The phone company analogy is useful for recognizing that the protocols at the transport layer are end-to-end. Does the phone company's network care if the person on the receiving end says: "Slow down, I'm trying to write this down" (Flow control)? Does the phone company's network care if the person on the receiving end says: "Let me read this back to you to make sure I've got it" (Error control)? The answers: No and No; these are end-to-end concerns.

In the next three layers, the protocols are between adjacent entities (machine-router, router-router, router-machine)

The network layer is concerned with transferring data across a communications network from a source computer to a destination computer. This is the first layer that recognizes the existence of a network.

Blocks of data at the network layer are termed packets or datagrams Tasks for the network layer include:

·  Routing

·  Internetworking-interconnecting distinct networks that use different protocols (different addressing schemes, different packet sizes, etc.)

The data link layer is concerned with transferring data across a single link connecting two nodes.

Blocks of data at the data link layer are termed frames. Tasks for the data link layer include:

·  Setting frame boundaries

·  Error control (to make a real link into an error-free link)

·  Link flow control (to stop a fast transmitter from drowning a slow receiver)

·  Control access to shared channels-the Multiple Access Problem

The physical layer is concerned with sending bits over a channel: i.e., the mechanical and electrical considerations. Blocks of data at the physical layer are termed bits… so we're not really talking about blocks!

See PowerPoint slide "Layers: An Illustration of Encapsulation and Decapsulation “ under Resources on the course website.

Example

You caught one of your crewmembers attempting to download porn on one of your ship's computers. After putting him on report, he tells you that the computer did not seem to be working. For each of the network problems below, state which layer of the TCP/IP model the problem resides in.