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
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
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
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).
Page | 15
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN
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.
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.
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.
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.
Page | 20