Vous êtes sur la page 1sur 15

E-Content of

INTERNET TECHNOLOGY AND WEB DESIGN

Chapter : 2.3 Internet Protocols

Topic : 2.3.1 Introduction to Internet Protocols

Introduction to Internet Protocols


• The internet protocol is a set of rules governing the format of data sent over the
internet or other network.
• The Internet protocols consist of a suite of communication protocols, of which the
two best known are
 Transmission Control Protocol (TCP)
 Internet Protocol (IP)
• The Internet protocol suite not only includes lower-layer protocols (such as TCP
and IP), but it also specifies common applications such as electronic mail,
terminal emulation, and file transfer.
• Internet protocols were first developed in the mid-1970s, when the Defense
Advanced Research Projects Agency (DARPA) became interested in establishing
a packet-switched network that would facilitate communication between
dissimilar computer systems at research institutions.
• With the goal of heterogeneous connectivity in mind, DARPA funded research by
Stanford University and Bolt, Beranek, and Newman (BBN). The result of this
development effort was the Internet protocol suite, completed in the late 1970s.
• TCP/IP later was included with Berkeley Software Distribution (BSD) UNIX and
has since become the foundation on which the Internet and the World Wide Web
(WWW) are based.
• Documentation of the Internet protocols (including new or revised protocols) and
policies are specified in technical reports called Request for Comments (RFCs),
which are published and then reviewed and analyzed by the Internet community.
• Protocol refinements are published in the new RFCs. To illustrate the scope of
the Internet protocols, following FIG maps many of the protocols of the Internet
protocol suite and their corresponding OSI layers.

Page | 6
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN

FIG 2.2 : Internet Protocols span the complete range of OSI model layers

Page | 7
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN

Chapter : 2.3 Internet Protocols

Topic : 2.3.2 Transmission Control Protocol (TCP)

Transmission Control Protocol (TCP)


• The second transport layer protocol is TCP.
• TCP (Transmission Control Protocol) is a protocol that works with the Internet
Protocol (IP) to send packets of data between computers over the Internet.
• TCP establishes a full duplex virtual connection between two endpoints. Each
endpoint is defined by an IP address and a TCP port number. The operation of
TCP is implemented as a finite state machine.
• TCP/IP protocols are modeled in four layers.

TCP operation
• The primary purpose of the TCP is to provide reliable, securable logical circuit or
connection service between pairs of processes.
• To provide this service internet communication system requires facilities in the
following areas.
 Basic data transfer
 Reliability
 Flow control
 Multiplexing
 Connections
• Basic data transfer
 TCP is able to both transmit and receive data streams simultaneously, even
though this is opposite to the basic concept of data transmission in many
underlying network technologies.
 The TCP is able to transfer a continuous stream of data in each direction
between its users by packaging some number of data into segments for
transmission through the internet system.

Page | 8
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN
 In general, the TCPs decide when to block and forward data at their own
convenience.
 The data unit transmitted from TCP layer is referred to as a segment. The
size of the segments and the timing at which they are sent is generally left to
the TCP module.
 TCP applications request that the data is Pushed by instructing the TCP
module to deliver all data up to that point without Maximum Transmission Unit
(MTU).
• Reliability
 TCP assigns a sequence number to each byte transmitted and expects a
positive acknowledgment (ACK) from the receiving TCP.
 If the ACK is not received within the timeout interval, the data is then
retransmitted.
 The receiving TCP uses the sequence numbers to rearrange the segments
when they arrive out of order, and to eliminate duplicate segments.

Page | 9
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN

FIG 2.3 : TCP data Transfer


 TCP provides reliable communication through a positive Acknowledgement
system.
• Flow Control
 TCP provides a means for the receiver to govern the amount of data sent by
the sender.
 This is achieved by returning a "window" with every ACK indicating a range of
acceptable sequence numbers beyond the last segment successfully
received.
 The window indicates an allowed number of octets that the sender may
transmit before receiving further permission.
• Multiplexing
 TCP is able to provide a connection oriented environment for many
simultaneous process within a single host.

Page | 10
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN
 TCP uses a set of ports which when concatenated with the IP address of the
host, provide a socket that uniquely identifies an application process
anywhere within the internet.
• Connections
 The reliability and flow control mechanisms described above require that
TCPs initialize and maintain certain status information for each data stream.
 The combination of this information, including sockets, sequence numbers,
and window sizes, is called a connection.
 Each connection is uniquely specified by a pair of sockets identifying its two
sides.
 When two processes wish to communicate, their TCP must first establish a
connection (initialize status information on both sides).
 When the communication is complete, the connection is terminated or closed
to free the resources for other uses.
TCP Header
• The TCP segment comprises of a header, and a variable length data area that
ultimately carries application data.
• TCP header at minimum is 20 bytes long and maximum 60 bytes.
• Source Port (16-bits): Identifies source port of the application process on the
sending device.
• Destination Port (16-bits): Identifies destination port of the application process
on the receiving device.
• Sequence Number (32-bits): Sequence number of data bytes of a segment in a
session.
• Acknowledgement Number (32-bits): When ACK flag is set, this number contains
the next sequence number of the data byte expect and works as
acknowledgement of the previous data received.
• Data Offset (4-bits): This field contains two meaning. First, it tells the size of TCP
header (32-bit words) Secondly, it indicates the offset of data in current packet in
the whole TCP segment.

Page | 11
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN
• Reserved (3-bits): Reserved for future use and all are set zero by default.
• Flags (1-bit each):
 NS: Nonce Sum bit is used by Explicit Congestion Notification signaling
process.
 CWR: When a host receives packet with ECE bit set, it sets Congestion
Windows Reduced to acknowledge that ECE received.
 ECE: has two meanings:
 If SYN bit is clear to 0, then ECE means that the IP packet has its CE
(congestion experience) bit set.
 If SYN bit is set to 1, ECE means that the device is ECT capable
 URG: indicates that Urgent Pointer field has significant data and should be
processed.
 ACK: indicates that Acknowledgement field has significance. If ACK is cleared
to 0, it indicates that packet does not contain any acknowledgement.
 PSH: when set, it is a request to the receiving station to PUSH data (as soon
as it comes) to the receiving application without buffering it.
 RST: Reset flag has many features:
 It is used to refuse an incoming connection.
 It is used to reject a segment.
 It is used to restart a connection.
 SYN: this flag is used to set up a connection between hosts.
 FIN: this flag is used to release a connection and no more data is exchanged
thereafter. Because packets with SYN and FIN flags have sequence
numbers, they are processed in correct order.
TCP Client/server model
• TCP is a peer-to-peer, connection-oriented protocol.
• There are no master/subordinate relationships. The applications, however,
typically use a client/server model for communications.
• A server is an application that offers a service to internet users. A client is a
requester of a service.

Page | 12
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN
• An application consists of both a server and a client part, which can run on the
same or on different systems.
• Users invoke the client part of the application, which builds a request for a
particular service and sends it to the server part of the application using TCP/IP
as a transport medium.
• The server is a program that receives a request, performs the required service,
and sends back the results in a reply.

Page | 13
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN

Chapter : 2.3 Internet Protocols

Topic : 2.3.3 Internet Protocol (IP)

Internet Protocol (IP)


• The Internet Protocol (IP) is the primary network protocol by which data is sent
from one computer to another on the Internet.
• Each computer (known as a host) on the Internet has at least one IP address that
uniquely identifies it from all other computers on the Internet.
• The Functions of Internet Protocol include,
 Defining the Internet addressing schemes.
 Moving data between the Network access layer and Host-Host transport
layer.
 Performing fragmentation and reassembly of datagrams.
 Routing datagrams to remote host.
• There are currently two versions in Internet Protocol - IPV4 and IPV6.
Overview of Internet Protocol version 4
• Internet Protocol Version 4 (IPv4) is the fourth revision of the IP and a widely
used protocol in data communication over different kinds of networks.
• IPv4 is a connectionless protocol used in packet-switched layer networks, such
as Ethernet. It provides the logical connection between network devices by
providing identification for each device.
• Internet Protocol version 4 standard that features IP addresses four bytes (32
bits) in length. IPv4 uses four 1 byte decimal numbers, separated by a dot
(i.e. 192.168.1.1).
• There are many ways to configure IPv4 with all kinds of devices - including
manual and automatic configurations - depending on the network type.
• The Internet Protocol version 6 (IPv6) is more advanced and has better features
compared to IPv4. It has the capability to provide an infinite number of
addresses.

Page | 14
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN
• IPV6 is replacing IPv4 to accommodate the growing number of networks
worldwide and help solve the IP address problems.
• The newer Internet Protocol version 6 (IPv6) standard features addresses 16
bytes (128 bits) in length. IPv6 uses hexadecimal numbers that are separated by
colons (i.e. fe80::d4a8:6435:d2d8:d9f3b11).

FIG 2.4 : IPv4 address

Page | 15
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN

Chapter : 2.3 Internet Protocols

Topic : 2.3.4 Router

Router
• Routing is the act of moving information across an internetwork from a source to
a destination.
• Along the way, at least one intermediate node typically is encountered.
• Routing is often contrasted with bridging, which might seem to accomplish
precisely the same thing to the casual observer.
• The primary difference between the two is that bridging occurs at Layer2 (the link
layer) of the OSI-reference model, whereas routing occurs at Layer 3 (the
network layer). This distinction provides routing and bridging with different
information to use in the process of moving information from source to
destination, so the two functions accomplish their tasks in different ways.
• Routing involves two basic activities
 Determining optimal routing paths
 Transporting information groups (typically called packets) through an
internetwork.
• In the context of the routing process, the latter of these is referred to as packet
switching.
• Although packet switching is relatively straightforward, path determination can be
very complex.
• Switching algorithms is relatively simple; it is the same for most routing protocols.
• In most cases, a host determines that it must send a packet to another host.
• Having acquired a router’s address by some means, the source host sends a
packet addressed specifically to a router’s physical (Media Access Control
(MAC)-layer) address, this time with the protocol (network layer) address of the
destination host.
• As it examines the packet’s destination protocol address, the router determines
that it either knows or does not know how to forward the packet to the next hop.

Page | 16
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN
• If the router does not know how to forward the packet, it typically drops the
packet.
• If the router knows how to forward the packet, however, it changes the
destination physical address to that of the next hop and transmits the packet.

FIG 2.5: Routing Process


• The example above shows two hosts communicating with each other using three
routers between them.
• If the three routers are part of the Internet, it will only work this way when both
hosts have valid public IP-addresses assigned to them.
• Network Address Translation(NAT)
 NAT, defined in RFC 1631, allows a host that does not have a valid registered
IP address to communicate with other hosts through the Internet.
 The hosts might be using private addresses or addresses assigned to
another organization.
 In either case, NAT allows these addresses that are not Internet-ready to

Page | 17
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN
continue to be used and still allows communication with hosts across the
Internet.
 NAT achieves its goal by using a valid registered IP address to represent the
private address to the rest of the Internet.
 The NAT function changes the private IP addresses to publicly registered IP
addresses inside each IP packet.

FIG 2.6 : NAT functioning


• The router, performing NAT, changes the packet’s source IP address when
leaving the private organization and the destination address in each packet
forwarded back into the private network. (Network 200.1.1.0 is registered in this
FIG)
• The NAT feature, configured in the router labeled NAT, performs the translation.
• Overloading NAT with Port Address Translation (PAT)
 Some networks need to have most, if not all, IP hosts reach the Internet. If
that network uses private IP addresses, the NAT router needs a very large set
of registered IP addresses.
 With static NAT, for each private IP host that needs Internet access, user
need a publicly registered IP address.
 Overloading allows NAT to scale to support many clients with only a few
public IP addresses.
 The following figure details an example that helps make the logic behind

Page | 18
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN
overloading.
 The top part of the figure shows a network with three different hosts
connecting to a web server using TCP. The bottom half of the figure shows
the same network later in the day, with three TCP connections from the same
client.
 All six connections connect to the server IP address (170.1.1.1) and WWW
port (80, the well-known port for web services).
 In each case, the server differentiates between the various connections
because their combined IP address and port numbers are unique.

FIG 2.7 : Overloading NAT

 NAT takes advantage of the fact that the server really doesn’t care if it has
one connection each to three different hosts or three connections to a single
host IP address. So, to support lots of inside private IP addresses with only a
few global, publicly registered IP addresses, NAT overload uses Port Address
Translation (PAT).
 Instead of just translating the IP address, it also translates the port number.

Page | 19
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN
 NAT overload can use more than 65,000 port numbers, allowing it to scale
well without needing very many registered IP addresses, in many cases, like
in small Office/Home Networks, needing only one.
 Taking the device called a 'router' by most users apart, it contains different
components.
 The following FIG show the different components out. These are a
hub/switch, the router and a DSL/Cable modem.

FIG 2.8 : Components of Router

Page | 20