Friday, February 26, 2010

TCP’s Error Detection / Error Reovery Feature

____________________________________________
TCP’s Error Detection / Error Reovery Feature

Before we take a look at how TCP performs both error detection and error recovery, we need to draw a very clear line between those two terms. They are not the same thing!
-    Error detection is finding an error
-    Error recovery is doing something about the error

TCP does both, and it uses both a sequence number and an acknowledgement number (“ack”) in the TCP header to do so. In the following example, one host is sending four segments to another host. Each of the segments has a sequence number. That sequence number tells the recipient in what order to reassemble the segments, and it’s also a fundamental concept in error detection and recovery.  ACK is nothing but the next segment number receiver would like to see.

For simplicity’s sake, we’ll assume the first segment has a sequence number of 100, and we’ll add 100 to the subsequent sequence numbers. (Remember, we’re at the Transport layer – these are segments!)


The recipient will now send a segment back that contains no data, but does have an ack number set. You might think that the ack number would reflect the last sequence number received, but that’s not quite right. The ack number will actually indicate the next sequence number the data recipient expects to see!

Like in our example above the receiver sends a ACK 500 signal back to the sender to let sender know that it got all the frames. In case Seq200 is lost during the transmission the Receiver sends a ACK200 at the end of the transfer. The sender receives ACK200 and sends the SEQ 200 back to the receiver. Receiver then sends a ACK500 to the receiver to notify the sender about receiving all the frames.


What if the acknowledgment itself is lost? The send will wait for life time otherwise.

This entire process revolves around two things:
-    The sender is waiting for a positive message from the recipient that the data was received.
-    If that message isn’t received, the data is retransmitted.
That’s why we call this entire process Positive Acknowledgement with Retransmission (PAR).


____________________________________________

TCP’s “ Three-Way Handshake ”

____________________________________________

TCP’s “Three-Way Handshake”

With TCP, there’s work to be done before data transmitted. The two devices have to agree on some basic parameters before segments can be sent – and this negotiation has the curious name three-way handshake. If that’s the first time you’ve heard this term, you’re probably wondering how a handshake can be three-way! They again, maybe you don’t want to know – but to pass the CCENT and CCNA exams, we gotta know! Let’s take a step-by-step look at this process. .

Before the sender can start sending, there’s going to be negotiation between the two devices regarding rules for data transmission, That negotiation is the three-way handshake itself, which begins with the sender transmitting a TCP segment with the Synchronization(“SYN”) bit set. The primary value being negotiated here is the TCP sequence number, which we’ll discuss in more detail in the next section. This is the first part of the three-way handshake.

The recipient responds with a TCP segment with both the synchronization and acknowledgement bits set – a “SYN/ACK”. This is part two of the three-way handshake.

The sender responds with an ACK, and the three-way handshake is complete.

UDP does not use a three-way handshake.

In addition to the orderly construction of the communication channel, TCP uses the FIN (“Finish”) to bring the channel down when the communication is closed.

____________________________________________

Transmission Control Protocol ( TCP ) vs. User Defined Protocol ( UDP )

____________________________________________

TCP :
-    Guaranteed delivery
-    Error detection via sequence and ACK numbers
-    Windowing
-    “Connection-Oriented”
UDP:
-    “best-effort” delivery, but no guarantee of delivery
-    No error detection
-    No windowing
-    “Connectionless”

____________________________________________

Purpose of using OSI and TCP/IP model

____________________________________________
So Why do we go through all of this models…..

It’s natural to ask why we use networking model in the first place. It’s a good question, and there are some good answers!

Networking models do help software vendors create products that are interoperable. (At least, we hope they’re interoperable.) That doesn’t affect us directly as network admins, but two uses of these models affect up directly both as admins and as students.

Breaking networking operations up into smaller parts make it easier to learn networking in the first place. By using the OSI model in particular, you can take a structured approach to your learning.
-    First, learn about cables and physical specifications (L1)
-    Then learn about switches and MAC addresses (L2)
-    Then start on routing (L3)

Using the OSI model to structure your troubleshooting approach is a real help, too. I always tell students to “start troubleshooting at the physical layer”, and you’ll see what I mean in the Troubleshooting section of the course. There are two kinds of troubleshooters in the world:
-    Those who have a structured approach
-    Those who don’t and are basically throwing stuff out there and hoping something works

____________________________________________

Thursday, February 18, 2010

TCP / IP Netowrk Model

____________________________________________
This model is another way to look at the overall data transport process, and it also uses layers to illustrate the process. However, the TCP/IP model uses only for layers to do so. For the CENT, CCNA, and any entry-level certification exam from another vendor, it's a very good idea to know.

    -  the layers of both the TCP/IP and OSI model
    -  the responsibilities of each layer
    -  how the layers map from one model to another



The Application layer of the TCP/IP model maps to the top three layers of the OSI model (Application, Presentation and Session). Everything that the top three layers of the OSI model do is performed by the TCP/IP model’s Application layer.

The Transport layer of the TCP/IP model maps directly to the Transport layer of the OSI model. TCP and UDP both operate at this layer, and data takes the form of segments.

The Internet layer of the TCP/IP model maps to the Network layer of the OSI model. Both layers are responsible for routing through the use of IP addresses, static routes, and dynamic routing protocols.

(You will occasionally see some non-Cisco documentation call this layer the Internetwork layer, but “Internet” is the name used in Cisco documentation.)

Finally, the Network Access layer of the TCP/IP model maps to the Data Link and Physical layers of the OSI model.
____________________________________________

The Data Transmission Process

____________________________________________
When the end user sends data, that data will go through all seven layers of the OSI model. The data is broken up into smaller and smaller parts beginning at Layer 4 ( The Transport Layer ) until it's in the form of electric signals that can be sent across the physical media.

As the data flows down the OSI model, it's referred to by different terms. You really have to master these and watch for them on your exams. There are four different terms you need to know :

 - At the Application, Presentation, and Session layers, data is simply called "data". (these three layers has nothing to do with the data breaking )
 - At the Transport layer, data is placed into segments.
 - At the Network layer, data is placed into packets.
 - At the Data Link Layer, data is placed into frames.
 - Finally, at the Physical layer, data takes the form of bits - and remember, it's all ones and zeros!!!

If I mention "segments", you should know I'm discussing the Transport layer of the OSI model without any other hints, because you might not get any other hints!!!!

As data flows down the OSI model, each layer adds a header that will be removed by the same layer on the other end of the session. These headers are layer-spedific in that the Network layer couldn't care less about the contents of any header except the Network layer on the other end of the session.

As an end user enters data for transmission to a remote host, the first six layers of the OSI model will add a layer-specific header that contains information to be read by the same layer of the OSI model at the remote location. Note that Layer 2, The Link layer, adds both a trailer and a header.


The combination of data and a layer-specific header is called a Protocol Data Unit(PDU). There's a PDU for each layer; that is, the combination of data and L7 header information is called an L7 PDU, the data and L6 header information is called an L6 PDU, and so forth.

After the data is successfully transmitted by the Physical layer to the remote location , the data begins to travel back up the mode. Each layer will remove the header added by its counterpart - that is, Layer 3 removes the L3 header and reads it, L4 removes the L4 header and reads it, and so forth.

The term same-layer interaction describes the process of a give OSI layer removing the header placed on the data by the same layer on the sending side. For example, the Application layer on the receiving end will remove only the header placed onto the data by the Application layer on the sending side, and so forth.


The term adjacent-layer interaction refers to the interaction between layers of the OSI model on the same host. That is, the Application layer interacts with the Presentation layer, the Presentation layer interacts with both the Application layer ( the one above it ) and the Session layer (the one below it ), and so forth.


____________________________________________

Tuesday, February 16, 2010

The Physical Layer ( Layer 1)

____________________________________________
When things get a little complicated in networking, I like to remind myself that "it's all ones and zeroes!" Whatever data our end users are creating, it's going to eventually be "translated" into a series of 1s and 0s. Once that is done, it's the Physical layer that handles the actual data transmission. Anything to do with a physical cable or the standards in use - the pins, the connectors, the electrical current itself - is running at the Physical layer.

____________________________________________

The Data Link Layer ( Layer 2 )

____________________________________________
The switches the we'll spend so much time with later in the course operate at Layer 2. Wireless Access Points (WAPs) also operate at this layer - more on WAPs in the Wireless section. Devices that you may well be using right now to access the Internet, cable modems and DSL modems, also run at L2,

We've got four major specifications that run here, some of which you may already be familiar with :
 - Ethernet
 - High Data link Control ( HDLC )
 - Point-to-Point Protocol ( PPP )
 - Frame Relay

A very important distinction : The data link layer does perform error detection through something called the Frame Check Sequence, but this layer does not perform error recovery.

The Data Link Layer is generally referred to as Layer 2, and MAC addresses as Layer 2 addresses. If you're not familiar with MAC addresses, they will be discussed in more detail in the Ethernet and LAN Switching section.

Another name for the MAC address is a little misleading, so let's nail this down. MAC addresses are sometimes called hardware addresses and physical addresses. That's because a MAC address is physically burned into the Network Interface Card (NIC), which leads to another name for this address - a burned-in address (BIA).

What's the misleading part? Remember that physical addresses are not used at the Physical Layer of the OSI model - they're Data Link layer address. That's right - a physical address is used to deliver a frame, but not a  physical layer address.

____________________________________________

The Network Layer ( Layer 3 )

____________________________________________
It's a Layer 3 of OSI model that you and I as network admins begin to have a great deal of interaction with the network. IP runs at this layer, and since routers operate here at L3, this layer is often called "the routing layer". In a nutshell, routing is a two-question process :

 - What valid paths exist from the local router to a given destination?
 - What is the best path ( the "optimal path") to take to get there?

Switches operate at L2, as do bridges. Layer 3 Switches do exist, but when operating at Layer 3, they're not switching or bridging. They're routing. You don't need to know about L3 switches for the CCENT exam, but you should know they exist as they're becoming more and more popular in today's networks.
___________________________________________

The Transport Layer ( Layer 4 )

____________________________________________
The transport layer's purpose is to establish a logical end to end connection between two systems, segment data received from the upper layers of the OSI model, and to make sure the data gets to the destination in the correct order and free of errors.

At the Transport Layer, there are two methods for transporting data: connection-oriented, referring to TCP, and connectionless, referring to UDP. We'll take a much more detailed look at TCP and UDP later in this section.

____________________________________________

The Session Layer ( Layer 5 )

____________________________________________
Layer 5 is the "manager" of the two-way communication between two remote hosts. This is the layer that handles the creation, maintenance, and teardown of communications between those two hosts. The overall communication itself is referred to as a session.

Some sessions last just long enough to send a unidirectional message, where other sessions will be of longer duration.

____________________________________________

The Presentation Layer ( Layer 6 )

____________________________________________
The layer answers one simple question : " How should this data be presented?" In addition to properly formatting data, encryption occurs a layer.

Have you ever opened a file in a word processing application , and you the pages of unrecognizable characters? That's a Presentation Layer issue. The applications have not agreed on how the data is to be presented.


If we open a 3 page document in notepad and see 300 page of garbage, then its a presentation layer issue. As it has got no idea what to present. Like opening a adobe file in notepad or wordpad.

There are four primary tasks that the Presentation Layer is concerned with :
 - Compatibility with the operating system
 - Proper encapsulation of data for network transmission
 - Data formatting (ascii, binary )
 - Data encryption, compression, and translation

Some of the file types that are used at the Presentation layer - JPEG, ASCII, GID, MPEG, MIDI, EBCDIC and TIFF. (Basically any file in regards to how data is presented )
____________________________________________

Monday, February 15, 2010

The Application Layer ( Layer 7 )

____________________________________________
This is the layer where the end users themselves interact with the network. Authentication services also run at Layer 7, but encryption runs at the next layer down.

The application layer ensures that the remote communication partner is available, that needed communication resources exist ( a modem, for example ). and that both ends of the communication agree on procedures involving data integrity, privacy and error recovery.

When trying to decide if a protocol is an Application layer protocol, just remember that protocols that require the end user to enter a request are Application layer protocols. Firewalls, devices intended to keep network intruders out, operate at L7.

Protocols and services that run at L7 include:
-  Email protocols SMTP ( Simple Mail Transfer Protocol ) and POP3 ( Post Office Protocol )
- Telnet
- HTTP
- File Transfer Protocol (FTP)
- Trivial File Transfer Protocol (TFTP)
- Simple Network Management Protocol (SNMP) - allows us to gather network information and analysis, particularly for CISCO switches GUI
____________________________________________

What is network

_________________________________________________________

What is network : - We need to get data from one point to another in the most effective manner possible
_________________________________________________________