Nov 6, 2011

Abstract of CCNA study guide-6 - tcp/ip 1

Continue the series of  Abstract CCNA study guide book .
Introduction to TCP/IP
TCP/IP and the DoD Model
The DoD model is composed of four layers:
-        Process/Application layer
-        Host-to-Host layer
-        Internet layer
-        Network Access layer

Next Figure  shows a comparison of the DoD model and the OSI reference model.


The Process/Application layer replaces the top three layers (Application, Presentation, and Session).
The Host-to-Host layer parallels the functions of the OSI’s Transport layer.
The Internet layer corresponds to the OSI’s Network layer
The Network Access layer equivalent of the Data Link and Physical layers of the OSI model
Figure below shows the TCP/IP protocol suite and how its protocols relate to the DoD model layers.


The Process/Application Layer Protocols
In this section, I’ll describe the different applications and services typically used in IP networks.
The following protocols and applications are covered in this section:
Telnet – FTP – TFTP – DNS  – DHCP/BootP – SMTP– SNMP– LPD - NFS - X Window

Telnet
Telnet is terminal emulation. It allows a user on a remote client machine, called the Telnet client, to access the resources of another machine

File Transfer Protocol (FTP)
File Transfer Protocol (FTP) is the protocol that actually lets us transfer files, and it can accomplish this between any two machines using it. But FTP isn’t just a protocol; it’s also a program.
FTP’s functions are limited to listing and manipulating directories, typing file contents, and copying files between hosts. It can’t execute remote files as programs.

Trivial File Transfer Protocol (TFTP)
Trivial File Transfer Protocol (TFTP) is the stock version of FTP. it’s so easy to use and it’s fast too. it can do nothing but send and receive files.

Domain Name Service (DNS)
Domain Name Service (DNS) resolves hostnames, specifically Internet names such as www.routersim.com

Dynamic Host Configuration Protocol (DHCP)/Bootstrap Protocol (BootP)
Dynamic Host Configuration Protocol (DHCP) assigns IP addresses to hosts.
DHCP differs from BootP in that BootP assigns an IP address to a host but the host’s hardware address must be entered manually in a BootP table. But remember that BootP is also used to send an operating system that a host can boot from. DHCP can’t do that.
there is a lot of information a DHCP server can provide to a host as :
IP address - Subnet mask - Domain name - Default gateway (routers) – DNS - WINS information.
A client that sends out a DHCP Discover message in order to receive an IP address sends out a broadcast at both layer 2 and layer 3. The layer 2 broadcast is all Fs in hex, which looks like this: FF:FF:FF:FF:FF:FF. The layer 3 broadcast is 255.255.255.255, which means all networks and all hosts. DHCP is connectionless, which means it uses User Datagram Protocol (UDP) at the Transport layer

Simple Mail Transfer Protocol (SMTP)
Simple Mail Transfer Protocol (SMTP) answering our ubiquitous call to email, uses a spooled, or queued, method of mail delivery. SMTP is used to send mail; POP3 is used to receive mail.

Simple Network Management Protocol (SNMP)
Simple Network Management Protocol (SNMP) collects and manipulates valuable network information.



The Host-to-Host Layer Protocols
This is still considered layer 4, and Cisco really likes the way layer 4 can use acknowledgments, sequencing, and flow control.
The following sections describe the two protocols at this layer:
- Transmission Control Protocol (TCP)
- User Datagram Protocol (UDP)

Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP) takes large blocks of information from an application and breaks them into segments. It numbers and sequences each segment so that the destination’s TCP stack can put the segments back into the order the application intended. After these segments are sent, TCP (on the transmitting host) waits for an acknowledgment of the receiving end’s TCP virtual circuit session, retransmitting those that aren’t acknowledged.

Before a transmitting host starts to send segments down the model, the sender’s TCP stack contacts the destination’s TCP stack to establish a connection. What is created is known as a virtual circuit. This type of communication is called connection-oriented.

TCP is a full-duplex, connection-oriented, reliable, and accurate protocol.

TCP Segment Format
Figure below shows the TCP segment format. The figure shows the different fields within the TCP header.

The TCP header is 20 bytes long, or up to 24 bytes with options. You need to understand what each field in the TCP segment is:
Source port The port number of the application on the host sending the data.

Destination port The port number of the application requested on the destination host.

Sequence number A number used to puts the data back in the correct order or retransmits missing or damaged data.

Acknowledgment number The TCP octet that is expected next.

Header length The number of 32-bit words in the TCP header. This indicates where the data begins.

Reserved Always set to zero.

Code bits Control functions used to set up and terminate a session.

Window The window size the sender is willing to accept, in octets.

Checksum The cyclic redundancy check (CRC), The CRC checks the header and data fields.

Urgent A valid field only if the Urgent pointer in the code bits is set. If so, this value indicates the offset from the current sequence number, in octets, where the first segment of non-urgent data begins.

Options May be 0 or a multiple of 32 bits, if any.

Data includes the upper-layer headers.

User Datagram Protocol (UDP)
User Datagram Protocol (UDP) fabulous job is transporting  information that doesn’t require reliable delivery.
There are some situations in which it would be wise for developers to use UDP rather than TCP:
1- The cost in overhead to establish, maintain, and close a TCP connection for each one of those little messages would reduce efficient network as in SNMP.
2- When reliability is already handled at the Process/Application layer. Network File System (NFS) handles its own reliability issues, making the use of TCP both impractical and redundant.

UDP does not sequence the segments and does not care in which order the segments arrive at the destination.
And  after that, It doesn’t follow through, check up on them, or even allow for an acknowledgment of arrival
Because of this, it’s referred to as an unreliable protocol.

UDP doesn’t create a virtual circuit, nor does it contact the destination before delivering information to it. Because of this, it’s also considered a connectionless protocol.

This gives an application developer a choice when running the Internet Protocol stack: TCP for reliability or UDP for faster transfers.

So if you’re using Voice over IP (VoIP), for example, you really don’t want to use UDP, because if the segments arrive out of order , the result is seriously garbled data. On the other hand, TCP sequences the segments so they get put back together in exactly the right order.

UDP Segment Format
Look at the next figure carefully, can you see that UDP doesn’t use windowing or provide for acknowledgments in the UDP header?

It’s important for you to understand what each field in the UDP segment is:
Source port Port number of the application on the host sending the data
Destination port Port number of the application requested on the destination host
Length Length of UDP header and UDP data
Checksum Checksum of both the UDP header and UDP data fields
Data Upper-layer data

Key Concepts of Host-to-Host Protocols
Table below highlights some of the key concepts that you should keep in mind regarding these two protocols. You should memorize this table.


Port Numbers
TCP and UDP must use port numbers to communicate with the upper layers.
Figure below illustrates how both TCP and UDP use port numbers.


The different port numbers that can be used are explained next:
-Numbers below 1024 are considered well-known port numbers.
-Numbers 1024 and above are used by the upper layers to set up sessions with other hosts and by TCP to use as source and destination addresses in the TCP segment.

Table below gives you a list of the typical applications used in the TCP/IP suite, their well known port numbers, and the Transport layer protocols used by each application or process. It’s important to study and memorize this table.

Notice that DNS uses both TCP and UDP. Whether it opts for one or the other depends on what it’s trying to do. Even though it’s not the only application that can use both protocols, it’s certainly one that you should remember in your studies.

No comments:

Post a Comment