In: Computer Science
A common protocol stack used by many applications is to use TCP at the transport layer and IP at the network layer. The ICMP protocol is also used to report on problems encountered by IP.
Services of IP protocol:
The Internetwork Protocol (IP) provides a best effort network layer
service for connecting computers to form a computer network. Each
computer is identified by one or more globally unique IP addresses.
The network layer PDUs are known as either "packets" or
"datagram’s". Each packet carries the IP address of the sending
computer and also the address of the intended recipient or
recipients of the packet. Other management information is also
carried.
The IP network service transmits datagram’s between intermediate
nodes using IP routers. The routers themselves are simple since no
information is stored concerning the datagram’s which are forwarded
on a link. The most complex part of an IP router is concerned with
determining the optimum link to use to reach each destination in a
network. This process is known as "routing". Although this process
is computationally intensive, it is only performed at periodic
intervals.
An IP network normally uses a dynamic routing protocol to find
alternate routes whenever a link becomes unavailable. This provides
considerable robustness from the failure of either links or
routers, but does not guarantee reliable delivery. Some
applications are happy with this basic service and use a simple
transport protocol known as the User Datagram Protocol (UDP) to
access this best effort service.
Most Internet users need additional functions such as end-to-end
error and sequence control to give a reliable service (equivalent
to that provided by virtual circuits). This reliability is provided
by the Transmission Control Protocol (TCP) which is used end-to-end
across the Internet.
In a LAN environment, the protocol is normally carried by Ethernet,
but for long distance links, other link protocols using fibre optic
links are usually used. Other protocols associated with the IP
network layer are the Internet Control Message Protocol (ICMP) and
the Address Resolution Protocol (arp).
It provides services such as connection-oriented communication,
reliability, flow control, and multiplexing. The details of
implementation and semantics of the transport layer of the Internet
protocol suite, which is the foundation of the Internet, and the
OSI model of general networking are different.
Cisco IP Services comprises many basic and advanced building blocks
that enable customers to: ... Deploy an IP network with basic
end-to-end IP connectivity. Manage their IP addressing requirements
from a central location. Control the IP addressing scheme used
throughout their network.
Services of TCP :
Process-to-Process Communication –
TCP provides process to process communication, i.e, the transfer
of data takes place between individual processes executing on end
systems. This is done using port numbers or port addresses. Port
numbers are 16 bit long that help identify which process is sending
or receiving data on a host.
Stream oriented –
The data is sent and received as a stream of bytes(unlike UDP or
IP that divides the bits into datagrams or packets). However, the
network layer, that provides service for the TCP, sends packets of
information not streams of bytes. Hence, TCP groups a number of
bytes together into a segment and adds a header to each of these
segments and then delivers these segments to the network layer. At
the network layer, each of these segments are encapsulated in an IP
packet for transmission. The TCP header has information that is
required for control purpose which will be discussed along with the
segment structure.
Full duplex service –
The communication can take place in both directions at the same
time.
Connection oriented service –
Unlike UDP, TCP provides connection oriented service. It defines
3 different phases:
Connection establishment
Data transfer
Connection termination
(IMP: This is a virtual connection, not a physical connection,
means during the transmission the resources will not be reserved
and the segments will not follow the same path to reach the
destination but it is a connection orientation in the sense that
segments will arrive in order by the help of sequence
number.)
Reliability –
TCP is reliable as it uses checksum for error detection,
attempts to recover lost or corrupted packets by re-transmission,
acknowledgement policy and timers. It uses features like byte
number and sequence number and acknowledgement number so as to
ensure reliability. Also, it uses congestion control
mechanisms.
Multiplexing –
TCP does multiplexing and de-multiplexing at the sender and
receiver ends respectively as a number of logical connections can
be established between port numbers over a physical
connection.
Mechanism it uses to overcome the deficiencies of IP:
TCP/IP was originally designed, and is usually implemented, for
wide-area networks. While TCP/IP is usable on a local-area network,
it is not optimized for this domain. For example, TCP uses an
in-packet checksum for end-to-end reliability, despite the presence
of per-packet CRC's in most modern network hardware. But computing
this checksum is expensive, creating a bottleneck in packet
processing. IP uses header fields such as `Time-To-Live' which are
only relevant in a wide-area environment. IP also supports
internetwork routing and in-flight packet fragmentation and
reassembly, features which are not useful in a local-area
environment. The TCP/IP model assumes communication between
autonomous machines that cooperate only minimally. However,
machines on a local-area network frequently share a common
administrative service, a common file system, and a common user
base. It should be possible to extend this commonality and
cooperation into the network communication software.
Current TCP/IP implementations use a complicated memory management
mechanism. This system exists for a number of reasons. First, a
multi-layered protocol stack means packet headers are added (or
removed) as the packet moves downward (or upward) through the
stack. This should be done easily and efficiently, without
excessive copying. Second, buffer memory inside the operating
system kernel is a scarce resource; it must be managed in a
space-efficient fashion. This is especially true for older systems
with limited physical memory.
To meet these two requirements, mechanisms such as the Berkeley
Unix mbuf have been used. An mbuf can directly hold a small amount
of data, and mbufs can be chained to manage larger data sets.
Chaining makes adding and removing packet headers easy. The mbuf
abstraction is not cheap, however: 15% of the processing time for
small TCP packets is consumed by mbuf management. Additionally, to
take advantage of the mbuf abstraction, user data must be copied
into and out of mbufs, which consumes even more time in the data
transfer critical path. This copying means that nearly one-quarter
of the small-packet processing time in a commercial TCP/IP stack is
spent on memory management issues. Reducing the overhead of memory
management is therefore critical to improving communications
performance.