CCENT - Memo - Ch1-5 (Part1)

From Linux - Help
Jump to navigation Jump to search
Cisco.ccent.logo.png

PAGE WORK IN PROGRESS

Goal: The objective is to have a memo to study the CCENT exam of CISCO, this first page will cover chapter 1 to 5, the first part of the book. This document will not replace the book, just help you to study. So please read the book.


Chapter 1: The TCP/IP and OSI Networking models

TCP/IP Networking Model

A networking model, sometimes also called either a networking architecture or networking blueprint, refers to a comprehensive set of documents. Individually, each document describes one small function required for a network; collectively, these documents define everything that should happen for a computer network to work. Some document define a protocol, which is a set of logical rules that devices must follow to communicate. Other documents define some physical requirements for networking. For example, a document could define the voltage and current levels used on a particular cable when transmitting data.

Overwiew of the TCP/IP Networking Model:


The TCP/IP model both defines and references a large collection of protocols that allow computers to communicate. To define a protocol, TCP/IP uses documents called Requests for Comments (RFC). For example: the Institute of Electrical and Electronics Engineers (IEEE) defines Ethernet lan's; the TCP/IP model does not define Ethernet in RFC's, but refers to IEEE Ethernet as an option.

To help people to understand a networking model, each model breaks the functions into a small number of categories called layer. Each layer includes protocols and standards that relate to that category of functions. TCP/IP actually has two alternative models:

Tcp ip.jpg

The original TCP/IP model (RFC1122), which breaks TCP/IP into four layers. The top two layers focus more on the application that need to send and receive data. The bottom layers focuses on how to transmit bits over each individual link, with the internet layer focusing on delivering data over the entire path from the original sending coputer to the final destination computer.

The TCP/IP model on the right is a common method used today to refer to the layers formed by expanding the original model's link layer on the left into ywo separate layers: Data Link and Physical (similar to the lower two layers of the OSI model).

Example of TCP/IP Architectural model and examples of protocols:

Architecure ip.gif

TCP/IP Application Layer

TCP/IP Application layer protocols provide services to the application software running on a computer. The application layer does not define the application itself, but it defines services that applications need. For example, application protocol HTTP defines how web browsers can pull the contents of a web page from a web server. In short, the application layer provides an interface between software running on a computer and the network itself.

HTTP overwiew:


What really happens to allow that web page to appear on your web browser?

Imagine that you open a browser. Your browser is been configured to automatically ask for a web server as default page. The general logic looks like this:

How web servers work 1.gif

HTTP protocol mechanisme:


Taking a closer look, this example show applications on each endpoit computer (specially, the web browser application and web-server application) use a TCP/IP Application layer protocol. To make the request for a web page and return the contents of the web page, the application use the hypertext transport protocol (HTTP).

Httprequest httpreply.png

Step 1: You send a message with an HTTP header. Generally, protocols use headers as a place to put informations used by that protocol. This HTTP header includes the request to get a file. The request typically contains the name of the file (page.html in this case), or if no filename is mentionned, the web-server assumes thet you wants the default web page.

Step 2: Shows the respons from the web-server. The message begins with an HTTP header, with a return code (200), wich means ok returned in the header. HTTP also defines other return codes so that the server can tell the browser whether the request worked. The second message also includes the first part of the requested file.

Step 3: Shows another message from the web-server to your web browser, but this time without an HTTP header. HTTP transfers the data by sending multiple messages, each with a part of the file. Rather than wasting space by sending repeated HTTP headers that list the same information, these additional messages simply omit the header.


TCP/IP Transport Layer

Although many TCP/IP Application layer protocols exist, the TCP/IP Transport layer includes a smaller number of protocols. The two most commonly used Transport layer protocols are the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). Transport layer protocols provide services to the Application layer protocols that resides one layer higher in TCP/IP model.

TCP Error Recovery basics:


To appreciate what the Transport layer protocol do, you must think about the layer above the transport layer, the Application layer. Why? Well, each layer provides a service to the layer above it, like the error recovery service provided to Application layer by TCP.

TCP/IP needs a mechanisme to guarantee delivery of data across a network. Because many Application layer protocols probaly want a way to guarantee delivery of data accros a network, the creators of TCP included an error recovery feature. To recover from errors, TCP use the concept of acknowledgments.

Ack.gif

This figure show host A sending a packet to host B. The TCP header shows a sequence number (SEQ), with each message. In this example, the network has a problem, and the network fails to delivery the TCP message (called a segment) with sequence number 1. When host B receives nothing, he realizes that something goes wrong, that realization by host B TCP logic causes host B to send a TCP segment back to host A, asking to send message 1 again.

Same-layer and Adjacent layer interactions:


Same-layer interaction on different computers: The two computers use a protocol (on agreed-to set of rules) to communicates with the same layer on another computer. The protocol defined by each layer uses a header that is transmitted between the computers to communicate what each computer want to do. Header information added by a layer of the sending computer is processed by the same layer of the receiving computer.

Adjacent layer interaction on the same computer: On a single computer, one layer provides a service to a higher layer. The software or hardware that implements the higher layer requests that the next lower layer perform the needed function.

TCP/IP Network Layer

The Application layer includes many protocols, the Transport layer include fewer, most notably, TCP and UDP. The TCP/IP Network layer includes a small number of protocols, but only one major protocol: the Internet Protocol (IP).

IP provides several features, most importantly, addressing and routing.

Internet Protocol addressing basics:


IP defines addresses for several important reasons. First each device that use TCP/IP (each TCP/IP host) needs a unique address so that it can be identified in the network. IP also defines how to group addresses together.

IP routing basics:


The TCP/IP Network layer, using IP protocol, provides a service of forwarding IP packets from one device to another. Any device with an IP address can connect on the TCP/IP network and send packets.


add image here---

Step 1: Begins with host A (eg.: a web-server) being ready to send an IP packet. Host A IP process chooses to send the packet to some router (a nearby router on the same LAN) with the expectation that the router will know to forward the packet. Host A doesn't nead to know anything more about the topology or the other routers.

Step 2: Router R1 receives the IP packet, and R1's IP process makes a decision. R1 looks at the destination address (2.2.2.2), compares that address to it's known IP routes, and choose to forward the packet to router R2. This process of forwarding the IP packet is called IP routing (or simply routing).

Step 3: Router R2 repeat the same kind of logic used by R1. R2's IP process will compare the packet's destination IP address (2.2.2.2) to R2's known IP routes and makes choice to forward the packet to the right, on to host B.

TCP/IP Link Layer (Data Link Plus Physical)

The TCP/IP model's original link layer defines the protocols and hardware required to deliver data across some physical network. The term link refers to the physical connections, or links, between two devices and the protocols used to control those links.

Just like every layer in any networking model, the TCP/IP Link layer provides services to the layer above it in the model. When a host's or router's IP process chooses to send an IP packet to another router or host, that host or router then use Link layer details to send that packet to the next host/router.


add image here---

Step 1: Host A encapsulates the IP packet between an Ethernet header and Ethernet trailer, creating an Ethernet frame.

Step 2: Host A physically transmits the bits of this Ethernet frame, using electricity flowing over the Ethernet cabling.

Step 3: Router R1 physically receives the electrical signal over a cable, and re-creates the same bits by interpreting the meaning of the electrical signals.

Step 4: Router R1 de-encapsulates the IP packet from the Ethernet frame by removing and discording the Ethernet header and trailer.

By the end of this process, the Link layer process an Host A and R1 have worked together to deliver the packet from host A to router R1.

In short, the TCP/IP Link layer includes two distinct functions: functions related to the physical transmission of the data, plus the protocols and rules that control the use of the physical media. The five layer TCP/IP model simply splits out the Link layer into two layers (Data Link and Physical) to match this logic.

TCP/IP Model and Terminology


add image here---

Step 1: Create and encapsulate the application data with any required Application layer header. For example, the HTTP ok message can be retrieved in an HTTP header, followed by part of the contents of a web page.

Step 2: Encapsulate the data supplied by the Application layer inside a Transport layer header. For end user applications, a TCP or UDP header is typically used.

Step 3: Encapsulate the data supplied by the transport layer inside a Network layer (IP) header. IP defines the IP address that uniquely identify each computer.

Step 4: Encapsulate the data supplied by the Network layer inside a Data Link layer, header and trailer. This layer uses both a header and a trailer.

Step 5: Transmit the bits. The Physical layer encodes a signal onto the medium to transmit the frame.

Names of TCP/IP Messages:


Finally, take particular care to remember the terms segment, packet and frame and the meaning of each. Each term refers to the headers (and possibly trailers) defined by a particular layer and the data encapsulated following that header.

Packet frame segment.jpg

OSI Networking Model

Comparing OSI and TCP/IP:


The OSI model has many similarities to the TCP/IP model from basic conceptual perspective. It has (seven) layers, and each layer defines a set of typical networking functions. As with TCP/IP, the OSI layers each refer to multiple protocols and standards that implement the functions specified by each layer.

Tcp-ip-osi.png

Even today, networking documents often describe TCP/IP protocols and standards by referencing OSI layer, both by layer number and layer name. For example a common description of a LAN switch is layer 2 switch, which layer 2 referring to OSI layer 2. Because OSI did have a well-defined set of functions associated with each of its seven layer, if you know those functions, you can understand what people mean when they refer to a product or function by its OSI model.

For another example, TCP/IP's original internet layer, as implemented mainly by IP, equates most directly to the OSI Network layer. So, most people say that IP is a Network layer protocol, or a layer 3 protocol, using the OSI terminology and numbers for the layer.

OSI Layers and Their Functions

Osi model.png

Layer 7 Application layer: This layer provides an interface between the communication software and any application that needs to communicate outside the computer on which the application resides. It also defines process for user authentication.

Layer 6 Presentation layer: This layer main purpose is to define and negotiate data formats, such as ASCII text, EBCDIC text, binary, BCD and JPEG. Encryption is also defined by OSI as a Presentation layer service.

Layer 5 Session layer: This layer defines how to start, control and end conversations (called sessions). This includes the control and management of multiple bidirectional messages so that the application can be notified if only some series of a series of messages are completed. This allow the Presentation layer to have a seamless view of an incoming stream of data.

Layer 4 Transport layer: This layer protocol provide a large number of services. Layer 4 focuses on issues related to data delivery to another computer (for example, error recovery and flow control).

Layer 3 Network layer: This layer defines three main features logical addressing, routing (forwarding), and path determination. Routing defines how devices (typically routers) forward packets to their final destination. Logical addressing defines how each devices can have an address that can be used by the routing process. Path determination refers to the work done by routing protocols to learn all possible routes and choose the best route.

Layer 2 Data Link layer: This layer defines the rules that determine when a device can send data over a particular medium. Data Link protocols also define the format of a header and trailer that allows devices attached to the medium to successfully send and receive data.

Layer 1 Physical layer: This layer typically refers to standard from other organizations. These standards deal with the physical characteristics of the transmission medium, including connectors, pins, use of pins, electrical currents, encoding, light modulation, and the rules for how to activate and deactivate the use of the physical medium.

Example of Devices and Protocols:

Osi protocol model.jpg

To remember the seven layer in a phrase:

All People Seems To Need Data Processing

OSI Layering Concepts and Benefits

While networking models use layers to help humans categorize and understand the many functions in a network, networking models use layers for many reasons:

Less complex: Compared to not using a layered model, network models break the concept into smaller parts.

Standard interfaces: The standard interface definitions between each layer allow multiple vendors to create products that fill a particular role, with all the benefits of open competition.

Easier to learn: Humans can more easily discuss and learn about the many details of a protocol specification.

Easier to develop: Reduced complexity allows easier program changes and faster product development.

Multivendor interoperability: Creating products to meet the same networking standards means that computers and networking gear from multiple vendors can work in the same network.

Modular engineering: One vendor can write software that implements higher layers (for example, a web browser) and another vendor can write software that implements the lower layer (for example, Microsoft's built-in TCP/IP software in its OS's).

OSI Encapsulation Terminology

Like TCP/IP, each OSI layer ask for services from the next lower layer. To provide the services, each layer makes use of a header and possibly a trailer. The lower layer encapsulates the higher layer's data behind a header.

The TCP/IP model uses terms such a segment, packet, and frame to refer to various layers and their respective encapsulated data. OSI uses a more generic term: protocol data unit (PDU).

OSI pdu.jpg

Chapter 2: Fundamentals of Ethernet LANs

Coming soon