Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
22 views

Unit2 - Basic of Computer Network

Uploaded by

prototypes6341
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Unit2 - Basic of Computer Network

Uploaded by

prototypes6341
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 139

Cryptography and Network Security

Year III Sem I

Rajan Sharma
UNIT 2: Basic of Computer Network
Networking Components
• Computer networks components comprise both
Hardware parts as well as the software parts
required for installing computer networks, both
at organizations and at home.
• The hardware components are the server, client,
peer, transmission medium, and connecting
devices.
• The software components are operating system
and protocols
NETWORK CONNECTING DEVICES : HUB,
SWITCH, BRIDGE, ROUTER, GATEWAY

• Network devices, also known as


networking hardware, are physical devices
that allow hardware on a computer
network to communicate and interact with
one another.
• For example Repeater, Hub, Bridge,
Switch, Routers, Gateway, Brouter, and
NIC, etc.
HUB

• Hub is a basic networking device that connects multiple


network devices together within a local area network
(LAN).
• A hub operates at the physical layer (Layer 1) of the OSI
model and serves as a central connection point for
network devices.
• Its primary function is to receive incoming data packets
from one port and broadcast them to all other ports.
• Hubs are used to extend the reach of a network by
allowing multiple devices to connect to a single network
segment
Working of HUB
• When a host sends frames,
the hub forwards the frames
in all the ports.
• Hubs forward all the frames
into all the ports.
• Although a hub sends the
frames to all the ports, a
computer accepts the ones,
whose MAC match matches
the destination MAC address
field.
• The rest of the frames are
discarded after receiving the
required information
Types of Hubs:
• Passive Hub:
• Simply serves as a physical connection point for network
devices.
• It does not amplify or regenerate the incoming signals.
• Data is broadcasted to all ports without any processing.
• Active Hub:
• Also known as a repeater hub, it regenerates and amplifies
incoming signals before broadcasting them to all ports.
• Active hubs are capable of extending the network reach
over longer distances.
Advantages of HUB
• Simplicity: Hubs are easy to install and require minimal
configuration. They are plug-and-play devices, making
them suitable for small networks.
• Cost-Effectiveness: Hubs are generally less expensive
than other networking devices such as switches or
routers, making them a budget-friendly option for
network expansion.
• Flexibility: Hubs support various types of network
devices and can accommodate different types of network
connections, including Ethernet, Fast Ethernet, and
Gigabit Ethernet.
Limitations
• Limited Performance:
• This can lead to collisions and reduced network
performance, especially in busy networks.
• Broadcast Traffic:
• Hubs broadcast data packets to all devices on the network,
resulting in increased network congestion and inefficient
use of bandwidth.
• Security Risks:
• Hubs lack advanced security features and do not provide
segmentation or isolation of network traffic.
Repeater
• Repeaters are defined as a networking device that is used to
amplify and generate the incoming signal. Repeaters work at
the physical layer of the OSI model.
• The main aim of using a repeater is to increase the networking
distance by increasing the strength and quality of signals.
• Using repeaters helps to reduce error, and loss of data and
provides with delivery of data at specified locations only.
• The major advantage of using a repeater is that it provides
with transfer of data with more security and over a long
distance.
Features of Repeater
• Repeater can regenerate the signal without modifying it.
• Repeaters can be used in analog signals and digital signals.
• Repeaters can extend the range of networks.
• Dynamic networking is supported by repeater.
• Use of Repeaters reduces error and loss of data.
• Power is required for working of repeaters.
• Using repeater can add complexity in the network.
Working of Repeater
• Initially the source system transmits the signals. This
source systems can be a mobile phone, laptop or
radio.
• This transmitted signal from the source system travels
in air if it’s wireless network or through the cable if it
is wired network. As the signal goes away from the
source it’s strength gets weak.
• The signal received to the repeater is not the actual
signal sent by source system but a weak signal.
Therefore repeater amplifies this weak signal to get it
strengthen.
Types of Repeater
1. According to the type of Signals
• Analog Repeater: Analog repeaters are used to amplify only the analog
signals.
• Digital Repeater: Digital repeaters are the type of repeaters that does not
amplify digital signal but regenerates it directly.
2. According to the type of Connected Network
• Wired Repeaters: Wired repeaters are used in wired Local Area
Networks(LANs).
• Wireless Repeaters: Wireless repeaters are used in wireless Local Area
Networks(LANs).
3. According to the Domain of LAN Networks
• Local Repeaters: Local Repeaters are used in Local Area Networks where the
network is very small.
• Remote Repeaters: Remote Repeaters are used in Local Area Networks where
network is very large.
Advantages of Repeater
• Better Performance of Network: Repeaters provide with better
performance of network because they do not always depend on
processing overheads at the time.
• Cost Effective: Repeaters are more cost effective as compared to
other network devices therefore they are cost effective.
• Extends the network: Repeaters provides with an advantage to
extend the available network for transmission of data.
• No Physical barriers: Using physical devices can led to some
barrier while transmission of signals. With the help of wireless
repeaters such issues are resolved.
• Enhanced Signals: When computer devices and routers are
connected in a network over long distance it weakens the strength
of signals. While using repeaters it improves the strength of
signals even over long distances.
Switches (Layer 2 and Layer 3)
• Switches are integral networking devices
used to connect multiple devices within a
local area network (LAN).
Functions of Switches:
• Connectivity: Switches serve as central connection points for
network devices, allowing them to communicate with each
other within the same LAN.
• Traffic Management: They manage and control the flow of
data traffic within the network, directing packets to their
intended destinations efficiently.
• Packet Forwarding: Switches forward data packets based on
the destination MAC address, using MAC address tables to
make forwarding decisions.
• Collision Domain Segmentation: Switches segment the
network into individual collision domains, reducing collisions
and improving network performance.
Types of Switches
• Unmanaged Switches: Basic switches with plug-and-play
functionality, suitable for small-scale networks with minimal
configuration requirements.
• Managed Switches: Advanced switches with additional
features such as VLAN support, Quality of Service (QoS)
capabilities, and network management capabilities.
• Layer 2 Switches: Operate at the data link layer (Layer 2) of
the OSI model and forward traffic based on MAC addresses.
• Layer 3 Switches: Operate at the network layer (Layer 3) and
can perform routing functions in addition to switching.
Features of Switch
• It uses MAC addresses (addresses of medium access
control sublayer) to send data packets to selected
destination ports.
• It uses packet switching technique to receive and
forward data packets
• It is supports unicast (one-to-one), multicast (one-to-
many), and broadcast (one-to-all) communications.
• Switches are active devices, equipped with network
software and network management capabilities.
• Switches can perform some error checking before
forwarding data to the destined port.
Advantages of Switch
• Improved Performance: Switches offer higher performance
compared to hubs by reducing collisions and optimizing
network traffic flow.
• Enhanced Security: Switches provide better security by
isolating traffic within individual ports or VLANs, preventing
unauthorized access to network resources.
• Flexibility and Scalability: Switches support various network
configurations and can scale to accommodate growing network
demands.
• Better Bandwidth Management: Switches offer better
bandwidth management and Quality of Service (QoS)
capabilities, allowing for prioritization of critical traffic.
Comparision between Layer 2
and Layer 3 Switches
Feature Layer 2 Switches Layer 3 Switches
Layer of Operation Data Link Layer (Layer 2) Network Layer (Layer 3)
Forwarding Based on MAC address Based on IP address
Decisions
Functionality Forwarding traffic within the Can perform routing functions in
same LAN based on MAC addition to switching
addresses
Inter-VLAN Routing Cannot perform inter-VLAN Can perform inter-VLAN routing,
routing, require external router reducing the need for external
routers
Protocol Support Primarily support Layer 2 Support Layer 3 protocols and
protocols and features (e.g., features (e.g., OSPF, RIP)
VLANs, STP)
Complexity and Generally simpler and less Tend to be more complex and
Cost expensive expensive due to additional
routing capabilities
HUB Vs Switch
Hub Switch
They operate in the physical layer of the OSI They operate in the data link layer of the OSI
model. model.
It is a non-intelligent network device that sends It is an intelligent network device that sends
message to all ports. message to selected destination ports.

It primarily broadcasts messages. It is supports unicast, multicast and broadcast.

Transmission mode is half duplex. Transmission mode is full duplex.


Collisions may occurs during setup of Collisions do not occur since the
transmission when more than one computers communication is full duplex.
place data simultaneously in the corresponding
ports.

They are passive devices, they don’t have any They are active devices, equipped with
software associated with it. network software.
Bridge
• A bridge in a computer network is a device used to connect
multiple LANs together to make a larger Local Area Network
(LAN).
• The mechanism of network aggregation is known as bridging.
The bridge is a physical or hardware device but operates at the
OSI model’s data link layer.
• It is used for interconnecting two LANs on same Protocol
Bridge
• A bridge in a computer network is a device used to connect
multiple LANs together to make a larger Local Area Network
(LAN).
• The mechanism of network aggregation is known as bridging.
The bridge is a physical or hardware device but operates at the
OSI model’s data link layer.
• It is used for interconnecting two LANs on same Protocol

Working of Bridge
Bridge accepts all the packets and
forwards all of them to the other
side. The bridges are intelligent
devices that allow the passing of
only selective packets from them. A
bridge only passes those packets
addressed from a node in one
network to another node in the other
network.
• A bridge performs in the following
aspect −
• A bridge receives all the packets or
frame from both LAN (segment) A and
B.
• A bridge builds a table of addresses
from which it can identify that the
packets are sent from which LAN (or
Uses of Bridges
• Bridges are used to divide large busy
networks into multiple smaller and
interconnected networks to improve
performance.
• Bridges also can increase the physical
size of a network.
Types of Bridge
• There are three types of bridges in
computer networks
1.Transparent bridge
2.Source routing bridge
3.Translational bridge
Advantages of Bridge
• Bridges can be used as a network extension like they can
connect two network topologies together.
• It has a separate collision domain
• Highly reliable and maintainable. The network can be divided
into multiple LAN segments.
• Simple installation, no requirement of any extra hardware or
software except the bridge itself.
• Protocol transparency is higher as compared to other
protocols.
Limitations of Bridge
• Expensive as compared to hubs and repeaters.
• Poor performance as additional processing is required
to view the MAC address of the device on the
network.
• As the traffic received is in bulk or is broadcasted
traffic, individual filtering of data is not possible.
• During the broadcasting of data, the network has high
broadcast traffic and broadcast storms can be
formed.
Repeater
• A repeater is a network device that retransmits a
received signal with more power and to an extended
geographical or topological network boundary
• It expand the coverage area of the network, re
propagate a weak or broken signal and or service
remote nodes.
• Repeaters amplify the received/input signal so that it
is reusable, scalable.
Working of Repeater
• When an electrical signal is transmitted via a channel, it gets
attenuated depending upon the nature of the channel or the
technology. This poses a limitation upon the length of the LAN or
coverage area of cellular networks. This problem is alleviated by
installing repeaters at certain intervals.
• Repeaters amplifies the attenuated signal and then
retransmits it.
• Digital repeaters can even reconstruct signals distorted by
transmission loss. So, repeaters are popularly incorporated to
connect between two LANs thus forming a large single LAN
Router
• Routers are networking devices operating at layer 3 or
a network layer of the OSI model.
• They are responsible for receiving, analysing, and forwarding
data packets among the connected computer networks.
• When a data packet arrives, the router inspects the destination
address, consults its routing tables to decide the optimal route
and then transfers the packet along this route.
Routers
• A router is a layer 3 or network layer device.
• It connects different networks together and sends data packets
from one network to another.
• A router can be used both in LANs (Local Area Networks) and
WANs (Wide Area Networks).
• It transfers data in the form of IP packets. In order to transmit
data, it uses IP address mentioned in the destination field of
the IP packet.
• Routers have a routing table in it that is refreshed periodically
according to the changes in the network. In order to transmit
data packets, it consults the table and uses a routing protocol.
• Some of the popular Routers are manufactured by
o Cisco, D-Link,HP,3Com,Juniper,Nortel
Working of Routers
Working of Routers
• A router determines a packet’s future path by examining the
destination IP address of the header and comparing it to the
routing database.
• The list of routing tables outlines how to send the data to a
specific network location. They use a set of rules to determine
the most effective way to transmit the data to the specified IP
address.
• A routing table primarily specifies the router’s default path.
• Static and dynamic tables come in two varieties in the router.
The dynamic routing tables are automatically updated by
dynamic routers based on network activity, whereas the static
routing tables are configured manually.
Types of Routers
• There are several types of routers. Some of them are
mentioned below:
1. Broadband Routers: Used to connect to the internet.
2. Wireless routers: These routers are used to create a
wireless signal in your office or home.
3. Wired Routers: Wired Router is used to connects
multiple wired devices using a Ethernet cable,
4. Edge Routers: As the name indicates, these are
located at the edges usually connected to an Internet
Service Provider
Functions of Router
1. Forwarding: The router receives the packets from its input
ports, checks its header, and then looks up to the routing table
to find the appropriate output port to dump the packets onto,
and forwards the packets onto that output port.
2. Routing: Routing is the process by which the router ascertains
what is the best path for the packet to reach the destination, It
maintains a routing table that is made using
different algorithms by the router only.
3. Network Address Translation (NAT): Routers use NAT to
translate between different IP address ranges. This allows
devices on a private network to access the internet using a
single public IP address.
Functions of Router
4. Security: Routers can be configured with firewalls and other
security features to protect the network from unauthorized
access, malware, and other threats.
5. Quality of Service (QoS): Routers can prioritize network
traffic based on the type of data being transmitted. This ensures
that critical applications and services receive adequate bandwidth
and are not affected by lower-priority traffic.
6. Virtual Private Network (VPN) connectivity: Routers can be
configured to allow remote users to connect securely to the
network using a VPN.
Functions of Router
7. Bandwidth management: Routers can be used to manage
network bandwidth by controlling the amount of data that is
allowed to flow through the network. This can prevent network
congestion and ensure that critical applications and services
receive adequate bandwidth.
8. Monitoring and diagnostics: Routers can be configured to
monitor network traffic and provide diagnostics information in
the event of network failures or other issues. This allows network
administrators to quickly identify and resolve problems.
Gateway
• A gateway is a networking
device or software application
that acts as an entry
pointbetween two different
networks, allowing them to
communicate and exchange data
• The network gateway operates
at layer 3, i.e. network layer of
the OSI model.
• It acts as the entry – exit point
for a network since all traffic
that flows across the networks
should pass through the
gateway.
Gateway
• A network gateway is a device
that connects different networks
by translating messages from
one protocol into another
protocol.
• The gateway monitors and
controls all the incoming and
outgoing network traffic.
• Gateways are also known as
protocol converters because they
play an important role in
converting protocols supported
by traffic on different networks.
• As a result, it allows smooth
communication between two
networks.
Features of Gateway
• Gateway is located at the boundary of a network and
manages all data that inflows or outflows from that
network.
• It forms a passage between two different networks
operating with different transmission protocols.
• It also stores information about the routing paths of the
communicating networks.
• When used in enterprise scenario, a gateway node may
be supplemented as proxy server or firewall.
Functions of Gateway
• LAN to WAN connections- It can be used to connect a group
of personal computers i.e. LAN(Local Area Network) to the
Internet i.e. WAN(Wide Area Network).
• Controls incoming and outgoing data– It is located on the
boundary of any network, so it controls incoming and outgoing
data packets from/to any network.
• Works as a Protocol Converter- It makes sure that the data
packet from another network is compatible with this network.
So it converts their protocols into supported protocols and
other stuff of the data packets before it enters into the network.
• Routing of data packets- It is responsible for routing data
packets to different networks because it knows about the
routing path of different networks that are in communication
with its own network.
BROUTER
• A brouter, also known as a bridge-router, is a
network device that combines the
functionality of a bridge and a router.
• It operates at both the data link layer (Layer 2)
and the network layer (Layer 3) of the OSI
model, allowing it to perform bridging and
routing functions simultaneously.
Function of Brouter
1. Bridging Function:
• Like a bridge, a brouter forwards frames between
different network segments based on MAC
addresses.
• It operates at the data link layer (Layer 2) of the
OSI model and uses MAC address tables to make
forwarding decisions.
• Bridging is typically used to connect segments of
the same network (e.g., Ethernet segments) and
reduce collision domains.
Function of Brouter
2.Routing Function:
• Similar to a router, a brouter routes packets
between different IP networks based on IP
addresses.
• It operates at the network layer (Layer 3) of the
OSI model and uses routing tables to make
forwarding decisions.
• Routing allows communication between devices
on different networks and enables traffic
segmentation and network optimization.
Function of Brouter
3.Hybrid Operation:
• A brouter combines bridging and routing functionalities
within the same device.
• It can selectively forward traffic based on MAC addresses
(bridging) or IP addresses (routing), depending on the
destination network.
Benefits of Brouter
• Flexibility: A brouter offers flexibility by supporting both
bridging and routing functionalities in a single device.
• Traffic Segmentation: It allows for the segmentation of traffic
between different network segments, improving network
performance and security.
• Interoperability: A brouter can seamlessly connect devices
and networks using different protocols, such as Ethernet and
IP.
• Simplified Network Management: By integrating bridging and
routing capabilities, a brouter simplifies network management
and reduces the need for separate bridging and routing
devices.
Addressing
• Addressing is a fundamental aspect of data
communication and computer networks, enabling
devices to uniquely identify and communicate with
each other across interconnected networks.
Importance of Addressing
1. Device Identification:
– Addresses uniquely identify devices on a network, allowing
them to be distinguished from one another.
– This enables accurate routing and delivery of data packets
to their intended destinations.
2. Communication:
– Devices use addresses to specify the source and
destination of data, enabling effective communication
across networks.
3. Routing:
– Routers and switches use addresses to determine the
most efficient path for packet transmission.
Importance of Addressing
4. Network Management:
• Addresses are essential for network management tasks such
as monitoring, troubleshooting, and configuration.
5. Resource Allocation:
• Addresses help manage the allocation of network resources
such as bandwidth, storage, and processing power. By
assigning addresses to devices and applications,
6. Security:
• Secure communication protocols use addresses to
authenticate and authorize devices, preventing unauthorized
access and protecting sensitive data from interception or
tampering.
Types of Addressing
• 1.Physical Address
• 2. Logical Address
• 3. Port Address
• 4. Specific Address
Types of Addressing
a, b c, j, k are the Port Addresser
A and P are the IP Addresses
MAC Addresses are included in H2 (Header of Data Link Layer)
1. Physical Address
• Physical Address is the lowest level of
addressing
• The physical address is usually included in the
frame and is used at the data link layer.
• MAC is a type of physical address that is 6 byte
(48 bit) in size and is imprinted on the Network
Interface Card (NIC) of the device.
2. Logical Address
• Logical Addresses are used for universal
communication.
• Most of the times the data has to pass through different
networks;
• since physical addresses are local to the network,
physical addresses are inadequate for source to
destination delivery of data in an internetwork
environment.
• Logical Address is also called as IP Address (Internet
Protocol address).
• At the network layer, device i.e. computers and routers
are identified universally by their IP Address.
Logical Address
• Currently there are two versions of IP
addresses being used:
– a. IPv4: 32 bit address, capable of
supporting 232 nodes
– b. IPv6: 128 bit address, capable of
supporting 2128 nodes
3. Port Address
• A logical address facilitates the transmission of data from
source to destination device.
• But the source and the destination both may be having
multiple processes communicating with each other.
• In other words, data needs to be delivered not only on
the correct device but also on the correct process on the
correct device.
• A Port Address is the name or label given to a process. It
is a 16 bit address.
• Eg. TELNET uses port address 23, HTTP uses port
address 80
3. Port Address
• Eg. Users A & B are chatting with each other using
Google Talk,
• Users B & C are exchanging emails using yahoo
messenger.
• The IP address will enable transmitting data from A to B,
but still the data needs to be delivered to the correct
process.
• The data from A cannot be given to B on yahoo
messenger since A & B are communicating using
Google Talk.
4. Specific Address
• Port addresses address facilitates the transmission of
data from process to process but still there may be a
problem with data delivery.
• For Eg: Consider users A, B & C chatting with each other
using Google Talk.
• Every user has two windows open, user A has two chat
windows for B & C, user B has two chat windows for A &
C and so on for user C
• Now a port address will enable delivery of data from user
A to the correct process ( in this case Google Talk) on
user B but now there are two windows of Google Talk for
user A & C available on B where the data can be
delivered.
4. Specific Address
• Again the responsibility of the port address is over here
and there is a need of addressing that helps identify the
different instances of the same process.
• Such address are are called specific addresses.
• Other Examples: Multiple Tabs or windows of a web
browser work under the same process that is HTTP but
are identified using Uniform Resource Locators (URL)
a, b c, j, k are the Port Addresser
A and P are the IP Addresses
MAC Addresses are included in H2 (Header of Data Link Layer)
MAC Address
• A MAC address, or Media Access Control address, is a
unique identifier assigned to a network interface
controller (NIC) for communications at the data link layer
of a network segment.
• It serves as a hardware address that distinguishes one
device from another on a local network.
• MAC Address is the physical Address or hardware
address
MAC Address:Features
• Uniqueness:
– Each MAC address is globally unique, meaning no
two devices should have the same MAC address.

• Address Format:
– A MAC address is typically represented as a 48-bit (6-
byte) hexadecimal number, often formatted as six
pairs of two hexadecimal digits separated by colons
or hyphens.
– For example, 00:1A:2B:3C:4D:5E.
MAC Address:Features
• Structure:
– The MAC address is divided into two parts: the
Organizationally Unique Identifier (OUI) and the
Device Identifier (also known as the NIC-specific
part).
– The first 24 bits (the first 3 bytes) represent the OUI,
which identifies the manufacturer or vendor of the
NIC.
– The remaining 24 bits (the last 3 bytes) represent the
unique identifier assigned by the manufacturer to the
NIC.
MAC Address:Features
• Assignment:
– MAC addresses are typically assigned by the
manufacturer of the network interface card (NIC)
when it is produced.
– The IEEE (Institute of Electrical and Electronics
Engineers) manages MAC address assignments and
assigns unique OUIs to manufacturers.
• MAC addresses are usually hardcoded into the hardware
of the network interface card (NIC) and remain constant
throughout the lifetime of the device.
Logical Addressing with IP (IPV4),
Classful Addressing
• Network addresses are always logical and are
implemented via IP addresses
IP Address
• When a router forwards the datagram, then it forwards the
packet to one of the links. The boundary between the router
and link is known as an interface.
• Each interface is capable of sending and receiving the IP
packets, so IP requires each interface to have an address.
• Every host and router on the Internet has an IP address, which
encodes its network number and host number.
• An IPv4 address is 32 bits long
• They are used in the Source address and Destination address
fields of IP packets.

Address Space
• An address space is the total number of addresses
used by the protocol.
• If a protocol uses N bits to define an address, the
address space is 2N because each bit can have two
different values (0 or 1) and N bits can have 2N
values.
• IPv4 uses 32-bit addresses, which means that the
address space is 232 or 4,294,967,296 (more than 4
billion).
IPV4 Notations
• 1.Binary notation
• The IPv4 address is displayed as 32 bits.
• eg. 11000000.10101000.00000001.00000001
• 2.Dotted decimal notation
• To make the IPv4 address easier to read, Internet
addresses are usually written in decimal form with a
decimal point (dot) separating the bytes.
• Each byte (octet) is 8 bits hence each number in dotted-
decimal notation is a value ranging from 0 to 255.
• Eg. 192.168.1.1
Classful Addressing
• An IP address is 32-bit (4 Byte) long . An
IP address is divided into sub-classes:
o Class A
o Class B
o Class C
o Class D
o Class E

• An ip address is divided into two parts:


o Network ID: It represents the number of networks.
o Host ID: It represents the number of hosts.
Classful Addressing
Classful Addressing
Class A
• In Class A, an IP address is assigned to those networks
that contain a large number of hosts.
– The network ID is 8 bits long.
– The host ID is 24 bits long.

• In Class A, the first bit in higher order bits of the first


octet is always set to 0 and the remaining 7 bits
determine the network ID. The 24 bits determine the host
ID in any network.
o The total number of networks in Class A = 27 = 128 network address
o The total number of hosts in Class A = 224 - 2 = 16,777,214 host
address
Class B
• In Class B, an IP address is assigned to those networks
that range from small-sized to large-sized networks.
– The Network ID is 16 bits long.
– The Host ID is 16 bits long.

• In Class B, the higher order bits of the first octet is always set
to 10, and the remaining14 bits determine the network ID.
The other 16 bits determine the Host ID.
o The total number of networks in Class B = 214 = 16384
network address
o The total number of hosts in Class B = 216 - 2 = 65534 host
address
Class C
• In Class C, an IP address is assigned to only small-sized
networks.
o The Network ID is 24 bits long.
o The host ID is 8 bits long.
• In Class C, the higher order bits of the first octet is
always set to 110, and the remaining 21 bits determine
the network ID. The 8 bits of the host ID determine the
host in a network.
o The total number of networks = 221 = 2097152
network address
o The total number of hosts = 28 - 2 = 254 host
address
Class D
• In Class D, an IP address is reserved for multicast
addresses.
• The higher order bits of the first octet is always set to
1110, and the remaining bits determines the host ID in
any network.
Class E
• In Class E, an IP address is used for the future use or for
the research and development purposes. It does not
possess any subnetting.
• The higher order bits of the first octet is always set to
1111, and the remaining bits determines the host ID in
any network.
Port Addressing: Port and Sockets
Port Addressing
• Addressing in Transport Layer is the port Address
• A logical address facilitates the transmission of data from
source to destination device. But the source and the destination
both may be having multiple processes communicating with
each other.
• In other words, data needs to be delivered not only on the
correct device but also on the correct process on the correct
device.
• Data generated by an application on one machine must be
transmitted to the correct application on another machine. In
this case, addressing is provided by the transport layer.
Port and Socket
• Transport layer provides the user address which is
specified as a station or port.
• The port variable represents a particular TS user of a
specified station known as a Transport Service access
point (TSAP).
• The transport layer protocols need to know which
upper-layer protocols are communicating.
• The combination of IP address and Port Address is
called Socket Address
• A Port Address is the name or label given to a process. It is a 16 bit
address.
• Ex. TELNET uses port address 23, HTTP uses port address 80
Port numbers
Socket
• Two processes that are running on a computer or running on
two different systems can communicate via a socket.
• A socket works as an inter-process communicator and seen as
the endpoint of the process communication. For
communication, the socket uses a file descriptor and is mainly
employed in client-server applications.
• A socket consists of the IP address of a system and the port
number of a program within the system. The IP address
corresponds to the system and the port number corresponds
to the program where the data needs to be sent:
Socket
Port Vs Socket
Protocols Operating at Network Layer :
ARP, RARP , ICMP
ARP
• ARP stands for Address Resolution Protocol, which is used
to find the MAC address of the device from its known IP
address.
• This means, the source device already knows the IP address
but not the MAC address of the destination device.
• The MAC address of the device is required because you
cannot communicate with a device in a local area network
(Ethernet) without knowing its MAC address. So, the Address
Resolution Protocol helps to obtain the MAC address of the
destination device.
ARP
• Most computer programs/applications use logical addresses (IP
Addresses) to send/receive messages. However, the actual
communication happens over the Physical Address (MAC
Address) that is from layer 2 of the OSI model. ARP translate
IP addresses to Physical Addresses.
• In order to send the data to destination, having IP address is
necessary but not sufficient; we also need the physical address
of the destination machine. ARP is used to get the physical
address (MAC address) of destination machine.
Working of ARP
• Before sending the IP packet, the MAC address of destination
must be known.
• If not so, then sender broadcasts the ARP-discovery packet
requesting the MAC address of intended destination.
• Since ARP-discovery is broadcast, every host inside that network
will get this message but the packet will be discarded by
everyone except that intended receiver host whose IP is
associated.
• The destination host that finds the matching IP address sends an
ARP reply to the source Now, this receiver will send a unicast
packet with its MAC address (ARP-reply) to the sender of ARP-
discovery packet. After the original sender receives the ARP-
reply, it updates ARP-cache and start sending unicast message to
the destination.
Working of ARP
RARP: Reverse Address Resolution Protocol

• Reverse ARP is a networking protocol used by a client


machine in a local area network to request its Internet
Protocol address (IPv4) from the gateway-router’s ARP table
• The network administrator creates a table in gateway-router,
which is used to map the MAC address to corresponding IP
address. When a new machine is setup or any machine
which don’t have memory to store IP address, needs an IP
address for its own use.
• So the machine sends a RARP broadcast packet which
contains its own MAC address in both sender and receiver
hardware address field.
RARP: Reverse Address Resolution Protocol
RARP
• A special host configured inside the local area network, called
as RARP-server is responsible to reply for these kind of
broadcast packets.
• Now the RARP server attempt to find out the entry in IP to
MAC address mapping table.
• If any entry matches in table, RARP server send the response
packet to the requesting device along with IP address.
RARP
• During its inception, RARP was designed specifically for
devices such as diskless workstations that lacked the capability
to store their IP addresses.
• In this scenario, these devices would broadcast their MAC
addresses and request an IP address.
• A RARP server on the network would then respond with an IP
address corresponding to that MAC address.
• RARP is not being used in today’s networks. Because we have
much great featured protocols like BOOTP (Bootstrap
Protocol) and DHCP( Dynamic Host Configuration Protocol).
DNS
• DNS (Domain Name System) is a hierarchical
distributed naming system used to translate
human-readable domain names (e.g.,
www.example.com) into numerical IP
addresses (e.g., 192.0.2.1) required for
locating and identifying computer services and
devices on the internet or private networks
How DNS Works
• When a user enters a domain name into a web browser or other
application, the DNS resolver on the user's device initiates a DNS query
to resolve the domain name to an IP address.
• The DNS resolver first checks its local cache to see if the domain name
and corresponding IP address are already stored. If not, it proceeds with
the DNS resolution process.
DNS Server
• Root DNS Servers: Managed by the Internet Assigned
Numbers Authority (IANA), they provide information
about the authoritative name servers for TLDs.
• Top-Level Domain (TLD) DNS Servers: Manage domain
names within specific TLDs (e.g., .com, .org, .net).
• Authoritative DNS Servers: Managed by domain owners
or DNS hosting providers, they hold the authoritative
information for specific domain names.
• Recursive DNS Servers: Also known as DNS resolvers, they
recursively query other DNS servers until they obtain the
IP address associated with the requested domain name.
DNS resolution process
• If the domain name is not found in the local cache, the DNS
resolver sends a query to a recursive DNS server, typically operated
by the user's ISP or configured in the network settings.
• The recursive DNS server queries the root DNS servers to obtain the
IP addresses of the authoritative name servers for the relevant TLD.
• The recursive DNS server then queries the TLD DNS servers to
obtain the IP addresses of the authoritative name servers for the
requested domain.
• Finally, the recursive DNS server queries the authoritative name
servers for the domain to obtain the IP address associated with the
requested domain name.
• Once the IP address is obtained, it is returned to the DNS resolver,
which caches the result for future use and forwards it to the
requesting application.
DNS resolution process
Benefits of DNS
• Human-Readable Names: DNS provides a user-friendly naming
system that allows users to access websites and services using easily
memorable domain names instead of numerical IP addresses.
• Scalability: DNS is highly scalable, allowing for efficient resolution of
millions of domain names to IP addresses across the internet.
• Redundancy and Fault Tolerance: DNS employs redundancy and
fault tolerance mechanisms, such as multiple DNS servers and
caching, to ensure high availability and reliability of DNS services.
• Load Balancing: DNS can be used for load balancing by distributing
client requests among multiple servers based on factors such as
server availability, proximity, or load.
• Global Reach: DNS facilitates global communication by providing a
unified naming system that enables devices and services to be
accessed from anywhere on the internet.
OSI Reference Model
• OSI 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.
• OSI consists of seven layers, and each layer performs a
particular network function.
• OSI model was developed by the International
Organization for Standardization (ISO) in 1984
• OSI model divides the whole task into seven smaller and
manageable tasks.
• Each layer is assigned a particular task.
OSI Reference Model
• Define rules for:
– How network devices communicate
– Methods used to determine when to send data
– Methods to ensure that data is received correctly
– How the network is cabled
– How the network maintains the flow of data
– How bits of data are represented
OSI Reference Model
Characteristics of OSI Reference
Model
• Layered -Structured Layered Model
• Hierarchical Approach - Lower Layer serves upper Laye
• Abstraction- hide individual layer processes
• Standardization- clear Boundary and interfaces
• Interoperability- Diff h/w and s/w with common protocol
can communicate
• Encaspulation- Each layer hide internal details
• Independence- Each Layers are independent
• Ease of Troubleshooting
• Flexibility and Scalability
Layers of OSI Model
Relationship of OSI Layers
• Each layer of the OSI model must
communicate with the layer above and below it
– For example, the Presentation layer must
communicate with the Application layer (one above)
and the Session layer (one below)
• As data passes down through the OSI layers,
each layer (except Physical) adds some
information to the data
• When data reaches the receiving computer,
the information added by each layer of the OSI
model is read and processed by the
corresponding layer on the receiving computer
• This is referred to as peer-layer
Relationships among OSI layers
Computer A Computer B
Application Application

Presentation Presentation

Session Virtual Session


Communication

Transport Transport

Network Network

Data Link Data Link

Physical Physical
Data Communication between two hosts
Data Data
Physical Layer
Function of Physical Layer
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.
• Examples: Ethernet cables, optical fibers, wireless
transmission.
Data Link Layer

• This layer is responsible for the error-free transfer of data


frames.
• It provides a reliable and efficient communication
• It is mainly responsible for the unique identification of each
device
Data Link Layer {Contd..}
• Consists of two sub layers
Function of Data Link Layer
• 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.
• 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.
• Flow Control:
– It ensures that the transmitting station such as a server with
higher processing speed does not exceed the receiving station,
with lower processing speed.
Function of Data Link Layer
• Error Control:
– Error control is achieved by adding different protocols
in Data link layer
– If any error seems to occurr, then the receiver sends
the acknowledgment for the retransmission of the
corrupted frames.
• 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.
• Examples: Ethernet switches, Wi-Fi access
points, MAC addresses.
Network Layer

• Manages device addressing, tracks the location of devices on


the network.
• Determines the best path to move data from source to the
destination
• Routing and forwarding the packets- Routers
• Examples of protocols are IP and Ipv6.
Function of Network Layer
• Internetworking: provides a logical connection between
different devices.
• Addressing: A Network layer adds the source and
destination address to the header of the frame.
– Addressing is used to identify the device on the internet.
• Routing: Routing is the major component of the network
layer, and it determines the best optimal path out of the
multiple paths from source to the destination.
• Packetizing: A Network Layer receives the packets from
the upper layer and converts them into packets. This
process is known as Packetizing.
• Examples: Routers, IP addresses, routing protocols (e.g.,
OSPF, BGP).
Transport Layer

• The main responsibility of the transport layer is to


transfer the data completely.
• Ensures that messages are transmitted in the order in
which they are sent and there is no duplication of data.
• It receives the data from the upper layer and converts
them into smaller units known as segments.
• 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.
Functions of Transport Layer:
• Service-point addressing:
– Computers run several programs simultaneously due to this
reason, the transmission of data from source to the destination
not only from one computer to another computer but also from
one process to another process.
– The transport layer adds the header that contains the address
known as a service-point address or port address.
– The responsibility of the network layer is to transmit the data
from one computer to another computer and the responsibility of
the transport layer is to transmit the message to the correct
process.
• Segmentation and reassembly:
– divides the message into multiple segments, and each segment
is assigned with a sequence number that uniquely identifies
each segment.
– When the message has arrived at the destination, then the
transport layer reassembles the message based on their
sequence numbers.
Functions of Transport Layer:
• Connection control:
– Transport layer provides two services Connection-oriented
service and connectionless service.
– A connectionless service treats each segment as an individual
packet, and they all travel in different routes to reach the
destination.
– A connection-oriented service makes a connection with the
transport layer at the destination machine before delivering the
packets. In connection-oriented service, all the packets travel in
the single route.
• Flow control: The transport layer also responsible for
flow control but it is performed end-to-end rather than
across a single link.
• Error control: The transport layer is also responsible for
Error control. Error control is performed end-to-end
rather than across the single link.
Session Layer

• The Session layer is used to establish, maintain


and synchronizes the interaction between
communicating devices.
Function of Session Layer
• Session Establishment: Establish, maintains and
terminates session- Connection between communicating
devices
• 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.
• Authentication: The process of identification is known
as authentication.
• Authorization: It grants privileges after authentication of
the user.
Presentation Layer

• Presentation layer is mainly concerned with the syntax


and semantics of the information exchanged between
the two systems.
• It acts as a data translator for a network. It translates
data from one form to another.
• converts the data from one presentation format to
another format.
Function of Presentation Layer
• Translation: 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.
• 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.
• 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.
Application Layer

• An application layer serves as a window for users and


application processes to access network service.
• It handles issues such as network transparency,
resource allocation, etc.
• This layer provides the network services to the end-
users.
Function of Application Layer
• File transfer, access, and management (FTAM): An
application layer allows a user to access the files in a
remote computer, to retrieve the files from a computer
and to manage the files in a remote computer.
• Mail services: An application layer provides the facility
for email forwarding and storage.
• Remote Host Access
• specifies the availability of resources, i.e., it checks
whether adequate network resources are available or
not.
Application Layer Protocols
• SMPT- Simple Mail Transfer Protocol
• HTTP- Hyper Text Transfer Protocol
• FTP- File transfer Protocol
TCP/IP
• Transmission Control Protocol/Internet Protocol
• Designed and developed by the Department of
Defense (DoD) in the 1960s
• The number of layers is sometimes referred to as
five or four.
• Layers of TCP/IP Model
1. Application Layer
2. Transport Layer(TCP/UDP)
3. Network/Internet Layer(IP)
4. Data Link Layer
5. Physical Layer
TCP/IP
TCP/IP Layers
Network Access Layer
• lowest layer of the TCP/IP model.
• combination of the Physical layer and Data Link layer
• The Major functions carried out by this layer are
– transmission of the data
– defines how the data should be sent physically through the
network
– encapsulating the IP datagram into frames transmitted by
the network
– mapping of IP addresses into physical addresses.
• The protocols used by this layer are ethernet, token
ring, FDDI, X.25, frame relay.
Internet Layer
• An internet layer is the second layer of the
TCP/IP model.

• also known as the network layer.

• The main responsibility of the internet


layer is to send the packets from source
to the destination irrespective of the route
they take.
IP Protocol
• Most significant protocol of Internet layer
• Major Responsibilities
– IP Addressing- Logical Addressing
– Host to host communication – Find Best Path
– Data Encapsulation- via IP datagram
– Fragmentation and Reassembly
• If Datagram > MTU it Fragments the data
- Routing
Transport Layer
• The transport layer is responsible for the
reliability, flow control, and error control of
data which is being sent over the network.
• The two protocols used in the transport
layer are User Datagram protocol and
Transmission control protocol.
Application Layer
• Topmost Layer of TCP/IP
• Handles function of
– Session
– Presentation and
– Application Layer
• Major Protocols
• HTTP, SNMP, SMTP, DNS, Telnet, FTP
END of UNIT 7

Thank You.

You might also like