You are on page 1of 15

5 TCP/IP

5.1 Protocol Standards Objectives


5.2 Introduction to TCP/IP
At the end of this chapter, students should be able to
5.3 TCP/IP Features
§ Learn a simple protocol architecture
5.4 TCP/IP Protocol Architecture
5.4.1 Application Layer
§ Understand the basics of TCP/IP
5.4.2 Transport Layer § Recognize different Protocols in TCP/IP suit
5.4.3 Internet Layer § Know the TCP/IP architecture
5.4.4 Network Interface Layer § Learn the features of TCP/IP protocol
§ Compare TCP/IP layers with OSI layers
5.5 Internet Protocol (IP)
5.5.1 IP Addressing Fundamentals § Identify the need of different protocols inside TCP/IP
§ Learn about IPv6 (Internet Protocol version 6)
5.6 IPv6 (Internet Protocol Version 6) § Learn about different TCP/IP applications
5.7 TCP/IP Applications
5.7.1 SMTP
5.7.2 FTP
5.7.3 TELNET

5.8 Summary

5.9 Exercises
TCP/IP

5.1 Protocol Standards

In a general sense, protocols are formal rules of behaviour. When we talk internationally,
protocols minimize the problems caused by cultural and language differences when various
nations work together. By ignoring the cultural and language differences, various nations can
come together, form a general set of rules and regulation for the easy communication among
themselves. Similarly, when computers communicate, it is necessary to define a set of rules
to govern their communications among different computers and devices created by different
vendors. In data communications these sets of rules are also called protocols.

5.2 Introduction to TCP/IP

Transmission Control Protocol/Internet Protocol (TCP/IP) is the basic language or


protocol used for the Internet. It is also be used in a private networks (either an intranet or
extranet) as a communication protocol. TCP/IP is basically a suit of communication
protocols used for connecting hosts on the Internet. TCP and IP are the most significant
protocols in the TCP/IP suite. TCP/IP also includes UDP, ARP and many other protocols
called sub-protocols. Among the several protocol its uses, the two main being
Transmission Control Protocol (TCP) and Internet Protocol (IP). UNIX/Windows
operating systems have TCP/IP built into it for the Internet, thus making it de facto (standard)
protocol for transmitting data over networks. Every operating systems of today have their
own protocols like Netware, NWLink, NetBIOS but most of them support TCP/IP.

83
Networking Principles

History of TCP/IP Protocol:

TCP/IP was first developed by U.S. Department of Defence, as a research project for its
Advanced Research Projects Agency network (ARPAnet) in the late 1960s. TCP/IP soon
becomes popular due to its low cost, its ability to communicate between dissimilar platforms
and its open nature. TCP/IP has a common addressing scheme that allow device to uniquely
address on the entire network, even if the network is as large as the worldwide Internet.
TCP/IP standardized high-level protocols for consistent, widely available user services.

5.3 TCP/IP Features

In present computer network operation, TCP/IP protocol is far more popular than any other
protocols. It is not because this protocol is being used for long time, but it meets the
important need of worldwide data communication for all and in right way. It has many
5 features, meeting the current requirements of computer network. One of the reasons, TCP/IP
become so popular is due to being a routable in nature, which means TCP/IP can carry
Network Layer addressing information that can be interpreted by a router. Protocols that
can span more than one LAN (or LAN segment) are called routable protocols. Not all
protocols are routable protocols. It is only routable protocols can be used over a large
networks.

Features of TCP/IP protocols:

§ TCP/IP is independently developed from any specific hardware or operating systems


§ It is open protocol standards and freely available
§ It is widely used for the Internet, Intranet and Extranet
§ Most of the products manufactured by vendors have support for TCP/IP
§ TCP/IP allows integration of different kind of networks
§ It can run over an Ethernet, token ring, dial-up line or any other kinds of physical
transmission media
§ TCP/IP has a common addressing scheme that allow device to uniquely address on
the entire network, even if the network is as large as the worldwide Internet
§ TCP/IP standardized high-level protocols for consistent, widely available user
services

84
TCP/IP

5.4 TCP/IP Protocol Architecture

TCP/IP has its own protocol model; it does not follow the OSI seven layers model. There is
no universal agreement regarding how to describe TCP/IP with a layered model, but it has
been agreed that TCP/IP has fewer layers than seven layers of OSI Model. TCP/IP follows its
own four layer model architecture.

The four layer of TCP/IP are:

§ Application Layer
§ Transport Layer
§ Internet Layer
§ Network Interface Layer

Figure 5-1 Comparison between OSI and TCP/IP Model

The key functions of each layer of TCP/IP are described below:

5.4.1 Application Layer

The Application Layer in TCP/IP group provides the same function as three layers of OSI
model (Application, Presentation and Session Layer). Therefore in the TCP/IP architecture,
any process above the transport layer is called an application layer. In TCP/IP protocol,
socket and port are used to describe the path over which applications communicate. Most
application level protocols inside TCP/IP are associated with one or more port number.

85
Networking Principles

5.4.2 Transport Layer

At Transport Layer of TCP/IP architecture, there are two main protocols User Datagram
Protocol (UDP) and Transmission Control Protocol (TCP) which carry out transport layer
functions. Transmission Control Protocol (TCP) is connection oriented protocol, which
means it guarantees information transmission. It is like sending a registered letter where
sender is assured that letter will reach to recipient. On the other hand, User Datagram
Protocol (UDP) is connectionless protocol, which transports datagram without end-to-end
reliability checking. It is like sending ordinary letter, where delivery is not guaranteed.
However, both protocols are useful for different applications. Since UDP is connectionless
protocol (does not need extra time for checking and verifying data) thus it is faster than TCP.
Therefore, UDP is used for transmission of sound and video over the Internet since these
media needs higher speed.

TCP UDP
· It is a connection-oriented protocol · It is connectionless protocol

· Reliable- When message sent with · Unreliable- It is not guaranteed that


5 TCP, delivery is guaranteed, unless
network breakdown.
packet sent will reach at receiver.

· Ordered- The message arrived at the · Not ordered- If you send two
receiver is in order which they where messages out, you don't know what
sent. order they'll arrive in.

· Heavyweight- when packet arrive in · Lightweight- No tracking of


wrong order, request are send to connection or order of packets, so it
source for resend. is lightweight.
Table 5-1 Comparison between TCP and UDP protocols

5.4.3 Internet Layer

At the Internet Layer of TCP/IP the primary protocol is Internet Protocol (IP). All upper
and lower layer communication must travel through IP layer in TCP/IP protocol stack.
Internet Protocol (IP) is responsible for assigning unique address, called IP address to
every computers and devices on the networks for successful communication. At Internet layer
there are others supporting protocols like ICMP to facilitate the routing process.

5.4.4 Network Interface Layer

In the TCP/IP architecture, the Data Link Layer and Physical Layer are normally grouped
together to become the Network Access Layer. TCP/IP makes use of existing Data Link and
Physical Layer standards rather than defining its own. The physical layer, which defines the
hardware communication properties, is not often directly interfaced with the TCP/IP
protocols in the network layer and above.

86
TCP/IP

Figure 5-2 Different Protocols at different layers of TCP/IP model

87
Networking Principles

5.5 Internet Protocol (IP)

Internet Protocol (IP) belongs to Network Layer of OSI and TCP/IP model and plays an
important role in computer network. It provides information about how and where data
should be sent by including source and destination addresses. At Network layer of the OSI
Model, data is formed into packet, the packet is called IP datagram in the context of TCP/IP.
The IP datagram act as an envelope for data and contain necessary information for routers to
transfer data between LAN segments.

The role played by the Internet Protocol:

Addressing
IP uses 32-bit addresses to identify the sending and receiving hosts. These addresses are
used by intermediate routers to select a path through the network for the packet.

Fragmentation
5 IP packets may be split, or fragmented, into smaller packets. This permits a large packet to
travel across a network which can only handle smaller packets.

Packet timeouts
Each IP packet contains a Time To Live (TTL) field, which is decremented every time a
router handles the packet. If TTL reaches zero, the packet is discarded, preventing packets
from running in circles forever and flooding a network.

5.5.1 IP Addressing Fundamentals

Networks recognize two types of addresses: Logical (or Network address) and physical (or
MAC or Hardware) addresses. MAC addresses are assigned to Network Interface Cards
(NICs) by manufacturer at the factory and cannot be changed easily. On the other hand,
logical addresses are assigned manually and can be changed easily. In the TCP/IP protocol
suite, Internet Protocol (IP) is core protocols responsible for logical addressing.

88
TCP/IP

Current version of IP address (IPv4) is a unique 32-bit binary number assigned to every
device that connects to IP based network. 32 bit binary number is usually represented as 4
decimal values, each representing 8 bits, in the range 0 to 255 (known as octets) separated by
decimal points. An Example of a valid IP is 140.179.220.200. This is known as "dotted
decimal" notation as shown in the example.

Every IP address consists of two parts, one identifying the networks and one identifying the
Hosts.

Example of IP Address:

IP Address: 140. 179. 220. 200

It is sometimes useful to view the values in their binary form


140 .179 .220 .200
10001100 .10110011 .11011100 .11001000

89
Networking Principles

IP addresses are classified into three classes; they are Class A, Class B and Class C. The
class IP address can be assigned to a particular business, government or other entity based on
size and need.

Figure 5-3 IP Address Classes

Summary Table of IP Classes


Class A Class B Class C
Max no. of networks 127 16256 2072640
Max no. of computers 16777214 65534 254
per network
Network no. part First field First two fields First three fields
Network no. range 001 to 127 128 000 to 191 255 192 000 000 to
233 255 255
Host no. part Last three fields Last two fields Last field
Host no. range 000 000 001 to 001 001 to 001 to 254
255 255 254 255 254

90
TCP/IP

5.6 IPv6 (Internet Protocol Version 6)


§ IPv6 is a new version of IP which is
designed to be an evolutionary step
from IPv4
§ The key to IPv6 enhancement is the
expansion of the IP address space from
32 bits to 128 bits, enabling virtually
unlimited unique IP addresses
§ It is recommended by the Internet
Engineering Task Force on July 25,
1994 (Toronto IETF meeting)
§ The IPv6 has auto configuration feature,
automatically configures interface and
router addresses for you
§ IPv6 protocol can coexist with current
IPv4 protocol

Example of IPv6 Address Format


5
IPv6 addresses are 128-bit entities. IPv6 Node Addresses are 128-bit records represented as
eight fields of up to four hexadecimal digits. A colon separates each field (:).

Example: 3ffe:ffff :101::230:6eff:fe04:d9ff.

NOTE:

The symbol “::” is a special syntax that can be used as a shorthand way of representing
multiple 16-bit groups of contiguous 0’s (zeros). The “::” can appear anywhere in the
address; however it can only appear once in the address.

91
Networking Principles

5.7 TCP/IP Applications


5.7.1 SMTP

Figure 5-4 An Email Application


5 Simple Mail Transport Protocol (SMTP) is an application layer protocol in TCP/IP suit. It
is the standard e-mail protocol on the Internet. SMTP defines the message format for the
email and also the way servers handle these messages. Most e-mail systems that send mail
over the Internet use SMTP to send messages from one server to another. SMTP servers route
SMTP messages throughout the Internet to a mail server that provides a message store for
incoming mail. SMTP uses TCP port number 25. Email address provided by Cosmopoint
e.g. name@cosmopoint.com.my is of SMTP type.

5.7.2 FTP

Figure 5-5 A FTP application

FTP stands for File Transfer Protocol, the protocol for exchanging files over the Internet.
FTP uses the Internet's TCP/IP protocols to enable data transfer. FTP is most commonly used
to download a file from a server using the Internet or to upload a file to a server (e.g.,

92
TCP/IP

uploading a Web page file to a server). FTP is an essential part of the internet, not only for
people building web sites but also for people downloading files.

5.7.3 TELNET

Figure 5-6 A Telnet Login Screen

Telnet is a text based, terminal emulation program for TCP/IP networks such as the Internet.
With telnet program you can connect your PC to a server at different location on the network.
Telnet is used for executing commands through Telnet program consul which is executed as
if it is entered directly on the server console. Thus Telnet can enable you to control the
server and communicate with other servers on the network. In order to connect to remote
server, you have to provide the host Name, Port number (which is telnet port number 23)
and terminal type, as shown in the Figure 5-6. FTP and SMTP protocols allow you to request
specific files/emails from remote computer but with telnet you have privilege to issue
command to remote servers.

93
Networking Principles

5.8 Summary

§ Protocol is set of rules to govern the communications among computers and devices
created by different vendors.

§ TCP/IP is basic protocol for the Internet as well as Intranet and Extranet.

§ TCP/IP consists of many protocols, TCP and IP being a core protocol in TCP/IP suit.

§ TCP/IP was fist developed by US Department of defence for ARPAnet in the late
1960s.

§ Unlike OSI 7 layers, TCP/IP has only four layers. They are Application, Transport,
Internet and Network Interface Layers.

§ Application layer of TCP/IP is concern with communication between applications.

5 § Transport layer of TCP/IP consist of two well know protocols; TCP and UDP.

§ TCP is connection oriented protocol, which guarantees information transmission.

§ UDP is connectionless protocol used for application like audio and video over the
Internet.

§ Internet Protocol (IP) is Internet layer protocol of TCP/IP which is responsible for
assigning logical address.

§ Network Interface Layer of TCP/IP defines the hardware communication properties.

§ Main role of Internet Protocol (IP) are IP addressing, Fragmentation and packet
timeouts.

§ IP address is unique 32 bit binary number assigned to every devices over a


network.

§ IP address is classified into three classes; Class A, Class B and Class C.

§ IPv6 is next generation Internet protocol has 128 bit addressing scheme.

§ SMTP is application layer protocol of TCP/IP used for sending and receiving email.

§ FTP is application layer protocols used for sending and receiving files over Internet.

§ TELNET is text based terminal emulation program for TCP/IP used for executing
command on remote computers.

94
TCP/IP

5.9 Exercises

Match both side of Table for correct answer

1 Protocol A Connection less protocol


2 TCP B 32 bit binary address
3 UDP C It is a sets of rules by which computer
talk to each other
4 IP D Connection-oriented protocol
5 TCP/IP E 7 layers
6 OSI F widely used for the Internet, Intranet and
extranet
7 IPv6 G SMTP
8 Port 25 H 128 bit address

5
Fill in the blanks

1. TCP/IP is widely used for ____________ , ___________ and____________.

2. TCP/IP has ___________ Layers where as OSI has _____________________ Layers.

3. __________, ____________, ________________ and _____________ are layers of


TCP/IP.

4. In TCP/IP protocol, __________ and ___________ are used to describe the path over
which applications communicate.

5. TCP is a _____________ protocol where as UDP is ______________ protocol.

6. TCP guaranteed the packet delivery to the receiver where as _____________ not.

7. IPv6 uses __________ Bits for its addressing unlike IPv4 which uses _____________ bits.

8. In TCP/IP the Data Layer and Physical layer is grouped to form _________________.

95
Networking Principles

Answer the following questions.

Q1. What is a protocol in a computer language?

Q2. What is TCP/IP and why it is so important?

Q3. List down some of TCP/IP features

Q4 List down the four layers of TCP/IP

Q5. What are different TCP/IP applications, describe them in brief.

96