Unit 1-2
Unit 1-2
2.6
2-2 THE OSI MODEL
Established in 1947, the International
Standards Organization (ISO) is a multinational
body dedicated to worldwide agreement on
international standards. An ISO standard that
covers all aspects of network communications
is the Open Systems Interconnection (OSI)
model. It was first introduced in the late
1970s.
Topics discussed in this section:
Layered Architecture
Peer-to-Peer Processes
Encapsulation
2.7
Figure 2.5 Physical layer
2.11
Data Link Layer
Communication Circuits make errors
occasionally
DLL specific functions are:
◦ Providing a well defined service interface to the
network layer
◦ Dealing with transmission errors
◦ Regulating the flow of data so that the receivers
are not swamped by the fast senders
Physical Addressing
DLL layer adds header to the frame to
define the sender and receiver of the
frame.
2.14
Responsibilities included by the n/w
layer
Logical Addressing:
Physical addressing is implemented by the DLL
handles the addressing problem locally.
If the packet passes boundary we needed logical
addressing to distinguish the src and destination
The network layer adds header to the packets
received from upper layer which defines the logical
address of the sender and receiver
Routing
• The network layer controls the operation
of the subnet
• A key design issue is determining how
packets are routed from source to
destination
• Routes can be dependent upon many
things like current network load or on
static tables
• The control of congestion also belongs to
the network layer.
Figure 2.10 Transport layer
2.17
Figure 2.11 Reliable process-to-process delivery of a message
2.18
Figure 2.12 Session layer
2.19
Figure 2.13 Presentation layer
2.20
Figure 2.14 Application layer
2.21
TCP/IP
History of TCP/IP
The ARPANET was a research network sponsored by the
DOD (U.S. Dept. of Defense). It eventually connected
hundreds of universities and govt. institutes using leased
telephone lines.
2.27
The Host-to-Network Layer (Physical + Data link
Layers)
Inthis, the host has to connect to the network using
some protocol, so it can send IP packets over it.
They include:
1. Virtual terminal (TELNET)- allows a user on one machine to log
into a distant machine & work there.
4. Domain Name Service (DNS)- used for mapping host names onto
their network addresses.
2.32
Connecting Devices
In this section, we divide connecting devices
into five different categories based on the
layer in which they operate in a network
35
If computer 1 want to send data to computer 6 than
the hub will send the signal to all the computers
including computer 6
Hub has no knowledge where to send data.
Hub uses twisted pair and UTP cables to connect to
2. Repeaters/Active Hub
• A repeater is a device that operates
only in the physical layer.
• Signals that carry information within a
network can travel a fixed distance before
attenuation endangers the integrity of the
data.
• A repeater receives a signal and, before it
becomes too weak or corrupted,
regenerates the original bit pattern.
• The repeater then sends the refreshed
signal.
37
• A repeater connecting two segments of a
LAN
38
LAN segment
• A section of a local area network that is used by a
particular workgroup or department and separated from
the rest of the LAN by a bridge, router or switch.
• Networks are divided into multiple segments for
security and to improve traffic flow by filtering out
packets that are not destined for the segment.
• A repeater is a regenerator, not an
amplifier
An amplifier cannot discriminate between
the intended signal and noise; it amplifies
equally everything fed into it.
A repeater does not amplify the signal;
it regenerates the signal. The noise of
signal can also be reduced by regenerating
the signal.
Repeater is used to connect two LAN
segments and not two LAN’s
40
41
3. Bridges
• Bridge is a layer 2 device i.e. it works on
both DLL and physical layer.
• As a DLL device it has knowledge about
physical address
• As a physical layer device, it forward
signal after regenerating.
• When A and C wants to communicate then
signal from A reaches the bridge and bridge
will read MAC address from frame of sender
as well as receiver.
• Since C is connected to port 3 so it will
forward the frame port 3 only hence unlike
hub or repeater, bridge has filtering
capability. 42
• When A and B are communicating then
C and D can also communicate hence
bridge is used to connect two or more LANs
and not LAN segment.
• Bridge is used to connect two or more
LANs and not LAN segment.
43
4. Routers
•A router is a three-layer device that routes
packets based on their logical addresses
(host-to-host addressing)
• A router normally connects LANs and
WANs in the Internet and has a routing
table that is used for making decisions
about the route.
• The routing tables are normally dynamic
and are updated using routing protocols
44
45
5. Gateway
• A gateway is normally a computer that
operates in all five layers of the Internet or
seven layers of OSI model.
• A gateway takes an application message,
reads it, and interprets it.
• This means that it can be used as a
connecting device between two
internetworks that use different
models.
• For example, a network designed to use
the OSI model can be connected to another
network using the Internet model.
46
• The gateway connecting the two systems
can take a frame as it arrives from the first
system, move it up to the OSI application
layer, and remove the message.
47
Internet Protocol
• Internet Protocol (IP) is the method or protocol by which data is
sent from one computer to another on the internet. Each computer
is known as a host and on the internet has at least one IP address
that uniquely identifies it from all other computers on the internet.
• An IP protocol provides the connectionless service, which
is accompanied by two transport protocols, i.e., TCP/IP and
UDP/IP, so internet protocol is also known
as TCP/IP or UDP/IP.
Function
• The main function of the internet protocol is to provide
addressing to the hosts, encapsulating the data into a
packet structure, and routing the data from source to the
destination across one or more IP networks.
Key Points For IP Protocol
• Internet Protocol is the primary protocol of the network layer. It uses a best-
effort mechanism to transport packets from source to destination.
• In a network, IP provides only those functions which are required to send
packets from source to destination.
• IP does not care whether the network is wired or wireless. It cares about the
delivery of packets. Also, it does not guarantee that the packets sent by the
sender will be received correctly by the receiver.
• IP does not track and maintain the flow of packets.
• On the sender side, when the network layer receives the segment from the
transport layer, it adds the IP header to the segment and forms the packet.
Then, the sender sends the packet to the receiver.
• When the receiver receives the packet, its network layer forwards the packet
to the transport layer, and the transport layer decides to which process the
packet should be assigned.
• Basically, there are two versions of IP, one is IPv4 (IP version-4), and the
other is IPv6 (IP version-6).
History of Internet Protocol
• The development of the protocol gets started in 1974
by Bob Kahn and Vint Cerf. It is used in conjunction
with the Transmission Control Protocol (TCP), so they
together named the TCP/IP.
• After IPv4, the second major version of the internet
protocol was IPv6, which was version 6. It was officially
declared by the IETF in 1998. The main reason behind
the development of IPv6 was to replace IPv4. There is a
big difference between IPv4 and IPv6 is that IPv4 uses
32 bits for addressing, while IPv6 uses 128 bits for
addressing.
What is an IP packet?
• Before an IP packet is sent over the network, two major
components are added in an IP packet, i.e., header and
a payload. An IP header contains lots of information about the
IP packet which includes:
Source IP address: The source is the one who is sending the data.
Destination IP address: The destination is a host that receives
the data from the sender.
• Header length
• Packet length
• TTL (Time to Live): The number of hops occurs before the
packet gets discarded.
• Transport protocol: The transport protocol used by the internet
protocol, either it can be TCP or UDP.
IP Datagram
• VERSION: Version of the IP protocol (4 bits), which is 4 for IPv4
• Total Length: Length of header + Data (16 bits), which has a minimum
value 20 bytes and the maximum is 65,535 bytes.
• Flags: 3 flags of 1 bit each : reserved bit (must be zero), do not fragment
flag, more fragments flag (same order)
• Due to the presence of options, the size of the datagram header can be
of variable length (20 bytes to 60 bytes).
What is IP Addressing?
• An IP address is a unique identifier assigned to the
computer which is connected to the internet. Users cannot
access the domain name of each website with the help of
these characters, so DNS resolvers are used that convert
the human-readable domain names into a series of
characters. Each IP packet contains two addresses, i.e.,
the IP address of the device, which is sending the packet,
and the IP address of the device which is receiving the
packet.
• An IPv4 address is 32-bit number which means that there
are a total of 232 (4,294,967,296) IPv4 addresses. Here 4
means there are 4 octets separated by a dot. IPv4 consists
of two portions, a network portion and a host portion.
Types of IP Addresses based on
Scheme
1. IPV4
• IPv4 address consists of a network and a host portion. The size
of the network and host portion varies by network.
• In our case, 24 bits belong to the network portion, and the
remaining 8 bits belong to the host portion. The network portion
is the same for all the devices residing in the same network.
• Each device on the network has a unique IPv4 address.
2. IPv6:
• Public address
• The public address is also known as an external address as they are grouped
under the WAN addresses. We can also define the public address as a way to
communicate outside the network. This address is used to access the internet.
The public address available on our computer provides the remote access to
our computer. With the help of a public address, we can set up the home
server to access the internet. This address is generally assigned by the ISP
(Internet Service Provider).
Key points related to public address are:
• The scope of the public address is global, which means that we can
communicate outside the network.
• This address is assigned by the ISP (Internet Service Provider).
• It is not available at free of cost.
• We can get the Public IP by typing on Google "What is my IP".
• Private address
• A private address is also known as an internal address, as it is
grouped under the LAN addresses. It is used to communicate
within the network. These addresses are not routed on the
internet so that no traffic can come from the internet to this
private address. The address space for the private address is
allocated using InterNIC to create our own network. The private
addresses are assigned to mainly those computers, printers,
smartphones, which are kept inside the home or the computers
that are kept within the organization. For example, a private
address is assigned to the printer, which is kept inside our home,
so that our family member can take out the print from the printer.
Based on Assignment Method
Static IP Addresses:
Dynamic IP Addresses:
• It is Cross-Platform.
• User Interface (UI): The UI is the part of the client application that
interacts with the user. It provides a means for users to input data and
view results returned by the server.