Saturday, March 24, 2012

Cisco CCNA: TCP/IP Networking

Cisco CCNA: TCP/IP Networking



Unit 1. Overview of TCP/IP



This course gives you a broad overview of several aspects of TCP/IP (Transmission Control Protocol/Internet Protocol), the standard for internetworking communications. It is important to understand TCP/IP, since it is a universally available protocol suite and it contains elements that can be found in other protocols.
TCP/IP can also be used by a router as a configuration tool, employing such methods as Telnet, TFTP (Trivial File Transfer Protocol), and SNMP (Simple Network Management Protocol).
In this first unit, you will learn a brief history of TCP/IP and be introduced to the TCP/IP protocol stack and its functions.

After completing this unit, you should be able to:
  • Describe the origin and evolution of TCP/IP

  • Define the functionality of the layers in the TCP/IP protocol stack

  • Explain the basic principles of TCP/IP


This unit does not address any specific Cisco objectives. However, it does provide background information that is essential for the CCNA exam.
In the course index, questions about background information are indicated with the abbreviation BCK and a short description of the question subject matter.

Topic 1.1: Evolution of TCP/IP

*Origin of TCP/IP
TCP/IP (Transmission Control Protocol/Internet Protocol), is a suite of protocols that was developed as a result of the research completed by DARPA (Dept. of Defense Advanced Research Projects Agency).
DARPA had a need for enabling communication between a variety of computers both internally and externally, for defense-related research.

*DARPA Research Goals
Around 1969, DARPA initiated their network research with four main goals in mind:
  • Common protocols

  • Interoperability

  • Robust communication

  • Ease of reconfiguration


*Collective Rules
The Department of Defense required a common set of protocols (communications rules) that could be specified for all networks.
Common protocols would greatly simplify the acquisition of information from different sources because the systems could communicate with each other.

*Equipment Compatibility
If equipment from various vendors could interoperate, the system development efficiency could be improved and competition among vendors would be promoted.

*Transmission Needs
A particularly dependable network standard was required to meet the nation's defense needs.
These protocols needed to provide reliable, high-performance networking with the relatively primitive wide area network technologies then available.

*Simple Reconfiguration
Because the Department of Defense depended on the network, reconfiguring the network and adding and removing computers without disrupting communication needed to be possible.

Question 1

Question 2

Topic 1.2: Development of TCP/IP

*Packet Switching
Keeping the four goals we just covered in mind, DARPA (since renamed ARPA), conceived a packet-switched network to provide electronic communication between U.S. research institutions. Packet-switched networks allow organizations to connect to an internetwork cloud that manages information transfer from one location to another without a direct connection or link between two end devices.

*Creation of ARPAnet
The first experimental network connected four sites: the University of California at Los Angeles (UCLA), the University of California at Santa Barbara (UCSB), the University of Utah, and SRI International. Early tests were encouraging, and additional sites were connected to the network. The ARPAnet, as it came to be called, incorporated 20 hosts by 1972. Today's Internet can trace its lineage back to the ARPAnet.

*TCP/IP Development
Initially, TCP/IP was part of the BSD (Berkeley Software Distribution) of UNIX, serving to connect remote UNIX hosts. The first set of TCP/IP protocols was developed in the early 1980s, and they became the standard protocols for the ARPAnet in 1983. TCP/IP is now the standard for internetwork communications, making it possible for millions of computers to communicate globally over the Internet.

*Protocol Standardization
With the size of the Internet and the number of protocols being used, there was a need for standardization. The Internet protocols must be documented in RFCs (Request for Comments), which are published, examined, and carefully assessed by the Internet community. Two important RFCs are RFC 1700 and RFC 791.
  • RFC 1700 manages assigned numbers used in protocols of the Internet community
  • RFC 791 covers IP functionality


Question 3

Topic 1.3: TCP/IP Protocol Stack

*The Protocol Stack
The TCP/IP networking model, or protocol stack, has only four layers, compared to the seven-layer OSI model. Let's take a brief look at each layer in the TCP/IP protocol stack:
  • Application

  • Transport

  • Internet

  • Network Access


Topic 1.3.1: Application Layer

*Application Layer Overview
The Application layer defines the functionality found in the Application, Presentation, and Session layers of the OSI model.
This layer supports the communicating component of an application and the formatting and conversion of code.

*Application-Layer Protocols
The Application layer also establishes and maintains sessions between applications.
Protocols exist on the Application layer for file transfer, e-mail, remote login, and network management.

Topic 1.3.2: Transport Layer

*Transport Layer Overview
The TCP/IP Transport layer works like the Transport layer does in the OSI model.
It defines the functionality of connection-oriented and connectionless data transport by using TCP or UDP.

Topic 1.3.3: Internet Layer

*Internet Layer Overview
The TCP/IP Internet layer defines the internetworking functionality found in the Network layer of the OSI model. Here are some of the protocols available at the Internet layer. We will cover this layer in more detail in a later unit.

Topic 1.3.4: Network Access Layer

*Network Access Layer Overview
The TCP/IP Network Access layer works like the Data Link layer does in the OSI model, defining the data-link properties and media access methods. Here are some of the protocols available at the Network Access layer.

Question 4

Question 5

Topic 1.4: Functions of TCP/IP

*Transmitting Messages
TCP/IP transfers information in a sequence of datagrams (units of data).
A message may be transmitted as a series of disassembled datagrams, which are then reassembled into the proper order at the receiving location.

*Datagrams and Packets
Let's compare the terms datagram and packet. A datagram is a unit of data, but a packet is a physical item appearing on the network. Usually, a packet contains a datagram, but there are some protocols where a datagram may be divided into multiple packets, to meet a transmission requirement.

*Data Transmission
In the next unit, we will learn more about data transmission and how it is handled by the different layers of the TCP/IP protocol stack.


* Exercise 1
Try testing your knowledge of the TCP/IP protocol stack.


Examine the following table
Step Action
1 Sketch the four-layer TCP/IP protocol stack.
Correctly label each layer.
2 What is the role of each layer within the stack? Which protocols are available on each of the layers?
List this information with the appropriate layer.
3 How does the TCP/IP protocol stack correspond the OSI reference model?
Sketch the seven-layer OSI reference model next to the TCP/IP protocol stack and draw lines between the correlating layers.
4 Find out more about the origin of TCP/IP by doing an Internet search.


Topic 1.5: Unit 1 Summary

In this unit, you learned how the TCP/IP protocol began as a concept of the Department of Defense and grew to be the standard for internetworking today.
You were also introduced to the TCP/IP protocol stack and saw how its layers correlate to the OSI reference model.

Unit 2. Transport Layer Protocols



The Transport layer of the TCP/IP protocol stack corresponds with the Transport layer of the OSI model. This layer acts as a buffer from the intricacy of the network.
In this unit you will learn about the two protocols available at the Transport layer of the TCP/IP protocol stack, TCP and UDP. You will learn how these protocols process information, and the level of reliability offered with each. In addition, you will learn to identify the fields that make up the data segments of both of these protocols.

After completing this unit, you should be able to:
  • Explain basic TCP functionality

  • Define UDP data transmission methods

  • Recognize the differences between TCP and UDP

  • Identify the fields of TCP and UDP segments


This unit provides information that is relevant to the following CCNA exam objective:
Identify the parts in specific protocol address examples
In the course index, questions about background information are indicated with the abbreviation BCK and a short description of the question subject matter.

Topic 2.1: Transport Layer Role

*Transport-Layer Functions
The Transport layer from the TCP/IP protocol stack works to shield the upper-layer applications from the complexities of the network.
The Transport layer takes data and instructions from the upper layers and begins the process of readying the information for sending.

*Available Protocols
There are two protocols available at the Transport layer:
  • TCP (Transmission Control Protocol)

  • UDP (User Datagram Protocol)


Topic 2.2: TCP

*Transmission Control Protocol (TCP)
TCP is a connection-oriented, reliable delivery protocol. This means that it makes sure transmitted information is received properly, without modification.
If there is a problem during transmission, TCP will resend the information.

Topic 2.2.1: Segments

*TCP Segments
TCP breaks down large units of information from an application into numbered and sequenced segments for transmission. The numbers and sequences then allow the destination's TCP to put the segment back together in the proper order. Here are the TCP segment fields and their length in bits.

*TCP Segment Fields
Here are the TCP segment fields and their definitions:
Examine the following table
TCP Segment Field Definition
Source Port Number of sending port; names the upper-layer protocol in the sending host
Destination Port Number of the destination port; names the upper-layer protocol in the destination host
Sequence Number Identifies the position in the senders' byte stream of the data in the segment; used to substantiate reliability
Acknowledgement Number Identifies the next anticipated TCP octet; used to substantiate reliability
HLEN Number of 32-bit words in the header; denotes where the data begins
Reserved Set to zero
Code Bits Contains bits for control functions (i.e. SYN bits for session setup and FIN bits for session completion)
Window Number of octets that the sender will accept; size of receive buffers
Checksum Calculated checksum of the header and data fields; confirms that the datagram arrives intact
Urgent Pointer Identifies the end of the urgent data; used to indicate out-of-band data
Option One currently defined; maximum TCP segment size
Data Upper-layer protocol data


Topic 2.2.2: Procedures

*TCP Procedures
TCP uses a series of handshakes to establish the session, creating what is called a virtual circuit. During the initial handshake, before the destination's TCP sends back an acknowledgment, the two TCP layers agree on the amount of information that is going to be transmitted. This agreement process is called windowing. With all these details being ironed out ahead of time, the stage is set for reliable Application-layer communication. The specifics of TCP's use of windowing and acknowledgments will be discussed in more detail in a later unit.

*Sending Segments
After the sender's TCP contacts the destination's TCP and establishes a connection, the sender's TCP starts to send segments down the model to the Network Access layer. TCP waits for acknowledgment from the destination's TCP for each segment sent. Any segments that have not been acknowledged are retransmitted.

*When to Use TCP
The fact that TCP is a full-duplex, connection-oriented, reliable, accurate, error-checking protocol means that it is a very complex and costly protocol.
TCP should be used only in situations where reliability is the most important factor.

Question 6

Question 7

Topic 2.3: UDP

*User Datagram Protocol (UDP)
UDP is similar to and can be substituted for TCP. UDP differs from TCP by offering less reliability and using far fewer network resources.
UDP is considered a connectionless protocol since it doesn't create a virtual circuit or contact the destination before information is delivered to it.

Topic 2.3.1: Segments

*UDP Segments
UDP does not employ windowing or acknowledgments, so there are no sequence or acknowledgment fields within the segment. UDP counts on the Application-layer protocols to provide reliability. In contrast to a TCP segment, the UDP segment is small. UDP segments the information just as TCP does, but UDP doesn't sequence the segments.

*UDP Segment Fields
Here are the UDP segment fields and their definitions:
Examine the following table
UDP Segment Field Definition
Source Port Number of sending port; names the upper-layer protocol in the sending host
Destination Port Number of the destination port; names the upper-layer protocol in the destination host
Length Indicates the total length of the segment, including both data and header information
Checksum (Optional field) If activated, this field is used by both ends of the communication channel for data integrity checks
Data Upper-layer protocol data


Topic 2.3.2: Procedures

*UDP Procedures
UDP takes blocks of upper-layer information and breaks them into segments, just like TCP.
However, UDP does not sequence the segments and doesn't concern itself with the order in which these segments arrive at their destination.

*When to Use UDP
UDP is best suited for applications that don't need to assemble sequences of segments and don't require a connection.
TFTP, SNMP, NFS (Network File System), and DNS (Domain Name System) are examples of protocols that employ UDP.

*TCP vs. UDP
Since UDP doesn't concern itself with the segments and their safe arrival to their destination, it's referred to as an unreliable protocol.
This does not mean UDP is ineffective, it just means that it doesn't offer as much reliability as some other protocols.

Question 8

Question 9

Question 10


* Exercise 1
Try testing your knowledge of the TCP and UDP protocols.
.

Examine the following table
Step Action
1 Sketch a TCP segment and label each field correctly.
What is the purpose/function of each field? Write a short definition next to each field.
2 Sketch a UDP segment and label each field correctly.
What is the purpose/function of each field? Write a short definition next to each field.
3 Make a list contrasting the strengths and weaknesses of TCP vs. UDP.
Think of a scenario for when you might use each of them.


Topic 2.4: Unit 2 Summary

In this unit you learned about TCP and UDP, the two protocols available at the Transport layer of the TCP/IP protocol stack. You learned about their level of reliability and how each handles the task of readying data for transmission.
We will cover the specifics of TCP data transmission in the next unit.

Unit 3. TCP Specifics



Now that you've had a brief introduction to TCP, it's time to get better acquainted. In this unit you will learn about the specifics of TCP data transmission, such as the use of port numbers, handshakes, synchronization, acknowledgments, and windowing.
You will also learn how sequence and acknowledgment numbers are used to provide reliability in this complex protocol.

After completing this unit, you should be able to:
  • Identify well-known port numbers and their corresponding protocols

  • Explain how TCP uses handshakes, synchronization, acknowledgments, and windowing for efficient data transmission

  • Define TCP sequence and acknowledgment numbers and their use


This unit provides information that is relevant to the following CCNA exam objective:
Identify the parts in specific protocol address examples
In the course index, questions about background information are indicated with the abbreviation BCK and a short description of the question subject matter.

Topic 3.1: Port Numbers

*Using Port Numbers
Port numbers are used by both TCP and UDP to pass information to the upper layers of the protocol stack. There may be many processes on a single machine using both TCP and UDP, and port numbers distinguish these processes for incoming packets.

*Assigned Protocol Numbers
There are particular port numbers assigned to particular Application-layer protocols. RFC 1700 covers these assigned port numbers used by application software developers. These protocol numbers identify the upper-protocol that is using the transport.

*Random Port Numbers
If there is a conversation using an application that doesn't have a well-known port number, then that application is assigned a port number randomly chosen from a specific range. These port numbers are used in the source and destination port fields of the TCP segment.

Question 11

Question 12

Topic 3.2: Port Numbers in TCP

*TCP Port Numbers
Port numbers are used by the end systems to select the proper application. Originating source port numbers are dynamically assigned by the source host, and according to the assigned ranges, they are numbers greater than 1023. Usually the TCP destination port number on both sides of the conversation is the same. In other words, when a file transfer takes place, the software on one host is communicating with a peer application on another host.

*Multiple Telnet Sessions
There may be occasions when you have multiple Telnet sessions running at the same time on a host or router. In this case, the source host or router selects an available port number greater than 1023 to represent the source port for each independent session, but the destination port remains 23. .

*IP Access Lists
Understanding the concept of port numbering is essential for configuring IP extended access lists.
IP access lists will be covered in greater detail in a later course.

Question 13

Question 14

Topic 3.3: Handshakes and Synchronization

*Initial Sequence Numbers
For a connection to be initialized or established, the two end stations must synchronize on each other's initial sequence numbers (ISNs). Sequence numbers are used to track the communication order and to ensure that no pieces of data are missing in multi-packet communications. The starting number used when the TCP connection is established is known as the initial sequence number.

*Synchronization
Synchronization is attained by exchanging segments carrying the ISNs and a control bit called SYN. A successful connection requires a proper mechanism for selecting an ISN and then a handshake to exchange the ISNs. There are basically four steps involved in synchronization. Since the second and third steps can be combined in one message, the exchange is called a three-way handshake.

*Importance of the Three-Way Handshake
Since sequence numbers are not tied to a global clock in the network, the three-way handshake is essential for a successful TCP connection. After receiving the first SYN, the receiver won't know if the segment was an old delayed one (unless it remembers the last sequence number used on this connection), so it must ask the sender to verify the SYN.

Question 15

Question 16

Question 17

Topic 3.4: Windowing

*The Role of Windowing
As was covered in an earlier course, window size determines how much data the receiving device can receive at once. TCP uses windowing as a flow control mechanism to govern the flow of data between devices. The sending TCP receives a window from the receiving TCP. This window indicates the number of bytes (including the acknowledgment number) that the receiving TCP is presently ready to receive.

*Window Advertisements
Each acknowledgment that the sender gets contains a window advertisement, showing the number of bytes acceptable by the receiver. TCP also has a congestion control window that is normally the same size as the receiving device's window. However, when there is congestion or a segment is lost, the size of this window is cut in half. TCP's windowing methods are also known as sliding window flow control.

Topic 3.5: Sequence and Acknowledgment Numbers

*Sequencing and Acknowledging Segments
TCP assigns each segment a particular sequence number before transmission so that the receiving device can reassemble the segments in the correct order. As the receiving device receives each segment, it verifies the sequence number and sends back an acknowledgment number for the next segment in the series. If the receiver finds that a sequence number is missing, that segment is retransmitted by the sender.

*Providing Reliability
Sequence and acknowledgment numbers are communicated between the two devices in both directions. TCP provides full-duplex communication and these sequence and acknowledgment numbers help to provide reliability.

Question 18

Question 19


* Exercise 1
Try testing your knowledge of some elements of TCP.

Examine the following table
Step Action
1 From memory, write down the assigned port number for each of the following protocols:
TFTP
Telnet
FTP
DNS
SNMP
SMTP
2 Conduct an Internet search on RFCs 793 and 813, for more information on windowing.


Topic 3.6: Unit 3 Summary

In this unit you learned details about the functionality of TCP. You learned how TCP uses port numbers, handshakes, acknowledgments, windowing, and sequencing to provide reliability and efficiency.

Unit 4. Internet Layer Protocols



This last unit focuses on the Internet (Network) layer of the TCP/IP protocol stack.
In this unit you will learn about IP (Internet Protocol) and other protocols available at the Internet layer, such as ARP, BootP, and ICMP.

After completing this unit, you should be able to:
  • Explain the functionality of IP

  • Identify the fields of an IP datagram

  • Distinguish among the various protocols available at the Internet layer


This unit provides information that is relevant to the following CCNA exam objective:
Identify the functions of the TCP/IP network-layer protocol
In the course index, questions about background information are indicated with the abbreviation BCK and a short description of the question subject matter.

Topic 4.1: Internet Layer Role

*Corresponding Layers
The Internet layer of the TCP/IP protocol stack corresponds to the Network layer of the OSI model. In both models, this particular layer is responsible for using software addressing to send packets through an internetwork.

*Internet Layer Functions
The Internet layer has two main functions:
  • Routing

  • Network addressing
There are no routing-related functions performed in any of the upper-layer or lower-layer protocols, they all happen at the Internet layer.

Topic 4.2: IP

*Internet Protocol (IP)
IP (Internet Protocol) is used at the Internet (Network) layer for routing and assigning a logical or IP address to network devices. IP addresses are 32-bit unique numbers that are divided into three parts. The first part denotes the network address, the second part denotes the subnet, and the third part denotes the host address. IP addresses will be covered in more detail in a later course.

*IP Datagrams
IP takes segments from the Transport layer and fragments them into datagrams. Each datagram has the IP address of both the sender and the receiver. IP datagrams consist of an IP header and data and are surrounded by the MAC-layer header and MAC-layer trailer. Here are the IP datagram fields and their length in bits.

*IP Datagram Fields
Here are some of the IP datagram fields and their definitions:
Examine the following table
IP Datagram Fields Definition
VERS Version number
HLEN Header length in 32-bit words
Type of Service Stipulates reliability, precedence, delay, and throughput parameters; indicates how the segment should be handled
Total Length Total length of header and data, including all upper-layer headers
Identification, Flags, Frag Offset Allows for fragmentation and reassembly of datagrams, accommodating varying MTUs (Maximum Transmission Units) or frame sizes in the network.
TTL Time To Live, countdown field
Protocol Identifies the upper-layer protocol that should receive the segment
Header checksum Integrity check on the header
Source and Destination IP Addresses 32-bit IP addresses that identify the end devices involved in the communication
IP Options (if any) Network testing, debugging, security, and others


Question 20

Question 21

Topic 4.3: ICMP

*Internet Control Message Protocol (ICMP)
ICMP resides at the Internet layer that is used to send messages between routers. These messages are carried in the IP datagram.

*ICMP Messages
Here is a list of some of the most common ICMP message types:
Examine the following table
Message Definition
destination unreachable Report unreachable destination
time exceeded Detect circular pockets
parameter problem Faulty IP packet structure
source quench Flow control
redirect Route change
echo Test reachability
echo reply Test reachability
timestamp Clock sync - Transit time estimation
timestamp reply Clock sync - Transit time estimation
information request Obtain a network address
information reply Obtain a network address
address mask request Obtain a subnet mask


*Packet Delivery
If a router receives a packet and it is not able to deliver it to its destination, the router sends an ICMP destination unreachable message to the source. This ICMP message would be sent if there were no known route to the destination.

*Troubleshooting with ICMP
An unsuccessful ping command could result in several ICMP messages, such as unreachables and timeouts. An echo reply message is indicative of a successful ping.
ICMP is a very useful troubleshooting and network design tool.

Question 22

Question 23

Topic 4.4: ARP

*Address Resolution Protocol
ARP is a method used to map a known IP address to a hardware or MAC address. ARP sends a broadcast inquiry across the network, asking that the machine with the specified IP address send a reply with its hardware address.

*Finding the Machine
Another way to think of it is that ARP translates the IP address into a hardware address, and from that, determines where the machine is located.
When ARP is used on a network where the requesting and destination host share the same media, this is referred to as local ARP.

Topic 4.5: RARP

*Reverse ARP
RARP is another protocol used for address resolution that works in the opposite manner of ARP. RARP is a means of determining the IP address from a known MAC address. This protocol sends out a packet with its MAC address and requests information on its IP address. A specific machine called a RARP server responds with the answer.

Topic 4.6: BootP

*Boot Program
Boot Program is used by a diskless machine that is trying to figure out its IP address and which file it should boot from. A BootP broadcast is sent over the network when the machine is turned on, a BootP server hears the request and looks in its BootP file for the client's MAC address. If there is a proper entry in the BootP file, the server responds with the information requested.

Question 24

Question 25

Question 26


* Exercise 1
Try testing your knowledge of the TCP/IP Internet layer.

Examine the following table
Step Action
1 Sketch an IP datagram and label each field correctly.
What is the purpose/function of each field? Write a short definition next to each field.
2 Make a list of as many protocols as you can think of that are found at the Internet (Network) layer.
How does each protocol function? Write a brief description next to each protocol.


Topic 4.7: Unit 4 Summary

In this unit you learned about the various protocols available at the Internet (Network) layer. You learned how this layer manages routing and network addressing by employing such methods as ICMP, ARP, RARP, and BootP.
This completes our look at TCP/IP networking.

No comments:

Post a Comment