TCP/IP PART 1
OBJECTIVES
Introduction to TCP/IP
TCP/IP and OSI Models
TCP/IP Protocols
IP addressing
2
Introduction to TCP/IP
A network protocol includes:
all the rules and conventions for communication between network
devices,
ways devices can identify and make connections with each other.
formatting rules that specify how data is packaged into sent and received
messages.
Without protocols, devices would lack the ability to understand the
electronic signals they send to each other over network connections.
Introduction to TCP/IP
TCP/IP is:
a family of network protocols, with each performing a function to move data from one level to
the other through a host to another over a link
based on two main protocols: TCP (Transmission Control Protocol) and IP (Internet Protocol)
central to the working of Internet and Intranets
Origin
Military antecedents
First proposed in 1978 and a standard version available for wider use in 1983
Largely developed by computer scientists @ Univ of California, Berkeley
Made part of UNIX series software by UCB
US government promotion of its standards 4
Introduction to TCP/IP
Benefits of TCP/IP – Advantage
Original design goals for over other Network Protocols
TCP/IP:
• a widely published open standard making it
independent of manufacturers’
completely independent of any hardware or
hardware and software software manufacturer.
good built-in failure recovery ( a
• a routable protocol, making it traffic efficient
feature from its military origin)
reliable end-to-end service • reliable and efficient data-delivery
efficient with a low data overhead mechanisms
scalable • uses a common addressing scheme
5
The TCP/IP is standard protocol used between computers and network
devices for communication
The TCP/IP model, or Internet Protocol Suite, describes a set of
general design guidelines and implementations of specific networking
protocols to enable computers to communicate over a network.
TCP/IP is generally described as having four abstraction layers.
Functionality is provided through various protocols implemented at
each of the layers. This layer architecture is often compared with the
seven-layer OSI model.
6
TCP/IP and OSI Model
7
TCP/IP Model. Network Access Layer
• Implementation of
OSI Physical and
Data Link layers.
Supports: • Hosts identified by
MAC address.
• A wide range of
low-level protocols.
Does not • Sequencing
support: • Acknowledgement
8
TCP/IP Model. Internet Layer
• network addressing
• host addressing
• routing
Respon- • packaging data for
sible transmission
for:
• fragmenting packets for
transmission and
reassembling packets
Internet Protocol version 4 (IPv4)
Internet Protocol version 6 (IPv6)
Address Resolution Protocol (ARP)
9
Internet Layer details: IP Protocol
Internet Protocol (IP) is essentially the Internet layer. The other
protocols merely exist to support it.
How IP routes data: (Sending node)
Receives data segments from the TCP layer
Breaks the data segments into packets
Adds IP addresses of the source and destination nodes.
Each router (device) that receives a packet makes routing
decisions based on the packet’s destination IP address.
Note: IP protocol is connectionless
10
IP ADDRESSING
IP Address is Logical address given to each and
every device in the network. It is a Network
Layer address (Layer 3)
Two Versions of IP
i. IP version 4
ii. IP version 6
Internet Protocol version 4 (IPv4)
It is responsible for addressing and
routing packets.
It is responsible for delivering packets
from the source host to the destination
host solely based on the IP addresses.
It is a connectionless protocol, so it does
not establish a connection between the
source and destination hosts.
12
Internet Protocol version 4 (IPv4)
IPv4, the original Internet Protocol, uses a
32‐bit address. It is typically written in
dotted decimal notation, as shown below:
192.168.10.42
While IPv4 is still useful in most situations,
the Internet is running out of IPv4
addresses that are available for assignment.
13
Internet Protocol version 6 (IPv6)
IPv6 was developed to extend the address space by
providing a 128‐bit address, represented as a series
of hexadecimal numbers:
fe80:bde1:d46f:5f6c:bff1:30db
Most network devices now support both IPv4 and
IPv6 addresses. Computer operating systems
configure hosts with both IPv4 and IPv6
addresses. However, IPv6 addresses are largely
ignored because they are not currently required in
most network environments.
14
TCP/IP Model. Transport Layer
Provides datagram (packet of data
containing destination and routing
information) services for Application
layer protocols.
• Establishes connection
between hosts
• Provides sequencing and
TCP acknowledgement
• Recovers lost packets
through retransmission
• One-to-one or one-to-
UDP many transmissions
15
TCP and UDP protocols
Transmission Control Protocol (TCP) is a connection‐
oriented protocol. It provides a reliable, ordered, and
error-checked one‐to‐one connection between two
network hosts. TCP is used whenever it is necessary to
ensure delivery of data. (more details to follow)
User Datagram Protocol (UDP) is a connectionless
protocol. It can be used for one‐to‐one or one‐to
many (broadcast) transmissions. Because UDP is
connectionless, it does not ensure reliable delivery.
UDP is used when very little data (no more than one
packet) is being sent.
16
TCP Details: How it Works
How does TCP ensure reliable, verifiable data exchange
between hosts on a network?
By breaking the data into segments (called datagrams) and
adding header information as shown below.
17
TCP Details: How it Works
Header Element Function
Source & Destination Port allow the data to be sent back and forth to the correct
Numbers process running on each computer. A port number and
an IP address together is termed a socket. Two sockets
(source and destination define a connection
Sequence Number allows the datagrams to be rebuilt in the correct order
in the receiving computer
Checksum allows the protocol to check whether the data sent is
the same as the data received
Acknowledgment number Indicates that the data was received successfully.
18
TCP/IP Model. Application Layer
Information exchange protocols. It is the
interface between a computer’s users and
applications and the network services
provided by TCP/IP. The Application
layer of the TCP/IP model has protocols
to support file transfer, e-mail, and
remote login, and many other
applications.
Application layer protocols:
• Telnet, SSH, SNMP (Simple
Network Management Protocol),
FTP (File Transfer Protocol), HTTP
(Hypertext Transfer Protocol),
SMTP (Simple Mail Transfer
Protocol) , DNS (Domain Naming
System), DHCP (Dynamic Host
Configuration Protocol).
TCP/IP Model. Application Layer
File System (NFS) – NFS is a distributed file system protocol suite developed by
Sun Microsystems that allows file access to a remote storage device such as a hard
disk across a network.
Simple Mail Transfer Protocol (SMTP) – SMTP administers the transmission of
e-mail over computer networks.
Terminal emulation (Telnet) – Telnet provides the capability to remotely access
another computer.
Simple Network Management Protocol (SNMP) – SNMP is a protocol that
provides a way to monitor and control network devices, and to manage
configurations, statistics collection, performance, and security.
Domain Name System (DNS) – DNS is a system used on the Internet for
translating names of domains and their publicly advertised network nodes into IP
addresses.
Summary
The TCP/IP Network Access layer implements functionality
from the OSI model Physical and Data Link layers.
The TCP/IP Internet layer implements functionality from
the OSI model Network layer (IPv4 and IPv6 are
implemented at the Internet layer).
The TCP/IP Transport layer implements functionality from
the OSI model Transport and Session layers.
The TCP/IP Application layer implements functionality from
the OSI model Session, Presentation, and Application layers.
21
Comparing OSI and TCP/IP
Both have application layers, though TCP/IP combines the presentation
they include very different services and session layer into its application
layer Combines the Data Link and
Physical layer into the Network
Access Layer
Both have comparable transport and TCP/IP appears simpler because it
network layers has fewer layers
Packet-switched, not circuit- TCP/IP transport layer using UDP
switched, technology is assumed does not always guarantee reliable
delivery of packets as the transport
layer in the OSI model does
IP Addresses: Networks and Host
An IP address is a unique global address for a network interface
An IP address:
- is a 32 bit long identifier
- encodes a network number (network prefix) and a host number
Made up of a 32-bit address or four octet address
The three major IP address classes
Class A
Class B
Class C
There are also Class D and Class E addresses, used for multicasts (D) and for
research (E), but these addresses are not used by any group or individuals
IP Addresses: Networks and Host
All computers also have a unique physical address, known as a MAC
(Media Access Control) address. These are assigned by the
manufacturer of the network interface card.
MAC addresses operate at Layer 2 of the OSI model.
IP Addresses: Networks and Host
IP address is written in decimal value. Example of IP address : 192.168.100.1 ,
10.10.20.250 , 203.2.110.5 etc.
There are four Octet in a 32 Bits IP address. Octets are
separated by dots (.)
Each Octet consist of 8 bits. So, Total bits in an IP address
is 4×8 or 8+8+8+8 = 32 Bits. 8 Bits make a Byte. So 1 Octet
holds a Byte
In decimal format , each octet has a minimum value 0 and
maximum value can be 255. Because as binary has a base
value 2, so for 8 bit , 28 =256 is the max.
IP address starts from 0.0.0.0 and the end is
255.255.255.255 in decimal format. So there will be total 232
= 4294967296 IP Address.
IP Addresses: Networks and Host
Addresses Conversion
An IP address is a 32-bit address, written as four octets or bytes, separated
by periods.
For example: 195.143.67.2
This way of representing an IP address is also known as “dotted decimal”
notation
A sample of binary numbers
Position 8 7 6 5 4 3 2 1
Power of 2
Decimal Value 12 1
64 32 8 4 2 1
8 6
Addresses Conversion
An IP address: 192.168.100.2 and 11000000.10101000.01100100.00000010 are
same
In simple words, each block can be written as:
11000000 = 192
10101000 = 168
01100100 = 100
00000010 = 2
11000000 = 1*128+1*64+0*32+0*16+0*8+0*4+0*2+0*1=128+64+0+0+0+0+0+0=192
10101000 = 1*128+0*64+1*32+0*16+1*8+0*4+0*2+0*1=128+0+32+0+8+0+0+0=168
And So on
Addresses Conversion
Please do the following examples yourself to clarify the concepts
Convert : 192.168.140.20
Convert: 11110011
IP Addresses
For a TCP/IP wide area network (WAN) to work efficiently as a collection of networks,
the routers that pass packets of data between networks do not know the exact location of a
host for which a packet of information is destined.
Routers only know what network the host is a member of and use information stored in
their route table to determine how to get the packet to the destination host's network.
After the packet is delivered to the destination's network, the packet is delivered to the
appropriate host.
IP Addresses
For this process to work, an IP address has two parts. The first part of an IP address is
used as a network address, the last part as a host address.
If you take the example 192.168.123.132 and divide it into these two parts you get the
following:
192.168.123. Network .132 Host
-or-
192.168.123.0 - network address. 0.0.0.132 - host address.