Internet of TCP-IP Notes
Internet of TCP-IP Notes
Internet of TCP-IP Notes
1
UNIT - I
Network Models: Layered Tasks, The OSI Model, Layers in OSI Model, TCP/IP Protocol suite,
Addressing.
Connecting devices: Passive Hubs, Repeaters, Active Hubs, Bridges, Two Layer Switches, Routers,
Three Layer Switches, Gateway, Backbone Networks.
Layered Architecture
o The main aim of the layered architecture is to divide the design into small pieces.
o Each lower layer adds its services to the higher layer to provide a full set of
services to manage communications and run the applications.
o It provides modularity and clear interfaces, i.e., provides interaction between
subsystems.
o It ensures the independence between layers by providing the services from
lower to higher layer without defining how the services are implemented. Therefore, any
modification in a layer will not affect the other layers.
o The number of layers, functions, contents of each layer will vary from network to
network. However, the purpose of each layer is to provide the service from lower to a
higher layer and hiding the details from the layers of how the services are implemented.
o The basic elements of layered architecture are services, protocols, and interfaces.
o Service: It is a set of actions that a layer provides to the higher layer.
2
o Protocol: It defines a set of rules that a layer uses to exchange the
information with peer entity. These rules mainly concern about both the contents and order
of the messages used.
o Interface: It is a way through which the message is transferred from one
layer to another layer.
o In a layer n architecture, layer n on one machine will have a communication with
the layer n on another machine and the rules used in a conversation are known as a layer-n
protocol.
3
o In a layered architecture, unmanageable tasks are divided into several small and
manageable tasks.
o The data is passed from the upper layer to lower layer through an interface. A
Layered architecture provides a clean-cut interface so that minimum information is shared
among different layers. It also ensures that the implementation of one layer can be easily
replaced by another implementation.
o A set of layers and protocols is known as network architecture.
OSI Model
o OSI stands for Open System Interconnection is a reference model that
describes how information from a software application in one computer moves through a
physical medium to the software application in another computer.
o OSI consists of seven layers, and each layer performs a particular network function.
o OSI model was developed by the International Organization for Standardization
(ISO) in 1984, and it is now considered as an architectural model for the inter-computer
communications.
o OSI model divides the whole task into seven smaller and manageable tasks. Each
layer is assigned a particular task.
o Each layer is self-contained, so that task assigned to each layer can be
performed independently.
5
o The OSI model is divided into two layers: upper layers and lower layers.
o The upper layer of the OSI model mainly deals with the application related
issues, and they are implemented only in the software. The application layer is closest to
the end user. Both the end user and the application layer interact with the software
applications. An upper layer refers to the layer just above another layer.
o The lower layer of the OSI model deals with the data transport issues. The data
link layer and the physical layer are implemented in hardware and software. The physical
layer is the lowest layer of the OSI model and is closest to the physical medium. The
physical layer is mainly responsible for placing the information on the physical medium.
1. Physical Layer
2. Data-Link Layer
6
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
1) Physical layer
7
o The main functionality of the physical layer is to transmit the individual bits from
one node to another node.
o It is the lowest layer of the OSI model.
o It establishes, maintains and deactivates the physical connection.
o It specifies the mechanical, electrical and procedural network interface
specifications.
o Line Configuration: It defines the way how two or more devices can be
connected physically.
o Data Transmission: It defines the transmission mode whether it is simplex, half-
duplex or full-duplex mode between the two devices on the network.
o Topology: It defines the way how network devices are arranged.
o Signals: It determines the type of the signal used for transmitting the
information.
2) Data-Link Layer
8
o It provides a reliable and efficient communication between two or more devices.
o It is mainly responsible for the unique identification of each device that resides
on a local network.
o It contains two sub-layers:
o Logical Link Control Layer
o It is responsible for transferring the packets to the Network layer of
the receiver that is receiving.
o It identifies the address of the network layer protocol from the
header.
o It also provides flow control.
o Media Access Control Layer
o A Media access control layer is a link between the Logical Link
Control layer and the network's physical layer.
o It is used for transferring the packets over the network.
o Framing: The data link layer translates the physical's raw bit stream into packets
known as Frames. The Data link layer adds the header and trailer to the frame. The header
which is added to the frame contains the hardware destination and source address.
o Physical Addressing: The Data link layer adds a header to the frame that
contains a destination address. The frame is transmitted to the destination address
mentioned in the header.
9
o Flow Control: Flow control is the main functionality of the Data-link layer. It is
the technique through which the constant data rate is maintained on both the sides so that
no data get corrupted. It ensures that the transmitting station such as a server with higher
processing speed does not exceed the receiving station, with lower processing speed.
o Error Control: Error control is achieved by adding a calculated value CRC (Cyclic
Redundancy Check) that is placed to the Data link layer's trailer which is added to the
message frame before it is sent to the physical layer. If any error seems to occurr, then the
receiver sends the acknowledgment for the retransmission of the corrupted frames.
o Access Control: When two or more devices are connected to the same
communication channel, then the data link layer protocols are used to determine which
device has control over the link at a given time.
3) Network Layer
10
o It determines the best path to move data from source to the destination based
on the network conditions, the priority of service, and other factors.
o The Data link layer is responsible for routing and forwarding the packets.
o Routers are the layer 3 devices, they are specified in this layer and used to
provide the routing services within an internetwork.
o The protocols used to route the network traffic are known as Network layer
protocols. Examples of protocols are IP and Ipv6.
4) Transport Layer
11
o The Transport layer is a Layer 4 ensures that messages are transmitted in the
order in which they are sent and there is no duplication of data.
o The main responsibility of the transport layer is to transfer the data completely.
o It receives the data from the upper layer and converts them into smaller units
known as segments.
o This layer can be termed as an end-to-end layer as it provides a point-to-point
connection between source and destination to deliver the data reliably.
13
o Error control: The transport layer is also responsible for Error control. Error
control is performed end-to-end rather than across the single link. The sender transport
layer ensures that message reach at the destination without any error.
5) Session Layer
o Dialog control: Session layer acts as a dialog controller that creates a dialog
between two processes or we can say that it allows the communication between two
processes which can be either half-duplex or full-duplex.
o Synchronization: Session layer adds some checkpoints when transmitting the
data in a sequence. If some error occurs in the middle of the transmission of data, then the
transmission will take place again from the checkpoint. This process is known as
Synchronization and recovery.
14
6) Presentation Layer
o A Presentation layer is mainly concerned with the syntax and semantics of the
information exchanged between the two systems.
o It acts as a data translator for a network.
o This layer is a part of the operating system that converts the data from one
presentation format to another format.
o The Presentation layer is also known as the syntax layer.
o Translation: The processes in two systems exchange the information in the form
of character strings, numbers and so on. Different computers use different encoding
methods, the presentation layer handles the interoperability between the different
encoding methods. It converts the data from sender-dependent format into a common
format and changes the common format into receiver-dependent format at the receiving
end.
15
o Encryption: Encryption is needed to maintain privacy. Encryption is a process of
converting the sender-transmitted information into another form and sends the resulting
message over the network.
o Compression: Data compression is a process of compressing the data, i.e., it
reduces the number of bits to be transmitted. Data compression is very important in
multimedia such as text, audio, video.
7) Application Layer
16
o This layer provides the network services to the end-users.
-------------------------------------------------------------------------------------------
TCP/IP model
o The TCP/IP model was developed prior to the OSI model.
o The TCP/IP model is not exactly similar to the OSI model.
o The TCP/IP model consists of five layers: the application layer, transport layer,
network layer, data link layer and physical layer.
o The first four layers provide physical standards, network interface,
internetworking, and transport functions that correspond to the first four layers
of the OSI model and these four layers are represented in TCP/IP model by a
single layer called the application layer.
o TCP/IP is a hierarchical protocol made up of interactive modules, and each of
them provides specific functionality.
Here, hierarchical means that each upper-layer protocol is supported by two or more
lower-level protocols.
17
Network Access Layer
Internet Layer
18
Following are the protocols used in this layer are:
IP Protocol: IP protocol is used in this layer, and it is the most significant part of the
entire TCP/IP suite.
ARP Protocol
19
o ARP is a network layer protocol which is used to find the physical address from
the IP address.
o The two terms are mainly associated with the ARP Protocol:
o ARP request: When a sender wants to know the physical address of the
device, it broadcasts the ARP request to the network.
o ARP reply: Every device attached to the network will accept the ARP
request and process the request, but only recipient recognize the IP
address and sends back its physical address in the form of ARP reply. The
recipient adds the physical address both to its cache memory and to the
datagram header
ICMP Protocol
The two protocols used in the transport layer are User Datagram protocol and
Transmission control protocol.
21
o Transmission Control Protocol (TCP)
o It provides a full transport layer services to applications.
o It creates a virtual circuit between the sender and receiver, and it is active
for the duration of the transmission.
o TCP is a reliable protocol as it detects the error and retransmits the
damaged frames. Therefore, it ensures all the segments must be received
and acknowledged before the transmission is considered to be completed
and a virtual circuit is discarded.
o At the sending end, TCP divides the whole message into smaller units
known as segment, and each segment contains a sequence number which
is required for reordering the frames to form an original message.
o At the receiving end, TCP collects all the segments and reorders them
based on sequence numbers.
Application Layer
22
o When one application layer protocol wants to communicate with another
application layer, it forwards its data to the transport layer.
o There is an ambiguity occurs in the application layer. Every application cannot be
placed inside the application layer except those who interact with the
communication system. For example: text editor cannot be considered in
application layer while web browser using HTTP protocol to interact with the
network where HTTP protocol is an application layer protocol.
23
Addressing.
Four levels of addresses are used in the TCP/IP protocol: physical address, logical
address, port address, and application-specific address as shown in Figure.
Physical Addresses
The physical address, also known as the link address, is the address of a node
as defined by its LAN or WAN.
The size and format of these addresses vary depending on the network. For
example, Ethernet uses a 6-byte (48-bit) physical address.
Physical addresses can be either unicast (one single recipient), multicast (a
group of recipients), or broadcast (to be received by all systems in the network.
Example: Most local area networks use a 48-bit (6-byte) physical address
written as 12 hexadecimal digits; every byte (2 hexadecimal digits) is separated
by a colon, as shown below: A 6-byte (12 hexadecimal digits) physical
address 07:01:02:01:2C:4B
Logical Addresses
Logical addresses are used by networking software to allow packets to be
independent of the physical connection of the network, that is, to work with
different network topologies and types of media.
A logical address in the Internet is currently a 32-bit address that can uniquely
define a host connected to the Internet. An internet address in IPv4 in decimal
numbers 132.24.75.9
24
No two publicly addressed and visible hosts on the Internet can have the same
IP address.
The physical addresses will change from hop to hop, but the logical addresses
remain the same.
The logical addresses can be either unicast (one single recipient), multicast (a
group of recipients), or broadcast (all systems in the network). There are
limitations on broadcast addresses.
Port Addresses
There are many application running on the computer. Each application run with
a port no.(logically) on the computer.
A port number is part of the addressing information used to identify the senders
and receivers of messages.
Port numbers are most commonly used with TCP/IP connections.
These port numbers allow different applications on the same computer to share
network resources simultaneously.
The physical addresses change from hop to hop, but the logical and port
addresses usually remain the same.
Example: a port address is a 16-bit address represented by one decimal
number 753
Application-Specific Addresses
Some applications have user-friendly addresses that are designed for that
specific application.
Examples include the e-mail address (for example, forouzan@fhda.edu) and the
Universal Resource Locator (URL) (for example, www.mhhe.com). The first
defines the recipient of an e-mail; the second is used to find a document on the
World Wide Web.
25
1. Repeater – A repeater operates at the physical layer. Its job is to
regenerate the signal over the same network before the signal becomes too
weak or corrupted to extend the length to which the signal can be transmitted
over the same network. An important point to be noted about repeaters is that
they not only amplify the signal but also regenerate it. When the signal
becomes weak, they copy it bit by bit and regenerate it at its star topology
connectors connecting following the original strength. It is a 2-port device.
26
unnecessary. These bridges make use of two processes i.e. bridge
forwarding and bridge learning.
Source Routing Bridges:- In these bridges, routing operation is performed
by the source station and the frame specifies which route to follow. The
host can discover the frame by sending a special frame called the discovery
frame, which spreads through the entire network using all possible paths to
the destination.
4. Switch – A switch is a multiport bridge with a buffer and a design that can
boost its efficiency(a large number of ports imply less traffic) and performance.
A switch is a data link layer device. The switch can perform error checking
before forwarding data, which makes it very efficient as it does not forward
packets that have errors and forward good packets selectively to the correct
port only. In other words, the switch divides the collision domain of hosts, but
the broadcast domain remains the same.
Types of Switch
1. Unmanaged switches: These switches have a simple plug-and-play design
and do not offer advanced configuration options. They are suitable for small
networks or for use as an expansion to a larger network.
2. Managed switches: These switches offer advanced configuration options
such as VLANs, QoS, and link aggregation. They are suitable for larger,
more complex networks and allow for centralized management.
3. Smart switches: These switches have features similar to managed switches
but are typically easier to set up and manage. They are suitable for small-
to medium-sized networks.
4. Layer 2 switches: These switches operate at the Data Link layer of the OSI
model and are responsible for forwarding data between devices on the
same network segment.
5. Layer 3 switches: These switches operate at the Network layer of the OSI
model and can route data between different network segments. They are
more advanced than Layer 2 switches and are often used in larger, more
complex networks.
6. PoE switches: These switches have Power over Ethernet capabilities,
which allows them to supply power to network devices over the same cable
that carries data.
7. Gigabit switches: These switches support Gigabit Ethernet speeds, which
are faster than traditional Ethernet speeds.
8. Rack-mounted switches: These switches are designed to be mounted in a
server rack and are suitable for use in data centers or other large networks.
27
9. Desktop switches: These switches are designed for use on a desktop or in
a small office environment and are typically smaller in size than rack-
mounted switches.
10. Modular switches: These switches have modular design, which allows for
easy expansion or customization. They are suitable for large networks and
data centers.
5. Routers – A router is a device like a switch that routes data packets based
on their IP addresses. The router is mainly a Network Layer device. Routers
normally connect LANs and WANs and have a dynamically updating routing
table based on which they make decisions on routing the data packets. The
router divides the broadcast domains of hosts connected through it.
28
6. Gateway – A gateway, as the name suggests, is a passage to connect two
networks that may work upon different networking models. They work as
messenger agents that take data from one system, interpret it, and transfer it
to another system. Gateways are also called protocol converters and can
operate at any network layer. Gateways are generally more complex than
switches or routers. A gateway is also called a protocol converter.
29
1. Poor Reliability:
With a single LAN, the reliability will be poor since a service interruption
even for a short duration can cause major problem to the user.
2. Capacity:
There is a possibility that a single LAN may be saturated due to increase in
number of devices beyond a certain number
3. Cost:
A single LAN can not give its optimum performance for the diverse
requirements of communication and interconnection.
So the alternative for using a single LAN is to use low cost low capacity LANs
in each building or department and then interconnection all these LANs with
high capacity LAN. such a network is called as Backbone LAN. the backbone
network allows several LANs to be connected. in the backbone network, no
station is directly connected with backbone, instead each station is a part of a
LAN, and the LANs are connected to the backbone.
The backbone itself is a LAN, it uses a LAN protocol such as ethernet, Hence
each connection in the backbone is itself another LAN. The two very common
used architectures are: Bus backbone, Star backbone. These are explained as
following below.
1. Bus Backbone:
In Bus backbone the topology used for the backbone is bus topology.
30
In above the Bus backbone structure is used as a distribution backbone for
connecting different buildings in an organization. each building may have
either a single LAN or another backbone which comes in star backbone. the
structure is a bridge based (bridge is the connecting device) backbone with
four LANs.
Working:
In above structure if a station in LAN 2 wants to send a frame to some other
station in Same LAN then Bridge 2 will not allow the frame to pass to any
other LAN, hence this frame will not reach the backbone. If a station from
LAN 1 wants to send a frame to a station in LAN 4 then Bridge 1 passes
this frame to the backbone. This frame is then received by Bridge 4 and
delivered to the destination.
2. Star Backbone:
The topology of this backbone is star topology.
Above figure shows the Star backbone in this configuration, the backbone
is simply a switch which is used to connect various LANs. The switch does
the job of backbone and connect the LANs as well. This type of backbone
are basically used as distribution backbone inside a building.
31
There is one more category of backbone network is Interconnecting of
Remote LANs:
3. Interconnection of Remote control:
In this type of backbone network the connection are done through the
bridge called remote bridges which acts as connecting devices in connect
LANs as point to point network link.
-----------------------------------------------------------------------------------------------------------------------------------
32
UNIT - II
Internetworking Concepts: Principles of Internetworking, Connectionless Interconnection, Application
Level Interconnection, Network Level Interconnection, Properties of the Internet, Internet Architecture,
Interconnection through IP Routers.
TCP, UDP & IP: TCP Services, TCP Features, Segment, A TCP Connection, Flow Control, Error
Control, Congestion Control, Process to Process Communication, User Datagram, Checksum, UDP
Operation, IP Datagram, Fragmentation, Options, IP Addressing: Classful Addressing, IPV6.
--------------------------------------------------------------------------------------------------------------------------
The distinction between expanding the network and internetworking is quite slight. A
simple extension of a LAN is the use of a switch or hub to join two local area networks,
but connecting them via a router is an example of internetworking. The OSI-ISO
33
model’s Layer 3 (Network Layer) enforces internetworking. The internet is the most
prominent famous example of internetworking.
Types of Internetworking
Internetworking primarily consists of three units: Extranet, Internet, and Intranet.
Internet connections may or may not be present on intranets and extranets. The
computer network or the extranet area unit is typically protected from being accessed
from the internet if it is not approved and if there is a link to the internet. Although it
should serve as a portal for access to portions of the associate degree extranet, the
internet is not considered to be a part of the computer network or extranet.
Extranet
It’s a network of the internetwork with a confined scope to one organisation or
institution but with limited links to one or more other networks on occasion; however,
this is not always the case. It is the lowest degree of internet usage and is typically
prohibited in extremely private areas. An extranet may also be referred to as a MAN,
WAN, or another type of network, but it cannot include a single local area network;
rather, it must make at least one mention of an external network.
Internet
Internet is a specific internetworking that connects governmental, academic, public,
and private networks on a global scale. It is based on the ARPANET, which was
created by the ARPA (Advanced Research Projects Agency) of the U.S. Defense
Department. It is also the location of the World Wide Web (WWW) and is referred to
as the “Internet” to distinguish it from other generic internetworking. Internet users and
their service providers utilise IP addresses obtained from address registries that
control assignments.
34
Intranet
This computer network can be a collection of interconnected networks that employ the
Internet Protocol and IP-based software like web browsers as well as FTP tools, all of
which are controlled by a single body entity. This body entity blocks access to the
computer network for the rest of the world and only allows a select few users. This
network most frequently refers to the internal network of a business or other
enterprise. To provide users with browseable data, a large computer network can
typically have its own internet server.
Terminology
Internetworking stands for connectivity and communication between two or more networks.
- Internetwork (internet): a collection of communication networks interconnected by bridges, switches and/or
routers.
- Intranet: a corporate internet that provides key Internet applications. It is usually isolated and self-contained
within an organization.
- End System (ES): a device attached to one of the networks.
- Intermediate System (IS): a device that connects two or more networks (e.g., switch, router). It is called
sometimes an IWU (Internetworking Unit) or a relay.
2.2 Principles of Internetworking
2.2.1 Requirements for Internetworking The overall requirements for an internetworking facility are:
1. Provide a link between networks. At minimum, a physical and link control connection is needed.
2. Provide for the routing and delivery of data between processes on different networks.
3. Provide an accounting service that keeps track of the use of the various networks and routers and maintains
status information.
4. Provide the services just listed without requiring modifications to the networking architecture of constituent
networks. This means accommodating the following differences: o Different addressing schemes: e.g., naming
(DNS), DHCP. o Different maximum packet size: e.g., segmentation, ATM cells. o Different network access
mechanisms: e.g., Ethernet, FDDI, ATM. o Different timeouts: longer with multiple networks.
Different error recovery services:
some networks will have it, others won’t. Internetwork error recovery should be independent of individual
networks.
o Different status reporting: how and whether this information can be shared.
o Different routing techniques: may depend on fault detection and congestion control techniques. Coordination is
needed. o Different user access control: authorization for use of the network.
o Connection-oriented vs. connectionless Some of the above mentioned issues are dealt with in the IWUs.
It may be desirable for an internetwork service not to depend on the characteristics of individual networks. By
fulfilling these requirements, two important problems in interconnecting networks can be addressed:
- Heterogeneity of types of networks
35
- Scale of internetwork: routing and addressing issues with large growth
36